For my graduation product, I am modelling a production planning system in the context of a rolling horizon. The model can allocated products to plant A and plant B, based on the expected demand for the upcoming periods. Plant A has a production lead-time of 1 week and plant B has a production lead-time of 2 weeks.
Note that for some products, it is cheaper to produce at plant A, whereas for other products, it is cheaper to produce at plant B.
I formulated the following constraint in AIMMS to update the inventory:
In which p refers to the set of products, h to the horizon, and r to the set of plants. The LeadTime(r) is modeled as a parameter and takes value 1 for plant A and value 2 for plant B.
However, with this constraint, AIMMS always allocates all products to plant A.
When modelling the inventory constraint by:
the model does allocate some products to plant A and some to plant B (when production is cheaper at plant A, the product are allocated to plant A and otherwise to B.
Additionally, the first-formulated constraint (unnecessary) counts Lost sales, while the second constraint does not count them (even if the products are allocated to the same plant).
- Why does the model behave less optimal by included the first constraint compared to the second constraint?
- How to correctly include a plant-dependent lead time in the horizon?
Your syntax looks correct. From the piece of information here, it is hard to explain the result.
However, AIMMS provides diagnostic tools to help you find out why the model does not work as expected. In your case, you may use MPI to check if the constraint is generated correctly.
To use MPI, you need first solve your model, and then go to menu Tools->Diagnostic Tools -> Math Program Inspector, where you can see all the generated constraints and variables. You can find each constraint, open each node and see if the individual constraint is generated as expected.
If you could not solve the problem, you can share your AIMMS project here.