Drastic change in the number of variables on the Progress Window right before the solve
Hi,
Using the AIMMS version 24.5.9.4. I have put pretty tight conditions on my index domain on purpose, but the model generation phase takes about 20 mins and # variables on the Progress Window reaches up to 55 million, which is a very surprising number for me because of the reason above.
Then right before the solve process it instantly decreases to 679K, which is much closer to what I’d expect. Then the solve process takes only 5 secs. So 20 mins for the model generation, and then 5 secs to solve, but what I am really wondering is why would the number of variables inflate this much and then instantly decreases right before the solve? Can anybody explain the possible reasons?
Please see the pics below.
Best, Gorkem
Page 1 / 1
I refined the issue down to its core, so hopefully this will be helpful to any reader in explaining why this is happening in AIMMS version 24.5.9.4 (haven’t tried with other versions). Here is the issue:
ep_TerminalOfFleet(i_Fleet) returns the Terminal of a Fleet, and ep_ZoneOfCustomer(i_Customer) returns the Zone of a Customer.
These two expressions are in the definition of a constraint. I am sure they are equivalent, but even if they are not, I put 1=0 in their conditions, so basically they are disabled anyway.
Now the strange thing follows: If I comment out the 2, and run the model with only 1, the model generation is nice and smooth, there is no peak in the number of variables, it goes gradually up to 400K, model generation takes only 1 min.
However, if I comment out the 1 and run the model with only 2, then suddenly model generation starts to take 5 times more and right before the solve, # variables peaks to 11 million, and then decreases to 400K.
Based on these observations, can somebody please help what is going on with AIMMS?
And please recall that I have already put 1=0 in the conditions of both expressions for debugging purposes, so I don’t know why the expression 2 would mess with the model generation process.
Best, Gorkem
Hi @gorkem. It seems that the generator does something inefficient with the second formulation; it seems it cannot determine which variables are actually used inside the constraint, and therefore adds all of them. Later on the generator finds out that many variables are actually not used inside the model, and then removes those. I tried to reproduce the issue in a small example but failed to do so.
AIMMS 24.6 introduces a new generator for linear models. The new generator is on average about 2 or 3 times faster, and for some models it is more than 10 times faster. You might want to download the latest AIMMS version (25.3.2) and run your project with this version to see whether the generation is faster.
The new generator generates the model in a different way, and as a result it will only update the number of constraints in the progress window. The number of variables and nonzeros is only updated at the very end. So, even if the new generator would temporarily add 11 million superfluous variables, you will very likely not see it in the progress window. You could look at the memory consumption of AIMMS in the Windows Task Manager to check for a spike.
Hi @Marcel Hunting , thanks for the reply.
I tried running the model with 25.3.1 yesterday, and it doesn’t run into the same issue as 24.5.9.4. Both formulations work fine and it’s pretty quicker in model generation too (comparing the 1st formulation which runs normally in both AIMMS versions).
Hence, it is safe to say that there is an issue with the model generation of 24.5.9.4. I wouldn’t care about the sudden spike in # variables if the generation time was ok, but the generation time also takes a lot longer with the 2nd formulation in 24.5.9.4.
Best,
Gorkem
Reply
Sign up
Already have an account? Login Please use your business or academic e-mail address to register