Skip to main content

The unit and shadowprice of a constraint

  • 31 May 2024
  • 0 replies
  • 15 views

Today I got a question on support whether the unit of a constraint influences the shadowprice; for instance, what is the consequence of using [ton] instead of [kg] on the unit of constraint for the shadowprice.

A small example illustrates the effects:

 

Variable x {

    Range: free;

    Unit: kg;

}

Constraint limX {

    Unit: ton;

    Property: ShadowPrice;

    Definition: x <= 5:kg];

}

Variable o {

    Range: free;

    Unit: kg;

    Definition: x;

}

 

 

The base unit of Mass is kg. 

Running the model, the shadowprice returned for limX was 1; indicating that increasing the rhs by 1 unit (kg), will increase the objective by 1. 

Then I changed the unit of limX to ton, and solved the model again.

The shadowprice returned was 1000; indicating that increasing the rhs by1 unit (ton), increased the objective by 1000.

 

See also: https://documentation.aimms.com/language-reference/optimization-modeling-components/variable-and-constraint-declaration/constraint-declaration-and-attributes.html#constraint-levels-bounds-and-marginals

 

0 replies

Be the first to reply!

Reply


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

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