Here is the objective I would like to maximize in R:
AX1+BX2+CX3+DX4
The following constraints exists
0 >= S2 >= 8
0 >= S3 >= 8
0 >= S4 >= 8
0 >= S5 >= 8
Where
S2 = X1 + V
S3 = X2 + X1 + V
S4 = X3 + X2 + X1 + V
S5 = X4 + X3 + X2 + X1 + V
Basically, the constraints reference the objective.
As an example, if V = 4, X1 = 2, then S2 = 6. (therefore the constraint, 0 >= S2 >= is not violated.
How do I reference the objective (I used L_Objective function) in the constraint function?
Thanks in Advance
Does the following not work?
Of course, filling in the correct values for A, B, C, D, and V, which I assume you have. If the last constraint is satisfied, the others will be automatically, so it's the only one that matters.