[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] Printing constraint for report using printf and for
From: |
glpk xypron |
Subject: |
Re: [Help-glpk] Printing constraint for report using printf and for |
Date: |
Mon, 05 Mar 2012 20:10:33 +0100 |
Helo Noli,
you have on %2f too many in
printf "%d,%s,%s,%s,%s,%.2f,%.2f,%.2f",
Regards
Xypron
-------- Original-Nachricht --------
> Datum: Mon, 5 Mar 2012 18:38:12 +1100
> Betreff: [Help-glpk] Printing constraint for report using printf and for
> Hi,
>
> I want to print this constraint (below) as one of my reports i.e. screen
> output.
>
> constraint
> #############
> subject to Mill_Demand_Allocation {dmd in DEMAND, t in PERIOD: t >=
> MinPeriod[dmd] and t <= MaxPeriod[dmd]}:
>
> sum {(dmd,spec,prd) in GRADE_MIX, (t,spec,prd,orig,dest) in
> WOODFLOW: dest = DemandDest[dmd]}
>
> U[t,spec,prd,orig,dest] = Demand[dmd];
> #############
>
>
> This is not working, I need help on this,
>
> printf "\n";
>
> printf "Log Allocation - Mill Demands \n";
>
> printf "Period,Species,Products,Origin,Destination,Demand";
>
> printf "\n";
>
>
>
> for{dmd in DEMAND, t in PERIOD, (dmd,spec,prd) in GRADE_MIX,
> (t,spec,prd,orig,dest) in WOODFLOW: dest = DemandDest[dmd]} {
>
> printf "%d,%s,%s,%s,%s,%.2f,%.2f,%.2f",
>
> t,spec,prd,orig,dest,
>
> (sum {(dmd,spec,prd) in GRADE_MIX, (t,spec,prd,orig,dest) in
> WOODFLOW: dest = DemandDest[dmd]} U[t,spec,prd,orig,dest]),
>
> Demand[dmd];
>
> printf "\n";
>
> }
>
> Any suggestion how to fix this thing above?
>
> Thanks.
>
> Noli
>
> _______________________________________________
> Help-glpk mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/help-glpk
--
Follow me at http://twitter.com/#!/xypron
NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!
Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a