Microsoft Solver Foundation for Half-Whole

Is it possible to use MSF api to indicate a variable as half-integer ( V = 0or a <= V <= b)?

The following is an example in LP_Solve, which uses the keywords "sec" and "int" to indicate that the variables are semi-continuous and integer.

max: 0.5 Q1 + 0.55 Q2 ;

Q1 >= 5;
Q1 <= 10 ;
Q2 >= 5;
Q2 <= 10;
Q1 + Q2 <= 10;

sec Q1,Q2 ;
int Q1,Q2 ;

Something similar in MSF would be nice. I note that you can call the Gurobi Plugin DLL in MSF, but I can’t find a place in this api to be able to correctly set the type of the variable (I think Gurobi calls it VTYPE), so I assume that it either does not appear in their .net api or not available in the version of Gurobi that MSF uses? Also, is there a good way to call LP_Solve from .NET?

+3
1

Solver Foundation, "sec" . 0-1 . "V" OML:

Model[
  Decisions[
    Integers[0, 1],
    VPositive
  ],
  Decisions[
    Reals,
    V
  ],
  Constraints[
    constraint -> 10 * VPositive<= V <= 20 * VPositive
  ]
]

API- Solver Foundation, , , . - , ctor.

+4

Source: https://habr.com/ru/post/1728811/


All Articles