Bilevel JuMP

Please read the first post of Please read: make it easier to help you - #81 to learn how to format your code correctly.

There are multiple issues.

First, you seem to want a quadratic objective with PGm1^2, but you are using Cbc with is a linear solver.

Second, PGm1 is a 1x1 matrix, so you need to index it as PGm1[1, 1]. Do you just want it to be a scalar? Same goes for PGm2.

Third, it looks like you want PGD_EX to be a vector?Use @variable(Upper(model), PGD_EX[1:3]).

I suggest you read the JuMP documentation and try solving some simpler models before moving to bilevel problems: Variables · JuMP

1 Like