[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] Transport Problem advanced
From: |
Andrew Makhorin |
Subject: |
Re: [Help-glpk] Transport Problem advanced |
Date: |
Wed, 22 Apr 2009 15:16:32 +0300 |
> But if I leave out the impossible combinations of supply & demand varcost =
> "-1" I get always
> following errormessage:
> "no value for varcost[1,10]"
> ( x[i,j] is the solution quantity for combination )
> This is my current reading process:
> param supply{i in I};
> ...sql...
> I <- [INo], supply ~ count;
> param demand{j in J};
> ...sql...
> J <- [JNo], demand ~ min_count;
> param varcost{i in I, j in J};
> ...sql...
> [ INo, JNo ], varcost ~ cost;
> Excuse me, I don't know, what you mean - I'm a Beginner with glpk.
> Or, is there a switch to ignore empty combinations?
You can declare varcost as follows:
param varcost{i in I, j in J}, default -1;
In this case if a value for some varcost[i,j] is not provided, it
will be set to -1.