Say I want to rewrite A <= MAX (B, 100) using only AND statements and substractions. <= means smaller or equal. A and B are variables. Is it possible?
I can't seem to use OR's using the Microsoft Solver foundation in this contrived example, which is a simplification of a problem I have at work :
Decision x = new Decision(Domain.Real, "x"); model.AddDecisions(x);
Decision y = new Decision(Domain.Real, "y");
model.AddDecisions(y);
// Add a constraint
// x <= MAX(y,200);
model.AddConstraints("zero", x + Math.Sin(44) == 33.2);
model.AddConstraints("one", y + x == 5);
model.AddConstraints("three", x <= -y);
model.AddConstraints("four", x <= 200);
// Solve the problem
context.Solve();
// Display the results
Console.WriteLine("x: {0}", x);
Console.WriteLine("y: {0}", y);