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
_______________________________________________
Help-glpk mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-glpk