# Relation algebra - matrix construction

#### hanke83

##### New Member
Hi,
In a DEA-software I have, I must construct logical weights. These weights are constructed as a matrix solution of relationships between the variables. In the DEA analysis, the weights are used as restrictions in the linear programming.

Lets say I have 5 variables (X1,X2,Z1,Z2,Z3), and want to put up a restriction that says that X1 must always be in the ratio between twice to equal that of X2 (1 <= X1/x2 <=2 ).
Furhtermore, No variable can be 0, so there must be a zero-weight restriction on
all of the variables.

I have tried to write this in matrix form, where each restriction is a row vector
and each variable has its own column. The formulation with two restrictions:

Weight-name x1 x2 z1 z2 z3
'a' -2 1 0 0 0
'b' 1 -1 0 0 0

tries to assure that neither x1 and x2 can be negative if any of them are positive.
If both are positive, the weight is in the ratio of (1 <= X1/x2 <=2 ).
The problem is that both of them could be non-positive. How do I account for that?
(putting it in the language of the matrix above).

Is there anyone with any knowledge of this?

Any help much appreciated,

Best regards,
Hank