 0.0 Double.PositiveInfinity |&gt; toExpression
let s1 = Variable.real "s1" 0.0 Double.PositiveInfinity |&gt; toExpression


let m = [
  [1.0 ; -2.0 ; 1.0 ; 1.0 ; 0.0];
  [-4.0 ; 1.0 ; 2.0 ; 0.0 ; -1.0];
  [-2.0 ; 0.0 ; -1.0 ; 0.0 ; 0.0];
]

let eq = [11.0; 3.0; -1.0]

let mdl =
      Model.Default
      |&gt; DecisionVars [x0; x1; x2; s0; s1]
      |&gt; Goal Minimize
      |&gt; Objective  (-3*x0 + x1 + x2)
      |&gt; MatrixEq m eq

let result = Solve mdl

match result with
| Solution sol -&gt;
    print