Memory during run

42 views
Skip to first unread message

Theresia van Essen

unread,
Apr 1, 2011, 7:54:57 AM4/1/11
to AIMMS - The Modeling System
Hi,

I have a model where I want to make a schedule for each day of the
week and I do this for 100 weeks of 5 days. When I determine the
schedule for each day separable (not with an MP, but just with a
heuristic) the run time is ok. But when I execute a for loop such that
all days a scheduled consecutively the run times becomes longer and
longer for each day. It seems that AIMMS stores some information which
makes the process slower. I looked at the task manager and the CPU
time stays the same. I also already used the Identifier Cardinalities,
but the biggest parameters are my input parameters, so this can't be
the problem. Do you have any suggestions how I can fix this?

Theresia

Luis Pinto

unread,
Apr 1, 2011, 8:35:27 AM4/1/11
to ai...@googlegroups.com
Hello Theresia,

AIMMS generally does well to conserve memory, using sparse allocations.
When I do run into memory problems, they are generally associated to very large identifiers, which should be easily identified in the Identifier Cardinalities. Did you tick the "Show predeclared ...." and the "Show identifier suffices" options at the bottom?

Do you change your condition in the "for" expression during the execution of the loop?

Another tool that helps is the "Diagnostic Tools" -> "Profilier". It stores processing time and number of hits for each individual line in aimms, so you can take a look after the process has executed and see which command is taking more time.

Hope it helps,

Cheers,

Luis Pinto

www.unisoma.com.br




--
You received this message because you are subscribed to the Google Groups "AIMMS - The Modeling System" group.
To post to this group, send email to ai...@googlegroups.com.
To unsubscribe from this group, send email to aimms+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/aimms?hl=en.


Marcel Roelofs

unread,
Apr 1, 2011, 4:46:33 PM4/1/11
to AIMMS - The Modeling System
Hi Theresia,

It's kind of hard to tell what is causing this without looking at the
exact for loop. Are you by any chance referring to a parameter using a
permuted index order, that you also assign values to during the loop?
If you refer to a parameter using a permuted index order, AIMMS
generates that particular permutation of the data to allow for
efficient computation. However, assigning to it may lead to
regeneration of the permutation which might take more and more time as
the cardinality of the data grows.

Not saying that this is the case in your model, but it is something
that pops to mind as a possible explanation.

Cheers,
Marcel


On Apr 1, 1:54 pm, Theresia van Essen <theresiavanes...@gmail.com>
wrote:

Theresia van Essen

unread,
Apr 15, 2011, 10:09:01 AM4/15/11
to AIMMS - The Modeling System
Hi,

Thanks for your reaction! I don't change any parameters in the for-
loop, I just loop through weeks and days per week. (Part of) my code
is here below.

for (w,d) do
e_week:=w;
e_Day:=d;
empty S_CurrentSurgeries;
S_CurrentSurgeries:=S_SurgeriesWeekDay(w,d);
FixedGoalValues;
P_Objectives(w,d):=P_Objective;
endfor;

I hope you have any other suggestions!

Theresia van Essen
> > Theresia- Tekst uit oorspronkelijk bericht niet weergeven -
>
> - Tekst uit oorspronkelijk bericht weergeven -

Luis Pinto

unread,
Apr 15, 2011, 10:14:43 AM4/15/11
to ai...@googlegroups.com, Theresia van Essen
Did you run this procedure with the profiler on?
It would be nice to know which of these command lines are actually responsible for the big processing times. That way you (we) can focous on resolving the specific issue.

Cheers,

Luis Pinto

www.unisoma.com.br

Peter Hulshof

unread,
Apr 15, 2011, 10:14:13 AM4/15/11
to AIMMS - The Modeling System
Dear all,

I have the same problem in my model. I would like to have experiments
with multiple runs. When I run the model once, run times are fine, but
when the number of runs exceeds 10 or so, run times decrease
dramatically.

There is no increased memory usage apparent in my task manager, so I
am assuming that it is a problem within AIMMS.
The profiler also does not show me where the problem is.

I have the idea that there is some hidden function that clears the
AIMMS local working memory (if that exists) each time after a
procedure is completely executed. Therefore, when I perform multiple
runs, this hidden function is not called (as the procedure is not
completely executed after each run) and somehow, AIMMS is becoming
slower.

