In the equilibrium problems we have discussed so far, each variable and each constraint was owned by a single agent. In this section we relax the assumption that each constraint has to be controlled by a single agent and introduce shared constraints. Shared constraints are constraints that appear in the problems of several agents. They are mainly used to model resources shared among agents. Note that the examples in this section are from Kim & Ferris (2017) [108].
Consider the following example:
The constraints
variables obj(i), x(i);
equations deff(i), defg(i), defh;
model sharedc / deff, defg, defh /;
Observe that the equation defh
implementing the shared constraint
file empinfo / '%emp.info%' /;
put empinfo 'equilibrium' /;
loop(i,
put 'min', obj(i), x(i), deff(i), defg(i), defh; /;
);
putclose empinfo;
Here the equation defh
appears in the minimization problem of each agent. As the equation defh
is not indexed by agent and appears in the problem of each agent, it is easy to see that it is a shared constraint. Given these annotations, the EMP framework aggregates the FOC for each agent to create the following MCP:
Note that the equation
- Attention
- By default, the solver JAMS does not allow shared constraints. The option
SharedEqu
needs to be specified in the option filejams.opt
if shared constraints are intended, otherwise an error is reported when they are detected. This cautious default helps minimize the number of surprising results.
A full model including the JAMS option file is given below.
The second way to write the EMP annotations uses the EMP keyword VIsol
to specify that a variational equilibrium be computed, i.e. a solution where the multipliers VIsol
keyword should appear after the EMP keyword equilibrium
and before the descriptions of agent models.
put / 'VIsol defh';
The multipliers to make equal (or, equivalently, the constraints not to replicate) are indicated by the equation name(s) following the keyword VIsol
. These constraints appear once in the resulting MCP, not once per agent. The EMP tool creates the following MCP:
If there are no constraints
An example for shared constraints is the pollution of a river basin in Haurie & Krawczyk (1997) [95] and Krawczyk & Uryasev (2000) [110], where the total amount of pollutants that may be dumped in a river is restricted. This implies that the environmental constraints of some pollutant-producing agents are shared. This example can be formulated as follows, where
Here three agents produce some commodities and aim to maximize their profit. The term
Sets i / 1*3 /
m / 1*2 / ;
alias(i,j) ;
Variable obj(i) ;
Positive Variable x(i) ;
Parameters K(m) / 1 100, 2 100 /
d1 / 3 /
d2 / 0.01 /
e(i) / 1 0.5, 2 0.25, 3 0.75 / ;
Table c(m,i)
1 2 3
1 0.1 0.12 0.15
2 0.01 0.05 0.01 ;
Table u(i,m)
1 2
1 6.5 4.583
2 5.0 6.250
3 5.5 3.750 ;
Equations objdef(i)
cons(m) ;
objdef(i).. obj(i) =e= (c('1',i) + c('2',i)*x(i))*x(i) - (d1 - d2*sum(j, x(j)))*x(i);
cons(m).. sum(i, u(i,m)*e(i)*x(i)) =l= K(m);
Model m_shared / objdef, cons /;
File empinfo / '%emp.info%' /;
put empinfo 'equilibrium' /;
put 'VIsol cons' /;
loop(i,
put 'min', obj(i), x(i), objdef(i), 'cons' /;
);
putclose empinfo;
$echo SharedEqu > jams.opt
m_shared.optfile = 1;
solve m_shared using emp;
display x.l, cons.m;
Note that the shared environmental constraints are expressed with the equation cons
. In the EMP annotations, we have chosen the formulation with the EMP keyword VIsol
. It leads to the solution VIsol
and thus prompt the framework to compute the MCP in (15), resulting in the solution