This is a Python framework to reformulate a class of linear bilevel programs (LBP) to (one-level) nonlinear programs, and solve the latter using a nonlinear solver such as baron.
To run the project, the AMPL executable's path should be in the system PATH. We use python
To run the project with test instances:
python3 blevp2nlp.py -t
To run the project with an AMPL-formatted ".dat" file:
python3 blevp2nlp.py -d [path to '.dat' file]
For instance:
python3 blevp2nlp.py -d tests/test_pb_4.dat
Solver statuses according to the AMPL book:
Message | Interpretation |
---|---|
solved | optimal solution found |
solved? | optimal solution indicated, but error likely |
infeasible | constraints cannot be satisfied |
unbounded | objective can be improved without limit |
limit | stopped by a limit that you set (such as on iterations) |
failure | stopped by an error condition in the solver |