Solved

solveFixed using AIMMS

  • 22 November 2020
  • 2 replies
  • 134 views

Dear Community;

 

We are working with some MILP problems where we need to identify the ShadowPrice of some constraints. These constraints are made up of both binary and continuous variables.

 

As the duality is not well defined for MILP problems, one method to find the ShadowPrice is to run a LP fixed model right after MILP solution. I see that AIMMS provide ShadowPrice by default for MILP problem when the variable property “ShadowPrice” is defined. We need to know how AIMMS calculate ShadowPrices for MILP problem? Does AIMMS use a method similar to post MILP fixed LP execution?

 

A quick additional question: Is it possible to identify and set all Bianry and Integer as “nonvar” (i.e. if var is Binary then var.nonvar := 1) -- the idea here is to manually prepare a fixed LP? I do not see how AIMMS support fixed LP preparation and its execution.

 

Thank you;

Amrit Gill

icon

Best answer by Marcel Hunting 24 November 2020, 10:54

View original

2 replies

Userlevel 5
Badge +4

Hi @Amritbir1. By default AIMMS does a postsolve step for MIP problems in which the integer variables are rounded and fixed, after which the resulting LP is solved. That way AIMMS can also retrieve the shadow prices. This is controlled by the Solvers General options 'Postsolve’ and 'MIP Calculate Sensitivity Information’; see the help of these options for more information.

The easiest way to build a fixed LP is by using the GMP procedure GMP::Instance::FixColumns. Instead of

solve MP;

you then have to use:

! Generate and solve math program.
myGMP := GMP::Instance::Generate( MP );
GMP::Instance::Solve( myGMP );

! Fix integer variables, change model type to LP, and solve fixed LP.
GMP::Instance::FixColumns( myGMP, myGMP, 1, AllIntegerVariables, round : 1 );
GMP::Instance::SetMathematicalProgrammingType( myGMP, 'LP' );
GMP::Instance::Solve( myGMP );

Here myGMP is an element parameter with range AllGeneratedMathematicalPrograms.

Thank you @Marcel Hunting. You provided all the information that we need.

Reply


Didn't find what you were looking for? Try searching on our documentation pages:

AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator