[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
statements
SELECT a.orig, a.dest, b.prod, b.cost
FROM Channels a, ChannelProducts b
WHERE a.id = b.id;
UPDATE Channels a, ChannelProducts b SET b.flow = ?
WHERE a.id = b.id AND a.orig = "?" AND a.dest="?" AND b.prod="?"
Best regards
Xypron
--
GMX DSL: Internet-, Telefon- und Handy-Flat ab 19,99 EUR/mtl.
Bis zu 150 EUR Startguthaben inklusive! http://portal.gmx.net/de/go/dsl
- Re: [Help-glpk] Problems with Connecting GLPK to Excel, aly, 2010/07/08
- Re: [Help-glpk] Problems with Connecting GLPK to Excel,
glpk xypron <=
- Re: [Help-glpk] Problems with Connecting GLPK to Excel, aly, 2010/07/16
- Re: [Help-glpk] Problems with Connecting GLPK to Excel, aly, 2010/07/20
- Re: [Help-glpk] Problems with Connecting GLPK to Excel, Aly Megahed, 2010/07/21
- Re: [Help-glpk] Problems with Connecting GLPK to Excel, glpk xypron, 2010/07/27
- Re: [Help-glpk] Problems with Connecting GLPK to Excel, aly, 2010/07/29