Questions tagged [docplex]

docplex (a.k.a. IBM® Decision Optimization CPLEX® Modeling for Python) is a Python modeling API that provides modules for mathematical programming via CPLEX and constraint programming via CP Optimizer.

316 questions
1
vote
1 answer

how does docplex use local solver?

I want to use docplex to solve a MIP model locally but error. mdl = Model('name', agent='local') docplex.mp.utils.DOcplexException: No CPLEX DLL and no DOcplexcloud credentials: model cannot be solved! my python version is 3.6.6, the version of…
1
vote
1 answer

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 python? if yes is there any documentation to use this…
sel
  • 942
  • 1
  • 12
  • 25
1
vote
0 answers

Variable removal in docplex

I am trying to implement Column Generation using docplex. Is there any way to remove variables that have been already added to the model?
1
vote
2 answers

What are the limits of docplex (the cplex version of python) in terms of the number of variables and constraints?

I am solving an optimization problem in python using docplex(not docplex cloud API) with only 2 constraints and 92 variables (dvar in OPL). But even though I get this error: docplex.mp.utils.DOcplexLimitsExceeded: **** Promotional version. Problem…
sel
  • 942
  • 1
  • 12
  • 25
1
vote
1 answer

How to model constraints in optimization problems using docplex (python)?

I need to solve an optimization problem that is similar to the knapsack problem. I have detailed the optimization problem in this post: knapsack optimization with dynamic variables I actually need to tu use python instead of OPL, so I have installed…
sel
  • 942
  • 1
  • 12
  • 25
1
vote
1 answer

Create an integer variable that can only takes values from a list with the cplex python api

from docplex.cp.model import CpoModel mdl = CpoModel() To create an integer variable between [0,10]: variable = mdl.integer_var(min=0, max=10, name="variable") How can I create a variable that only can take an integer value from a list? For…
Erik Garcia
  • 88
  • 1
  • 6
1
vote
2 answers

Get node logs from docplex

CPLEX prints out nice node logs, how can I get them using docplex? I've tried changing content.solver.verbose and log_output but I'm not getting the information (current solution, gap) to print. I'm using this code: context.solver.log_output =…
MLE
  • 69
  • 6
0
votes
0 answers

Solving the same MIP model with benders annotations twice throws an error in Cplex in python

I am using Docplex in Python to solve a MIP. The model has benders annotations on it. from docplex.mp.model import Model mdl = (create the MIP model with benders annotations) mdl.solve(log_output=True) The previous code runs with no problem at all.…
Ricotero
  • 13
  • 4
0
votes
0 answers

CPLEX Studio solve MIP problem forever, what should I do?

everyone I have tried to solve a MIP problem with CPLEX Studio. Now it's 8 hrs. still not find the solution. I am minimizing distance of waste collection. Details are as follows: The data is matrix of 49 rows * 49 columns. Decision Variable:…
0
votes
0 answers

Need help Cplex code about optimization waste collection with collection point my code seem not right

I am currently working on optimizing waste collection and attempting to create a Traveling Salesman Problem (TSP) model that incorporates collection points. The primary objective of this code is to efficiently collect waste from all the general bins…
0
votes
1 answer

Reading a nested array Using SheetRead from Excel file in IBM ILOG CPLEX OPL

I am trying to read a set of players P that play in position Q from excel. A sample of how the sets look is given below - // set of positions q Q = {"GK", "DEF", "MID", "FWD"}; // set of players p allowed to play in Q position Pq = [{"Raya",…
0
votes
1 answer

Needassistance Debugging " Data element already Been set" error on IBM ILOG CPLEX studio

I have made a model to optimize FPL team selection and tried running for 3 rounds of the season. However I am getting an error for the data set "Pq" which is the set of players p allowed to play in position q and is indexed by the set Q. The error…
0
votes
0 answers

How to do cross validation on a docplex MILP model?

I've created some mixed integer linear programming models for feature selection in classification based on support vector machines. Now I should do cross validation on these models, but I can't figure out how to use the scikit learn library to apply…
0
votes
0 answers

Pass additional information to IBM Watson Machine Learning job and retrieve via python API

I've been using IBM CPLEX Optimization Studio to run Decision Optimization (DOCPLEX) models locally with python API. I have a bulk of temporal data (hourly time steps for 20 years) and I define and solve optimization problems for 24h windows. I can…
0
votes
1 answer

Maximize the amount of zeros in continuous matrix (Python, docplex)

I have an optimization problem with a continuous matrix variable (C), but: My objective function is not about min/max the entries of C, but to maximize the amounts of 0 in C. My approach to model this, is to translate C to heaviside(C), which would…
msax
  • 13
  • 3