Presentation is loading. Please wait.

Presentation is loading. Please wait.

Advanced Topics in Behavior Analysis - Page L15-1 MEF-OOM&A-L15-1 Dr. M.E. Fayad Lesson 15: Advanced Topics in Behavior Analysis Object- Oriented Modeling.

Similar presentations


Presentation on theme: "Advanced Topics in Behavior Analysis - Page L15-1 MEF-OOM&A-L15-1 Dr. M.E. Fayad Lesson 15: Advanced Topics in Behavior Analysis Object- Oriented Modeling."— Presentation transcript:

1 Advanced Topics in Behavior Analysis - Page L15-1 MEF-OOM&A-L15-1 Dr. M.E. Fayad Lesson 15: Advanced Topics in Behavior Analysis Object- Oriented Modeling & Applications

2 Advanced Topics in Behavior Analysis - Page L15-2 MEF-OOM&A-L15-2 Dr. M.E. Fayad Lesson Objectives oDescribe the characteristics of Real-Time Systems oUnderstand action tables oUnderstand picket fence representation oLearn about timing diagram oUnderstand leveling behavior models oLearn about concurrency

3 Advanced Topics in Behavior Analysis - Page L15-3 MEF-OOM&A-L15-3 Dr. M.E. Fayad State-Transition Diagrams Related Terms: state machine, state chart, finite automaton Definition: –A STD shows a sequence of states an object (a class, a package, or a system) can assume during its lifetime (execution), together with the stimuli that cause changes of state. –A STD describes a hypothetical machine (finite automaton) which at any given time is found in a set of finite states. –It consists of: »A finite, non-empty set of states »A finite, non-empty set of events »Functions (actions) which describe the transition from one state to the next »An initial state »A set of final states

4 Advanced Topics in Behavior Analysis - Page L15-4 MEF-OOM&A-L15-4 Dr. M.E. Fayad State-Transition Diagrams: Events/Conditions/Operations A Transition is triggered by one or more events. An Event consists of a name and a list of possible argument. Conditions can be attached to the event or conditions may be formulated independently of a specific event. Events/Conditions can trigger actions inside the state that are realized through appropriate operations (actions). Three special triggers are predefined –entry: fires automatically when entering a state –exist: fires automatically when leaving a state –do: fires repeatedly as long as the state is active

5 Advanced Topics in Behavior Analysis - Page L15-5 MEF-OOM&A-L15-5 Dr. M.E. Fayad State-Transition Diagrams: Events/Conditions/Operations An event is an occurrence which has a particular significance in a given context, can be localized in space and time, and needs to be taken into account because it triggers a state transition. An Event may have the following causes: –A condition (defined for a transition) is satisfied. –The object receive a message. Transitions are usually triggered by events which are noted on the arrows that connect the states. Transitions without event specifications are triggered automatically as soon as the actions belong to a state (inside) or previous state (on transition) are terminated. 0 or more Event(arguments) [0 or more conditions] /operations (arguments)

6 Advanced Topics in Behavior Analysis - Page L15-6 MEF-OOM&A-L15-6 Dr. M.E. Fayad Characteristics of Real-Time Systems Problems are formulated in scientific or engineering terms RTSs contain sensors and actuators to interact with their environment instead of with humans –A RTS has sensors to sense important physical parameters, such as temperature, pressure, or speed –A RTS has actuators, such as valves and thermostats that can make direct changes to the environment without going through a human intermediary. –Require a degree of coordination similar to the eye-hand coordination of people. RTSs often require concurrent processing of multiple inputs - Examples: –Temperature, pressure, acidity may have to be sensed and used together to calculate how to control a chemical reaction. –Valves and heaters may have to be adjusted simultaneously to maintain the desired flow rate, temperature, and reaction rate.

7 Advanced Topics in Behavior Analysis - Page L15-7 MEF-OOM&A-L15-7 Dr. M.E. Fayad Characteristics of Real-Time Systems RTSs operate at very short time scales –Systems like a nuclear reactor may responses in milliseconds or even microseconds. –Such rapid response times may sometimes be at the limit of the available technology. –As a result, there may be several technological constraints in the design of the system. RTSs require higher precision than ordinary systems. Constraints are imposed by the task, not the user –These constraints guarantee safety, liveness, and timeliness –Safety means that responses match specifications and the system is fault-tolerant –Liveness means that the system responds to all events –Timeliness means that the system responds within time constraints imposed by the environment

