This book explains how
to make models for Information Systems engineering and for
Discrete Event Simulation engineering using the Unified
Modeling Language (UML) and the Discrete Event Process Modeling
@@ -680,7 +680,8 @@
39
40
41
-42
objectType Person {
+42
+43
objectType Person {
attribute id : Integer {id};
attribute name : String;
attribute birthDate : Date;
@@ -708,6 +709,7 @@
}
objectType BookCopy {
attribute id : Integer {id};
+ attribute isbn : String;
attribute status : BookCopyStatusEL;
}
activityType BookLending {
@@ -750,11 +752,10 @@
multiplicity is greater than 0, it defines a minimum cardinality constraint
("there must be at least l values"). Whenever the upper bound
u of a multiplicity is not ∗ (unbounded), it defines a maximum
- cardinality constraint ("there must be at most u values").
An
- OE class model (based on a finite set of
- data types DT) is a 10-tuple
a vocabulary ⟨ OT, ET, attr, OAss,
PAss ⟩ consisting of finite sets of object and event
type names OT and ET, a finite set of composite
@@ -789,25 +790,27 @@
such that
for all O ∈ OT, sup(O) ⊆ OT,
-
for all E ∈ ET, sup(E) ⊆ ET and
- Event ∈ sup(E), where Event is the predefined
- top-level event type,
+
for all E ∈ ET, sup(E) ⊆ ET,
+
+
Event ∈ sup*(E), where Event is the
+ predefined top-level event type and sup* is the transitive
+ closure of sup,
for all T ∈ OT ∪ ET and T' ∈
sup(T), attr(T') ⊆ attr(T);
-
for all event types E ∈ ET, the three implicit
- attributes startTime, occTime and duration are
- inherited from the predefined event type Event ∈ sup(E)
-
+
for all event types E ∈ ET, the two implicit
+ attributes startTime and occTime are inherited from the
+ predefined event type Event.
If an OE class model has only
binary object type associations, it can be reduced to an
association-free model as a septuple
⟨ OT, ET, attr, rng, mul, muls, sup
⟩
by expressing/replacing all associations with the help of
- corresponding reference attributes.
An
+ corresponding reference attributes, the ranges of which are not
+ data types, but entity types.
Interpretations
An
interpretation of an association-free OE class model is a septuple
I = ⟨ T, c, Obj,
- Evt, type, occt, I ⟩
such that
+ Evt, types, startT, occT, I ⟩
such that
T is a linearly ordered set of time instants and c ∈
T is the current time,
@@ -822,11 +825,12 @@
types is a function that assigns one or more object types to
each object from Obj and one or more event types to each event
- from Evt (types assigns its direct types to an
- entity,
+ from Evt (types assigns an entity its direct types),
-
occt is a function that assigns an occurrence time t ≤
- c to each event from Evt, and
+
startT and occT are functions that assign a start time
+ t1 and an occurrence time t2 to each
+ event from Evt such that t1 ≤
+ t2 ≤ c, and
I is an interpretation
function for the vocabulary ⟨ OT, ET, attr ⟩ of the class
@@ -888,29 +892,546 @@
the case of single-valued attributes a1, in the case of
multi-valued attributes a1, all resulting value sets are
simply merged together. In this way, we can form path expressions of any
- length greater than zero.
Finally, we can define how an interpretation
- of a class model Iα, together with a variable value
- assignment α for a set of data and entity variables, satisfies a logical
- formula F formed with atomic formulas that are connected with the
- help of the usual logical operations, which is symbolically expressed as
+ length greater than zero.
An Interpretation Expressed with a Set of
+ Object Tables and Event Tables
An interpretation I = ⟨
+ T, c, Obj, Evt, types, startT, occT,
+ I ⟩ of a class model ⟨ OT, ET, attr, rng, mul,
+ muls, sup ⟩ can be defined in the form
I = ⟨ T, c, Obj,
+ Evt, ObjTbls, EvtTbls ⟩
where the interpretation
+ function I is defined implicitly by the object and event
+ tables ObjTbls and EvtTbls such that where
+ {objects1, objects2, …},
+ {events1, events2, …} of a set of
+ tables,.
+
for each object type O1 ∈ OT, there is a
+ corresponding object table I(O1) =
+ objects1 ∈ ObjTbls with columns corresponding
+ to the attributes of O1 by having the same names and
+ satisfying their range constraints in the sense that for all rows
+ r ∈ objects1 and all attributes a ∈
+ attr(O1),
+
if the range of a is a data type, then r[a]
+ ∈ rng(a), where r[a] denotes the data literal
+ contained in the objects1 table cell determined by
+ row r and column a,
+
+
if the range of a is an entity type T with
+ corresponding entity table I(T), then the
+ corresponding table column is a foreign key column, that is,
+ r[a] ∈ T[a] where T[a]
+ denotes
+
+
+
for each event type E1 ∈ ET, there is a
+ corresponding event table I(E1) =
+ events1 ∈ EvtTbls having the two special
+ columns startTime and occTime with data literals
+ corresponding to values from the temporal domain T, and all other
+ columns corresponding to the attributes of E1 by the
+ same names and by satisfying their range constraints as for object
+ types;
+
+
Obj is a finite set of (currently existing) objects, for
+ which it is assumed that they have been existing in the past and will
+ exist in the future (for simplicity, by assuming a constant universe of
+ objects, neither object creation nor object destruction is
+ considered),
+
+
Evt is a finite set of (past or current) events with
+ occt(e) ≤ c for all e ∈ Evt,
+
+
types is a function that assigns one or more object types to
+ each object from Obj and one or more event types to each event
+ from Evt (types assigns an entity its direct types),
+
+
startT and occT are functions that assign a start time
+ t1 and an occurrence time t2 to each
+ event from Evt such that t1 ≤
+ t2 ≤ c, and
+
+
I is an interpretation
+ function for the vocabulary ⟨ OT, ET, attr ⟩ of the class
+ model such that
+
I(O) ⊆ Obj for all O ∈
+ OT.
+
+
I(E) ⊆ Evt for all E ∈
+ ET and I(Event) =
+ Evt.
+
+
An attribute T-a with multiplicity
+ mul(T-a) = ⟨ l, u ⟩ is
+ interpreted as a function from entities to value sets:
+ I(T-a) : I(T) →
+ 2I(R) for all attributes
+ T-a with T ∈ OT ∪ ET,
+ a ∈ attr(T) and R =
+ rng(T-a), such that for any entity e ∈
+ I(T) and its attribute value set val =
+ I(T-a)(e),
+
the cardinality of val is greater than l and
+ smaller than u,
+
+
if the attribute has a snapshot multiplicity
+ muls(T-a) = ⟨
+ ls, us ⟩, that is, if the
+ attribute represents the event class association end of a
+ participation association, then if ls> 0,
+ the cardinality of the set of current events in the attribute's
+ value set, card = #{ evt ∈ val |
+ occt(evt) = c}, is greater than
+ ls, and if us≠ ∗, then
+ card ≤ us,
+
+
if T ∈ ET, e.occTime =
+ occt(e) and e.duration =
+ e.occTime - e.startTime.
+
+
+
For any entity type T ∈ OT ∪ ET and any of
+ its supertypes T' ∈ sup(T),
+ I(T) ⊆
+ I(T').
+
+
An example of an interpretation of (a slightly simplified version
+ of) the model presented in Figure 3-1
+ consists of the following tables:
+
+
+
persons
+
+
+
+
id
+
+
name
+
+
+
+
+
+
1049
+
+
Tom Banks
+
+
+
+
1083
+
+
Mary Swift
+
+
+
+
1102
+
+
Liza Miller
+
+
+
+
1157
+
+
Su Kang
+
+
+
+
+
+
library_users
+
+
+
+
id
+
+
address
+
+
+
+
+
+
1049
+
+
738 Austin Blv, Manchaca, TX 78652
+
+
+
+
1102
+
+
29 Hank St, Austin, TX 73301
+
+
+
+
1157
+
+
114 Feritti Dr, Austin, TX 78734
+
+
+
+
+
+
books
+
+
+
+
isbn
+
+
title
+
+
+
+
+
+
006251587X
+
+
Weaving the Web
+
+
+
+
0465026567
+
+
Gödel, Escher, Bach
+
+
+
+
0465030793
+
+
I Am A Strange Loop
+
+
+
+
+
+
book_copies
+
+
+
+
id
+
+
isbn
+
+
status
+
+
+
+
+
+
2194
+
+
006251587X
+
+
LENDED
+
+
+
+
2195
+
+
006251587X
+
+
AVAILABLE
+
+
+
+
2196
+
+
006251587X
+
+
AVAILABLE
+
+
+
+
1843
+
+
0465026567
+
+
AVAILABLE
+
+
+
+
1844
+
+
0465026567
+
+
LENDED
+
+
+
+
1172
+
+
0465030793
+
+
LENDED
+
+
+
+
+
+
arrivals
+
+
+
+
occTime
+
+
libraryUser
+
+
+
+
+
+
20240705T09:03
+
+
1102
+
+
+
+
20240705T10:42
+
+
1157
+
+
+
+
20240705T13:29
+
+
1157
+
+
+
+
20240706T09:01
+
+
1049
+
+
+
+
20240706T09:37
+
+
1102
+
+
+
+
+
+
departures
+
+
+
+
occTime
+
+
libraryUser
+
+
+
+
+
+
20240705T11:17
+
+
1157
+
+
+
+
20240705T12:36
+
+
1102
+
+
+
+
20240705T15:55
+
+
1157
+
+
+
+
20240706T09:58
+
+
1049
+
+
+
+
20240706T10:41
+
+
1102
+
+
+
+
+
+
book_lendings
+
+
+
+
startTime
+
+
occTime
+
+
libraryUser
+
+
bookCopies
+
+
+
+
+
+
20240705T09:14
+
+
20240705T09:17
+
+
1102
+
+
2195
+
+
+
+
+
+
2195
+
+
AVAILABLE
+
+
+
+
+
+
+
+
2196
+
+
AVAILABLE
+
+
+
+
+
+
+
+
1843
+
+
AVAILABLE
+
+
+
+
+
+
+
+
1844
+
+
LENDED
+
+
+
+
+
+
+
+
1172
+
+
LENDED
+
+
+
+
+
+
+
+
book_take_backs
+
+
+
+
startTime
+
+
occTime
+
+
libraryUser
+
+
bookCopies
+
+
+
+
+
+
20240706T09:42
+
+
20240706T09:44
+
+
1102
+
+
2195
+
+
+
+
+
+
2195
+
+
AVAILABLE
+
+
+
+
+
+
+
+
2196
+
+
AVAILABLE
+
+
+
+
+
+
+
+
1843
+
+
AVAILABLE
+
+
+
+
+
+
+
+
1844
+
+
LENDED
+
+
+
+
+
+
+
+
1172
+
+
LENDED
+
+
+
+
+
Satisfaction of Logical Formulas
Finally, we can
+ define how an interpretation Iα, together with a variable
+ value assignment α for a set of data and entity variables, satisfies a
+ logical formula F formed with atomic formulas that are connected with
+ the help of the usual logical operations, which is symbolically expressed as
Iα ⊨ F. The base case of atomic formulas includes
the following two forms:
-
Classification atoms have the form C(x) where
- C is a classifier. Iα ⊨ C(x) iff
- α(x) ∈ I(C).
+
Classification atoms have the form C(x)
+ where C is a classifier.
Iα ⊨
+ C(x) iff α(x) ∈ I(C).
-
Comparison atoms have the form expr1 o
+
Comparison atoms have the form expr1 o
expr2 where each exprk is either a
data literal (from one of the underlying datatypes), a variable, or a
path expression, and o is one of the usual comparison predicates (=, ≠,
- <, ≤, >, ≥). Iα ⊨ expr1 o
- expr2 iff ⟨
+ <, ≤, >, ≥).
Iα ⊨ expr1
+ o expr2 iff ⟨
Iα(expr1),
Iα(expr2) ⟩ ∈
- I(o), where I(o) is the binary
- relation that interprets the comparison predicate.
+ I(o), where I(o) is the binary relation
+ providing the interpretation of the comparison predicate.
Complex logical formulas formed with the logical operators ¬, ∧,
- ∨, →, ∀, ∃ are satisfied by an interpretation in the usual way.
3.1.2. Integrity Constraints
An
+ ∨, →, ∀, ∃ are satisfied by an interpretation in the usual
+ way.
Entailment
An OE class
+ model CM entails a logical sentence if the sentence is satisfied by
+ all interpretations of the class model:
CM ⊨ F iff I ⊨ F for
+ all interpretations I of CM
3.1.2. Integrity Constraints
An
OE class model, like the one presented in
Figure 3-1, defines the following types of
(integrity) constraints:
@@ -1110,12 +1631,13 @@
special operation with the predefined name 'recurrence' and normally
annotated with a probability distribution expression.
-
The information design model must add a duration() function
- to all activity classes. This function is invoked when a new activity is
- created for computing the value of its duration attribute.
- Normally, the duration() function represents a random
- variable, to be indicated by appending a probability distribution
- annotation such as Exp(1.5).
+
The information design model must specify a duration()
+ function for all activity classes. This function is invoked when a new
+ activity is created during a simulation run for computing the value of
+ its duration attribute. Normally, the duration() function
+ represents a random variable, to be indicated by the stereotype
+ «rv» and by appending a probability distribution annotation such as
+ Exp(1.5).
If the simulation is to deal with objects in space, the
design model must be based on a choice of space model: