Ask Your Question

Use os SOS2 in Linear Optimization

asked 2013-10-31 18:20:01 -0500

subbu gravatar image

updated 2013-10-31 18:49:32 -0500

Shashank gravatar image

I have a linear optimization to minimize value like

MIN = sum(x_i*j_i)
        0 < x_i  < C
        0 < j_i < J
        x_i + y_i <= x_(i-1) + f(x_i)

Where this f(x_i) is a SOS2 function:

Sum(lambda_i) = 1
Sum(lambda_i * X_i) = x_i  # Here X_i is a constant.
Sum(lambda_i * K_i) = result # Here K_i is a constant. 
this result will be returned.

When I make individual MixedIntegerLinearProgram(maximization=False, solver = "GLPK") one for f(x), I am able to slove. When introducing the function as another variable into another MixedIntegerLinearProgram(maximization=False, solver = "GLPK") I am unable to get the results.

Need help in actually formulating the sage equations.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2013-12-17 06:30:08 -0500

subbu gravatar image

When I am looking at documentation? I see there is solution for Piecewise in Sage,

This Piecewise helped me to solve the problem, with accurate results.

when I am passing a MixedIntegerLinearProgram variable I am getting the exception saying the value should be Integer.

There is another thread where the results are wrong when doing minimization of the SOS2.

Need help in integrating a SOS2 or Piecewise model with MixedIntegerLinearProgram.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2013-10-31 18:20:01 -0500

Seen: 121 times

Last updated: Dec 17 '13