Dear all,
I'm quite new to Aimms, therefore I don’t know if my problem is easy to solve or a difficult one. My end goal is to be able to generate an automated production planning for a big pizza bakery. The machine shop scheduling example is in the direction for what I’m looking for, see the link below.
https://how-to.aimms.com/Articles/473/473-ProductionPlanning-machinescheduling.html
The machine shop scheduling example determines the optimal machine and start time for each order, so that the makespan is minimized.
I want to expand this model, so that more contraints can be added. An important binary variable for me is ‘DoYouHaveProductionInAPeriod(i,o,i_hc)’: do you have production at a certain machine i, for a spefic order o, at a certain time period i_hc. An example of a constraint that I want to add and using the variable ‘DoYouHaveProductionInAPeriod(i,o,i_hc)’ is if I have 4 workers available, only 4 machines can run at the same time → for each i_hc, sum((i,o),DoYouHaveProductionInAPeriod(i,o,i_hc) <= 4.
But how do generate the variable ‘DoYouHaveProductionInAPeriod(i,o,i_hc)’?
In my mind it should be possible, because the binary variable StartProductionOnProductionLine(i,o,i_hc) indicates when production starts and the parameter ActivityLength(i,o) states the duration of an order o on a specific machine i.
I was thinking of adding a constraint, which only works at time i_hc when StartProductionOnProductionLine(i,o,i_hc) is 1: sum((i_hc1)| (i_hc1>= (StartProductionOnProductionLine(i,o,i_hc)*i_hc1) and i_hc1<= StartProductionOnProductionLine(i,o,i_hc)*(i_hc1+ActivityLength(i,o))), DoYouHaveProductionInAPeriod(i,o,i_hc))=ActivityLength(i,o)
But I got an error: There is no operation defined for operator "*" with arguments of data type numeric and data type element; the arguments themselves are "StartProductionOnProductionLine(i,o,i_hc) $ domStartProductionProductionLine(i,o,i_hc)" and "i_hc1".
Who can help me to define the binary variable ‘DoYouHaveProductionInAPeriod(i,o,i_hc)’? Is it possible or not?