###################################################################### # EPEC-GJ.mod QLR-AN-LCP-v-v-v # # Gauss-Jacobi iteration to solve ... # Random EPEC generated by matlab. # Sven Leyffer, Argonne National Laboratory, December 2004. # # This is an EPEC with random data of the form # # minimize 0.5*x^T G_L*x + g_L^T x # x_L >= 0 # # subject to A_L x_L <= b_L # 0 <= y _|_ N x + M y + q >= 0 # ###################################################################### # ... dimensions of the problem param l integer; # ... number of leaders param m integer; # ... number of states y param n integer; # ... number of controls x param p integer; # ... number of control constraints # ... sets of indices set LL := 1..l; set MM := 1..m; set NN := 1..n; set PP := 1..p; # ... some useful sets & parameters set NxL := NN cross LL; set NL := 1..(n*l); param imap{i in NN, j in LL} := i + (j-1)*n; # ... maps NxL -> NL # ... random data (initialized to zero for sparse problems) param G{NL,NL,LL} default 0; # ... leaders' objective param g{NL,LL} default 0; param A{PP,NN,LL} default 0; # ... leaders' constraints: A x <= b param b{PP,LL} default 0; param N{MM,NL} default 0; # ... followers' LCP: N x + M y + q >= 0 param M{MM,MM} default 0; param q{MM} default 0; # ... variables var x{NN,LL} := 1; # ... leader l's variables x[:,l] var y{MM} := 0; # ... followers' variables # ... leaders' objective minimize objf{L in LL}: ( sum{(i1,l1) in NxL,(i2,l2) in NxL} x[i1,l1] * G[imap[i1,l1],imap[i2,l2],L] * x[i2,l2] ) / 2 + sum{(i1,l1) in NxL} g[imap[i1,l1],L]*x[i1,l1]; subject to # ... leader L's constraints cons{k in PP, L in LL}: sum{i in NN} A[k,i,L]*x[i,L] <= b[k,L]; # ... followers' LCP compl{j in MM}: 0 <= y[j] complements 0 <= sum{(i,l) in NxL} N[j,imap[i,l]]*x[i,l] + sum{k in MM} M[j,k]*y[k] + q[j];