Hello Pao devs! First of all thank you for your awesome work!
I wanted to ask a question about how to correctly build the following bilevel optimization program. More specifically, I am struggling with the first constraint, as it features variables from both the model and the submodel.
Hello Pao devs! First of all thank you for your awesome work!
I wanted to ask a question about how to correctly build the following bilevel optimization program. More specifically, I am struggling with the first constraint, as it features variables from both the model and the submodel.
$$\begin{align} %r0 & \underset{z{j}}{\text{maximize}}~\underset{y{ij}}{\text{minimize}} ~~ \sum{i \in \mathcal{I}} \sum{j \in \mathcal{J}} c{ij}y{ij}\ &\
s.t. \quad & \sum{i \in \mathcal{I}} y{ij} \leq zj
~~~~~~~~~~~~~~\forall j \in \mathcal{J}\ & \sum{j \in \mathcal{J}} y{ij} \leq 1~~~~~~~~~~~~ \forall i \in \mathcal{I}\ %r5 & \sum{i \in \mathcal{I}} \sum{j \in \mathcal{J}} y{cp} = min(|I|,|J|)\ & y{ij} \in \{0,1\}~~~~~~~~~~~~ \forall (i,j) \in \mathcal{I} \times \mathcal{J}\ & z{j} \in \{0,1\}~~~~~~~~~~~~~ \forall (i,j) \in \mathcal{J}\ \end{align}$$If I initialize the constraint within the submodel e.g
then I can not access the variable in the model $z$ and I get the error above, and if I initialize the constraint from the model e.g
the program executes with no apparent errors, however the solutions provided violate the 1st constraint.
Hope you can help! Leaving a reproducible example below where the first constraint is initialized from the model (case 2).