Constraint shadow prices for MIP models

71 views
Skip to first unread message

srikkanth madhavan

unread,
Apr 14, 2016, 2:00:06 AM4/14/16
to gamsworld
Hi,

 Can anyone let me know if its possible to display constraint equation shadow prices for MIP models? In the MIP model I am executing, I find that the constraint equations have no data to display.

Regards,
Srikkanth M

Steven Dirkse

unread,
Apr 14, 2016, 2:30:40 PM4/14/16
to gams...@googlegroups.com
Srikkanth,

It is possible to get shadow prices for the equations in a MIP model.  Here is one example I just ran on my Linux machine:

gamslib rotdk
gams rotdk.gms mip=cplex gdx=results
gdxdump results.gdx  symb=capbal

with the gdxdump output below:

Equation capbal(t) capacity balance /
't1'.M -1.81, 
't2'.M -1.81, 
't3'.M -1.805, 
't4'.M -1.705, 
't5'.M -0.785, 
't6'.M -0.695, 
't7'.M -0.67, 
't8'.M -0.67, 
't9'.M -0.3, 
't10'.M -0.19, 
't11'.M -0.12, 
't12'.M -0.055 /;

Hope this helps,

-Steve


--
You received this message because you are subscribed to the Google Groups "gamsworld" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at https://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.



--
Steven Dirkse, Ph.D.
GAMS Development Corp.,  Washington DC
Voice: (202)342-0180     Fax: (202)342-0181
sdi...@gams.com
http://www.gams.com

srikkanth madhavan

unread,
Apr 16, 2016, 4:47:30 AM4/16/16
to gamsworld
Steven,

   Thanks for getting back. I do see it does produce the shadow prices for equations in the MIP model you sent as an example. But in the model below with binary variables, I either find the equations shadow prices to be empty or having level, lower and upper values but no marginal values. How do I interpret the results?

$gdxin CapacityModInputData.gdx

sets
wmid(*) Unit WM ID
dstep(*) Demand Steps
;

$load wmid dstep

Parameters
cap(wmid) Capacity of each unit
bid(wmid) Bid price per MW for each unit
delta(wmid) Delta MW for each unit
ajunit(wmid) Ajunit ON or OFF
dmd(dstep) Demand per step
dprice(dstep) Price per each demand step

$load  cap bid delta ajunit dmd dprice
$gdxin
;

VARIABLES
z objective function value;

BINARY VARIABLES
units_vars(wmid)         Unit ON OR OFF
dmd_steps_vars(dstep)  DMD ON OR OFF
ajunits_vars(wmid)       AJUNIT ON OR OFF

EQUATIONS
OBJ                    Total Cost of operating the units(Bid cost + AJ Unit cost) - Total Area under demand curve
Supply_EQ_Demand_CONST Supply equals demand constraint
AJ_UNIT_CONST          AJ UNIT Demand Constraint
NON_AJ_UNIT_CONST(wmid)          NON AJ UNIT Demand Constraint
Unit_Var_Unique_CONST(wmid) EITHER AJ OR NON AJ
;

OBJ..           z =E= sum(wmid , bid(wmid)*cap(wmid)*units_vars(wmid))+sum(wmid, delta(wmid)*cap(wmid)*ajunits_vars(wmid))-sum(dstep, dprice(dstep)*dmd(dstep)*dmd_steps_vars(dstep));

Supply_EQ_Demand_CONST.. sum(wmid,(ajunits_vars(wmid)+units_vars(wmid))*cap(wmid)) =e= sum(dstep,dmd_steps_vars(dstep)*dmd(dstep));

AJ_UNIT_CONST..          sum(wmid,ajunits_vars(wmid)*cap(wmid)) =g= 0.8*sum(dstep,dmd_steps_vars(dstep)*dmd(dstep));

NON_AJ_UNIT_CONST(wmid).. ajunits_vars(wmid)$(ajunit(wmid) = 0) =e= 0;

Unit_Var_Unique_CONST(wmid).. ajunits_vars(wmid)+units_vars(wmid) =l= 1;

MODEL PJMCapacityMOD /all/;

SOLVE PJMCapacityMOD using MIP minimizing z;

Regards,
Srikkanth M

Steven Dirkse

unread,
Apr 18, 2016, 1:18:23 PM4/18/16
to gams...@googlegroups.com
Srikkanth,

I don't see any results, so I can't help interpret them.  If you send the GDX input I could try to run this and offer more help.

-Steve

--
You received this message because you are subscribed to the Google Groups "gamsworld" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at https://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.

Masoud Barati

unread,
Apr 18, 2016, 11:09:48 PM4/18/16
to gams...@googlegroups.com
In general the shadow price of the MIP problem is invalid. 
First, you should find the equivalent LP problem and use its shadow prices. 

--
Reply all
Reply to author
Forward
0 new messages