[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] Re: XyPron: shadow prices in MIP problem
From: |
glpk xypron |
Subject: |
Re: [Help-glpk] Re: XyPron: shadow prices in MIP problem |
Date: |
Thu, 06 May 2010 21:15:09 +0200 |
Hello Ivo,
> Very satisfied with the dual for constraints in MPL from your version
> *glpk-4.38-dot* and your table read/write contribution to GLPK,
> I have two questions though:
>
> 1) Why hasn't the recent version GLPK version 4.43 this MPL
> dual feature?
The developper of GLPK is Andrew Makhorin. He has focused on a
bunch of other useful features for GLPK since my proposal to
support output of duals in GMPL.
> 2) Is it possible to write the dual itself or the results
> from operations on it to a table, and if so, could you
> please give an example as all my attempts fail?
The following syntax works for the table statement
(based on examples/transp.mod). Please, have a look
at docs/table.tex.
...
solve;
table ts {i in I} OUT 'CSV' 'supply.csv' :
i ~ PLANT,
supply[i].value ~ SUPPLY_VAL,
supply[i].lb ~ SUPPLY_LB,
supply[i].ub ~ SUPPLY_UB,
supply[i].dual ~ SUPPLY_DUAL;
table td {j in J} OUT 'CSV' 'demand.csv' :
j ~ MARKET,
demand[j].value ~ DEMAND_VAL,
demand[j].lb ~ DEMAND_LB,
demand[j].ub ~ DEMAND_UB,
demand[j].dual ~ DEMAND_DUAL;
data;
...
The content of the created csv files is:
demand.csv
MARKET,DEMAND_VAL,DEMAND_LB,DEMAND_UB,DEMAND_DUAL
"New-York",325,325,1.79769313486232e+308,0.225
"Chicago",300,300,1.79769313486232e+308,0.153
"Topeka",275,275,1.79769313486232e+308,0.126
supply.csv
PLANT,SUPPLY_VAL,SUPPLY_LB,SUPPLY_UB,SUPPLY_DUAL
"Seattle",300,-1.79769313486232e+308,350,0
"San-Diego",600,-1.79769313486232e+308,600,0
Best regards
Xypron
--
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01