Skip to main content
0 votes
2 answers
38 views

Docplex: KeyError: (-1, 0) when attempting to add a constraint that makes the first value have to equal the last

Part of my model states that the initial value of a time series should always equal the last. When modelling this for just one time series, the constraint is added no problem. m.add_constraint(var_1[-...
Trev's user avatar
  • 23
0 votes
2 answers
84 views

Installing IBM ILOG CPLEX academic version for use with python

I am struggling to activate the academic version of CPLEX for use in docplex. I had tried following the steps outlines in https://www.ibm.com/docs/en/icos/22.1.2?topic=cplex-setting-up-python-api, but ...
Trev's user avatar
  • 23
0 votes
1 answer
97 views

IBM CPLEX does not have a python folder on install

I have installed IBM CPLEX Studio 2212, and am attempting to verify that I have installed the academic version to remove the limit on DOCPLEX. However, upon install there is no python folder in the ...
Trev's user avatar
  • 23
0 votes
1 answer
28 views

Docplex use for timeseries based variables

I am trying to model an optimisation problem where each item in a list is essentially power generated at that hour. I am trying to minimise the amount of energy stored while still getting the same ...
Trev's user avatar
  • 23
0 votes
1 answer
35 views

Docplex and callback problems

I’m trying to implement a custom callback that solves a subproblem during the optimization process. I want to: Get the values of certain variables from the main model's solution. Solve a subproblem (...
Javier's user avatar
  • 3
-3 votes
1 answer
37 views

How can I write the values of a decision variable to an Excel sheet after running an iterative optimization in CPLEX OPL?

I am performing an iterative optimization using the main function in CPLEX OPL. After each iteration, I want to write the values of the decision variables to an Excel sheet. The optimization runs for ...
SUBHADARSHINI PANDA's user avatar
0 votes
0 answers
50 views

How to write flow constraint for destination node if I have to stay at destination for some time and then move towards other destination node

A team travels by car from a source node to a destination node, passing through intermediate nodes based on a predefined network. Upon arriving at a destination node, the team is required to stay for ...
Vandana Kumari's user avatar
-1 votes
1 answer
22 views

Download and Installation of cplex/docplex academic version

I recently downloaded the latest version of IBM ILOG CPLEX Optimization studio using my Academic credentials. However upon installation, there is no python folder with the setup.py file that would ...
Richlove Frimpong's user avatar
0 votes
1 answer
39 views

How can I update a matrix in the current iteration while preserving the values from previous iterations using the main function in CPLEX OPL?

I want to update a matrix with values of the current iteration as well as the previous iteration in the main function. Please help me in achieving this. I have tried this code. int TSlots = 96; ...
SUBHADARSHINI PANDA's user avatar
2 votes
1 answer
36 views

How to update a matrix in iterative optimization using cplex opl?

I am solving an iterative optimization problem in cplex opl using the main function. However, I am getting errors while printing a matrix value. Please help me in solving this issue. int Nod=41; ...
SUBHADARSHINI PANDA's user avatar
0 votes
1 answer
29 views

Reduced Costs in IBM ILOG CPLEX Optimization Studio

In this Stack Overflow post, they give the code to find the solution duals (shadow prices). execute { writeln(ctMaxTotal.dual); writeln(ctMaxTotal2.dual); writeln(ctMaxChloride.dual); } What is the ...
David Coley's user avatar
1 vote
1 answer
23 views

How to include .dat file while writing a code in cplex opl using main function?

I am trying to solve an iterative optimization problem in cplex opl using main function. The optimization objective and constraints are written in subvaluenew.mod. float maxOfx = ...; dvar float x; ...
SUBHADARSHINI PANDA's user avatar
0 votes
1 answer
35 views

How to update non-decision variables/parameters Iteratively in CPLEX OPL using main function?

I am running a CPLEX OPL model for 10 entities. The objective is to optimize a certain objective for each entity. Step 1: The CPLEX model first runs for the first entity, optimizing the objective ...
SUBHADARSHINI PANDA's user avatar
0 votes
1 answer
43 views

Limit the memory used when solving using docplex

I am implementing a mathematical model using docplex and the academic version of CPLEX. I am attempting to solve very big problem instances. I faced a MemoryError. Is there a way to overcome this? I ...
M Germanos's user avatar
0 votes
1 answer
28 views

How to solve the error cplex can't extract expression?

For a given problem, I am writing the following constraint. But I am getting the error as cplex(default) can't extract the expression : forall(v in VehicleRange){ slot==startSlot[v]; tm==...
SUBHADARSHINI PANDA's user avatar

15 30 50 per page
1
2 3 4 5
158