Hi Alex,
Thanks for your help! We really appreciate your sharing in LinkedIn and GitHub. These posts do help a lot!!
The new problem is: Dual infeasible due to empty column 'q({2})({1})'.
I am working on a bi-level programming problem with the KKT condition actually. I guess the reason for error is because there are different number of paths available for different orders.
For instance, there are two orders and three paths. Order A could select one path from three alternatives (p1, p2 and p3), while Order B could select p2 or p3 only.
So decision variables are q[1][1], q[1][2], q[1][3], q[2][2] and q[2][3]. Then CPLEX can't get a feasible dual formulation.
Do you have any idea to express q[k][p] more tight?
------------------------------
Ying Qi
------------------------------
Original Message:
Sent: Tue July 27, 2021 03:56 AM
From: ALEX FLEISCHER
Subject: index is a sub tuple
Hi,
in
you could have a look at array variable indexer size - 3 ways : union , tuple set, decision expression
and for your second question
{int} S={1,2,3}; tuple path { int i; {int} Sequence; } {path} paths={<1,{1}>,<3,{3}>}; int a[s in S][p in paths]=(s in p.Sequence); execute { writeln(a); }
gives
[[1 0] [0 0] [0 1]]
------------------------------
[Alex] [Fleischer]
[EMEA CPLEX Optimization Technical Sales]
[IBM]
------------------------------