help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Help-glpk] GMPL fails on circular references


From: Meketon, Marc
Subject: RE: [Help-glpk] GMPL fails on circular references
Date: Sun, 22 Jun 2008 13:17:01 -0400

That's certainly a very clever use of recursion.

I don't know how often users of mathprog use this recursive feature.  If not 
very often, then perhaps there could be a warning issued.

-----Original Message-----
From: Andrew Makhorin [mailto:address@hidden 
Sent: Saturday, June 21, 2008 3:32 AM
To: Meketon, Marc
Cc: address@hidden
Subject: Re: [Help-glpk] GMPL fails on circular references

>> I had a line of math-prog code that had a circular reference:

>>     param FromNode{ (train,sd,seq) in TRAIN_SEGS } symbolic
>> := Terminal[FromNode[train,sd,seq]];

>> GMPL, much further down in the model, just stops without any
>> warning or anything else.  It took a while to figure out the circular
>> reference
>> and fix my error.  If possible, it would be nice if GMPL could
>> discover this
>> and issue a message.

> It is problematic, because mathprog allows recursive definition of
> sets and parameters. Incorrect definition, as in your case, leads to
> infinite loop that, in turn, causes stack overflow--the same that
> would happen in any programming language.

See, for example, recursive definition of parameter z in model bpp.mod
included in glpk distribution.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]