> I've got stuck
> figuring out how to get printf work with my results.
> When I use printf I get 
> the following error:

> Reading model 
> section from city2.mod...
> city2.mod:77: only numeric, symbolic, or logical 
> expression allowed
> Context: ...ansfer , <= 20 ; printf { i in PLANTSC } 
> '...' , p_c [ i ] ;
> Model processing error

Variables cannot be printed *before* the solve statement (if there
is no solve statement in your model, one is assumed at the end of the
model section). More precisely, you are attempting to print a linear
form, whose value is unknown yet.

Try writing something like this:

. . .
solve;
printf{i in PLANTSC} "res= %f", p_c[i];
. . .

For more details please see the language reference.



_______________________________________________
Help-glpk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-glpk

Reply via email to