Originally posted by: Filipe Costa
Hi,
If I understood your problem correctly, you can do something like this:
{string} machines = {A,B,C,D,E};
tuple Setup {
string machine_origin;
string machine_destination;
int time;
}
{Setup} setup_times[m in machines]=...;
tuple Setup_Indexed{
int id1;
int id2;
int time;
}
{Setup_Indexed} setup_times_indexed[m in machines]={<ord(machines,m_dest),ord(machines,m_dest),time>|<m_or,m_dest,time> in setup_times[m]};
Then when you declare your sequence variable:
you must specify the types :
types all(o in operations: ma.name==o.machine.name) ord(machines,o.machine.name); // ma -> all machines
Then the noOverlap constraint should work.
Regards
#DecisionOptimization#OPLusingCPOptimizer