>>> set TT := 1jan04                # Time Buckets
>>>           2jan04
>>>           3jan04
>>>           4jan04
>>>           5jan04
>>>           6jan04
>>>           7jan04
>>>           8jan04 ;
>>
>> Easiest way is to define TT as follows:
>>
>>    set TT := 1 2 3 4 5 6 7 8;
>>
>> in which case ord(t) = t.
>>

> Yes. I think these "ordered" and "ord() can rest in peace now.
> MathProg got solution for this problem.

On printing you can convert elements of TT to calendar dates as
follows:

set TT := 1..8;

param START, symbolic, := "1jan04";

printf{t in TT} "...%s...",
   time2str(str2time(START, "%d%b%y")+86400*(t-1), "%d%b%y");

(See also the example model cal.mod in glpk/examples.)



_______________________________________________
Help-glpk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-glpk

Reply via email to