Author: Edward Zhu (edward.zhu@berkeley.edu)
This repository contains a Python implementation of the Dynamic Game SQP algorithm.
- Zhu, Edward L., and Francesco Borrelli. "A sequential quadratic programming approach to the solution of open-loop generalized nash equilibria." 2023 IEEE International Conference on Robotics and Automation (ICRA). IEEE, 2023. arXiv
- Zhu, Edward L., and Francesco Borrelli. "A Sequential Quadratic Programming Approach to the Solution of Open-Loop Generalized Nash Equilibria for Autonomous Racing." arXiv preprint arXiv:2404.00186 (2024). (Under review). arXiv, data
Dependencies:
numpyscipycasadiosqpmatplotlib
The following command will install the Python package DGSQP:
python3 -m pip install -e .
CPLEX is a QP, LP, and mixed integer solver developed and maintained by IBM and is provided as a part of IBM ILOG CPLEX Optimization Studio. Academic users are allowed free access to the solver after registering for an account. To use CPLEX with CasADi Python:
- Download ILOG CPLEX Optimization Studio according to https://ronennir.medium.com/installing-cplex-optimization-studio-on-ubuntu-20-04-53e234ca4ec2.
- Install CPLEX using
sudo(this will default to/opt/ibm/ILOGon Ubuntu). - Copy the compiled CPLEX library (found at
/opt/ibm/ILOG/CPLEX_Studio<CPLEX_VERSION>/cplex/bin/x86-64_linux/libcplex<CPLEX_VERSION>.so), to the CasADi Python package installation directory:- Local installation:
~/.local/lib/python3.8/site-packages/casadi - Global installation:
/usr/local/lib/python3.8/site-packages/casadi
- Local installation:
- Before creating the solver (e.g. using
ca.conic), set the system environment variableCPLEX_VERSIONto match the version of the solver that you have installed (e.g. usingos.environ['CPLEX_VERSION']='2210'for v22.1.0). - Set the parameter
DGSQPV2Params.qp_solver = 'cplex'
To run the comparisons using the PATH solver, install the prerequisites using the following steps
- Install Julia:
wget https://julialang-s3.julialang.org/bin/linux/x64/1.10/julia-1.10.1-linux-x86_64.tar.gztar zxvf julia-1.10.1-linux-x86_64.tar.gzexport PATH="$PATH:/path/to/<Julia directory>/bin"
- Install Julia packages:
- In the Julia REPL package manager:
add PyCalladd PATHSolver@1.1.1- (note, only version 1.1.1 works when called from pyjulia)
- Install pyjulia:
python3 -m pip install julia
Scripts for running the experiments presented in the paper can be found in the scripts directory.