Originally posted by: AndyHam
Suppose a vehicle picks up and delivers jobs among machines in a factory line. One vehicle is currently located at machine 3 after delivering j1. Now, the next job is j2. So, the vehicle should first travel to m1 and then travel to m2 as shown in Fig. 1a. However, my CP code only represents Fig. 1b scenario, which is an incorrect representation.
We can divide each job into two sub jobs to correctly model, but I think it is not a good approach. Please give me some idea, as IBM always does.
============================================
j in Jobs;
m in Machines;
v in Vehicles;
tuple t_Job {
key int job;
int from_machine;
int to_machine;
};
{t_Job} Jobs = ...;
tuple t_m2m_Travel {
key int m1;
key int m2;
int ttime;
};
{t_m2m_Travel } m2m_Travel;
dvar interval itvJobs[j in Jobs] size t_m2m_Travel[j.fromMachine,j.toMachine];
Sequence seqVehicles[v] in all(j in Jobs) types j.toMachine;
forall (v in Vehicles) noOverlap(seqVehicles[v],m2m_Travel);
============================================
#DecisionOptimization#OPLusingCPOptimizer