FICO
FICO Xpress Optimization Examples Repository
FICO Optimization Community FICO Xpress Optimization Home
Back to examples browserNext example

Introductory examples

Description
Introductory examples from the whitepaper 'Robust Optimization with Xpress'. Topics covered by the examples:
  • Price of robustness: cost_of_robustness.mos (calculating the cost of having uncertainty in the model)
  • Working with nominal values:

    nominalvalue_0base.mos (simple robust model without nominal values);

    nominalvalue_2base.mos (simple robust model with a nominal valued uncertain);

    nominalvalue_none.mos (uncertainty as an addition to a coefficient);

    nominalvalue_rule2.mos (using uncertains with nominal value as coefficients);

    nominalvalue_shift1.mos (basic version without nominal values);

    nominalvalue_shift2.mos (defining nominal values);

    nominalvalue_shift3.mos (substituting the effect of the nominal values);

    nominalvalue_simple.mos (uncertainty as a coefficient)
  • Overlapping uncertainty:

    overlapping_cardinality.mos (cardinality constraint with overlapping uncertainty sets);

    overlapping_polyhedral.mos, overlapping_polyhedral2.mos (polyhedral uncertainty set with overlapping use in robust constraints)
  • Working with scenarios:

    scenario_simple.mos (simple robust optimization model with scenario based uncertainty);

    scenario_simple_deterministic.mos (deterministic version of the simple scenario problem)
  • Special cases:

    careful_equalities.mos (robust problem with equality constraint);

    careful_unbounded_uncertain.mos (robust problem with an unbounded uncertain)
Further explanation of this example: Whitepaper 'Robust Optimization with Xpress', Section 1 Introduction


Source Files





nominalvalue_rule2.mos

 (!******************************************************
   Mosel Example Problems
   ======================   

   Example model for the 
   Robust Optimization with Xpress white paper

   (c) 2014 Fair Isaac Corporation
       
*******************************************************!)
model Nominalvalues
 uses "mmrobust"                    ! Load the robust library

! Real valued coefficients
declarations
 x : mpvar
 r : real
end-declarations

r := 3

C1 := (1+r)*x <= 1

r := 5

maximize(x)

writeln("x = ", getsol(x))

sethidden(C1, true)      ! Make the existing constraint hidden

! Uncertain coefficients
declarations 
 y : mpvar
 u : uncertain
end-declarations

u := 3

(1+u)*y <= 1

u := 5

maximize(XPRS_NOMINAL, y)

writeln("y = ", getsol(y))

end-model

Back to examples browserNext example