EPEC solve
Solving Equilibrium Problems with Equilibrium Constraints (EPECs)
Data Structures | Typedefs | Enumerations | Functions
Game Namespace Reference

Data Structures

class  EPEC
 Class to handle a Nash game between leaders of Stackelberg games. More...
 
struct  EPECAlgorithmParams
 Stores the configuration for EPEC algorithms. More...
 
struct  EPECStatistics
 Stores statistics for a (solved) EPEC instance. More...
 
class  LCP
 Class to handle and solve linear complementarity problems. More...
 
class  MP_Param
 class to handle parameterized mathematical programs(MP) More...
 
class  NashGame
 Class to model Nash-cournot games with each player playing a QP. More...
 
struct  QP_constraints
 struct to handle the constraint params of MP_Param/QP_Param More...
 
struct  QP_objective
 struct to handle the objective params of MP_Param/QP_Param More...
 
class  QP_Param
 Class to handle parameterized quadratic programs(QP) More...
 

Typedefs

typedef struct Game::QP_objective QP_objective
 struct to handle the objective params of MP_Param/QP_Param More...
 
typedef struct Game::QP_constraints QP_constraints
 struct to handle the constraint params of MP_Param/QP_Param More...
 

Enumerations

enum  EPECAddPolyMethod { EPECAddPolyMethod::sequential, EPECAddPolyMethod::reverse_sequential, EPECAddPolyMethod::random }
 
enum  EPECsolveStatus {
  EPECsolveStatus::nashEqNotFound, EPECsolveStatus::nashEqFound, EPECsolveStatus::timeLimit, EPECsolveStatus::numerical,
  EPECsolveStatus::unInitialized
}
 
enum  EPECalgorithm { EPECalgorithm::fullEnumeration, EPECalgorithm::innerApproximation, EPECalgorithm::combinatorialPNE }
 
enum  EPECRecoverStrategy { EPECRecoverStrategy::incrementalEnumeration, EPECRecoverStrategy::combinatorial }
 

Functions

bool isZero (arma::mat M, double tol=1e-6) noexcept
 
bool isZero (arma::sp_mat M, double tol=1e-6) noexcept
 
std::ostream & operator<< (std::ostream &os, const QP_Param &Q)
 
std::ostream & operator<< (std::ostream &ost, const perps &C)
 
void print (const perps &C) noexcept
 
arma::vec LPSolve (const arma::sp_mat &A, const arma::vec &b, const arma::vec &c, int &status, bool Positivity=false)
 
unsigned int ConvexHull (const std::vector< arma::sp_mat *> *Ai, const std::vector< arma::vec *> *bi, arma::sp_mat &A, arma::vec &b, const arma::sp_mat Acom={}, const arma::vec bcom={})
 
void compConvSize (arma::sp_mat &A, const unsigned int nFinCons, const unsigned int nFinVar, const std::vector< arma::sp_mat *> *Ai, const std::vector< arma::vec *> *bi, const arma::sp_mat &Acom, const arma::vec &bcom)
 

Typedef Documentation

◆ QP_constraints

struct to handle the constraint params of MP_Param/QP_Param

Refer QP_Param class for what A, B and b mean.

◆ QP_objective

struct to handle the objective params of MP_Param/QP_Param

Refer QP_Param class for what Q, C and c mean.

Enumeration Type Documentation

◆ EPECAddPolyMethod

Enumerator
sequential 

Adds polyhedra by selecting them in order.

reverse_sequential 

Adds polyhedra by selecting them in reverse sequential order

random 

Adds the next polyhedra by selecting random feasible one.

Definition at line 34 of file epecsolve.h.

◆ EPECalgorithm

enum Game::EPECalgorithm
strong
Enumerator
fullEnumeration 

Completely enumerate the set of polyhedra for all followers

innerApproximation 

iterations

Perfrorm increasingly better inner approximations in

combinatorialPNE 

Perform a combinatorial-based search strategy to find a pure NE

Definition at line 408 of file games.h.

◆ EPECRecoverStrategy

Enumerator
incrementalEnumeration 

Add random polyhedra in each iteration.

combinatorial 

Triggers the combinatorialPNE with additional information from innerApproximation

Definition at line 418 of file games.h.

◆ EPECsolveStatus

enum Game::EPECsolveStatus
strong
Enumerator
nashEqNotFound 

Instance proved to be infeasible.

Set of status in which the solution status of a Game::EPEC can be.

nashEqFound 

Solution found for the instance.

timeLimit 

Time limit reached, nash equilibrium not found.

numerical 

Numerical issues.

unInitialized 

Not started to solve the problem.

Definition at line 397 of file games.h.

Function Documentation

◆ compConvSize()

void Game::compConvSize ( arma::sp_mat &  A,
const unsigned int  nFinCons,
const unsigned int  nFinVar,
const std::vector< arma::sp_mat *> *  Ai,
const std::vector< arma::vec *> *  bi,
const arma::sp_mat &  Acom,
const arma::vec &  bcom 
)

◆ ConvexHull()

unsigned int Game::ConvexHull ( const std::vector< arma::sp_mat *> *  Ai,
const std::vector< arma::vec *> *  bi,
arma::sp_mat &  A,
arma::vec &  b,
const arma::sp_mat  Acom = {},
const arma::vec  bcom = {} 
)

◆ isZero() [1/2]

bool Game::isZero ( arma::mat  M,
double  tol = 1e-6 
)
noexcept

Checking if a given matrix M is a zero matrix

Parameters
tolTolerance, below which a number is treated as 0
Warning
tol < 0 always returns false with no error.

Definition at line 14 of file Games.cpp.

◆ isZero() [2/2]

bool Game::isZero ( arma::sp_mat  M,
double  tol = 1e-6 
)
noexcept

Checking if a given sparse matrix M is a zero matrix

Parameters
tolTolerance, below which a number is treated as 0

Definition at line 26 of file Games.cpp.

◆ LPSolve()

arma::vec Game::LPSolve ( const arma::sp_mat &  A,
const arma::vec &  b,
const arma::vec &  c,
int &  status,
bool  Positivity = false 
)

Checks if the polyhedron given by $ Ax\leq b$ is feasible. If yes, returns the point $x$ in the polyhedron that minimizes $c^Tx$ Positivity can be enforced on the variables easily.

Parameters
AThe constraint matrix
bRHS of the constraint matrix
cIf feasible, returns a vector that minimizes along this direction
statusStatus of the optimization problem. If optimal, this will be GRB_OPTIMAL
PositivityShould $x\geq0$ be enforced?

Definition at line 721 of file LCPtoLP.cpp.

◆ operator<<() [1/2]

std::ostream& Game::operator<< ( std::ostream &  os,
const QP_Param Q 
)

◆ operator<<() [2/2]

std::ostream& Game::operator<< ( std::ostream &  ost,
const perps C 
)

◆ print()

void Game::print ( const perps C)
noexcept

Definition at line 39 of file Games.cpp.