help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] Problem with generating a subset of sets


From: Andrew Makhorin
Subject: Re: [Help-glpk] Problem with generating a subset of sets
Date: Wed, 29 Oct 2008 20:45:09 +0300

> By building a model I have the following problem in defining a set.
> First I have a set of numbers, let's say 1 to 25.
> This may be defined by: set N := 1..25;
> Now I want to create a subset consisting only of the numbers 5, 10, 15, 20,
> 25.
> Normally, I thought it might be possible by writing: set new_N := 1..25 by
> 5;
> But this dows not work. The only solution I know is to write: set new_N := 5
> 10 15 20 25;
> But for large sets this is would take a lot of time.
> Thanks for your time and help!

Probably you get 1 6 11 16 21 ?

The following statement is correct:

set new_N := 5..25 by 5;

For details please see the langauge reference included in the glpk
distribution.





reply via email to

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