[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## Re: [Help-glpk] Some suggestions to GLPK/L

**From**: |
Andrew Makhorin |

**Subject**: |
Re: [Help-glpk] Some suggestions to GLPK/L |

**Date**: |
Thu, 25 Jul 2002 00:33:03 +0400 |

>*1. numerical set, like mentioned in a previous email.*
>*It would be convienient if we can simply declare *
>* set S = (1..10000);*
>*How inconvienient if I have to explictly list 10000*
>*items in the set.*
I agree :+) However all items (i.e. elements of a set) should have
unique names, so integers can't be used (otherwise from the context
'a[#123]' it is unclear which set the item '123' belongs to). The main
issue is the syntax. The context 'set S = (ABC1..ABC1000)' is more or
less clear. But what about 'set S = (ABC1D..ABC1000D)'? May be better to
write something like 'set S = (address@hidden@D, i=1..1000)' ?
>*2. import data from external sources. Text files would*
>*suffice, though it would be better to use with*
>*database or spreadsheet. Maybe one file for each*
>*parameter.*
Have you got any thoughts about syntax?
>*3. some simple functions would be really convienient.*
>*For example, if I want to find out the maximum value*
>*in a parameter.*
Yes, must add some aggregate functions like sum, i.e. min, max, and
also the quantors 'forall' and 'exist'.
>*4. set operations, like union and intersection. *
In glpk/l the same item can't belong to different sets, so these
operations can't be implemented. Nevertheless you can simulate subsets
using predicates. To do that you can declare universum, i.e. a set,
which includes all items, and then define unary predicates, which
determine subsets. Then, say, intersection of sets can be expressed as
conjunction of the corresponding predicates.