Application of Coloured Petri Net for Agent Control and Communication in the ABAsim Architecture Antonín Kavička University of Pardubice, Czech Republic Michal Žarnay University of Žilina, Slovak Republic
CPN'08 Workshop2 Outline Background and motivation Definition of ABA-CPN (Agent-based architecture – Coloured Petri net) Application example Conventions in ABA-CPN Analysis of ABA-CPN Conclusion
CPN'08 Workshop3 Background Simulation of large and complex logistic nodes using ABAsim architecture (agent-based architecture of simulation models)
CPN'08 Workshop4 ABAsim – Agent’s Decomposition
CPN'08 Workshop5 ABAsim – Hierarchy of Agents
CPN'08 Workshop6 ABA-graph Definition of agent’s control and communication Subclass of Place/Transition Petri net
CPN'08 Workshop7 Motivation Upgrade to a subclass of coloured Petri nets in order to: –use a more flexible approach in describing the agent’s components –use existing tools for an analysis
CPN'08 Workshop8 Outline Background and motivation Definition of ABA-CPN Application example Conventions in ABA-CPN Analysis of ABA-CPN Conclusion
CPN'08 Workshop9 What is ABA-CPN Describes reactive logic of an agent component (edited within the CPN Tools environment) Token colours correspond to messages Denoted transitions correspond to agent’s instant assistants Management of token instances is based on prefix conventions of identifiers used in arc expressions Evolution is realized by means of a system interpreter within the ABAsim run-time kernel
CPN'08 Workshop10 Definition of ABA-CPN Based on definition of CPN Net structure: P = {p in } {p out } P S T = T D T A T S T B Additional rules
Input place p in Output place p out Internal places P S
Decision transitions T D Assistant transitions T D representing actions in simulation Standard transitions T D Sending transitions T D
Decision arcs Elementary variable arcs (all the remaining) Constant arcs
CPN'08 Workshop14 Tokens Reflect message forms used for communication that may be filled differently throughout the net evolution
CPN'08 Workshop15 Initial Markings (|M 0 (p)| = 1, p = p in ) (|M 0 (p)| = 0, p ≠ p in ) M 0 = { j M 0 | j =1,2, …, |C(p in )|}, for i ≠ j, i M 0 (p) ≠ j M 0 (p) Admissible initial marking: input message before processing and no other messages being processed Set of admissible initial markings: all relevant input messages
Another option: 1`IM_B
CPN'08 Workshop17 Outline Background and motivation Definition of ABA-CPN Application example Conventions in ABA-CPN Analysis of ABA-CPN Conclusion
Example Introduction
Example of ABA-CPN
CPN'08 Workshop20 Outline Background and motivation Definition of ABA-CPN Application example Conventions in ABA-CPN Analysis of ABA-CPN Conclusion
CPN'08 Workshop21 Conventions in ABA-CPN Management of token instances –First character (prefix) –Second character for decision transitions Denoting of places Third character Constant identifiers
CPN'08 Workshop22 Prefix Convention
CPN'08 Workshop23 “Decision Transitions” Convention
CPN'08 Workshop24 Outline Background and motivation Definition of ABA-CPN Application example Conventions in ABA-CPN Analysis of ABA-CPN Conclusion
CPN'08 Workshop25 Analysis of ABA-CPN To check correctness of the ABA-CPN, the liveness properties are used: –Dead markings –Transitions liveness
CPN'08 Workshop26 Dead Markings – 2 Types (|M(p out )| ≥ 1) (|M(p)| = 0, p ≠ p out ) |M(p)| = 0, p P sending a message from the current agent to another agent consumption of the message form and no need for further communication
CPN'08 Workshop27 Conditions from Transitions Liveness The only transition occurring in all sequences: input transition t T D No transition is dead in all occurrence sequences for all admissible initial markings
CPN'08 Workshop28 Conclusion Benefits of the ABA-CPN compared to the ABA-graph: –higher modelling capabilities of CPN: construction of conditional branching and differentiation of various instances of messages –existing tools for the CPN analysis
CPN'08 Workshop29 Use of the ABA-CPN Create an ABA-CPN model Analyze its liveness properties Import the model Check the model syntax Interpret the model during simulation runs CPN Tools ABA-CPN Interpreter
Thank you for your attention!
CPN'08 Workshop31 Examples of ABA-CPN Construction Errors Net has >1 input or >1 output place Decision or assistant transition has >1 input place An assistant transition has >1 output place A sending transition has >1 input place Tokens left after an evolution in the net No expression on outgoing arcs from a decision transition is used.
CPN'08 Workshop32 Input place p in Output place p out Internal places P S