Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

Sos2 Operator (Solver Foundation)

Solver Foundation 3.0

Adds an SOS2 constraint.

Sos2[args]
Sos2[function_decision == point_0*set_member_0 + ... + point_n*set_member_n]
Sos2[point_0 * set_member_0 + ... + point_n * set_member_n]
Model[
  Decisions[Reals[0, Infinity], x, p1, p2, p3, y],
  Constraints[
    // x is constrained to be greater than or equal to 1.5
    x>=1.5,
    // The value of function y in point 1 is 1, in point 2 is 3, and 
    // in point 3 is 4
    y == p1 + 3*p2 + 4*p3,
    // 1, 2 and, 3 are the points where the function value is known
    Sos2[x == 1*p1 + 2*p2 + 3 * p3]
  ],
  Goals[ Minimize[y] ]
]

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.