I am very interested in your reply,
Peter

On 1 apr, 22:46, Marcel Roelofs <marcel.roel...@gmail.com> wrote:

Theresia van Essen

unread,
Apr 15, 2011, 10:19:47 AM4/15/11
to AIMMS - The Modeling System
I did run it with the profiler on, but it isn't the problem that it
takes long, but that each run takes longer in time. So, for example,
the first run takes 10 sec, the second 12, the third 16, and the forth
25 sec., etc.

Theresia van Essen

On 15 apr, 16:14, Luis Pinto <luisf...@gmail.com> wrote:
> Did you run this procedure with the profiler on?
> It would be nice to know which of these command lines are actually
> responsible for the big processing times. That way you (we) can focous on
> resolving the specific issue.
>
> Cheers,
>
> Luis Pinto
>
> www.unisoma.com.br
>
> >http://groups.google.com/group/aimms?hl=en.- Tekst uit oorspronkelijk bericht niet weergeven -

Peter H.

unread,
Apr 15, 2011, 10:21:58 AM4/15/11
to AIMMS - The Modeling System
Ow, I meant that runtimes increase in the first paragraph of my reply.
Peter

On 15 apr, 16:19, Theresia van Essen <theresiavanes...@gmail.com>
> > >http://groups.google.com/group/aimms?hl=en.-Tekst uit oorspronkelijk bericht niet weergeven -
>
> > - Tekst uit oorspronkelijk bericht weergeven -- Tekst uit oorspronkelijk bericht niet weergeven -

Marcel Roelofs

unread,
Apr 15, 2011, 4:07:01 PM4/15/11
to AIMMS - The Modeling System
Well, it's kind of hard to tell like this what the problem is, if only
because I can't see what happens inside FixedGoalValues. But any
performance issue not understood has my attention, so if at all
possible, could you send your model to our support e-mail account? I
can then take a look, and report back to the group what the problem
is.

Cheers,
Marcel

On Apr 15, 4:09 pm, Theresia van Essen <theresiavanes...@gmail.com>

Marcel Roelofs

unread,
Apr 15, 2011, 4:14:28 PM4/15/11
to AIMMS - The Modeling System
Hi Peter,

The same applies to you. If you want me to take a look at your model,
and try to find out what the problem is, please send it to our support
e-mail account with some instructions how to trigger the behavior you
describe. I will report the findings back to the group.

Cheers,
Marcel

Peter Nieuwesteeg

unread,
Apr 15, 2011, 7:52:55 PM4/15/11
to AIMMS - The Modeling System
Hi Peter, Theresia,

In the past I have seen similar behavior that AIMMS becomes slower
and slower every iteration of my for-loop, even if I did the same
in every iteration.

I worked with the AIMMS development team to find the cause of this
issue and we concluded that it was a weird interaction between AIMMS
and the external IDE component.

If your problem has the same cause, the solution would be to set the
option "Enhanced Long Run Responsiveness" to "on".

Can you try this and report back to the group your results?

Peter

Peter H.

unread,
Apr 19, 2011, 4:40:30 AM4/19/11
to AIMMS - The Modeling System
Peter!

This seems to be working for me..

I have set "Enhanced Long Run Responsiveness" to "yes", and I do not
have a reduced performance in later iterations.

Thanks!

Kind regards,
Peter

On 16 apr, 01:52, Peter Nieuwesteeg <Peter.Nieuwest...@aimms.com>
wrote:
> > > > - Tekst uit oorspronkelijk bericht weergeven -- Tekst uit oorspronkelijk bericht niet weergeven -

Theresia van Essen

unread,
Apr 19, 2011, 4:46:39 AM4/19/11
to AIMMS - The Modeling System
It works for me too! From 50 to 13 seconds for a small instance!
Thanks!

Theresia

Marcel Roelofs

unread,
Apr 19, 2011, 9:52:37 AM4/19/11
to AIMMS - The Modeling System
This setting should be automatic on Windows Vista and higher, so just
to make sure that the automatic setting actually works: what Windows
version are you using?

Cheers,
Marcel

On Apr 19, 10:46 am, Theresia van Essen <theresiavanes...@gmail.com>
Reply all
Reply to author
Forward
0 new messages