547 questions
Advice
0
votes
0
replies
22
views
Precedence implementation - compressed sparse row (CSR)
I'm doing a model for scheduling personnel through VRP formulation and I would like to know how can I integrate precedence binary matrix, using the CSR to accelerate the data processing.
My precedence ...
0
votes
0
answers
44
views
MIP Relaxation through pyomo
I have a step in my algorithm where I have to perform a standard Mixe Integer Program relaxation, it goes as follows:
Solve the MIP
Relax the binaries of MIP to NonNegativeReals
Fix the variables to ...
3
votes
1
answer
78
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 ...
3
votes
0
answers
57
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
vote
1
answer
139
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 ...
0
votes
0
answers
36
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:
...
5
votes
2
answers
267
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
0
answers
54
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 ...
0
votes
1
answer
350
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
...
1
vote
2
answers
423
views
Use more than 1 core when solving with mathopt (or tools) - HiGHS solver
I am interested in leveraging more number of physical cores when solving a MIP problem with mathopt.
Parallelization was easy with CP-SAT by setting the number of search workers
solver.parameters....
2
votes
1
answer
58
views
Gekko : Error in Resource Optimisation problem
I am working on a optimisation problem and I am using Gekko to solve it. Consider the scenario where there are 2 machines and 5 users and each machines has 2 resources to distribute to users. The user ...
3
votes
0
answers
102
views
Finding the optimum value of all Decision Variables in a MixedVariable problem with Pymoo
I've successfully built my model and it runs and plots a Pareto front. However, I don't know how to store X* (the optimum value of ALL the decision variables that resulted in the optimum F).
My model ...
-1
votes
1
answer
93
views
Enforcing Order in a Linear Programming Question
I have an optimization model to fulfill the water requirements of a city's distribution network. The model includes water sources from rainfall collection, river extraction, reservoir storage, and ...
0
votes
2
answers
222
views
minimum of decision variables not including zero. OR-Tools CP-SAT solver
I have a problem where I need to take the minimum of decision variables, but want to exclude variables which take a value of zero. For e.g. if variable values are : 0,0,2,5,7 then I want the minimum ...
0
votes
0
answers
96
views
network optimisation supply planning is not generating weekly plan
I am working on Production planning optimization where I have three stages of planning
Production plan
Packaging plan
Dispatch plan
for each stage I have its capacity and lead time it takes for each ...
1
vote
2
answers
384
views
how to implement alldifferent constraint except 0 in ortools
I am using ortools, CP-SAT solver, and I am struggling to write a constraint that will allow for a solution which can have multiple zero's but the remaining decision variable values have to be unique. ...
3
votes
2
answers
1k
views
OR-Tools CP-SAT python example terminates after creating solver
I am new to Google OR-Tools and trying to start by running a basic example from OR-Tools example library found here
https://github.com/google/or-tools/blob/stable/ortools/sat/samples/cp_sat_example.py....
0
votes
1
answer
47
views
why it always results zero regardless of an example for optimal value
I have coded the multy commodity flow problem using MIP and CPLEX solver but for any example I provide it leads to 0 as optimal value. I believe the problem lies within either in objective function or ...
2
votes
1
answer
220
views
Taking too long from 0.08% Gap to 0% while solving a MIP in Python with Gurobi package
I am solving a MIP problem in Python. The solving process with branch and bound proceeds very fast at the beginning, but when the optimality gap reaches 0.08% the opposite happens. I mean, from 0.08% ...
0
votes
0
answers
116
views
Pyomo Mixed Integer Programming : how to turn a binary variable equal to 1 if values of a variable exceed a certain threshold for the first time?
I want a binary variable, $inv_year$, to indicate the investment year, i.e., the year where the investment variable, $I$, turns greater than zero for the first time. Both variables ($inv_year$ and $I$)...
0
votes
1
answer
57
views
gurobi constraint to prevent repeated solution
i want to create multiple optimal solutions from my gurobi optimization MIP model but not using the PoolMode. instead, i have a model that creates the optimal NBA DFS lineup. one of my constraints ...
2
votes
1
answer
78
views
Simultaneous Spacing and Duration Constraints with time gaps in Gekko
I'm trying to simultaneously enforce sequential duration and spacing constraints to vector solution output in Gekko. Normally, this would be fairly straightforward using window logic, but my time ...
3
votes
1
answer
80
views
Time-based spacing constraints in Gekko
I'm trying to constrain the vector output of "simu_total_volume" below by requiring that solution output elements (x7=1) be spaced apart by s records (weeks) while also controlling for the ...
2
votes
1
answer
44
views
How to use layered conditional constraints in Gekko
I'm trying to implement conditional logic in Gekko using "if3" but am unsure how to successfully layer 2 conditions at different levels of granularity.
"x1" is vector of binary ...
2
votes
1
answer
67
views
How to handle optimizing across vectors in Gekko
I'm trying to use Gekko to optimize across time (a vector) to generate schedules based on several constraints, namely price and the number of times an event can occur (say we limit it to 5 per x7 ...