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: Andrew Makhorin
Subject: Re: [Help-glpk] GMPL fails on circular references
Date: Sat, 21 Jun 2008 11:31:42 +0400

>> 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]