In the accompanied model, I try to decrease the inter-facility transport flows between warehouses by changing the production allocation per factory. However, when I try to solve this model, after +- 20 seconds the solution comes back at '0', and I can see that nothing has changed. Could anyone point out to me why this is happening?
Already have an account? Login
Please use your business or academic e-mail address to register
Login to the community
No account yet? Create an account
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.
There should be a .data file in the folder as well, which when loaded shows the costs for StockCostsPerDay and TransportCosts. However, even with this data in the model, the solution is still given as 0. I am not really sure what you meant by the second part about a missing index domain, could you explain that to me please? I am struggling to understand.
For the empty index domain of TransportRequirements, what I meant was its domain condition:
leads to an empty set, so variable TransportRequirements is never generated, thus it is always 0.
If you place the last part in a binary parameter, i.e.,
and display its data then you will see that this parameter is only 1 if wf = wt, which contradicts wf != wt.
Note: the community does not support '< >' yet (without a space in between) and therefore I used '!='.
Thank you for your reply. However, I am afraid I am not much wiser. The code you provided in your answer was generated by another AIMMS employee. I have been trying to understand it, but I had never used the exist function before. Could you assist me in understanding what it does and how I could prevent this code from leading to an empty set? In terms of the model, wf is warehousefrom and wt is warehouseto, which both consist of the identical entries from set w (all the warehouses). Since transport costs from wf to wt where wf = wt are 0 anyways, can I just remove the sections that mention this variable altogether?
I am still in the learning shoes of AIMMS and I was hoping to gain more understanding from this project, I hope you are willing to assist me.
I have made some changes to my model. I am not sure whether they are correct or not (see attached link). However, when I try to run it I encounter the error "memory allocation error". I attempted to run the model once more while task manager was open, and I could see that AIMMS took up almost all of the CPU and the memory, therefore resulting in the error.
I am currently running AIMMS on a 64-bit Windows partition on my Macbook, and my current RAM is 8GB. I do have a much faster PC at home (64-bit, 32GB RAM). Would it be possible to solve this model there, if I can somehow install AIMMS on that computer? Or are there errors in my model that make this unsolvable?
To solve the model in its current form, AIMMS would need more than 50 Gb memory to solve it. This is mainly caused by the variable CustomerPickUpLocation(c,p,w,t) for which there are 6085 x 521 x 3 x 365 = 3.471.462.075 elements which is a very large number.
Luckily most of these elements don't play a role and therefore they can be excluded. Namely the model contains the constraint CustomerDemandMet with definition
If CustomerDemand(c, p, t) equals 0 then this constraint implies that CustomerPickUpLocation(c,p, w, t) must be 0 for all w (because CustomerPickUpLocation is nonnegative). Therefore we only have to include CustomerPickUpLocation(c,p, w, t) if CustomerDemand(c, p, t) > 0, hence we can use
for the index domain of CustomerPickUpLocation. The variable CustomerPickUpLocation(c,p,w,t) will not be generated if CustomerDemand(c, p, t) = 0 which saves a lot of memory (and variables that are not generated are set to 0).
You can do something similar for the variable ProductionAllocation(p,f,t).
I have attached a new model file (.ams) with the new domain conditions. I used less domain conditions than my colleague did. You should copy this file to the MainProject folder. To solve this version of the model AIMMS uses around 6 Gb of memory.
However, also in this case the objective value is 0, and all TransportRequirements(p,wf,wt,t) are 0. If this is unexpected then I would recommend you to use a much smaller instance (so less Products, less TimePeriods, etc) to analyze the model.