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

**Best answer by Marcel Hunting**

Hi

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.