Dear Prof. Löfberg,
I tried to solve a bilevel problem as follows:
Maxmin f(x,u)
s.t. g(x,u)<=0
h(x,u) = 0
f, g, and h are all linear. The decision variables of the inner problem are x and that of the outer problem are u.
I used the kkt function to obtain the kkt conditions of the inner problem, i.e. [K,details] = kkt( [g(x,u) <= 0, h(x,u) == 0], f(x,u), x ). The results shown is as follows:
Removed 864 duplicated or redundant inequalities
Starting derivation of dual bounds (can be turned off using option kkt.dualbounds)
*Computing 2617 primal bounds (required for dual bounds)
*Computing 4231 dual bounds
*Success: All dual upper bounds are finite
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
| ID| Constraint| Tag|
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
| #1| Complementarity constraint| Compl. slackness and primal-dual inequalities|
| #2| Equality constraint 2215x1| Primal feasible|
| #3| Element-wise inequality 4231x1| Upper bound on duals|
| #4| Equality constraint 2617x1| Stationarity|
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
details =
info: 'min c'x s.t. Ax<b, Ex=f'
c: [2617x1 double]
Q: [2617x2617 double]
A: [4231x2617 double]
b: [4231x1 double]
E: [2215x2617 double]
f: [2215x1 double]
dual: [4231x1 sdpvar]
dualeq: [2215x1 sdpvar]
primal: [2617x1 sdpvar]
inequalities: [1x1 constraint]
equalities: [1x1 constraint]
dualbounds: [4231x1 double]
However, the values of the dualbounds are all 0 and I donnot know why. Then I calculated this bilevel problem by solvesdp( [ g(x,u) <= 0, h(x,u) == 0, K], -f(x,u) ), the results of which is feasible.
I greatly appreciate your help!
Best,
Shuai