I have a few questions about my model, which I hope the AIMMS community can answer. Please bear with me, as I should be drawing to the conclusion of my thesis (when this model works).
Sum and indices
In the accompanied model, I am trying to add several constraints. However, when setting these constraints I often encounter errors like "the index (p) does not denote a subset of the domain of set "FactoryLines"" for instance.
I often find that I make mistakes with the indices in the constraint itself and within the constraint definition. I have tried looking at the guides online, but with no effect. Could anyone explain to me (preferably in layman's terms) how the indices in constraints work as well as indices within a sum argument? I am encountering similar problems with the parameters "IncomingStock" and "OutgoingStock"
One of the decision variables, StockAtWarehouse is made from the following definition:
StockAtWarehouse(p,w,t-1) + sum(p, IncomingStock(w,p,t)) - sum(p, OutgoingStock)
I am afraid that for t = 1, the formula will not work since it is referring to a time unit that is not in the set. I tried to include an if statement, that states that it should replace the StockAtWarehouse(p,w,t-1) with the parameter StartingStock if t = 1, but this has not worked for me yet. Could anyone look at the code and point out to me what I am doing wrong? Moreover, would this be a right approach for a problem like this, or would you recommend something else?
For my model, a product can be produced or not. IF it is produced, a minimum lotsize of 10.000 kg must be produced. I created the variable ProductInFactory, but I am not sure how to continue from there. Should I make a constraint, and if so, what could it possibly look like?
I have not yet been able to solve this model properly, but do you have any tips on my model that may enhance its quality or make it easier to solve? I am still very much a beginner in AIMMS, and I wish to get better but I find the learning curve quite steep so far.
Sorry for the avalanche of questions, kind regards.
Best answer by mohansxView original