help-glpk
[Top][All Lists]
Advanced

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

[Help-glpk] Re: Defining a subset of a multi dimension set


From: glpk xypron
Subject: [Help-glpk] Re: Defining a subset of a multi dimension set
Date: Thu, 23 Sep 2010 21:23:12 +0200

Hello Aly,

> set Facilities_IN_FacilityResourcePeriod, dimen 1;
> table Facilities_IN_FacilityResourcePeriod_jrtt IN "ODBC"
> 'FileDSN=.\d2.dsn;READONLY=FALSE' 
> 'TransformerTypePeriodResources' :
> Facilities_IN_FacilityResourcePeriod <-[FacilityID];
>
> But when the data were read, I get an error of "Duplicate Tuple 1
> Detected" which is expected since the same FacilitiID can be in multiple 
> records

set Facilities_IN_FacilityResourcePeriod, dimen 1;
table Facilities_IN_FacilityResourcePeriod_jrtt IN "ODBC"
'FileDSN=.\d2.dsn;READONLY=FALSE' 
'SELECT DISTINCT FacilityID FROM TransformerTypePeriodResources' :
Facilities_IN_FacilityResourcePeriod <-[FacilityID];

Best regards

Xypron


-------- Original-Nachricht --------
> Datum: Thu, 23 Sep 2010 07:38:35 -0400 (EDT)
> Von: address@hidden
> An: help-glpk <address@hidden>, glpk xypron <address@hidden>
> Betreff: Defining a subset of a multi dimension set

> Hi All,
> 
> Suppose I have 3 sets, J, R and T for Facilities, Resources and Periods
> respectively and that each is well defined. And suppose there is a set of
> dimension 3 that was defined as follows:
> 
> 
> set FacilityResourcePeriod, dimen 3;
> table FacilityResourcePeriod_jrtt IN "ODBC"
> 'FileDSN=.\d2.dsn;READONLY=FALSE' 
> 'TransformerTypePeriodResources' : 
> FacilityResourcePeriod <-[FacilityID, ResourceID, PeriodID];
> 
> 
> Note that the set FacilityResourcePeriod would not have all possible
> combinations of the elements of J, R and T (as the table its values are read
> from has only a subset of the combinations).
> 
> What I would like to do is to define a set, that is a subset of J, and
> that only contains the Facilities that are in FacilityResourcePeriod. I tried
> to define it that way:
> 
> set Facilities_IN_FacilityResourcePeriod, dimen 1;
> table Facilities_IN_FacilityResourcePeriod_jrtt IN "ODBC"
> 'FileDSN=.\d2.dsn;READONLY=FALSE' 
> 'TransformerTypePeriodResources' :
> Facilities_IN_FacilityResourcePeriod <-[FacilityID];
> 
> 
> But when the data were read, I get an error of "Duplicate Tuple 1
> Detected" which is expected since the same FacilitiID can be in multiple 
> records
> (each with a different combination of ResourceID and PeriodID). 
> 
> So, how can I define such a set?
> 
> Any help will be greatly appreciated!
> 
> Aly
> 
> -- 
> 
> PhD Student
> 
> Rm. 407 Main Building
> H. Milton Stewart School of Industrial and Systems Engineering
> Georgia Institute of Technology
> 765 Ferst Dr., NW
> Atlanta, Georgia 30332-0205, USA
> 

-- 
GRATIS: Spider-Man 1-3 sowie 300 weitere Videos!
Jetzt freischalten! http://portal.gmx.net/de/go/maxdome



reply via email to

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