LINDO-like sensitivity analysis report from gurobi shell

178 views
Skip to first unread message

Betty Love

unread,
Jun 27, 2014, 9:13:47 PM6/27/14
to gur...@googlegroups.com
Is there a way to get gurobi to output a LINDO-like sensitivity analysis report from the gurobi shell? I'd like ranges on each cost coefficient and rhs value for which the optimal basis remains optimal.

Thanks!

Angelo

unread,
Jun 29, 2014, 6:25:39 AM6/29/14
to gur...@googlegroups.com
Hello Betty,

I am using Gurobi through AMPL and I have added some appropriate commands in a script file, in order to output a LINDO-like sensitivity analysis report. Please find attached an example model (.mod) file and a script (.run) file. Although, I am not using the Python shell, I believe/hope that these might be helpful to you. Perhaps, you can try something similar with the Python syntax. The sensitivity analysis report, for the attached example, is as follows:

  Variable     Value   Reduced Cost
-----------------------------------
: _varname[j] _var[j] _var[j].rc    :=
1   'x[1]'       3         0
2   'x[2]'       1.5       0
;

   Row       Slack or Surplus   Dual Price 
------------------------------------------
: _conname[j] _con[j].slack _con[j].dual    :=
1   R1              0            0.75
2   R2              0            0.5
3   R3              2.5          0
4   R4              0.5          0
;

Ranges for the objective-function coefficient of the variable:
---------------------------------------------------------------
: _varname[j] _var[j].sensobjlo _var[j].sensobjhi    :=
1   'x[1]'          2                    6
2   'x[2]'          3.33333             10
;

Ranges for the RHS of the constraints:
--------------------------------------
: _conname[j] _con[j].sensrhslo _con[j].sensrhshi    :=
1   R1               20                36
2   R2                4                 6.66667
3   R3               -1.5          1e+100
4   R4                1.5          1e+100
;

As you can see, they are pretty similar to LINDO...

Best regards,
Angelo
Reddy_Mikks.mod
Reddy_Mikks.run
Reply all
Reply to author
Forward
0 new messages