Skip to content
Advertisement

Tag: optimization

mixed integer programming optimization

I am trying to understand how gekko and its different types of custom variables work. So I wrote a very simple optimization problem, but it won’t find the optimal solution, at least this is what i think the error message means. The code is a simple set switch combination (braco_gas and braco_eh, both binaries) multiplied by some weights (vazao and

Pyomo find minimal sum of list values

I want to have an indexed binary variable so pyomo optimises it to minimise the total sum of the list while picking at least 2 elements. When I remove the (imo redundant) model.q I receive: ValueError: No variables appear in the Pyomo model constraints or objective. This is not supported by the NL file interface and the solution pyomo gives

Algorithm for ordering data so that neighbor elements are as identical as possible

I have a (potentially large) list data of 3-tuples of small non-negative integers, like I want to order the tuples within data so that neighboring tuples (data[i] and data[i+1]) are “as similar as possible”. Define the dissimilarity of two 3-tuples as the number of elements which are unequal between them. E.g. (0, 1, 2) vs. (0, 1, 2): Dissimilarity 0.

Advertisement