Solved

Aimms returns the same Opt solution for different cases (data)

  • 20 August 2019
  • 6 replies
  • 151 views

I am trying to solve an MIP model with AIMMS. I run the AIMMS for a specific parameters and obtained the optimal solution; I also solved the model with same data/parameters using a heuristic to test the optimal solution- it is indeed the optimal. Now I first change the parameters (i.e., using different values) and save the changes in a new "case" using "save case as" option under different name. Then I set the new case as the "active case" and try the model with the new data. surprisingly AIMMS returns the (same) optimal solution obtained with original "case". I used to use the "single file data management" so I thought this might be the reason. I changed this to "disk files and folders" by going to Menu File > Open > Data file>convert...but it didn't help at all.
I also noticed that when I load a case, the model's decision variables contains some values from perhaps previous runs; not sure if this is normal with AIMMS.
Any help on this is greatly appreciated in advance.
Thanks,
Jean
icon

Best answer by Jean 23 August 2019, 19:21

View original

6 replies

Userlevel 5
Badge +2
I also noticed that when I load a case, the model's decision variables contains some values from perhaps previous runs;

Perhaps you could try emptying the variables before solve command:

code:
Empty SectionName_where_variables_are;


This test can answer if the solver is using your previous result and accepting it as the optimal one.

not sure if this is normal with AIMMS.

If the variables' property is not set to NoSave, the expected behaviour is that the values will be stored within the .data whenever you save it.
Thanks for your reply-I added the codes to empty are variable before execution but I am still getting the same opt solution which obtained using another data case.
Userlevel 4
Badge +1
Hi Jean, I try to understand that if you take the case saving part out of the procedure, but just alternate the parameter value and solve two times, do you get the different solving solution? Then you can isolate the problem in the case saving part, or the model solving part.
Thank you for your reply.
Let me give you a little bit more information. Based on what I observed from running the AIMMS and heuristic for different parameter sets,it seems that at least FOR TWO specific parameters, AIMMS is using something like, default values saved from past runs and the new values for these two parameters (in a new case or changed within the same case) are completely ignored/not accessible by/to AIMMS. I tested this by using the solution found by AIMMS (REPEATEDLY) as an input into the heuristic algorithm. With "specific" values for these two parameters, algorithm returns the SAME opt solution returned (repeatedly) by AIMMS-no problem. But when I use another set of values for these two parameters in the heuristic, heuristic algorithm returns another solution (which make more sense given the new values for the two parameters); for AIMMS, changing the value of these two parameters make no difference as explained above.
Thanks,
Userlevel 4
Badge +1
In this case, you first want to check the specific constraints where the parameters are used. Do you see the different value in the contraints?

You can do so either via the MPI (Math Program Inspector, under menu tool -> diagnostic tool), or print out the solver listing file (turn the option on via project setting dialog)

If you see the different value in the constraint but the solution is indeed the same, it means the solver finds so. Many reasons. You may share the model here so we can find out why.

If you see the same value in the constraint, it means changing of the value does not reach the solve statement. It could be the value was reset somehow. You may want to check your procedure to see where the value was reset, or sharing your project here.
Thank you both again for your input.
I figure it out. The problem was about updating the perimeters' values. Because the two parameters used in the model have "three" indices of let say i,j and k then for each k we have a matrix so all the values in all the matrices for different value of k (k=1 to n) must be updated. I just updated the first matrix for k=1 that's why I got the same results no matter the value of the parameters in the new set; silly me!.

Reply


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

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