Upload
others
View
2
Download
0
Embed Size (px)
Citation preview
Decision Modeling
Marlon Dumas Institute of Computer Science
Actions/ Outcomes
Conditions
Each column represents a condition-action rule
Classic Decision tables
1
1 2 3 4 5
Leave 8am 9am 9am 10am 10am
Stall? - - - Y N
Accident - Y N - -
Long Medium Long Long Short
DMN – Decision Model & Notation
2
} OMG standard decision modeling notation } Includes:
} High-level diagrams to denote decisions, sub-decisions, inputs and knowledge sources
} Decision tables (a bit different from classical decision tables)
} Supported by several tools } IBM ILOG Jrules } OpenRules } Signavio } GenMyModel
Decision Requirements Diagram
© Signavio 2015
3
Decision
Sub-decision
Input
Knowledge source
DMN Decision Table
© Signavio 2015
4
U
Inputs Output(s)
Comes from the output of the Sufficient funds table
Comes from the output of the Valid identification table
DMN Decision Table
© Signavio 2015
5
U
Decision tables: Numerical ranges
6
Decision Table Consistency
7
} A decision table is inconsistent if there is a pair of rules R1 and R2 such that: } There is an input D matching both R1 and R2 } The output of R1 and R2 for input D is different
} In other words, consistency = no overlapping rules with different outputs
} If the table has unique hit policy, there should be no overlapping rules at all (with the same or different output)
Inconsistency – Example
8
• Rules 1 and 3, and rules 2 and 3 are inconsistent
Completeness
9
} A decision table is complete if for every possible input that matches the domain of every input column, there is at least one rule R that matches this input
} In other words, no “missing rules”
Incompleteness – Example
10
• No rule for Age = Child, Marital status = Not married, Parental status = No kids
Hit Policies
11
} Unique (single) – the rules are assumed to be non-overlapping so only one rule can fire for any given input
} Note: This is a stronger requirement than consistency
Unique-hit DMN table
© Signavio 12
Hit Policies
13
} Unique – the rules are assumed to be non-overlapping so only one rule can fire for a given input
} Any – rules may overlap, but if two rules overlap, they must have the same output (consistency), so any of them can be fired
Any-hit decision table
© Visionalysis 14
Can this table be re-written as a unique-hit table?
Hit Policies
15
} Unique – the rules are assumed to be non-overlapping so only one rule can fire for a given input
} Any – rules may overlap, but if two rules overlap, they have the same output, so any of them can be fired
} Priority/first – rules may overlap and/or contradict. In case of overlap, the first rule matching the input is fired } NOT RECOMMENDED
Hit Policies
16
} Unique – the rules are assumed to be non-overlapping so only one rule can fire for a given input
} Any – rules may overlap, but if two rules overlap, they have the same output, so any of them can be fired
} Priority/first – rules may overlap and be inconsistent. In case of overlap, the first rule matching the input is fired } NOT RECOMMENDED
} Multi-hit – rules may overlap; all rules that can fire for a given input will fire. Their outputs is combined using an aggregation function: } E.g. max, min, avg, sum
Multi-hit DMN table
© OpenRules (DMN Live Primer) 17
Tooling
18
} DMN Editor in Signavio } Simple online DMN table checker
} http://dmn.cs.ut.ee
} Simple online DMN table “simulator” } https://camunda.org/dmn/simulator/
Recap
19
} Decision Trees } Suitable for modeling simple decisions } Also used when decision tree is auto-generated (e.g. decision
tree learning)
} Classic decision tables (rules on the columns) } Come with a methodology for capturing complex decisions
and ensuring rule completeness and non-overlap
} DMN decision tables (rules on the rows) } Provide many additional feature to organize decisions more
conveniently