Use os SOS2 in Linear Optimization
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.