help-glpk
[Top][All Lists]
Advanced

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

[Help-glpk] CSV outputting MathProg for summary report mapulation


From: Noli Sicad
Subject: [Help-glpk] CSV outputting MathProg for summary report mapulation
Date: Thu, 1 Mar 2012 16:10:19 +1100

Hi,

I don't know how to exactly to convert this AMPL code to MathProg to
get the desired CSV table.

In AMPL
############
table tblWoodflowSummary OUT "ODBC" "Otago.mdb" "tblWoodflowSummary":

        {t in PERIOD} -> [Period],sum {(t,i,j) in HARVEST} Y[t,i,j] ~ 
ClearfellArea,

        {p in PRODUCT: Status[p] in YIELD} <sum {(t,i,j) in HARVEST}
Y[t,i,j]*Yield[p,i,j] ~ (p)>;

write table tblWoodflowSummary;



The desire tables in CSV outlooks like this:

Period  ClearfellArea  TRV  P1P2  SLOG  PULP
1  222  23  34 23 12
2  22  23  31 23 12
3  10  23  30 23 12
4  222  23  34 23 12
5  22  23  34 23 12
.
.
60

where TRV, P1P2 SLOG and PULP are the PRODUCT.

Now, how to we do write in MatProg?

Here are incomplete and working script.


table tab_WoodflowSummary{(t,i,j) in HARVEST} OUT "CSV" "WoodFlowSummary.csv" :

  t ~ Period, sum {(t,i,j) in HARVEST} Y[t,i,j] ~ ClearfellArea

regards,

Noli



reply via email to

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