> you will need a parameter translating the strings to numbers.
> set PERIOD;
> param month{p in PERIOD};
> data;
> set PERIOD :=
> Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec;
> param month :=
> Jan 1 Feb 2 Mar 3 Apr 4 May 5 Jun 6 Jul 7 Aug 8 Sep 9 Oct 10 Nov 11 Dec
> 12;
> end;
Another way:
param month{p in PERIOD} := time2str("%m", str2time("%b", p)) + 0;
"+ 0" is required to convert a symbolic value returned by time2str to
numeric one.
_______________________________________________
Help-glpk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-glpk