Skip to main content

Hi,

I was a production planner at a rotational molding factory, and now I try to model this environment in Aimms by using the example of the machine shop scheduling problem.

For my model I only need one extra ‘dependent’ variable → a variable that tracks starts and ends of products on a machine. The reason is that starts/ends of a product on a machine involves set-up cost, and I want this to be a penalty in the TotalCostOfStartingOrders.

So I created the binary variable DoYouStartOrRemoveAProductFromAPosition(m,a,s,p,pn,i_dc), in where m is the machine (2 machines), a is the arm (each machine has 3 arms), s is the side of de arm (each arm has 2 sides: up or down), p the position (each side has 3 positions), pn is the product name (the model contains 12 products) and i_dc is the daily calender in workdays (66 workdays).

This binary variable is defined by three contraints:
DoYouStartOrRemoveAProductFromAPosition(m,a,s,p,pn,i_dc)<=(DoYouHaveProductionOfAProductInAPeriod(m,a,s,p,pn,i_dc) + DoYouHaveProductionOfAProductInAPeriod(m,a,s,p,pn,i_dc-1))

DoYouStartOrRemoveAProductFromAPosition(m,a,s,p,pn,i_dc)>=(DoYouHaveProductionOfAProductInAPeriod(m,a,s,p,pn,i_dc) - DoYouHaveProductionOfAProductInAPeriod(m,a,s,p,pn,i_dc-1))

DoYouStartOrRemoveAProductFromAPosition(m,a,s,p,pn,i_dc)>=(DoYouHaveProductionOfAProductInAPeriod(m,a,s,p,pn,i_dc-1) - DoYouHaveProductionOfAProductInAPeriod(m,a,s,p,pn,i_dc))

I added the variable in the cost function:
sum ((m,a,s,p,o,pn,i_dc), StartProductionOnProductionLine(m,a,s,p,o,i_dc)*P_CostOfStartingOrderOvens(m,a,s,p,o,i_dc)+DoYouStartOrRemoveAProductFromAPosition(m,a,s,p,pn,i_dc))

The thing is that after I implemented the variable in the cost function, the solver does not work properly → after it finds an ‘ok’ solution, it does not find better solutions. You can see this in screenshot 1: a solution of 4470 is found. In the attachment it is version 10.

When you remove the variable and the constraints, and you run the solver again it finds a solution of 2832, see screenshot 2 and version 11. Because the model has 30 orders, which means in the worst case scenario 30 starts and 30 ends (penalty of 60), a solution of 2892 or lower is what I'm looking for in version 10. But I get 4470, which is way off. Who can help me to find a better way to track starts and ends in the model and use it as a penalty in the cost function?

 

Hi ​@Harm. Your objective in version 10 is:

sum ((m,a,s,p,o,pn,i_dc),
StartProductionOnProductionLine(m,a,s,p,o,i_dc)*
P_CostOfStartingOrderOvens(m,a,s,p,o,i_dc) +
DoYouStartOrRemoveAProductFromAPosition(m,a,s,p,pn,i_dc))

Please note that the domain used inside the sum also contains the index 'o’, which is not part of the index domain of the variable DoYouStartOrRemoveAProductFromAPosition, and therefore each of these variables is basically multiplied by 30 (the cardinality of the set S_OrderNumbers).

Normally AIMMS will give a warning regarding unused indices, but this project reached a limit on the amount of warnings.

You probably want to use:

sum ((m,a,s,p,o,pn,i_dc),
StartProductionOnProductionLine(m,a,s,p,o,i_dc)*
P_CostOfStartingOrderOvens(m,a,s,p,o,i_dc))
+
sum ((m,a,s,p,pn,i_dc),
DoYouStartOrRemoveAProductFromAPosition(m,a,s,p,pn,i_dc))

 


Hi Marcel, 

Indeed, I made an error in the objective function. Also in version 11. See the attachments for the updated versions.

With the updated objective functions, I found that the solver could find good solutions: without incorporating the starts and stops, a solution of 236 was found, see screenshot 1. With the starts and stops, a solution of 262 was found, see screenshot 2. This is also what I expected: upper bound of the solution should be: 236+30 orders*2 (start and stop) = 296. Lower bound is the 236. The solution of 262 is right in the middle.

The error messages are now only when the Maininitialization runs, and not when the solver is running.

Do you see any more improvements that can be made?

 


Hi ​@Harm. I don't think you need two copies of your project. You can just combine them in one by defining some binary parameter, e.g., UseV10. Then you should add this parameter to the index domain of some variables and constraints, for example:

Variable DoYouStartOrRemoveAProductFromAPosition {
    IndexDomain: (m,a,s,p,pn,i_dc) | UseV10;
    Range: binary;
}

If you set UseV10:=1 then the project will run version 10 and if you set UseV10:=0 it will run version 11. That is, if UseV10 equals 1 then the variable DoYouStartOrRemoveAProductFromAPosition will be active and otherwise not.

Your project has several warnings regarding not commensurate units. I did not see any errors.

 


Reply


Didn't find what you were looking for? Try searching on our documentation pages:

AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator