help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] Empty Sets


From: Andrew Makhorin
Subject: Re: [Help-glpk] Empty Sets
Date: Wed, 23 Feb 2011 21:58:33 +0300

> > when I try to specify an empty set in the data file I cannot make it 
> > work, though it is working in the above version:
> > 
> > set S := {}; /* In the data file */
> > 
> > obtaining: syntax error in set data block
> > 
> > the other way round does not work either, i.e., defining an empty set in 
> > the model and trying to override this in the data file.
> > 
> > Whatever suggestion is appreciated.
> > 
> 
> You can declare the set as follows:
> 
> set S, default {};
> 
> In this case, if no value is given for S in the data section, the
> default value (an empty set) will be used. For more details please see
> the language reference.

Another way is specifying the following:

set S := ;

rather than "set S := {};" which is syntactically incorrect in the data
section.




reply via email to

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