help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] GLPK cannot compare to symbols: s1 < s2


From: Andrew Makhorin
Subject: Re: [Help-glpk] GLPK cannot compare to symbols: s1 < s2
Date: Fri, 16 May 2008 12:05:49 +0400

> I have a symbolic set J, further I want to define a set B identifying
> each unordered combination of different elements of aforementioned set:

> set J;
> set B := setof{j1 in J, j2 in J : j1 < j2} (j1, j2);
> display B;
> data;
> set J := 'A' 'B';

> Unfortunately this results in error

> Display statement at line 3
> test.mod:3: cannot convert A to floating-point number

> Is there another way to create set B for a symbolic set J?

In principle, you might create a numeric set, say, {1, 2, 3}, and
then use its elements as indices to a symbolic parameter.

> If there is not, it would be useful to add some method of comparing
> strings to GLPK or to determine the numeric index of an element in a set.

Yes, I think it would be useful to add some built-in functions to
perform operations on symbolic values.





reply via email to

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