help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] Transport Problem advanced


From: Nigel Galloway
Subject: Re: [Help-glpk] Transport Problem advanced
Date: Wed, 22 Apr 2009 12:25:28 +0100

Look at qfit.mod in the glpk examples.

When you have your table called Sample with i,j,and x defined

set Sample;
param i {z in Sample};
param j {z in Sample};
param x {z in Sample};

then somthing like:

test{z in Sample}: varcost[i[z],j[z]] * x[i[z],j[z]] >= 0;



> ----- Original Message -----
> From: "Michael Hennebry" <address@hidden>
> To: SpaceRider <address@hidden>
> Cc: address@hidden
> Subject: Re: [Help-glpk] Transport Problem advanced
> Date: Tue, 21 Apr 2009 09:09:10 -0500 (CDT)
> 
> 
> On Tue, 21 Apr 2009, SpaceRider wrote:
> 
> > Now, I insert each combination into a table. If a combination isn't
> > possible, the value ist "-1". All possible combinations get positive values
> > ("0.02","0.04", etc.).
> >
> > Because of that I have to insert a special rule in model:
> > "s.t. positive_result {i in I, j in J}: varcost[i,j] * x[i,j] >= 0;"
> >
> > Is there a easier way to insert only possible combinations into a table and
> > to drop the special rule.
> 
> A linear table with generic entry
> i, j, x[i,k]
> That is roughly how GLPK's API fills the constraint matrix.
> 
> -- Michael   address@hidden
> "Pessimist: The glass is half empty.
> Optimist:   The glass is half full.
> Engineer:   The glass is twice as big as it needs to be."
> 
> 
> _______________________________________________
> Help-glpk mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-glpk

>


-- 
_______________________________________________
Surf the Web in a faster, safer and easier way:
Download Opera 9 at http://www.opera.com

Powered by Outblaze




reply via email to

[Prev in Thread] Current Thread [Next in Thread]