Original Message:
Sent: Wed January 10, 2024 08:15 AM
From: ALEX FLEISCHER
Subject: Constraint Progrraming for Unrelated Parallel Scheduling:
Hi,
C and Y may take very large values , if you want to avoid this, you can write
range horizon=1..100;dvar int Y[Jobs] in horizon; // Start time of job jdvar int C[Jobs] in horizon; // Completion time of job j
------------------------------
[Alex] [Fleischer]
[Data and AI Technical Sales]
[IBM]
Original Message:
Sent: Wed January 10, 2024 07:28 AM
From: Berkay Orkun Erkılınç
Subject: Constraint Progrraming for Unrelated Parallel Scheduling:
------------------------------
Berkay Orkun Erkılınç
Original Message:
Sent: Wed January 10, 2024 05:58 AM
From: ALEX FLEISCHER
Subject: Constraint Progrraming for Unrelated Parallel Scheduling:
Let me fi the model you shared with me to make it give solutions
.mod
// CP Model for Job Scheduling// Include necessary librariesusing CP;int nbJobs = ...;int nbMchns = ...;int nbPositions = ...;range Positions = 1..nbPositions;range Jobs = 1..nbJobs;range Mchns = 1..nbMchns;// Parametersint mEligible[Jobs][Mchns] = ...; // Ajkint setup[Mchns][Jobs][Jobs] = ...; // sijkint processTime[Jobs][Mchns] = ...; // Ljktuple triplet { int j1; int j2; int time; } {triplet} transitionTime[m in Mchns] = { <j1,j2,setup[m][j1][j2]> | j1 in Jobs, j2 in Jobs}; dvar interval Z[j in Jobs];dvar interval X[j in Jobs][m in Mchns][p in Positions] optional size processTime[j][m];dvar sequence Mch[m in Mchns] in all(j in Jobs, p in Positions: mEligible[j][m] == 1) X[j][m][p];dvar int Y[Jobs]; // Start time of job jdvar int C[Jobs]; // Completion time of job jdexpr int totalCompletionTime = sum(j in Jobs, k in Mchns, p in Positions) endOf(X[j][k][p]);execute{ cp.param.timeLimit=3600;}minimize totalCompletionTime;subject to {forall (j in 1..nbJobs) alternative(Z[j], all(m in Mchns, p in Positions: mEligible[j][m] != 0) X[j][m][p]); forall(j in Jobs, p in Positions,m in Mchns: mEligible[j][m]==0) presenceOf(X[j][m][p])==0; forall (m in Mchns) noOverlap(Mch[m], transitionTime[m],true); forall(k in Mchns) { noOverlap(Mch[k], transitionTime[k]); }forall(i in Jobs, j in Jobs : i < j) { forall(m in Mchns) { // Apply the constraint only if both jobs are scheduled on the same machine endBeforeStart(Z[j], Z[i], setup[m][j][i]); }}// forall(j in Jobs) C[j] >= Y[j] + sum(m in Mchns, p in Positions) (presenceOf(X[j][m][p]) * processTime[j][m]); }
and
.dat
nbJobs = 5; // Example number of jobsnbMchns = 3; // Example number of machinesnbPositions = 10; // Example number of positions// Eligibility of jobs for machines (1 if eligible, 0 if not)mEligible = [ [1, 0, 1], // Job 1 eligibility for each machine [1, 1, 1], // Job 2 [0, 1, 0], // Job 3 [1, 0, 1], // Job 4 [1, 1, 1] // Job 5];// Setup time between jobs on each machinesetup = [ // Machine 1 [ [0, 10, 20, 30, 40], // Job 1 setup times to other jobs [10, 0, 15, 25, 35], // Job 2 [20, 15, 0, 20, 30], // Job 3 [30, 25, 20, 0, 25], // Job 4 [40, 35, 30, 25, 0] // Job 5 ], // Machine 2 [ [0, 12, 18, 28, 38], // Job 1 setup times to other jobs [12, 0, 16, 26, 36], // Job 2 [18, 16, 0, 21, 31], // Job 3 [28, 26, 21, 0, 24], // Job 4 [38, 36, 31, 24, 0] // Job 5 ], // Machine 3 [ [0, 11, 19, 29, 39], // Job 1 setup times to other jobs [11, 0, 14, 24, 34], // Job 2 [19, 14, 0, 22, 32], // Job 3 [29, 24, 22, 0, 23], // Job 4 [39, 34, 32, 23, 0] // Job 5 ]];// Processing time of each job on each machineprocessTime = [ [10, 0, 20], // Job 1 processing time on each machine [15, 25, 15], // Job 2 [0, 20, 0], // Job 3 [15, 0, 10], // Job 4 [20, 10, 20] // Job 5];
------------------------------
[Alex] [Fleischer]
[Data and AI Technical Sales]
[IBM]
Original Message:
Sent: Thu January 04, 2024 12:43 PM
From: Berkay Orkun Erkılınç
Subject: Constraint Progrraming for Unrelated Parallel Scheduling:
Just wondering is there any Constraint Programming model made in IBM CPLEX ILOG similar to this mathematical modeç.
------------------------------
Berkay Orkun Erkılınç
------------------------------