Closed Mark531 closed 1 year ago
Use model.Equations([w[i - 1] <= w[i] for i in I if i])
to create multiple equations from a list comprehension. Issues on GitHub are typically for feature requests or bug reports. Please use StackOverflow with tag gekko
for future syntax questions. https://stackoverflow.com/questions/tagged/gekko The response time is typically faster and it is easier to search for similar Q+A posts.
I've designed a simple MINP problem using this kind of inequalities:
model.Equation(w[i - 1] <= w[i] for i in I if i)
But when solving the model, I get the folowing error:
That's true, if you take for instance x_0, it will be lesser than w_1, w_2, ..., w_n. The idea was to create a series of binary variables of this kind:
Is it possible to model it with gekko?