Originally posted by: Chawalit
Dear Philippe;
Here is the more formal mathematical ways I have for the problem.
​I am coming from MIP and this is my first time using CP.
â€
​We have some of the data:
tuple panel_tuple{
key int partnumber;
float width;
float height;
int processingtime;
};‹
​{panel_tuple} PanelData;
tuple WorkOrder_tuple{
key int WOnumber;
int partnumber;
int ReleaseDate;
int DeliveryDate;
int Demand; // unit
int processingtime;
};
{WorkOrder_tuple} WorkOrderData;
tuple stainless_tuple{
key int stainlessindex;
float width;
float height;
int capacity;
int CleaningTime;
};
{stainless_tuple} StainlessData;
tuple group_tuple{
key int GroupNumber;
int layout;
{int} panel_set; // group of the panel can be process on the same machine
int processingtime;
int stainlessindex;
float Waste;
int ProductionOutput; // number of production per machine slot
};
{group_tuple} GroupData;
tuple machine_tuple{
key int machinenumber;
int NumberOfSlot;
{int} stainless_set;
int machine_cost;
};
{machine_tuple} MachineData;
int cycles; // number of machine cycle consider per day
dvar int PanelAssignment[PanelData][Slot_Range][GroupData][m in MachineData][cycles] in 0..1; // to assign the panel into each slot for each machine
dvar int GroupAssignment[GroupData][Slot_Range][MachineData][cycles] in 0..1; // to assign the group into each slot for each machine
//Objective function
minimize the total Waste
//Constraint
//1. Demand constraint
//each of the work order, the demand must be satisfied within the given time interval (releasedate, duedate)
//The PanelAssignment will assign the panel to the machine, slot, for each cycle (panel can use machine many cycles, many slots)
sum( p in PanelData, g in GroupData, m in MachineData, s in m.NumberOfSlot, c in cycles, w in WorkOrder: w.partnumber == p) PanelAssignment [p][s][g][m][c] * g.ProductionOutput >= w.Demand; // with the specified period given
// the total PanelAssignment on the same machine, same cycle must be less than NumberOfSlot available on the machine
// 2. Group assignment constraint
// There is only 1 group can be assigned to the machine on the same cycle
// The panel within the same group can be assigned to the machine on the same cycle
//3. Time interval for each machine and cycle must have the same size as the panel processing time but must be within the release date and due date
//4. the assignment of the stainless must be the same as in the group specify. The time interval for the stainless is the same as the time interval of the machine + CleaningTime
//5. There is the capacity of each stainless
End;
I hope it is much clear now.
Thank you very much in advance for your help.
Chawalit
#DecisionOptimization#OPLusingCPOptimizer