[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] CSV outputting MathProg for summary report mapulation
From: |
Noli Sicad |
Subject: |
Re: [Help-glpk] CSV outputting MathProg for summary report mapulation |
Date: |
Thu, 1 Mar 2012 18:55:28 +1100 |
This is the data set for the problem.
set PRODUCT:=
TRV
SCOST
PCOST
P1P2
SLOG
PULP
CFREV
LCOST
TCOST
SACOST
RCOST;
#param Type{PRODUCT} symbolic; # Product (Final),
Thinning
(Intermediate), Residue
param Type:=
TRV Final
SCOST Intermediate
PCOST Intermediate
P1P2 Final
SLOG Final
PULP Final
CFREV Final
LCOST Final
TCOST Final
SACOST Final
RCOST Final;
#param Status{PRODUCT} symbolic; # Revenue, Cost, Yield, Ignore
param Status:=
TRV Yield
SCOST Cost
PCOST Cost
P1P2 Yield
SLOG Yield
PULP Yield
CFREV Revenue
LCOST Cost
TCOST Cost
SACOST Cost
RCOST Cost
;
Noli
On 3/1/12, Noli Sicad <address@hidden> wrote:
> Thanks for the suggestion.
>
>> Second line was incorrect. A better approximation is:
>>
>> printf " Period,ClearfellArea,TRV,P1P2,SLOG,PULP\n" > "filename.csv"
>> printf {(t,i,j) in HARVEST}: "%d,%f\n" t, sum {(t,i,j) in HARVEST}
>> Y[t,i,j]
>>>> "filename.csv"
>>
>
> However, TRV, P1P2, SLOG, PULP are inputs so it changes from time to
> time. It could not be hardcoded. Some of the data sets for case
> studies, the YIELD may have PRODUCTS where are P1, P2, SLOG1, SLOG2,
> K1, K2, C1, C2, PULP.
>
> Any suggestion how to do this using
>
> for {p in PRODUCT} { } syntax.
>
> #######################
>
> {p in PRODUCT: Status[p] in YIELD} <sum {(t,i,j) in HARVEST}
> Y[t,i,j]*Yield[p,i,j] ~ (p)>;
>
> Thanks.
>
> Noli
>
Re: [Help-glpk] CSV outputting MathProg for summary report mapulation, Andrew Makhorin, 2012/03/01