Sha256: 8d230b03f604eef661d081e714a9257ca2e70878d4bb467cba3f46018d4275b4

Contents?: true

Size: 1.51 KB

Versions: 2

Compression:

Stored size: 1.51 KB

Contents

vocabulary OilSupply;

/*
 * Value Types
 */
Cost is defined as Money();
MonthCode is defined as FixedLengthText();
ProductName is defined as VariableLengthText();
Quantity is defined as UnsignedInteger(32);
RefineryName is defined as VariableLengthText(80);
RegionName is defined as VariableLengthText();
Season is defined as VariableLengthText(6) restricted to {'Autumn', 'Spring', 'Summer', 'Winter'};
TransportMethod is defined as VariableLengthText() restricted to {'Rail', 'Road', 'Sea'};
YearNr is defined 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

2 entries across 2 versions & 1 rubygems

Version Path
activefacts-0.7.1 examples/CQL/OilSupply.cql
activefacts-0.7.2 examples/CQL/OilSupply.cql