Originally posted by: SystemAdmin
[agus said:]
Hi,
I am trying to do a sensitivity analyisis with my model, I am able to do it with a small problem, but I can't implement it on a larger model.
Here is the model where it works:
dvar float x in 5..20;
dvar float y in 0..20;
maximize x+y;
subject to
{
ct1:2*x+y<=10;<br /> ct2:x<=7;<br /> }
execute
{
writeln( ct1.name," ",ct1.UB," ",ct1.LB," ",ct1.dual," ",ct1.slack);
writeln( ct2.name," ",ct2.UB," ",ct2.LB," ",ct2.dual," ",ct2.slack);
writeln(x.reducedCost);
writeln(y.reducedCost);
}
but when I tried with this:
dvar float+ t[Flights][nodes];
A:
forall (i, j in Flights: i.flightID!=j.flightID, u in (i.realNodes inter j.realNodes): u!= last(i.realNodes))
(t[j][u] - t[i][u] >= (t[i][next(i.realNodes,u)]-t[i][u])/luv[u][next(i.realNodes,u)]*200 - (1-y[i][j][u])*1000000);
execute
{
// Getting the slack for constraint A
writeln( A.name," ",A.UB," ",A.LB," ",A.dual," ",A.slack);
//Getting the reduced cost for variable t
for (p in Flights, nodes)
writeln(p.reducedCost);
}
I got this from the Scripting log window:
// solution (optimal) with objective 4426.46699999603
A undefined undefined undefined undefined
undefined
undefined
undefined
undefined
undefined
undefined
I am guessing it is because of the sparsity.
Can anyone help me with this
Thanks
agus
#DecisionOptimization#OPLusingCPLEXOptimizer