[Top][All Lists]

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

Re: [Help-glpk] Problems with Connecting GLPK to Excel

From: glpk xypron
Subject: Re: [Help-glpk] Problems with Connecting GLPK to Excel
Date: Thu, 08 Jul 2010 22:46:14 +0200

Hello Aly,

> In AMPL, there is some kind of a "cross" statement that might solve that,
> but I don't know a corresponding one in GLPK, and how to use it if it
> exists!

See glpk-4.44\doc\gmpl.pdf chapter 3.4 Set expressions

> In Access, there is a table called Channels, that contains three fields,
> one called Channel ID, another for origin facilities and a third for the
> corresponding destination facilities for all pairs that have flow between
> them. 
> Then, there is a table called ChannelsProducts that has a field for
> Channel ID, another for products, a third for transportation cost (from which
> t_ijp should be read), and a fourth for the flow variable values (which is the
> one x_ijp needs to be written back in).
> The question is: how can I read t_ijp from and write x_ijp to this table?
> As you see there are only two fields for the indices (channel and product),
> while t_ijp and x_ijp have three indices (origin facility, destination
> facility, and product).

You don't need operator "cross", you can use the following SQL

SELECT a.orig, a.dest,, b.cost 
FROM Channels a, ChannelProducts b 

UPDATE Channels a, ChannelProducts b SET b.flow = ? 
WHERE = AND a.orig = "?" AND a.dest="?" AND"?"

Best regards


GMX DSL: Internet-, Telefon- und Handy-Flat ab 19,99 EUR/mtl.  
Bis zu 150 EUR Startguthaben inklusive!

reply via email to

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