Qualitative Reasoning in Garp3
Review
Workspaces in Garp3 Building blocks Constructs Entities Configurations Quantities Quantity Spaces Constructs Scenarios Model fragments
Building Blocks Entities Configurations Represent physical objects or conceptualizations that are part of the system to be modelled. They form an important backbone to any model that is created. Entities are organized in a subtype hierarchy. Configurations Commonly called ‘structural relations’. Structural relations model how entities are physically related to each other.
Building Blocks Quantities Quantity Spaces Represent changeable properties of entities and are typically seen as implementing the behavioural characteristics of a system. Quantity Spaces Represent the values that quantities can take on.
Constructs Scenarios Describes the initial situation of the system whose behavior is to be captured by the qualitative model. A scenario is the starting point for running a simulation and is created by defining instances of building blocks.
Constructs Model Fragments Define behavioural features for one or more entities. Model fragments are assembled form building blocks, have conditions and consequences, and are organized in a subtype hierarchy. Static Fragments : Structure of the system and the proportionalities Process Fragments : Contain at least one direct influence
Dependencies in Model Fragments Influence An influence is a causal dependency that models a direct effect (from value to derivative). Can be either positive (I+) or negative (I-). Magnitude of influenceing quantity determines the rate of change of affected quantity. For example, in the case of a positive influence (I+), when a liquid flow has the value plus, the amount of liquid at the destination will increase.
Dependencies in Model Fragments Proportionality A proportionality is a causal dependency that models an indirect effect (from derivative to derivative). Can be either positive (P+) or negative (P-). Set the derivative of the target quantity depending on the target of the source quantity. For example, in the case of a positive proportionality (P+), when the level of a liquid in a container increases, the pressure of the liquid on the bottom of the container will also increase.
Dependencies in Model Fragments Choosing a proportionality or influence The key concept to understand is that only influences initiate change in a system and that proportionalities only propagate change. Specifically, the magnitude of the source quantity of an influence determines the derivative of the target quantity. As such, influences only cause change when the source quantity has a non-zero magnitude value. Proportionalities only change the derivative of the target quantity when the source quantity is not stable.
1. Tree & Shade
Tree & Shade A tree always grows. Ignoring the need for water, sunlight, air and minerals. The size of the shadow depends on the size of the tree. As the shaded area increases as the tree becomes bigger. The growth of the tree causes the shaded area to increase.
Entity The entity hierarchy consists of only a tree
Quantities and Quantity Spaces The size of the tree : Size The area of shade caused by the tree : Shade The rate at which the tree grows : Growth rate
Scenarios The tree has two quantities, namely Size and Shade Value assignments are used to indicate that both the Size and the Shade have the value small A proper simulation should show the changes in the Size and the Shade of the tree growing
Model Fragment The tree and shade model consists of two model fragments Static Fragment Tree with Shade Process Fragment Growth of Tree
Static Fragments Tree with Shade Relationship between the Size of the Tree and its Shade. Positive proportionality from Size to Shade, as the Shade increases when the Size. increases and shade remains stable when Size is stable. Quantity space correspondence in the model that indicates that during the simulation Size and Shade have the same magnitude values.
Process Fragments Growth of Tree The Growth process that increases Size. Positive influence from Growth rate to Size. This has to be an influence, as Size can increase even when the Growth rate is stable. A bigger tree will grow faster, which is modelled using a positive proportionality from Size to Growth rate.
Simulation Results The results of simulating the scenario a Tree with small size
2. Population Growth
Population Growth Birth process causes an existing population of green frogs to grow. A quantity Death is introduced, with a negative influence on Number of. Death leads to ambiguity, as Birth and Death are competing processes. Number of may increase due to Birth, decrease due to Death, or the influences may balance each other out.
Entity The entity hierarchy for the population model contains only one type of entity.
Quantities and Quantity Spaces The number of individuals in the population: Number of The amount of biomass involved in the population : Biomass
Quantities and Quantity Spaces A measure of how many individuals are born : Birth A measure of how many individuals are dead : Death
Scenarios Number of may decrease, remain stable, or increase due to the influences of death and birth processes. The death process introduces a negative flow from death to number of. The birth process introduces a positive flow from birth to number of. The relationship between Birth and Death is deliberately left unspecified, so the simulation should demonstrate all three possibilities.
Model Fragment Static Fragment Process Fragment Population Birth, Death
Static Fragments Population Generic knowledge about any population. When the Number of individuals changes, Biomass changes in the same direction This knowledge is modelled by the positive proportionality (P+) from Number of to Biomass. A value change in Number of corresponds to a similar value change in Biomass, also quantity space correspondence (Q) is added.
Process Fragments Birth There are no conditions, except the existence of a population, so the Birth process automatically applies to any population. a positive influence (I+) from Birth to Number of. The value of Birth is set to plus, so that there will indeed be an effect.
Process Fragments Death A quantity Death is introduced, with a negative influence on Number of. Number of decrease due to Death.
Simulation Results The results of simulating the scenario a Population Behaviour
Simulation Results Quantity Value Format ② ① ③ Quantity Name(Individual) : Magnitude, Derivative, (2nd Order Derivative) ② ① ③
Simulation Results State 1 → 6
Simulation Results State 2
Simulation Results State 3 → 4
Simulation Results State 3 → 5 → 7
3. Communicating Vessels
Communicating Vessels The communicating vessel system consists of containers and pipes, which are both objects. The fluid has the same height everywhere, provided the containers contain the same liquid, and the bottoms of the containers are on the same height. If one of the containers is filled, a flow will level the fluid in each of the containers. Increasing or decreasing the amount of fluid in one of the containers will affect the height in the other containers.
Entity The communicating vessel system consists of containers and pipes, which are both object. The containers can contain liquids, which are substances, such as water and oil.
Quantities and Quantity Spaces The height of the liquid in a container could be zero(empty), or have some positive value, or be full. The quantity space chosen for Height is {zero, plus, max}. Analogous to Height, the Pressure and Amount of liquid can be zero, or have some value, or be maximal.
Quantities and Quantity Spaces The quantity spaces Flow can either be no flow, negative flow(from right to left), or positive flow(from left to right). So the quantity space chosen for Flow is {min, zero, plus}.
Scenarios In the communicating vessel model three scenarios are defined. Each of these scenarios encompasses two containers which each contain either Oil or Water. > = <
Scenarios The container is connected to a pipe using a From relation, and the pipe is connected to the other container using a To relation. The Water or Oil instances each have a quantity Height, of which each has been given the value plus. The height of the Oil left is greater than the Oil right.
Model Fragment Static Fragment Process Fragment Contained liquid Liquid flow
Static Fragments Contained liquid There are positive proportionalities from Amount to Height, and from Height to Pressure. Because if Amount changes, Height changes in the same direction, and Height is stable if amount is stable. The same is true for Height and Pressure.
Process Fragments Liquid flow
Process Fragments – Liquid flow The model fragment reuses the Contained liquid model fragment A positive influence from Flow to the Amount on the right side, and a negative influence from Flow to the Amount on the left side. The Flow is calculated by subtracting the Pressure on the left side from the Pressure on the right side. The result is assigned to the Flow using an equality relationship.
Simulation Results
Simulation Results State Init → 1
Simulation Results
Simulation Results State 1 → 4
Simulation Results State 1 → 4
Simulation Results State 1 → 3 → 2
Simulation Results State 1 → 3 → 2
Simulation Results State 1 → 3 → 2
Simulation Results State 1 → 2
Simulation Results State 1 → 2
Simulation Results Another Cases
Simulation Results Another Cases ?