# This file is governed by the Creative Commons license # Attribution-NonCommercial 4.0 Unported # http://creativecommons.org/licenses/by-nc/4.0/ # http://creativecommons.org/licenses/by-nc/4.0/legalcode # # Extended licenses, in particular commercial licenses, can be obtained from the # author of the source code. # Any re-distribution as source code must acknowledge the original author of this file. # # File: deeptelos-time.cbs # Author: Manfred Jeusfeld, manfred.jeusfeld@acm.org # Date: 2016-08-17 (2016-08-17) #---------------------------------------------------------------- # Use DeepTelos to model the temporal roll-up hierarchies. # We use hiere months & weeks as two parallel branches. cbserver -port 4411 -t low -new TIMEDB tellModel deeptelos.sml.txt tellModel deeptelos-GTs.sml.txt #mkdir MLOs #cd MLOs # MGI hierarchy for Time tell " ALLTIME end YEAR with IN c: ALLTIME end {* subsuming months of a year *} YEARM with ISA c: YEAR end {* subsuming weeks of a year *} YEARW with ISA c: YEAR end MONTH with IN c: YEARM end WEEK with IN c: YEARW end DAY with IN c1: MONTH; c2: WEEK end " mkdir Years cd Years tell " {* all months of 2016 *} M2016 in YEARM end {* all weeks of 2016 *} W2016 in YEARW end {* collect all days of a given year *} D2016 with IN c1: M2016; c2: W2016 end W201633 in W2016 end W201634 in W2016 end W201635 in W2016 end M201608 in M2016 end M201609 in M2016 end " mkdir Days cd Days tell " {* 2016_08_17 in W201633,M201608 end 2016_08_18 in W201633,M201608 end 2016_08_19 in W201633,M201608 end 2016_08_20 in W201633,M201608 end 2016_08_21 in W201633,M201608 end 2016_08_22 in W201634,M201608 end 2016_08_23 in W201634,M201608 end 2016_08_24 in W201634,M201608 end 2016_08_25 in W201634,M201608 end 2016_08_26 in W201634,M201608 end 2016_08_27 in W201634,M201608 end 2016_08_28 in W201634,M201608 end *} 2016_08_29 in W201635,M201608 end 2016_08_30 in W201635,M201608 end 2016_08_31 in W201635,M201608 end 2016_09_01 in W201635,M201609 end 2016_09_02 in W201635,M201609 end "