547 questions
0
votes
2
answers
359
views
Does IloCplex::Param::MIP::Display parameter restrict information displayed related to repairing singularity and Markowitz Tolerance?
The warnings that I henceforth refer to are as follows; repairing basis singularity, added to 1 column super-basic list and Markowitz threshold set to 0.3.
Will toggling the IloCplex::Param::MIP::...
0
votes
1
answer
422
views
How does docplex find the best bound?
I really can't understand how does CPLEX compute the best bound in the first place. From my understanding CPLEX needs to explore all the nodes in order to find the best bound or the objective value ...
1
vote
1
answer
772
views
Where can I find the documentation of docplex automatic tuning tool?
I was able to find the documentation of the CPLEX automatic tuning tool, namely (the IBM Studio) but I couldn't find any for the docplex one (the cplex python api). Does the tuning tool exist for ...
-2
votes
2
answers
909
views
Using Gurobi to run a MIQP: how can I improve time performance?
I am using Gurobi to run a MIQP (Mixed Integer Quadratic Programming) with linear constraints in Matlab. The solver is very slow and I would like your help to understand whether I can do something ...
1
vote
1
answer
1k
views
Mixed Integer Quadratic Programming with linear constraints in Matlab calling Gurobi
I have some troubles to understand how to implement the following MIQP (Mixed Integer Quadratic Programming) with linear constraints in Matlab calling Gurobi.
Let me explain in a schematic way my ...
0
votes
0
answers
127
views
Mixed integer programming R: Least absolute deviation with cost associated with each regressor
I have been presented with a problem, regarding the minimization of the absolute error, the problem know as LAD(Least absolute deviation) but, being each regressor the result of expensive test with an ...
0
votes
1
answer
261
views
Order constraints in optimisation
I have a set of many (10000+) items, from which have I have to choose exactly 20 items. I can only choose each item once. My items have profits, and costs, as well as several boolean properties (such ...
1
vote
1
answer
234
views
Optimization: Oj algorithms (java) versus SCIP (python)
Does anybody know how these 2 solvers, (Oj algorithms) from Java and SCIP for Python, relate to each other performance wise (as in: which one is the fastest), when dealing with a typical MILP (Mixed ...
1
vote
0
answers
82
views
How to model a specific optimization problem?
I have a specific problem and don't know how to change it to a feasibility or optimization problem. Can anyone please help me?
Assume that the objective function is Obj=f(x,y). We want to see for ...
1
vote
1
answer
1k
views
Implementing an OR constraint in Google OR-tools?
I'm trying to solve a variant of the transportation problem with a constraint which makes me able to specify the amount of supplies a truck should take to from a certain source towards a certain ...
1
vote
0
answers
564
views
Combinatorial constraint satisfaction and optimization
Problem
I created a set of polygons based on bag of plane intersection.
Now I try to create the following manifold by combinatorial optimization.
Manifold constraint each edge in the final model ...
0
votes
1
answer
600
views
Confusion regarding model.optimize() and model.feasRelaxS(1, True, False, True) output
I have modeled the MILP problem.
When executed the code
m.Optimize()
Output looks like this:
Optimize a model with 798001 rows, 312006 columns and 2117780 nonzeros
Variable types: 1920 continuous, ...
0
votes
1
answer
273
views
How to specify a multiplication in the objective function of a Sage mixed integer linear program?
I want to represent this in Sage as an objective function of a mixed integer linear program
But when I type:
p = MixedIntegerLinearProgram()
x = p.new_variable(integer=True, nonnegative=True)
c = p....
0
votes
0
answers
132
views
Gurobi Python: Does the code satisfy the constraint?.
I am trying to write the constraints as shown in the image, But can't able to achieve the desired result.
The result will be if the task uses the electricity then x binary
variable will be 1 it ...
2
votes
0
answers
193
views
Python Gurobi: Cannot add constraints to the model
can somebody correct me what's wrong in this code?.
I am trying to write the constraint as shown in the image.
But raising TypeError
<ipython-input-189-be5360af354c> in <module>()
...
1
vote
1
answer
1k
views
Pulp & coin-or-cbc: What are the meaning of SOS weights?
When defining a mixed integer linear programming problem using pulp, one may define sos like so:
x1 = LpVariable('x1', cat = LpInteger)
x2 = LpVariable('x2', cat = LpInteger)
prob.sos1['sos'] = x1 + ...
0
votes
1
answer
48
views
Searching for MILP constraint to prevent alternation of integer variable
Here is precisely my case:
Let's assume a variable x[t] which is a NonNegativeInteger smaller or equal than 3.
So x[t] can be {0,1,2,3}. It's indexed by a time serie.
I would like to prevent x[t] ...
0
votes
1
answer
172
views
Constrain the maximum allocation size using Mixed Integer Programming
I have 2 facilities, each has a pipeline and installation cost. I also have 16 customers to be serviced, each customer has a service cost. I want to assign each facility a maximum of 10 customers such ...
0
votes
1
answer
743
views
Defining multiple logical OR constraints in PuLP MIP
Say, I have a set of binary variables like so:
ht = {}
for t in range(100):
ht[t] = pulp.LpVariable('ht[%i]' % t, lowBound=0, upBound=1, cat='Integer')
I want to make sure that there is a gap ...
1
vote
2
answers
98
views
How can I augment this MILP by using equations with IFF conditions as cuts in GAMS?
So I am trying to implement an algorithm in GAMS by augmenting a master problem with cuts after every iteration. The master problem is,
minimize w =-x - 10z
s.t.
-25x + 20z ≤ 30
x + 2z ≤ 10
...
0
votes
1
answer
1k
views
Minimize the maximum in Julia JuMP
So I've combed through the various websites pertaining to Julia JuMP and using functions as arguments to @objective or @NLobjective, but let me try to state my problem. I'm certain that I'm doing ...
3
votes
1
answer
397
views
Vehicle Routing with Pickup and Dropoffs with MIP
I am trying to solve a Vehicle Routing Problem with multiple pickups and dropoffs with multiple products carried by just one car. After solving this problem I am going to extend to multiple types of ...
0
votes
0
answers
314
views
PULP Minimize costs and deviations/errors constraints
I have an LP in python that includes the following code:
Objective Function:
model = LpProblem("OneProductCost",LpMinimize)
model += lpSum([y[i] + abs(delta) for i in range(N)]), "Objective function"...
0
votes
1
answer
527
views
Stopping MATLAB's intlinprog early
How can I exit intlinprog at the "Branch and Bound" stage when fval and/or the relative gap no longer improve? I have tried numerous options but so far without success. For the example below, I know ...
1
vote
1
answer
604
views
R: ompr package constraints
I am using ompr package in R to solve an omptimization problem.
The optimization problem in written looks like this:
Min wi * xi
xi ϵ {0,1}
xi ≤ xj , j follower of i
i is a follower of j if in ...
1
vote
1
answer
1k
views
Why is MIP infeasible when cplex presolve is ON?
I am using the cplex callable library (version 12.6.3) in a c++ program to solve a Mixed Integer Program. The relevant part of the code looks like this:
loadSubProblem();
double TimeLimit = 999999;
...
0
votes
1
answer
164
views
How to write the condition in between some part of total content and single largest item's content in Linear Programming
Am trying to solve an optimization problem with Python pulp.
Following is my basic LP model.
prob = LpProblem("Minimizing cost", LpMinimize)
A = LpVariable("A", lowBound=0, cat='Integer')
B = ...
0
votes
1
answer
2k
views
Formulate square of a function in Mixed Integer Linear Programming using pulp
I have a linear equation Ax = b. I am trying to minimize (Ax-b)^2 using pulp in Python. Dimensions of A are (1000, 500) and b is (1000,).
So far I have tried this:
import pulp
mse = pulp.LpProblem("...
2
votes
0
answers
1k
views
Solving system of linear equations with variables taking binary values
I am trying to solve a system of linear equations where the variables take binary values
import numpy as np
import numpy.linalg as LA
import scipy.optimize as optimize
A = np.array([[1/5, 1/2, 1/3], ...
0
votes
0
answers
687
views
Python Mixed Integer Optimization
I'm new to mixed integer optimization problem. Currently, I'm using pulp python interface with default CBC solver to solve the problem.
The problem is to improve resource utilization in a cancer ...
0
votes
1
answer
324
views
Setting priority branching through pyomo for Baron solver
I am using Pyomo in Python together with the MINLP solver 'BARON'.
I have achieved to get it running and pass options (e.g. maxTime) to the solver via pyomo.
In the baron manual, they explain the ...
-1
votes
1
answer
191
views
How to add integer cut to MILP constraints to find alternative optimal solutions?
I am solving an MILP optimization with binary variables in MATLAB in which I want to find more than one optimal solution by excluding previous solutions. Therefore, I know I must include the following ...
1
vote
0
answers
338
views
Implement an incremental optimization for MILP
I am trying to implement an incremental optimization where I can feed my MILP model with new constraint/variables and remove some other constraints/variables as time passes. Not to mention solved ...
0
votes
1
answer
241
views
How to obtain iterations and runtime of the Feasibility Pump from the Coin-OR Framework
I have programmed an algorithm that finds feasible points for mixed-integer convex optimization problems. Now I wish to compare it with the Feasibility Pump for mixed-integer nonlinear programms on a ...
1
vote
0
answers
508
views
Gurobi Python: show n best Solutions of MILP
I am trying to not only get the optimal solution of my MIP, but the 5 best solutions. I know, how to get Gurobi to save the 5 best solutions but I dont know how I can access them like I do with the ...
0
votes
0
answers
82
views
Mixed integer programming for parameter estimation in R
I am looking to find a good way to find the optimum parameter for a linux program using R.
It takes about 20 seconds to run each time.
You put in a single integer number as input and get a single ...
4
votes
2
answers
913
views
Weighted Bin Packing/Knapsack optimization
I'm struggling to categorise a problem that I'm working on, which means that I haven't been able to figure out if there's any established heuristic solutions. What sort of problem do you think this is,...
0
votes
0
answers
71
views
Java Cplex getting a Heuristics Solution
I am trying to find a good enough solution for a MIP written in Java and solved by CPLEX. Since it takes way too much time, I would be happy enough If I would get a feasible solution. Since CPLEX ...
1
vote
0
answers
1k
views
Get marginal values (dual) for constraints in Pyomo MIP
I want to access dual variables for a MIP problem developed in python with Pyomo. To my understanding the dual is not created for MIP problems, but in my opinion there should be a work around for this....
1
vote
0
answers
230
views
How to add minimum up time constraint for a home load into a Mixed Integer Linear Programming in matlab?
I have written the code for the operation of the appliances for a minimum up time in a MILP problem in MATLAB.
The code I have written is based on the lines of the "optimal operation of thermal ...
1
vote
1
answer
212
views
Capacity constraints in ampl
I am building a model that requires me to factor in the capacity of various vessels and I am not sure how to declare this in ampl.
Currently, I have:
Cap1: forall {i in I, t in T} x[1,i] * people[1,...
1
vote
1
answer
1k
views
Converting Conditional Statements Into Linear Constraints
I am trying to convert the 3rd condition below to a linear constraint. I have included the full problem and my progress for illustrative purposes.
An manufacturer is considering manufacturing three ...
9
votes
4
answers
3k
views
Best modelling language for modelling LP/MILP? (NOT solver)
I have a Gurobi licence and I am after a good MILP/LP modelling language, which should be
free/open source
intuitive, i.e. something that looks like (taken from MiniZinc)
var int: x;
constraint x >= ...
1
vote
0
answers
346
views
How to get intermediate Integer solutions when solving a MIP in Julia (JuMP)?
I am solving a MIP model using CPLEX in Julia. I know CPLEX has a so-called Solution Pool where all the intermediate integer solutions during the solving process are stored. Is there a way of ...
2
votes
2
answers
2k
views
MIP vs CP for scheduling problems
It is known that exact mathematical strategies such MILP are not efficient for large instances of the flexible job shop problem. However, still, nowadays it is possible to find proposals of MILP ...
4
votes
1
answer
2k
views
Set MIP termination gap with PySCIPOpt
I cannot figure out how to set a MIP gap threshold such that the solver will terminate when the relative difference between the primal and dual solutions is within some value. I am using PySCIPOpt to ...
0
votes
0
answers
555
views
PuLP integer programming: solver returns 'Undefined' for anything beyond toy example
I am trying to find an integer programming formulation for the following problem:
Sort a list of items according to 2 criteria, represented by the following cost:
'Positional cost': dependent on ...
1
vote
0
answers
186
views
GAMS : Avoid Scan of obviously wrong solutions in CPLEX
I have the following problem in GAMS
I implemented a location routing problem. While checking the .log file I noticed something that could speed up the calculation time immensly if I fixed it.
Let me ...
5
votes
1
answer
1k
views
Optimization Approaches (Meta-heuristic, Graph-based, MILP)
I am very new to algorithms, now working on some route optimization problems and came across some papers on the following approaches:
Meta-heuristics Approach
Population Based (Genetic Algorithm, Ant ...
3
votes
1
answer
892
views
Constraints Added by docplex.mp.model.add_if_then Cause Read Error by CPlex
I'm using docplex to build up a mixed integer program which is then solved via cplex. However, upon trying to solve the MIP I receive the following error:
CPLEX> read plan.lp
CPLEX Error 1434: ...