Sha256: bee973b6a864f43501dbf23414c38f91021887ab0d2c245e2b70698f7e12735b

Contents?: true

Size: 1.51 KB

Versions: 1

Compression:

Stored size: 1.51 KB

Contents

vocabulary OilSupply;

/*
 * Value Types
 */
Cost is written as Money();
MonthCode is written as FixedLengthText();
ProductName is written as VariableLengthText();
Quantity is written as UnsignedInteger(32);
RefineryName is written as VariableLengthText(80);
RegionName is written as VariableLengthText();
Season is written as VariableLengthText(6) restricted to {'Autumn', 'Spring', 'Summer', 'Winter'};
TransportMethod is written as VariableLengthText() restricted to {'Rail', 'Road', 'Sea'};
YearNr is written as SignedInteger(32);

/*
 * Entity Types
 */
Month is identified by its Code;
Month is in one Season;

Product is identified by its Name;
AcceptableSubstitutes is where
	Product may be substituted by alternate-Product in Season [acyclic, intransitive],
	alternate-Product is an acceptable substitute for Product in Season;

Refinery is identified by its Name;

Region is identified by its Name;
TransportRoute is where
	TransportMethod transportation is available from Refinery to Region,
	TransportMethod transportation is available to Region from Refinery;
TransportRoute incurs at most one Cost per kl;

Year is identified by its Nr;

SupplyPeriod is identified by Year and Month where
	SupplyPeriod is in one Year,
	SupplyPeriod is in one Month;
ProductionForecast is where
	Refinery forecasts production of Product in SupplyPeriod;
RegionalDemand is where
	Region will need Product in SupplyPeriod;
ProductionForecast predicts at most one Cost;
ProductionForecast is for one Quantity;
RegionalDemand is for at most one Quantity;

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
activefacts-0.7.3 examples/CQL/OilSupply.cql