Skip to content

Latest commit

 

History

History
92 lines (68 loc) · 3.7 KB

File metadata and controls

92 lines (68 loc) · 3.7 KB

DyNECT logo

License

DyNECT stands for Dynamic Nash Equilibrium Control Toolbox - a Julia package for modeling and solving constrained dynamic Nash equilibrium control problems

A linear quadratic (LQ) game is a multi-agent control problem, where each decision maker influences the evolution of the shared linear dynamical system

$$x^{k+1} = A x^k + \sum_{i=1}^N \left(B_i u^k_i\right) + c,$$

and optimizes a quadratic performance metric

$$J_i(u_i, u_{-i}) = \frac{1}{2} (x^T)^\top P_i x^T + \sum_{k=0}^{T-1} \left(\frac{1}{2}(x^k)^\top Q_i x^k + \frac{1}{2}(u_{j}^k)^\top R_{i} u_{i}^k \right),$$

where $P_i, Q_i,, R_{i}$ are the weights of the optimization problem for agent $i$, and $u_{-i}$ is the collection of inputs that belong to agents other than $i$, namely, $u_{-i}=(u_j)_{j\neq i}$.
DyNECT helps you find the open-loop Nash equilibrium of the game, that is, the input sequences $(u_1^*,..., u_N^*)$ such that

$$J_i(u^*_i, u^*_{-i}) \in \arg\min_{u_i} J_i(u_i, u^*_{-i}).$$

DyNECT supports state constraints, local input constraints and shared input constraints of the kind

$$\begin{aligned} &C^{\text x} x^k \leq b^{\text x}\\\ &C^{\text{loc}}_i u_i^k \leq b^{\text{loc}}_i \quad \forall i\\\ &\sum_i C^{\text u} u_i^k \leq b^{\text u}. \end{aligned}$$

Many functionalities of DyNECT are based on reformulating the dynamic game into the affine variational inequality (AVI)

$$\text{find}~ u^*~ \text{such that} ~~~\mathcal F(u^*)^\top (u-u^*) \geq 0, \qquad \forall ~ u\in \mathcal C,$$

where $\mathcal F$ is a linear mapping parametric in the initial state of the system $x^0$ of the kind

$$\mathcal F: ~u \to Hu + Fx^0 + f$$

and $\mathcal C$ is a polyhedron of the kind

$$\mathcal{C} = \{Au \leq Bx^0 + b\}.$$

You can find more details on the problem formulation, and on the LQ game-to-VI conversion, as well as a performance comparison between some implemented solution algorithms, on our paper

The explicit game-theoretic linear quadratic regulator for constrained multi-agent systems E. Benenati, G. Belgioioso, 2025

Features

  • Collection of state-of-the-art iterative and explicit solvers for open-loop dynamic games
  • Utility tools for streamlined implementation of game-theoretic MPC
  • Automatic reformulation of LQ games as (multi-parametric) Variational Inequalities (VIs)
  • Solution of coupled Riccati equations arising in unconstrained infinite-horizon games
  • Integration with Monviso for access to multiple VI solution algorithms
  • Integration with pDAQP for offline precomputation of state-to-solution map, enabling fast online control
  • Unified solver access through the CommonSolve.jl interface

Installation

DyNECT depends on 'ParametricDAQP.jl' and 'Monviso.jl', which are not in the general registry. From the Julia REPL:

] add https://github.com/nicomignoni/Monviso.jl.git#vi-based
] add https://github.com/darnstrom/ParametricDAQP.jl
] add https://github.com/bemilio/DyNECT.git

Examples

Example scripts are in examples/ and use their own Julia environment. Run them with:

julia --project=examples/ examples/LQ_dyn_game.jl

To install example dependencies once:

julia --project=examples/ -e 'using Pkg; Pkg.instantiate()'

Additional examples can be found at this link.