8 Advanced Topics in Behavior Analysis - Page L15-8 MEF-OOM&A-L15-8 Dr. M.E. Fayad Comments on the Characteristics of RTSs The list of previous RTS characteristics is not mandatory A method for designing RTSs must be able to deal with all of the RTS characteristics. There are no method deals with all the characteristics Methods for RTS developments: –ROOM –Berard –O-ET

9 Advanced Topics in Behavior Analysis - Page L15-9 MEF-OOM&A-L15-9 Dr. M.E. Fayad STD for the Control Temperature Process Start Stop Idle State Gas Heating Electric Heating Cold Enable Gas() Cold Enable Gas() Refrigeration Cold or Cool Enable Electric() Cool Disable Gas() OK Disable Electric() Cold oe Cool Disable Refrig’n() Hot Disable Electric() Enable Refrig’n() Hot Enable Refrig’n()

10 Advanced Topics in Behavior Analysis - Page L15-10 MEF-OOM&A-L15-10 Dr. M.E. Fayad An Action Table Equivalent to previous STD STATUS SIGNALS Cold Cool OKHot Idle Gas Heat Electric Heat Refrigeration Enable Gas() Enable Electric() Disable Refrig’n() Idle-State Disable Electric() Enable Refrig’n() Disable Electric() Idle-State Enable Refrigeration() Disable Gas() Enable Gas() Disable Refrig’n() Idle-State

11 Advanced Topics in Behavior Analysis - Page L15-11 MEF-OOM&A-L15-11 Dr. M.E. Fayad Timing Diagram Idle Warming Running Cooling

12 Advanced Topics in Behavior Analysis - Page L15-12 MEF-OOM&A-L15-12 Dr. M.E. Fayad Timing Diagram (cont’d) Timing Diagrams help in understanding a complex sequence of related actions and activities within a thing or between instances A Timing Diagram represents the relative time at which an action or activity occurs Each “row” in the diagram denotes a separate action or activity

13 Advanced Topics in Behavior Analysis - Page L15-13 MEF-OOM&A-L15-13 Dr. M.E. Fayad Timing Diagram (cont’d) When the lines are drawn: –Low => the action or activity is considered not to be taken place –High=> the action or activity is considered to be taken place When one activity must precede another, a freehand line can be drawn to show the precedence relationship Timing Diagram can be annotated to show the “birth” and “death” of object instances, and the formation and breakup of relationships, etc.

14 Advanced Topics in Behavior Analysis - Page L15-14 MEF-OOM&A-L15-14 Dr. M.E. Fayad Leveling Behavior Models OFFOFF ONON On Off Idle Decelerating Accelerating Running Stopped Done Start At Speed

15 Advanced Topics in Behavior Analysis - Page L15-15 MEF-OOM&A-L15-15 Dr. M.E. Fayad Leveling Behavior Models (cont’d) Behavior models can be leveled –Leveling suppresses details to increase understanding –Allows the representation of very large behavior models, in manageable pieces Two popular approaches: –Sub-class/Super-class: Class-based –Composite object structure: Instance-based

16 Advanced Topics in Behavior Analysis - Page L15-16 MEF-OOM&A-L15-16 Dr. M.E. Fayad Concurrency Aggregation Concurrency: –A dynamic model describes a set of concurrent objects, each with its state and STD. –The objects in a system are inherently concurrent and can change state independently –The state of the entire system cannot be represented by a single state in a single object; it is the product of the states of all its objects. –Aggregation implies concurrency. »The aggregate state corresponds to the combined states of all the components STDs »Aggregation is the “and” relationship »The aggregate state is one state from the first STD, and a state from the second STD, and a state from each other STD.

17 Advanced Topics in Behavior Analysis - Page L15-17 MEF-OOM&A-L15-17 Dr. M.E. Fayad Concurrency (cont’d) Concurrency within an object: –Concurrency within the state of a single object arises when the object can be partitioned subsets of attributes and links, each o which has its own sub-STD. The state of an object comprises one state from each sub-STD

18 Advanced Topics in Behavior Analysis - Page L15-18 MEF-OOM&A-L15-18 Dr. M.E. Fayad Define An action table Concurrency Timing Diagram What are the differences between aggregation and concurrency? What are the characteristics of RTSs? Discussion Questions


Download ppt "Advanced Topics in Behavior Analysis - Page L15-1 MEF-OOM&A-L15-1 Dr. M.E. Fayad Lesson 15: Advanced Topics in Behavior Analysis Object- Oriented Modeling."

Similar presentations


Ads by Google