Originally posted by: ChWeil
Hi guys,
I have a model in which one part of the objective function is formulated as follows:
(sum j in jobs, v in variations) q(i,v) * (C(j)-dd(j))
with
float dd(j)
float q(i,v)
dvar float+ C(j)
dvar boolean z1(j,v), z2(j,v), z(j,v)
My problem is that the value of parameter q(i,v) depends on the deviation of C(j) and dd(j)
Therefore, I tried to model a constraint like that:
forall (v in V, j in J) (l(v)*dd(j) <=C(j)) => z1(j,v)==1, where l(v) state a lower bound
forall (v in V, j in J) (C(j) <= u(v)*dd(j)) => z2(j,v) ==1, where u(v) state an upper bound
forall (v in V, j in J) z(j,v) + 1 == z1(j,v)+z2(j,v)
Unfortunately the model only gives z1(j,v) and z2(j,v) ==1 for all values of C(j) which is not true.
Another idea was to model a decision variable like dvar boolean x(j,v) -> 1, if l(j,v)*dd(j) <= C(j) <= u(j,v)*dd(j), 0 else but I got an error that C(j) is not allowed.
Can someone help me with that and know what I am doing wrong?
Thank you
Best
CW
#DecisionOptimization#OPLusingCPLEXOptimizer