All Questions
Tagged with linear-programming mixed-integer-programming
210 questions
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 <= ...
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 ...
1
vote
2
answers
283
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....
3
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 ...
2
votes
1
answer
256
views
How to pickel (save model object) a Google or-tool's mathopt model object
I am building a model using mathopt library of or tools, and I want to save the model object as a pickle file (or any other suitable alternative). The use case for doing this is - underlying data ...
-1
votes
1
answer
84
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 ...
1
vote
1
answer
198
views
implement no overlapping constraint between 2 tasks in MIP
I have 2 sets of tasks each with start and end times, I want to enforce a constraint that ensures that 2 tasks do not overlap with each other. I know that in constraint programming we have specialised ...
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
1
answer
63
views
How to ensure that a value is a member of a set of decision variables in ortools
I want to implement constraints which ensures that a value is part of a set of decision variables. So for e.g. let dv[i] be a set of decision variables indexed by i. Say, the domain is restricted ...
1
vote
2
answers
278
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. ...
2
votes
0
answers
96
views
Constraint Transformation in SCIP
I am using pyscipopt 4.3.0 (python 3.11.5; SCIP 9.0.0) to solve the following binary linear problem:
import pyscipopt as scip
_Name = "tiny_test"
m = scip.Model(_Name)
y1 = m.addVar(name=&...
1
vote
1
answer
62
views
How to interpret shadow price array shape in Gekko
I'm trying to calculate the shadow prices for the various constraints and place them in a dictionary following the form c[i]:sp[i] where c is the name of a specific constraint and sp is the numeric ...
2
votes
1
answer
74
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
73
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
98
views
Dealing with Non-Optimal Solutions from Gekko
I'm running into some situations where it seems like Gekko is getting stuck in local maximums and was wondering what approaches could be used to get around this or dig deeper into the cause (including ...