On Thu, Oct 21, 2010 at 12:37 PM, Andrew Makhorin
<address@hidden> wrote:
> I am using the standalone GLPK solver and I extract outputs into csv file.
> Would anyone have an idea how to achieve the following?:
>
> In the table:
> table result {t in TRUCK:sum{s in STOCK}load[s,t]>0} OUT "CSV"
> ".output.csv": (etc)
>
> I would like to have a field with numbers going 1, 2, 3... as far as the
> table reaches. Please note that load[s,t] is a variable, so only at the end
> of the calculation it is clear, which t in TRUCK will be included in the
> output.
>
> I will be happy for any advice.
There is no direct way to do this. If your intent is to read that csv
file later in another model with the row numbers provided, you can use
the fake field named RECNO, which is supported by the csv and dbf table
drivers for input tables. In particular, you may use an auxiliary model
that reads the csv file using RECNO and writes complete data to another
csv file.
_______________________________________________
Help-glpk mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/help-glpk