param t_h; param t_w; param dist{h in 1..t_h, w in 1..t_w}; param outcomes; param v_h{h in 1..t_h, o in 1..outcomes}; param v_w{w in 1..t_w, o in 1..outcomes}; var x_h{h in 1..t_h, w in 1..t_w}; var x_w{h in 1..t_h, w in 1..t_w}; var p{h in 1..t_h, w in 1..t_w, o in 1..outcomes} >= 0; # Variables to make things more readable var utility_h{h in 1..t_h, w in 1..t_w, h_lie in 1..t_h}; var utility_w{h in 1..t_h, w in 1..t_w, w_lie in 1..t_w}; # maximize utility: sum{h in 1..t_h, w in 1..t_w} dist[h,w]*(utility_h[h,w,h] + utility_w[h,w,w] - x_h[h,w] - x_w[h,w]); # This allows us to check the maximum possible utility maximize utility: sum{h in 1..t_h, w in 1..t_w} dist[h,w]*(utility_h[h,w,h] + utility_w[h,w,w]); # maximize revenue: sum{h in 1..t_h, w in 1..t_w} dist[h,w]*(x_h[h,w] + x_w[h,w]); # These constraints are just to calculate utility for readability s.t. eqUtility_h{h in 1..t_h, w in 1..t_w, h_lie in 1..t_h} : utility_h[h,w,h_lie] = sum{o in 1..outcomes} p[h_lie,w,o]*v_h[h,o]; s.t. eqUtility_w{h in 1..t_h, w in 1..t_w, w_lie in 1..t_w} : utility_w[h,w,w_lie] = sum{o in 1..outcomes} p[h,w_lie,o]*v_w[w,o]; # s.t. exPostIR_h{h in 1..t_h, w in 1..t_w} : sum{o in 1..outcomes} (p[h,w,o]*v_h[h,o] - x_h[h,w]) >= 0; s.t. interimIR_h{h in 1..t_h} : sum{w in 1..t_w} (dist[h,w]*(utility_h[h,w,h] - x_h[h,w])) >= 0; s.t. exPostIC_h{h in 1..t_h, h_lie in 1..t_h, w in 1..t_w} : (utility_h[h,w,h] - x_h[h,w]) >= (utility_h[h,w,h_lie] - x_h[h_lie,w]); # s.t. BNEIC_h{h in 1..t_h, h_lie in 1..t_h} : sum{w in 1..t_w} dist[h,w]*((sum{o in 1..outcomes} (p[h,w,o]*v_h[h,o])) - x_h[h,w]) >= sum{w in 1..t_w} dist[h,w]*((sum{o in 1..outcomes} (p[h_lie,w,o]*v_h[h,o])) - x_h[h_lie,w]); # s.t. exPostIR_w{h in 1..t_h, w in 1..t_w} : sum{o in 1..outcomes} (p[h,w,o]*v_w[w,o] - x_w[h,w]) >= 0; s.t. interimIR_w{w in 1..t_w} : sum{h in 1..t_h} (dist[h,w]*(utility_w[h,w,w] - x_w[h,w])) >= 0; s.t. exPostIC_w{w in 1..t_w, w_lie in 1..t_w, h in 1..t_w} : (utility_w[h,w,w] - x_w[h,w]) >= (utility_w[h,w,w_lie] - x_w[h,w_lie]); # s.t. BNEIC_w{w in 1..t_w, w_lie in 1..t_w} : sum{h in 1..t_h} dist[h,w]*((sum{o in 1..outcomes} (p[h,w,o]*v_w[w,o])) - x_w[h,w]) >= sum{h in 1..t_h} dist[h,w]*((sum{o in 1..outcomes} (p[h,w_lie,o]*v_w[w,o])) - x_w[h,w_lie]); # This is to ensure that maximizing social welfare is bounded by requiring that expected payments to the seller are positive and the seller can't just pump money into the system s.t. postivePayments : sum{h in 1..t_h, w in 1..t_w} dist[h,w]*(x_h[h,w] + x_w[h,w]) >= 0; # This is to ensure that payments are budget balanced. # s.t. balancedPayments{h in 1..t_h, w in 1..t_w} : x_h[h,w] + x_w[h,w] = 0; s.t. validProbability{h in 1..t_h, w in 1..t_w} : sum{o in 1..outcomes} p[h,w,o] = 1; data;