help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] Special key in csv output


From: Andrew Makhorin
Subject: Re: [Help-glpk] Special key in csv output
Date: Thu, 21 Oct 2010 20:37:30 +0400

> 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.




reply via email to

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