Retrieve shadow-prices from multiple constraints

376 views
Skip to first unread message

Kasina

unread,
Aug 27, 2012, 5:12:27 PM8/27/12
to AIMMS - The Modeling System
Hello Everyone,

To retrieve the dual of a constraint, I know that you can use
constraintname.shadowprice and input that into a parameter. I'm trying
to implement a simple benders decomposition following the example of
the facility location problem. For small problems, I did

FixedParam1:=Param1;
solve sub_problem; (!this contains a constraint C1 which explicitly
says Param1=FixedParam1)
FixedShadowParam:=C1.ShadowPrice;
AddBendersCuts; (! this procedure calculates the benders constanta nd
coeeficients using the FixedShadowParam)


I was successfully able to make this work for small problems. But now,
I have many constraints in the subproblem and I have many different
sub-problems too and doing this is obviously tedious. I was wondering
if there's an efficient way to get the shadow-prices of all the
constraints in a constraint set in one go and input them into
parameters in another step to calculate benders cuts ??

Thanks !

Kasina

Kasina

unread,
Aug 27, 2012, 5:23:11 PM8/27/12
to AIMMS - The Modeling System
In addition to this, is there a way where in the procedure itself, you
can get the duals for fixing variables. I guess what I'm
looking for is a procedure to directly get shadow-prices from nonvar
constraints? (instead of writing a constraint and then getting it's
shadow-price input as a parameter).

Algorithmically, something like:

for (index in MasterProblemVars)
shadowXParam(index):=(x.nonvar:=1).shadowprice;
endfor;

Sorry guys, if there's an obviously clever way to do this.

Kasina

Guido Diepen

unread,
Aug 30, 2012, 5:48:49 AM8/30/12
to ai...@googlegroups.com
Hi Kasina,

Unfortunately, currently it is not possible to achieve what you want to do in a generic fashion. This means you will have to do all the retrieval explicityly (i.e. the same way as your small project, but just a lot more code).

Guido Diepen
AIMMS Specialist

Kasina

unread,
Sep 2, 2012, 2:53:46 PM9/2/12
to ai...@googlegroups.com
Thanks Guido, I coded them in by hand. I also had a general question. My stopping criteria for Benders is obviously UB<LB*(1+Epsilon). the model is running fine. By for my last iteration, the LB (lower bound) exceeds the Upper-bound by a huge amount. I have to mention that my sub-problem has Big-M in it (to avoid non-linearity). Can I still use the Upper-bound as my final solution or do you think this is happening due to a coding mistake ? ... I am attaching a pic of the graph here. I am also posting a new thread with this so that I can get general input from the people. The post here is to let you guys know that these posts are connected.

This is the first time I'm trying Benders and I'm not able to understand the physical implications of this. The sudden jump to a high value is caused by a sudden jump in the value of alpha which is the approximation of the subproblem objective in the master problem. Any reason why this is happening instead of the traditional long-tail benders convergence ? Thanks .
Benders_For_Aimmms_SingleStageSingleScenario_Sep2.JPG
Reply all
Reply to author
Forward
0 new messages