547 questions
0
votes
0
answers
69
views
Setting up a mixed-integer program in python
I am trying to figure out if it is possible to configure a specific problem as a mixed-integer program. I think I am able to structure it as a non-linear optimization problem, but would like to see if ...
3
votes
1
answer
47
views
Can I use an objective function that uses multiple functions in binary programming in gekko?
I am trying to minimize the L2 norm of the peak flows in a drainage system. I want to use gekko since it can handle integer-binary programming.
In my program, my objective is to minimize the peak ...
0
votes
1
answer
29
views
Python PuLP sorting 2D results
I have a Mixed Integer Programming problem very similar set up as introduced in this link.
https://colab.research.google.com/github/ffraile/operations-research-notebooks/blob/main/docs/source/MIP/...
3
votes
0
answers
37
views
How to use the cold-start options with GEKKO correctly?
I was testing some options with Gekko for an optimization with MINLP , but I still couldn't figure out how the option COLDSTART = 2 work. Using the variable values from a prior solution as initial ...
-1
votes
3
answers
223
views
Python ortools CP-SAT solution for group optimization - code too clunky?
I have a group of people that I need to split up into subgroups. The subgroups do not all have to be the same size, but can be no smaller than 5 and no larger than 10. I have created a matrix (in ...
0
votes
0
answers
80
views
Optimize load balancing using a constraint solver
I'm trying to solve a load balancing problem with a constraint solver. I have a list of partitions, each one is associated with a load, and I want to assign these partitions to a fixed number of ...
1
vote
2
answers
64
views
Is there any benefit of choosing to formulate constraints in a way or another in GEKKO?
I have an MINLP problem and let's say the continuous variable Q can only be 0 when the binary variable z is 0. Two ways to formulate this would be:
m.Equation(Q*(1-z) == 0) (1)
or
m.Equation(Q < z*...
0
votes
0
answers
31
views
How to define special sets to workaround network flow?
I am working on a special network flow problem, trying to implement in GAMS, something like a (N∗N) grid, and I am having difficulties to define some of its sets. The problem is stated as follows:
...
0
votes
0
answers
113
views
How to linearize the product of two continuous variables?
I'm trying to solve a MILP problem in Matlab Optimization Toolbox. I'm encountering with problems with the product of two decision variable of my problem which are bounded.
0<= x <= 60
0 <= ...
5
votes
2
answers
249
views
Generate all paths that consists of specified number of visits of nodes / edges
In a graph/chain there are 3 different states: ST, GRC_i and GRC_j.
The following edges between the states exists:
EDGES = [
# source, target, name
('ST', 'GRC_i', 'TDL_i'),
('ST', '...
0
votes
1
answer
88
views
VRP in CP-SAT (or tools) using all available vehicles, when a smaller number could have sufficed
I am solving a simple capacitated VRP with CP-SAT solver with 6 vehicles and 17 nodes. The issue that is happening is that the solution ends up using all 6 vehicles, when clearly a smaller number of ...
0
votes
0
answers
34
views
Struggling to Configure Solvers for MINLP Optimization with Pyomo (using NEOS or Local Installation)
I'm working on a Mixed-Integer Nonlinear Programming (MINLP) optimization problem using Pyomo in Python, but I'm having trouble installing and configuring solvers.
I've tried both installing solvers ...
3
votes
1
answer
55
views
Gekko using APOPT isn't optimizing a single linear equation represented as a PWL
I've run into an issue where I can't get APOPT to optimize an unconstrained single piecewise linear, and it's really throwing me for a loop. I feel like there's something I'm not understanding about ...
0
votes
1
answer
217
views
Issue with CFFI while installing Python-MIP package
I'm trying to install mip (Python-MIP package for mathematical optimization). But, I'm facing a issue with cffi package. Bellow, the result of command pip install mip :
pip install mip
Collecting mip
...
2
votes
1
answer
58
views
GEKKO mixed integer optimization callback function with APOPT solver
I am trying to solve a simple mixed-integer optimization problem using GEKKO to evaluate whether it is suitable for my actual optimization task. Since my future problems will depend on adhering to ...