489 questions
0
votes
1
answer
49
views
How to export second-stage optimization results to Excel in a two-stage optimization problem using CPLEX OPL main function
I am implementing a two-stage optimization problem in CPLEX OPL using the main function.
In the first stage, I solve an optimization model and use its results as input data for the second stage.
In ...
-3
votes
1
answer
47
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 ...
2
votes
1
answer
55
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;
...
0
votes
1
answer
49
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 ...
0
votes
1
answer
33
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==...
0
votes
1
answer
64
views
no solution in OPL CPLEX for DRLP
I am trying to run a DRLP within CPLEX. My parameters are in a sperate file. As I don´t have much experience with OPL, I don´t know what I am doing wrong. In my understanding the model should give a ...
0
votes
0
answers
107
views
CPLEX and OPL: VRP variant solved with Branch-and-Price
I would like to solve a Vehicle Routing Problem (VRP) variant with Branch-and-Price using CPLEX and OPL. With the VRP variant, the number of vehicles should be minimized. Each customer must be visited ...
0
votes
1
answer
46
views
Problems with creating a mathematical clustering model with an additive criterion in CPLEX OPL Studio
I'm trying to create a model in CPLEX OPL Studio for clustering with an additive criterion, but I have a number of errors that I don't know how to fix correctly, because I'm very bad at OPL Studio
...
0
votes
1
answer
39
views
How to add an Array to a datasource in Cplex with Java API using an OPL model?
I'm a newbie with cplex. I have a model which is written in opl and I want to run the model from my java application. To do that I want to fill the external data directly from my application instead ...
0
votes
1
answer
43
views
Why is my OPL model not providing a solution for the evacuation problem?
I'm working on an OPL model for a two-floor evacuation simulation. The model is supposed to calculate the flow of people evacuating from various nodes to the exits while considering constraints like ...
0
votes
1
answer
48
views
How to input a set into an OPL (Optimization Programming Language) model using Python
In OPL for input set we are defining as given below:
tuple Damage_line_Nodes {
int value;
};
// Declare a set with a few tuples
{Damage_line_Nodes} Damage_line_Node = ...;
In python (we are trying ...
0
votes
1
answer
62
views
How to code in OPL CPLEX - Progressive hedge algorithm
I am trying to write the code of the progressive hedge algorithm in OPL CPLEX. However, I am unable to write the correct code in OPL CPLEX. The progressive hedge algorithm algorithm is attached here. ...
1
vote
1
answer
38
views
how to remove a tuple of tupleset with conditions
I habe the code like this:
tuple Variableset{
int rooms;
int days;
int slots;
int instructors;
int groups;
int courses;
}
{Variableset} A = ...;
tuple Solution{
int days;
int slots;
...
0
votes
1
answer
45
views
Can we check the optimality gap between the solution found within a specified time limit and the actual optimal solution in CPLEX OPL?
In CPLEX OPL code, I have specified a time limit of 1800 seconds for obtaining a solution. How can I determine the optimality gap between the solution I'm obtaining and the true global optimal ...
0
votes
1
answer
48
views
Resources idle time
I'm dealing with RCPSP, I have calculated the resource consumption per day using cumulFuntion like the statement below:
cumulFunction resUsage [r in resources] =
sum(i in activities : reqRes[i][...
0
votes
1
answer
48
views
using dvar int in cumulFunction
I have defined variables Itvs[units][activities][results] as intervals and resAlloc as an integer. The value of resAlloc influences the size of each interval in Itvs. However, when attempting to ...
1
vote
1
answer
35
views
Combination of tuples and nest the elements of these 2 tuples together im CPLEX
I have two tuples like this:
tuple Combination_L {
int rooms;
int instructors;
int studentgroups;
int courses;
};
{Combination_L} L = ...;
tuple Combination_T {
int days;
int slots;
};
{...
0
votes
1
answer
43
views
How to update the element of set
I have a set of damaged lines initially.
damagelines = {1,5,8,10,25} at time t = 1 second
at time t = 2 seconds one of the lines i.e. l = 5 is repaired by the repair crew. I have a variable that ...
0
votes
1
answer
54
views
3-dimension Parameter in Cplex
I've got a model that I need to calculate the capacity of rooms (i) divided by the number of students in a student group (m). I use this value in my object function. I'm not sure how to code this ...
0
votes
1
answer
33
views
MS-RCPSP in OPL, CPLEX, adding multiple predecessors for a task
I developed this code using OPL with Cplex for the Multi-Skill Resource-Constrained Project Scheduling Problem (MS-RCPSP), and it performs well when each task is assigned a single predecessor. Now, I ...
0
votes
1
answer
41
views
Implementing the RCPSP with OPL using CPLEX adding multiple predecessors for a task
After receiving help numerous times with this issue here, I'm on my way from one step to finishing my model. I've created this one, and it's functioning well with a single predecessor task. However, I'...
1
vote
1
answer
87
views
Resource-Constrained Project Scheduling Problem (RCPSP) Implementation in OPL for CPLEX
I would appreciate any guidance on correcting my mistakes. I'm attempting to implement the RCPSP model by Pritsker et al. (1969).
Link : Here
// Example data
range J = 1..5;
range R = 1..3;
range T = ...
0
votes
1
answer
54
views
How to write divided by in objective function
My problem is multi-objective optimization problem. The expression for the objective function is given below:
Maximize (w1F1 + w2(1/F2))
w1 and w2 are weighting of two objective function F1 and (1/F2)
...
1
vote
0
answers
58
views
IloEnv env ; don't work in the dbug and it can access to it
i run a code in c++ in debug version step by step (F11) using visual studio2010 linked with cplex 12.4, so i obtained this error and message at the line where i declare IloEnv env ; it don't work , ...
0
votes
1
answer
66
views
In Cplex, is there a way to assign a different operator to a time interval variable when shifts changes?
I am using Cplex OPL to model flexible jobshop scheduling. I can use the intensity function to assign a task to an operator during his/her shifts. If the span is beyond a shift, the task will pause, ...