Originally posted by: ColumbiaSystemsandSecurityLabs
Hi,
I am trying to model a problem using a SOS1 constraint and encounter a number of problems:
First, I can't understand what the weights in the cplex().SOS.add() method stand for. When I am trying to simply set the weights into the same value (1.0) I get an error saying that the weight should not be equal.
The second problem I am having, even If I set the weights to some random value, is that I am not able to enforce the variables in the SOS set to have positive values-- even after adding the corresponding constraints into the problem (i.e. sos_var >= 0).
Finally, a more general question: I am using the SOS constraints in order to model a simple piecewise linear function. The function is passing through the origin so SOS1 is sufficient. Is SOS the recommended (most efficient) way of handling such constraints or is there some more efficient, alternative approach?
Thanks!
#DecisionOptimization#OPLusingCPLEXOptimizer