547 questions
0
votes
1
answer
248
views
What is the appropriate optimization method (algorithm) to solve such problems (Linear mixed-integer)?
I have this optimization problem:
In this problem, C_{i,k} is a matrix of binary values (i.e., 0 or 1) and w_i is a vector of integers, p_f is a probability, and \epsilon is a constant.
I understand ...
2
votes
1
answer
607
views
How to present the efficiency of MiniZinc in a research
Some time ago I am writing an OR related article for publication. In the article a MILP model is show for a certain Optimization problem using MiniZinc. I resolve 10 instances optimally out of 10 ...
1
vote
1
answer
1k
views
Pulp: How to add/subtract decision variable outputs together
I am working on a rail scheduling problem that moves product from a production plant to a storage facility to satisfy demand.
I am new to pulp so finding this difficult to understand why this isn't ...
0
votes
1
answer
133
views
Building a linear constrait with 3 binary variables
I am trying to build a linear constraint that follows this logic
if either x1 = 1 or x2 =1 then y1 = 1
but if x1 = 0 and x2 = 0 then y1 = 0
if both x1 = 1 and x2= 1 then y1 = 1
0
votes
2
answers
2k
views
How to interpret sub tour elimination constraint in travelling salesman problem in cplex?
I have written the following code:
How to interpret auxiliary constraints and sub tour elimination constraints in the following formulation?
0
votes
0
answers
507
views
Advanced Heuristics for MIP vehicle routing problem in PuLP
I am currently trying to speed up an MIP. An approach I was considering was to implement a cut callback heuristic with PuLP (one which rounds relaxed integer variables greater than .9 to 1). ...
7
votes
6
answers
4k
views
Non-linear optimisation/programming with integer variables in R
I wonder if anyone is able to suggest some packages to solve a non-linear optimisation problem which can provide integer variables for an optimum solution? The problem is to minimise a function with ...
0
votes
1
answer
1k
views
How do I bypass the 1000 variable limit in Cplex
I've created a MILP model to test using the Docplex library in python but I get this error message :
CPLEX Error 1016: Community Edition. Problem size limits exceeded. Purchase at http://ibm.biz/...
0
votes
1
answer
549
views
Putting integer constraints in mystic
I am new to mystic and working on an optimization problem.My mystic code looks like this:
def find_loss(e,lmd,q,k):
edge_pmf=find_final_dist(e,lmd,q)
l_e=sum(edge_pmf[k+1:])
return ...
1
vote
1
answer
1k
views
How to set a feasible start on python mip
using python mip I have found that unlike gurobi to initialize a feasible model one should supply it to the model and not per variable. But I can't find an example or explanation of what format is ...
0
votes
1
answer
542
views
Accessing each variable value in Pyomo indexed variable
I am solving an MINLP using Pyomo, which takes a vector of integer inputs(the link capacities of a graph) and returns the packet loss in the network.What the edge_enum dictionary does is, it ...
0
votes
0
answers
110
views
Mixed Linear Integer Programming in R (by using OMPR package)
I am not familiar with linear programming. My expertise is in statistics, econometrics. So I might have written the code with some errors.
But I have searched the sources as much as I can. In the ...
0
votes
1
answer
944
views
Cplex Error: Adding trivial infeasible linear constraint
I want to solve an integer programming model with cplex python. I have this model:
a and h are matrixes with 0s and 1s. p is a set of numbers.
here is a part of my cplex code for this model:
p=[i for ...
3
votes
1
answer
1k
views
Formulating pricing optimization as MILP
I am uncertain whether it is possible to formulate the following problem in a linear fashion or whether i should attempt to optimize it non-linearly.
I wish to find the optimal combination of a ...
3
votes
1
answer
540
views
when i run the GEKKO optimization, i got an 'FileNotFoundError'
when I run the GEKKO optimization, I got a 'FileNotFoundError', please let me know how to handle it.
Is there any problem in my code?
Y is Binary Integer Decision Variable.
#initialize gekko
model = ...
0
votes
0
answers
87
views
how do i create decision variables
how can i create decision variable of type xp.sos(fico xpress solver) from a list like this
`i have 2 lists K and D with these set of elements as seen below.K is a list of trips and J is a list of ...
2
votes
1
answer
1k
views
How to increase the verbosity level of SCIP solver log
I have the following SCIP solver log
time | node | left |LP iter|LP it/n| mem |mdpt |frac |vars |cons |cols |rows |
0.0s| 1 | 0 | 4 | - | 6k| 0 | 0 | 6 | 200 | 6 | 200 |...
0
votes
1
answer
249
views
How to add separators using constraint handlers in SCIP after airing at the root node using a pricer?
I was initially trying to implement a branch and price algorithm and I was mostly successful in implementing it. I implemented a pricer plugin and everything seems to work. But I want to strengthen ...
1
vote
1
answer
819
views
Getting an assertion error when declaring objective function using MIP library
I am using the MIP optimization library to solve a problem, but I can't correctly declare the objective function. I wrote the code before using Gurobi to solve and I am just trying to translate the ...
1
vote
1
answer
108
views
Why does the variable select strategy of CPLEX influence the user branch decisions? (Python)
I followed the example to branch using make_branch() in the control(branch) callback of the MIP. But I noticed that the solving processes differ surprisingly under different settings of the variable ...
0
votes
1
answer
545
views
Can I optimize a standalone battery with MIP and output the charge/discharge pattern?
I am a beginner in Python. I'm using the mip package to optimize a standalone battery given hourly power price in a year. I need the program to pick 5 lowest price hours to charge the battery and 4 ...
0
votes
1
answer
770
views
MINLP in Julia using Juniper
I'm trying to solve a MINLP with binary variables in Julia.
I have a user-specific objective function which is non-linear and I have nonlinear and linear constraints. I tried to solve the problem ...
0
votes
1
answer
951
views
Mixed Integer Linear Programming Using Python with Multiple Objectives Support
I am very new to this field. I am working on MILP type of problem, and I am using Python with Pyomo.
Pyomo is very easy to use when you are having Single Objective Model. but in my case.
it is ...
0
votes
1
answer
185
views
Inequality Constraint x Upper Bound Definition on Variable Declaration
Which is more computationally efficient for a Mixed-Integer Problem Formulation:
a. State the upper and lower bounds of the variables when declaring the variable
b. Declare the variables with the ...
4
votes
1
answer
2k
views
Learning more about APOPT solver
I have a few questions about how APOPT solves MINLPs.
What nonlinear programming method APOPT uses (interior point, trust region, etc.)?
How does APOPT deal with mixed integers (B&B, outer ...
0
votes
1
answer
128
views
How to write sequence by sequence constraints for scheduling
Now, I tried to add EQ7: a new constraint that make every start_pour[k][j] differ from others start_pour[k][j] that equal to site_process_time[c] to a runnable model. It showed a relaxed solution that ...
0
votes
0
answers
442
views
How to set a gap in the constraints using google or-tools
I'm trying to solve the following problem using Google or-tools
minimize f = x1 + x2
with the constraints
x1 = 0 or 100 <= x1 <= 2000
x2 = 0 or 100 <= x2 <= 2000
x1 + 4 * x2 >= 650
...
0
votes
0
answers
278
views
What is the best way to implement a cut-generation problem in Gurobi?
I want to implement a cut in a MILP, which will be added, if we encounter a MIP-feasible point. The cut shall be implemented by a cut-generation problem. I want to bound the linear cut-expression(the ...
0
votes
1
answer
301
views
How to display a solution with using timelimit in CPLEX for scheduling(CP)
Now I am trying to get a solution within a specific time-limit in my code.
Actually, my problem(scheduling) is NP-hard.
It spends lots of time to get a solution or out of memory.
So, I set a time-...
0
votes
1
answer
347
views
How to check if the solution of an LP is binary in GuRoBi
I am currently implementing my own heuristic to solve MILP problems in gurobi python interface. All my variables are continuous in the beginning and at some point of time the solution becomes ...
0
votes
1
answer
1k
views
CVXPY function to restrict sum of integer variables to be 1 at max in a constraint
I need some way to cap the sum of integer variables to be 1 at max in a python cvxpy optimization task constraint.
What i do not want is to force the sum of the variables to be 1, I just need a ...
0
votes
1
answer
248
views
How to model this MILP problem in python?
I have a problem that I want to solve but I cant figure out how to model it Before asking here I made research and find things that will help but I couldnt wrap my head around it. Example of problem I ...
0
votes
0
answers
313
views
Modelling an IF-THEN statement with multiple conditions in Mixed Integer Linear Programming (MILP)
I need some help modelling the following logic as a mixed integer linear programming constraints for a vehicle routing problem.
The Variables involved are the following:
Xij, SDVlmj, and MDVhkbj ...
2
votes
1
answer
2k
views
How to use Continuous Variables for IF-THEN constraints on DOCPLEX (Python)?
I'm using DOCPLEX to build up a Mixed Integer Linear Programming (MILP) problem which is then solved via CPLEX on Python. However, upon trying to solve the MILP problem using IF-THEN constraints, I ...
0
votes
1
answer
643
views
LP / MILP formulation with OR logic
I'm solving a LP / MILP problem using ILOG CPLEX.
int n = ...;
range time =1..n;
dvar float+ c[time] in 0..0.3;
dvar float+ d[time] in 0..0.3;
dvar float+ x[time];
int beta[time]=...;
float pc[time]...
5
votes
1
answer
300
views
Breakdown an integer value to an array of integer maintaining the sum
I am working on a project where I need to breakdown an integer value according to an array of percentage values.
My end array must contain integer value and the sum of the array must be equal to the ...
0
votes
0
answers
247
views
How to fix error code 9 in subprocess.wait() started by PuLP
I am trying to solve an optimization problem where different data sets are used as input. For most of the sets my programm utilizing the PuLP libary with the coin-or CBC solver works just fine. But ...
2
votes
1
answer
98
views
LP / MILP (CPLEX) difficulties
I'm trying to solve an optimization problem with CPLEX.
//Variables
int n = ...;
range time =1..n; //n definido em data
dvar float+ c[time] in 0..0.9;
dvar float+ d[time] in 0..0.9;
dvar float+ x[...
1
vote
2
answers
5k
views
Identifying infeasibility constraint and relaxing/removing it in Python using Pulp?
I am tried to solve a MILP problem using python pulp and The solution is infeasible. So, I want to find where infeasibility is coming and want to relax it or remove it to find feasible solution. it is ...
1
vote
1
answer
295
views
Why do I get non integer results from MILP problem?
I have a matlab script for diet linear programming problem. I am trying to compare results of linearprog or(intlinprog) with results of cplexlp(or cplexmilp) functions provided by toolbox CPLEX for ...
0
votes
0
answers
195
views
Should I factor in time as a parameter or a variable in a scheduling problem with MILP?
I am trying to formulate a problem that will spit out an optimal schedule for my tasks to be completed. To keep the information confidential, I will refer to my tasks as papers that need to be written....
0
votes
1
answer
55
views
How can I make a variation limits, do not exceed a specific value
Now I am facing a problem that making a variation does not exceed a specific value.
I will describe in details below.
using CP;
int a = 4;
int b = 3;
int c = 5;
range arange = 1..a;
range brange = ...
0
votes
1
answer
256
views
How can I use 'CP' in cplex model
Now I am trying to make an Iteration code by 'using CP' in cplex.
The problem is raised when I use CP to get a solution about 'q1' convex.
What should I do, What I need to change my code below.
main ...
0
votes
0
answers
86
views
Maximizing overlap of high-low set
I have a finite sequence of random positive integer numbers a1,…,aM and I am looking for an approximation algorithm (not exact) that finds sequence of z1,z2,z3,z4,z5,z6 (zigzag) that starts with z1=...
0
votes
1
answer
38
views
How to change value of dvar B as dvar A changes when dvar B depends on A
Now I am facing with a problem about 'changing value of dvar B as dvar A changes when dvar B depends on A.'
There is a code that I write, simply.
int a = 3;
int e = 4;
int t = 6;
int h = 2;
range ...
0
votes
1
answer
226
views
libpynumero_ASL is it available fror windows?
Just curious if libpynumero_ASL.dll is available for windows or it is only installable through linux/ios OS using pynumero libraries in conda?
0
votes
1
answer
723
views
How to solve this error when I use CP in Cplex
Now, I am facing with an error.
'Decision variables of type dvar float not supported by this algorithm.'
Here is the code that I made.
I will write it simply.
Firstly, I got in trouble with error ...
1
vote
2
answers
721
views
How to multiply each corresponding elements in two arrays when using Cplex
There are Two arrays A1[a][c], A2[b][c]
Now I am trying to multiply each corresponding elements of these two arrays.
int a = 3;
int b = 4;
int c = 5;
range aRange = 1..a;
range bRange = 1..b;
range ...
0
votes
0
answers
38
views
How to compare Matlab OptmizationExpression's?
I'm solving a binary integer linear program (BILP). To generate the optimization expression, I take the dot product of vector of decision variables with the vector of each decision's value. The two ...
0
votes
1
answer
397
views
R: Mixed Integer Linear Programming contains a variable that is not part of the model
when I try to run the following script, error message:The expression contains a variable that is not part of the model.
appr <- c(0.15, 0.11, 0.10, 0.13, 0.18, 0.20, 0.18, 0.11, 0.07, 0.06, 0.07, ...