|
EPEC solve
Solving Equilibrium Problems with Equilibrium Constraints (EPECs)
|
class to handle parameterized mathematical programs(MP) More...
#include <games.h>
Public Member Functions | |
| MP_Param ()=default | |
| MP_Param (const MP_Param &M)=default | |
| void | bound (double bigM, unsigned int primals) |
| arma::sp_mat | getQ () const |
| Read-only access to the private variable Q. More... | |
| arma::sp_mat | getC () const |
| Read-only access to the private variable C. More... | |
| arma::sp_mat | getA () const |
| Read-only access to the private variable A. More... | |
| arma::sp_mat | getB () const |
| Read-only access to the private variable B. More... | |
| arma::vec | getc () const |
| Read-only access to the private variable c. More... | |
| arma::vec | getb () const |
| Read-only access to the private variable b. More... | |
| unsigned int | getNx () const |
| Read-only access to the private variable Nx. More... | |
| unsigned int | getNy () const |
| Read-only access to the private variable Ny. More... | |
| MP_Param & | setQ (const arma::sp_mat &Q) |
| Set the private variable Q. More... | |
| MP_Param & | setC (const arma::sp_mat &C) |
| Set the private variable C. More... | |
| MP_Param & | setA (const arma::sp_mat &A) |
| Set the private variable A. More... | |
| MP_Param & | setB (const arma::sp_mat &B) |
| Set the private variable B. More... | |
| MP_Param & | setc (const arma::vec &c) |
| Set the private variable c. More... | |
| MP_Param & | setb (const arma::vec &b) |
| Set the private variable b. More... | |
| virtual MP_Param & | set (const arma::sp_mat &Q, const arma::sp_mat &C, const arma::sp_mat &A, const arma::sp_mat &B, const arma::vec &c, const arma::vec &b) |
| Setting the data, while keeping the input objects intact. More... | |
| virtual MP_Param & | set (arma::sp_mat &&Q, arma::sp_mat &&C, arma::sp_mat &&A, arma::sp_mat &&B, arma::vec &&c, arma::vec &&b) |
| Faster means to set data. But the input objects might be corrupted now. More... | |
| virtual MP_Param & | set (const QP_objective &obj, const QP_constraints &cons) |
| virtual MP_Param & | set (QP_objective &&obj, QP_constraints &&cons) |
| virtual MP_Param & | addDummy (unsigned int pars, unsigned int vars=0, int position=-1) |
| void | write (std::string filename, bool append=true) const |
Static Public Member Functions | |
| static bool | dataCheck (const QP_objective &obj, const QP_constraints &cons, bool checkObj=true, bool checkCons=true) |
Protected Member Functions | |
| unsigned int | size () |
Calculates Nx, Ny and Ncons Computes parameters in MP_Param: More... | |
| bool | dataCheck (bool forcesymm=true) const |
| Check that the data for the MP_Param class is valid Always works after calls to MP_Param::size() Checks that are done: More... | |
| virtual bool | finalize () |
| Finalize the MP_Param object. More... | |
Protected Attributes | |
| arma::sp_mat | Q |
| arma::sp_mat | A |
| arma::sp_mat | B |
| arma::sp_mat | C |
| arma::vec | c |
| arma::vec | b |
| unsigned int | Nx |
| unsigned int | Ny |
| unsigned int | Ncons |
|
default |
|
default |
|
virtual |
Adds dummy variables to a parameterized mathematical program position dictates the position at which the parameters can be added. -1 for adding at the end.
position cannot be set for vars. vars always added at the end. Reimplemented in Game::QP_Param.
| void Game::MP_Param::bound | ( | double | bigM, |
| unsigned int | primals | ||
| ) |
|
protected |
Check that the data for the MP_Param class is valid Always works after calls to MP_Param::size() Checks that are done:
Q is same as Ny (Q should be square)A should be Nx B should be Ny C should be Ny c should be Ny A and B should have the same number of rows, equal to Ncons forcesymm is true, then Q should be symmetric
|
static |
|
inlineprotectedvirtual |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
virtual |
Setting the data, while keeping the input objects intact.
Reimplemented in Game::QP_Param.
|
virtual |
Faster means to set data. But the input objects might be corrupted now.
Reimplemented in Game::QP_Param.
|
virtual |
Reimplemented in Game::QP_Param.
|
virtual |
Reimplemented in Game::QP_Param.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
protected |
Calculates Nx, Ny and Ncons Computes parameters in MP_Param:
Ny as number of rows in MP_Param::QNx as number of columns in MP_Param::CNcons as number of rows in MP_Param::b, i.e., the RHS of the constraints For proper working, MP_Param::dataCheck() has to be run after this. @returns @p Ny, Number of variables in the quadratic program, QP
| void Game::MP_Param::write | ( | std::string | filename, |
| bool | append = true |
||
| ) | const |
Writes a given parameterized Mathematical program to a set of files.
Writes a given parameterized Mathematical program to a set of files. One file is written for each attribute namely
To contrast see, Game::MP_Param::save where all details are written to a single loadable file
1.8.13