Ask Your Question
0

Use os SOS2 in Linear Optimization

asked 2013-11-01 00:20:01 +0200

subbu gravatar image

updated 2013-11-01 00:49:32 +0200

Shashank gravatar image

I have a linear optimization to minimize value like

MIN = sum(x_i*j_i)
 Constrains:
        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
0

answered 2013-12-17 13:30:08 +0200

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. http://ask.sagemath.org/question/3314...

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

Stats

Asked: 2013-11-01 00:20:01 +0200

Seen: 347 times

Last updated: Dec 17 '13