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 _______________________________________________ Help-glpk mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-glpk
