# Tag Info

### Constraint programming using solver: how to state the time limit of search?

What Nikaza said, and also: problems of this kind often have a large number of solutions that differ only by trivial permutations/relabellings/reorderings. For example, if one worker is assigned 10 ...

### Integrating genetic algorithm (or other heuristic methods) with CPLEX

I am aware of two ways of combining a (meta-)heuristic with a solver (like cplex). 1) Warm start: use a heuristic to quickly find a good solution and give it to the solver as a starting solution. ...

### Python to Excel

A great option is to use the pandas library, and specifically pandas.DataFrame.to_excel is what you need. I suggest you use one column per variable index, and one line per non zero variable. Here is ...

### Constraint programming using solver: how to state the time limit of search?

CPLEX is probably spending 15 hours trying to reduce the optimality gap. This is very common issue in MILP problems. The way MILPs are solved is commonly to make all integers continuous and solve the ...

### Docplex : model is infeasible

Short answer: The model is wrong. :-) Longer answer: After attempting to solve the model and being told it is infeasible, run the conflict refiner to get an set of mutually inconsistent constraints. ...
Accepted

Accepted

### Binary/integer variables get real values in docplex

All solution values will be floating-point numbers - independent of the variable types. In an optimal or feasible solution, they will simply be close to an integer value, depending on the specified ...
Accepted

### What is the default weight allocation in solving multi-objective on CPLEX?

Weights are defined by you to tell CPLEX how objectives with the same priorities are blended together. If you don't define weights, by default they are all assumed to be equal to 1. Let's assume in ...
Accepted

### Precedence constraints using binary variables - DOCPLEX

After a while, I finally found a way to establish a precedence constraint using binary variables. It was hard to find examples of precedence constraints that do not use time as a parameter in both ...
Accepted

### Logical operation on an array in DOCplex

The first argument in logical_and is *args but it's not unpacked in the subroutines inside of ...

let me a tiny example out of my zoo and buses story: ...
Accepted

### CPLEX MILP Report all solutions found

In Making optimization simple (Python) I gave 2 options: progress listener / MIP info callback get solutions one by one The models: ...
Accepted

### Constraint to handle the machine-configuration's change between initial position and its first occurrence in the process

I think you do need some variable that keeps track of the configuration a machine is in at a given process plan position. This could be a variable $C_{wcj}$ that is $1$ if machine $w$ is in ...
Accepted

### LP solver CPLEX is 'optimal with unscaled infeasabilities'?

When you turn CPLEX loose on a model, it runs a presolver that does assorted magic tricks that end up with a modified model. It then solves the modified model and, assuming it finds a solution to the ...
Accepted

### How to retrieve the variable's value in DOCplex

The key is a tuple of strings and not a tuple of numbers. ...

### opposite of no_overlap constraint in docplex for CP

You can use overlap_length ...

### Python to Excel

I have used openpyxl several times to create or alter excel files. It is quite easy if one is familiar with Python. With this module you can iterate through your variables and write its value to a ...
Accepted

### Sensitivity analysis for specific sets of constraints on DoCplex

You can filter the results you get from sensitivity.rhs : See small example out of the zoo example again: ...

### How to check infeasibility with conflict refiner (docplex mixed integer programming )?

As the docplex documentation says: Given an infeasible model, the conflict refiner can identify conflicting constraints and bounds within it. So, consider you ...
Accepted

### Rotated Second-Order Cone Constraints in docplex

For your first question: DOCplex instead is an object-oriented modeling API. It builds either on the CPLEX Python API (for local solves) or on the DOcplexcloud service, for remote solves. It provides ...
Accepted

### Docplex Error: Model has non-convex objective

The comment by @prubin is spot on. The V matrix is probably being numerically evaluated as not positive semidefinite by CPLEX. That can easily happen when one ore more eigenvalues are what you call ...

### Docplex Error: Model has non-convex objective

Cplex can minimize convex quadratic objectives, or maximize concave ones. For example, minimizing $x^2+y^2$ is OK, but minimizing $x^2 -y^2$ is not. See this page for more details: As mentioned in the ...

### CPLEX MILP Report all solutions found

One solution is to add an Incumbent callback (not sure whether DOCPLEX support this yet, but certainly Java/C++), and log the solution + time stamp within the the callback. Another solution which, if ...

### Constraint programming using solver: how to state the time limit of search?

CP Optimizer is doing a search for progressively better solutions. Each time it finds a feasible solution, it restricts the remainder of the search to solutions with better objective values than what ...
Accepted

### How to display the range of coefficients in docplex log?

even from docplex you can get access to the cplex python API. See example in SO for sensitivity analysis at https://stackoverflow.com/questions/62475139/sensitivity-analysis-in-docplex Plus before the ...

### Could DOcplex.CP recognize that it solves the graph coloring minimization problem?

The automatic search of CP Optimizer does not try to recognize a graph colouring problem. As you notice, fixing the colour of one variable to get rid of some symmetries in the model may help. ...