solution of equilibrium problems using extended ...pages.cs.wisc.edu/~ferris/talks/wets-may.pdf ·...
TRANSCRIPT
Solution of equilibrium problems using extendedmathematical programming
Youngdae Kim Michael C. Ferris
University of Wisconsin, Madison
2017 Bay Optimization Meeting, Davis, California, May 13, 2017
Kim & Ferris (Univ. Wisconsin) Structure in MOPEC Supported by DOE/AFOSR 1 / 25
The good news!
PATH solves rectangular VI
−F (x) ∈ NI1×...×Im(x)
(feasible set is a Cartesian product of possibly unbounded intervals)
PATHVI solves VI−F (x) ∈ NC (x)
by identifyingC = {x ∈ P : g(x) ∈ K}
and reformulating as
x∗ solves VI(F , C) ⇐⇒ 0 ∈ F (x∗) + NC(x∗)
⇐⇒ 0 ∈[F (x∗) +∇g(x∗)λ
−g(x∗)
]+ NP×K◦(x∗, λ)
Use Newton method, each step solves an affine variational inequality
Kim & Ferris (Univ. Wisconsin) Structure in MOPEC Supported by DOE/AFOSR 2 / 25
Experimental results: AVI vs MCP
Run PathAVI over AVI formulation.
Run PATH over rectangular form (poorer theory as recC larger).I M is an n × n symmetric positive definite/indefinite matrix.I A has m randomly generated bounded inequality constraints.
Structure knowledge leads to improved reliability
(m, n)PathAVI PATH % negative
status # iterations status # iterations eigenvalues
(180,60) S 55 S 72 0(180,60) S 45 S 306 20(180,60) S 2 F 9616 60(180,60) S 1 F 10981 80
(360,120) S 124 S 267 0(360,120) S 55 S 1095 20(360,120) S 2 F 10020 60(360,120) S 1 F 7988 80
Kim & Ferris (Univ. Wisconsin) Structure in MOPEC Supported by DOE/AFOSR 3 / 25
MOPEC
minxiθi (xi , x−i , π) s.t. gi (xi , x−i , π) ≤ 0,∀i
π solves VI(h(x , ·),C )
equilibrium
min theta(1) x(1) g(1)
...
min theta(m) x(m) g(m)
vi h pi cons
(Generalized) Nash
Reformulateoptimization problem asfirst order conditions(complementarity)
Use nonsmooth Newtonmethods to solve
Solve overall problemusing “individualoptimizations”?
Trade/Policy Model (MCP)
• Split model (18,000 vars) via region
• Gauss-Seidel, Jacobi, Asynchronous • 87 regional subprobs, 592 solves
= +
Kim & Ferris (Univ. Wisconsin) Structure in MOPEC Supported by DOE/AFOSR 4 / 25
Bad news! Cournot Model (inverse demand function)
maxxi
p(∑j
xj)T xi − ci (xi )
s.t. Bixi = bi , xi ≥ 0
Cournot model: |A| = 5
Size n = |A| ∗ Na
Size (n) Time (secs)
1,000 35.42,500 294.85,000 1024.6
0 10 20 30 40 50 60 70 80 90 100nz = 10403
0
10
20
30
40
50
60
70
80
90
100
Jacobian nonzero patternn = 100, Na = 20
Kim & Ferris (Univ. Wisconsin) Structure in MOPEC Supported by DOE/AFOSR 5 / 25
Computation: implicit functions
Use implicit fn: z(x) =∑
j xj
Generalization to F (z , x) = 0 (viaadjoints)
empinfo: implicit z F
Size (n) Time (secs)
1,000 2.02,500 8.75,000 38.8
10,000 > 10800 10 20 30 40 50 60 70 80 90 100
nz = 2403
0
10
20
30
40
50
60
70
80
90
100
Jacobian nonzero patternn = 100, Na = 20
Kim & Ferris (Univ. Wisconsin) Structure in MOPEC Supported by DOE/AFOSR 6 / 25
Computation: implicit functions and local variables
Use implicit fn: z(x) =∑
j xj(and local aggregation)
Generalization to F (z , x) = 0 (viaadjoints)
empinfo: implicit z F
Size (n) Time (secs)
1,000 0.52,500 0.85,000 1.6
10,000 3.925,000 17.750,000 52.3
0 20 40 60 80 100nz = 333
0
20
40
60
80
100
Jacobian nonzero patternn = 100, Na = 20
Kim & Ferris (Univ. Wisconsin) Structure in MOPEC Supported by DOE/AFOSR 7 / 25
Other specializations and extensions
minxiθi (xi , x−i , z(xi , x−i ), π) s.t. gi (xi , x−i , z , π) ≤ 0, ∀i , f (x , z , π) = 0
π solves VI(h(x , ·),C )
NE: Nash equilibrium (no VI coupling constraints, gi (xi ) only)
GNE: Generalized Nash Equilibrium (feasible sets of each playersproblem depends on other players variables)
Implicit variables: z(xi , x−i ) shared
Shared constraints: f is known to all (many) players
Force all shared constraints to have same dual variable (VI solution)
Can use EMP to write all these problems, and convert to MCP form
Use models to evaluate effects of regulations and theirimplementation in a competitive environment
Kim & Ferris (Univ. Wisconsin) Structure in MOPEC Supported by DOE/AFOSR 8 / 25
A Simple Network Model
Load segments srepresent electrical loadat various instances
d sn Demand at node n in
load segment s (MWe)
X si Generation by unit i
(MWe)
F sL Net electricity
transmission on link L(MWe)
Y sn Net supply at node n
(MWe)
πsn Wholesale price ($ perMWhe)
n1
n2
n3
n13
n14n15
n16
n4n5 n6
n7
n8
n9n10
n11n12
GCSWQLD
VIC
1989
1601
1875
2430 3418
3645
6866
4860
2478
6528
1487
25609152435
18302309
9159151887
1887
2917
1930
180
1097
1930
Kim & Ferris (Univ. Wisconsin) Structure in MOPEC Supported by DOE/AFOSR 9 / 25
Nodes n, load segments s, generators i , Ψ is node-generator map
maxX ,F ,d ,Y
∑s
(W (d s(λs))−
∑i
ci (Xsi )
)s.t. Ψ(X s)− d s(λs) = Y s
0 ≤ X si ≤ X i , G i ≥
∑s
X si
Y ∈ X
where the network is described using:
X =
{Y : ∃F ,F s = HY s ,−F s ≤ F s ≤ F
s,∑n
Y sn ≥ 0,∀s
}
Key issue: decompose. Introduce multiplier πs on supply demandconstraint (and use λs := πs)
How different approximations of X affect the overall solution
Kim & Ferris (Univ. Wisconsin) Structure in MOPEC Supported by DOE/AFOSR 10 / 25
Case H: Loop flow model
maxd
∑s
(W (d s(λs))− πsd s(λs))
+ maxX
∑s
(πsΨ(X s)−
∑i
ci (Xsi )
)s.t. 0 ≤ X s
i ≤ X i , G i ≥∑s
X si
+ maxY
∑s
−πsY s
s.t.∑i
Y si ≥ 0,−F s ≤ HY s ≤ F
s
πs ⊥ Ψ(X s)− d s(λs)− Y s = 0
Kim & Ferris (Univ. Wisconsin) Structure in MOPEC Supported by DOE/AFOSR 11 / 25
Let A be the node-arc incidence matrix, H be the shift matrix, L be theloop constraint matrix. Standard results show:
X = {Y : ∃F ,F = HY ,F ∈ F}
X ={Y : ∃(F , θ),Y = AF ,BAT θ = F , θ ∈ Θ,F ∈ F
}X = {Y : ∃F ,Y = AF ,LF = 0,F ∈ F}
Kim & Ferris (Univ. Wisconsin) Structure in MOPEC Supported by DOE/AFOSR 12 / 25
Loopflow model (using A,L)
maxd
∑s
(W (d s(λs))− πsd s(λs))
+ maxX
∑s
(πsΨ(X s)−
∑i
ci (Xsi )
)s.t. 0 ≤ X s
i ≤ X i , G i ≥∑s
X si
+ maxF ,Y
∑s
−πsY s
s.t. Y s = AF s ,LF s = 0,−F s ≤ F s ≤ Fs
πs ⊥ Ψ(X s)− d s(λs)− Y s = 0
Kim & Ferris (Univ. Wisconsin) Structure in MOPEC Supported by DOE/AFOSR 13 / 25
Network modelDrop loop constraints:
maxd
∑s
(W (d s(λs))− πsd s(λs))
+ maxX
∑s
(πsΨ(X s)−
∑i
ci (Xsi )
)s.t. 0 ≤ X s
i ≤ X i , G i ≥∑s
X si
+ maxF ,Y
∑s
−πsY s
s.t. Y s = AF s ,−F s ≤ F s ≤ Fs
πs ⊥ Ψ(X s)− d s(λs)− Y s = 0
Kim & Ferris (Univ. Wisconsin) Structure in MOPEC Supported by DOE/AFOSR 14 / 25
Comparing Network and Loopflow: DemandHere we look at simulations which impose a proportional reduction intransmission across the network. The network and loopflow modelsdemonstrate similar responses:
0
1
2
3
4
5
6
0 10 20 30 40 50 60 70 80 90 (blank) 0 10 20 30 40 50 60 70 80 90 (blank)
loopflow network
n8
n6
n7
n14
n11
n3
n9
n1
n13
n2
n15
n10
n12
n5
n16
n4
n14_n15
n9_n12
n8_n12
n13_n14
n1_n2
n16_VIC
gc_n1
n13_n15
n11_n14
n2_n3
Kim & Ferris (Univ. Wisconsin) Structure in MOPEC Supported by DOE/AFOSR 15 / 25
Comparing Network and Loopflow: GenerationLikewise, generation is similar in the two models:
0
1
2
3
4
5
6
7
8
9
10
0 10 20 30 40 50 60 70 80 90 (blank) 0 10 20 30 40 50 60 70 80 90 (blank)
loopflow network
GC
gc_n1
n1
n1_n2
n10
n11
n11_n12
n11_n14
n12
n12_n13
n13
n13_n14
n13_n15
n14
n14_n15
n15
n15_n16
n16
n16_VIC
n2
n2_n3
n3
n3_n4
n4
n4_n5
n4_n6
Kim & Ferris (Univ. Wisconsin) Structure in MOPEC Supported by DOE/AFOSR 16 / 25
Comparing Network and Loopflow: TransmissionNetwork transmission levels reveal that the two models are quite different:
0
20
40
60
80
100
120
0 10 20 30 40 50 60 70 80 90 (blank) 0 10 20 30 40 50 60 70 80 90 (blank)
loopflow network
n3_n4
n5_n8
n7_n8
n8_n9
n9_n12
n11_n14
n12_n13
n4_n6
n2_n3
n13_n14
n4_n5
n8_n12
n13_n15
n8_n11
n9_n10
n11_n12
n6_n7
n14_n15
n1_n2
n5_n9
n15_n16
gc_n1
swqld_n2
n16_VIC
Kim & Ferris (Univ. Wisconsin) Structure in MOPEC Supported by DOE/AFOSR 17 / 25
The Game: update red, blue and purple components
maxd
∑s
(W (d s(λs))− πsd s(λs))
+ maxX
∑s
(πsΨ(X s)−
∑i
ci (Xsi )
)s.t. 0 ≤ X s
i ≤ X i , G i ≥∑s
X si
+ maxY
∑s
−πsY s
s.t.∑i
Y si ≥ 0,−F s ≤ HY s ≤ F
s
πs ⊥ Ψ(X s)− d s(λs)− Y s = 0
Kim & Ferris (Univ. Wisconsin) Structure in MOPEC Supported by DOE/AFOSR 18 / 25
Top down/bottom up
λs = πs so use complementarity to expose (EMP: dualvar)
Change interaction via new price mechanisms
All network constraints encapsulated in (bottom up) NLP (or itsapproximation by dropping LF s = 0):
maxF ,Y
∑s
−πsY s
s.t. Y s = AF s ,LF s = 0,−F s ≤ F s ≤ Fs
Could instead use the NLP over Y with HClear how to instrument different behavior or different policies ininteractions (e.g. Cournot, etc) within EMP
Can add additional detail into top level economic model describingconsumers and producers
Kim & Ferris (Univ. Wisconsin) Structure in MOPEC Supported by DOE/AFOSR 19 / 25
PricingOur implementation of the heterogeneous demand model incorporatesthree alternative pricing rules. The first is average cost pricing, defined by
Pacp =
∑jn∈Racp
∑s pjnsqjns∑
jn∈Racp
∑s qjns
The second is time of use pricing, defined by:
Ptous =
∑jn∈Rtou
pjnsqjns∑jn∈Rtou
qjns
The third is location marginal pricing corresponding to the wholesaleprices denoted Pns above. Prices for individual demand segments are thenassigned:
pjns =
Pacp (jn) ∈ Racp
Ptous (jn) ∈ Rtou
Pns (jn) ∈ Rlmp
Kim & Ferris (Univ. Wisconsin) Structure in MOPEC Supported by DOE/AFOSR 20 / 25
Smart Metering Lowers the Cost of Congestion
0
0.5
1
1.5
2
2.5
3
3.5
4
10 20 30 40 50 60 70 80 90
acp
toup
lmp
Kim & Ferris (Univ. Wisconsin) Structure in MOPEC Supported by DOE/AFOSR 21 / 25
Economic Application
Model is a partial equilibrium, geographic exchange model.
Goods are distinguished by region of origin.
There is one unit of region r goods.
These goods may be consumed in region r or they may be exported.
Each region solves:
minX ,Tr
fr (X ,T ) s.t. H(X ,T ) = 0, Tj = Tj , j 6= r
where fr (X ,T ) is a quadratic form and H(X ,T ) defines X uniquelyas a function of T .
H(X ,T ) defines an equilibrium; here it is simply a set of equations,not a complementarity problem
Applications: Brexit, modified GATT, Russian Sanctions
Kim & Ferris (Univ. Wisconsin) Structure in MOPEC Supported by DOE/AFOSR 22 / 25
Model statistics and performance comparison of the EPEC
MCP statistics according to the shared variable formulation
Replication Switching Substitution
12,144 rows/cols 6,578 rows/cols 129,030 rows/cols544,019 non-zeros 444,243 non-zeros 3,561,521 non-zeros
0.37% dense 1.03% dense 0.02% dense
Path Shared variable formulation (major, time)crash spacer prox Replication Switching Substitution
X X 7 iters 20 iters 20 iters8 secs 22 secs 406 secs
X 24 iters 22 iters 21 iters376 secs 19 secs 395 secs
X 8 iters 8 iters 8 iters28 secs 18 secs 219 secs
Kim & Ferris (Univ. Wisconsin) Structure in MOPEC Supported by DOE/AFOSR 23 / 25
Results
Gauss-Seidel residualsIteration deviation
1 3.149302 0.909703 0.142244 0.022855 0.003736 0.000617 0.000108 0.000029 0.00000
Tariff revenueregion SysOpt MOPEC
1 0.117 0.0122 0.517 0.4073 0.496 0.2144 0.517 0.4075 0.117 0.012
Note that competitive solution produces much less revenue thansystem optimal solution
Model has non-convex objective, but each subproblem is solvedglobally (lindoglobal)
Kim & Ferris (Univ. Wisconsin) Structure in MOPEC Supported by DOE/AFOSR 24 / 25
Conclusions
Equilibrium problems can be formulated naturally and modeler canspecify who controls what
It’s available (in GAMS)
Enables modelers to convey simple structures to algorithms andallows algorithms to exploit this
New decomposition algorithms available to modeler (Gauss Seidel,Randomized Sweeps, Gauss Southwell, Grouping of subproblems)
Can evaluate effects of regulations and their implementation in acompetitive environment
Kim & Ferris (Univ. Wisconsin) Structure in MOPEC Supported by DOE/AFOSR 25 / 25
MCP size of equilibrium problems containing sharedvariables by formulation strategy
Strategy Size of the MCP
replication (n + 2mN)switching (n + mN + m)
substitution (explicit) (n + m)substitution (implicit) (n + nm + m)
Fi (z) =
∇xi fi (x , y)− (∇xiH(y , x))µi∇yi fi (x , y)− (∇yiH(y , x))µi
H(yi , x)
, zi =
xiyiµi
.
Kim & Ferris (Univ. Wisconsin) Structure in MOPEC Supported by DOE/AFOSR 1 / 2
Spacer steps
Given (x , y , µ) during iterations
Compute a unique feasible pair (y , µ)
Evaluate the residual at (x , y , µ)
Choose the point if it has less residual than the one of (x , y , µ)
Kim & Ferris (Univ. Wisconsin) Structure in MOPEC Supported by DOE/AFOSR 2 / 2