libFAUDES
Sections
Index
|
Multitasking PlugIn
[PlugIns]
Detailed Description
The multitasking plug-in allows to examine colored marking generators (CMGs). Generators can be created in the same way as in the standard implementation, the identifier is mtcGenerator. In addition to the standard implementation that is based on the classical theory, colored markings can be applied to single states. The class faudes::TmtcGenerator implements various methods to handle CMGs. Furthermore, functions for making CMGs deterministic or strongly coaccessible, for computing the parallel composition or an projection, are provided.
The libFAUDES multitasking plugin allows to develop descrete event systems using the classical, monolithic approach. Additionally, it is suitable for their modular or hierarchical development. For more information to the modular proceeding see
"Modular Multi-tasking Supervisory Control of Composite Discrete Event Systems", M.H. de Queiroz and J.E.R. Cury, IFAC World Congress, 2005.
Further information to the hierarchical proceeding can be found in
"Hierarchical and Decentralized Multitasking Control of Discrete Event Systems", K. Schmidt, M. H. Queiroz, and J. E. R. Cury, IEEE Conference on Decision and Control, 2007.
The implementation of the multitasking plug-in was part of Mathhias' Singers student project, supervised by Klaus Schmidt. The code is distributed with libFAUDES and under the terms of the LGPL.
Copyright (c) 2008, Matthias Singer.
|
Classes |
class | faudes::AttributeColoredState |
| State attributes for multitasking automata. More...
|
class | faudes::ColorSet |
| Container for colors: this is a NameSet with its own static symboltable. More...
|
class | faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr > |
| Allows to create colored marking generators (CMGs) as the common five tupel consisting of alphabet, stateset, transition relation, initial states, marked states, and attributes for state and event properties. More...
|
Functions |
Idx | faudes::calcNaturalObserver (const mtcGenerator &rGen, EventSet &rHighAlph) |
| Calculate a colored natural observer by extending a given high-level alphabet.
|
void | faudes::Parallel (const mtcGenerator &rGen1, const mtcGenerator &rGen2, mtcGenerator &rResGen) |
| Parallel composition of two colored marking generators, controllability status is observed.
|
void | faudes::Deterministic (const mtcGenerator &rGen, mtcGenerator &rResGen) |
| Make generator deterministic.
|
void | faudes::ProjectNonDet (mtcGenerator &rGen, const EventSet &rProjectAlphabet) |
| Project generator to alphabet rProjectAlphabet.
|
void | faudes::Project (const mtcGenerator &rGen, const EventSet &rProjectAlphabet, mtcGenerator &rResGen) |
| Minimized Deterministic projection.
|
void | faudes::InvProject (mtcGenerator &rGen, const EventSet &rProjectAlphabet) |
| Inverse projection.
|
bool | faudes::ComputeSCC (const Generator &rGen, std::set< StateSet > &rSccSet, StateSet &rRoots) |
| Computes the strongly connected components (SCCs) of an automaton.
|
void | faudes::ColoredSCC (mtcGenerator &rGen, ColorSet &rColors, std::set< StateSet > &rColoredSCCs) |
| Compute all strongly connected components (SCCs) in a colored marking generator (CMG) that are marked with a given set of colors.
|
bool | faudes::CheckRedundantColor (mtcGenerator rGen, Idx redundantColor) |
| Check if a color in a colored marking generator is redundant for the supervisor synthesis.
|
void | faudes::OptimalColorSet (const mtcGenerator &rGen, ColorSet &rOptimalColors, EventSet &rHighAlph) |
| Compute an optimal subset of the colors that should be removed.
|
void | faudes::SupConNB (const mtcGenerator &rPlantGen, const mtcGenerator &rSpecGen, mtcGenerator &rResGen) |
| Nonblocking Supremal Controllable Sublanguage (wrapper function).
|
void | faudes::SupCon (const mtcGenerator &rPlantGen, const mtcGenerator &rSpecGen, mtcGenerator &rResGen) |
| Supremal Controllable Sublanguage (wrapper function).
|
Function Documentation
Calculate a colored natural observer by extending a given high-level alphabet.
This function extends a given high-level alphabet such that the corresponding natural projection becomes a colored observer for a given colored marking generator. The function calls the function ExtendHighAlphabet in the Observer plugin.
- Parameters:
-
| rGen | input colored marking generator |
| rHighAlph | high-level alphabet that is extended towards a colored observer |
- Returns:
- number of states of the high-level colored marking generator
Example: Computation of an Lm-observer
Original generator |
|
Original high-level alphabet (rHighAlph): cb4-cb12, cb12-cb4, cb11-cb4, cb4-cb11 |
|
Result of calcNaturalObserver(rGenObs, rHighAlph); |
New high-level alphabet (rNewHighAlph): cb4-cb12, cb12-cb4, cb11-cb4, cb4-cb11, mh1end |
|
|
bool faudes::CheckRedundantColor |
( |
mtcGenerator |
rGen, |
|
|
Idx |
redundantColor | |
|
) |
| | |
Check if a color in a colored marking generator is redundant for the supervisor synthesis.
This function determines if a color can be removed from a CMG if it is redundant for the supervisor synthesis. The algorithm implements the work in K. Schmidt and J.E.R. Cury, "Redundant Colors in the Multitasking Supervisory Control for Discrete Event Systems", Workshop on Dependable Control of Discrete Event Systems, 2009.
- Parameters:
-
| rGen | Reference to generator |
| redundantColor | Index of the color to be removed + |
- Returns:
- true if the color can be removed, false otherwise
Compute all strongly connected components (SCCs) in a colored marking generator (CMG) that are marked with a given set of colors.
This function finds all SCCs in a CMG that contain states with all colors in a given color set. To find all SCCs, first the function ComputeSCC is called.
- Parameters:
-
| rGen | generator under investigation |
| rColors | colors that have to be contained in the SCCs |
| rColoredSCCs | SCCs marked with all colors in rColors |
Computes the strongly connected components (SCCs) of an automaton.
This function is the wrapper function for Trajan's algorithm that is implemented in the function SearchSCC.
- Parameters:
-
| rGen | investigated generator |
| rSccSet | Set of strongly connected components (result). |
| rRoots | Set of states that each are root of some SCC (result). |
- Returns:
- true if SCCs have been found, false if not.
void faudes::Deterministic |
( |
const mtcGenerator & |
rGen, |
|
|
mtcGenerator & |
rResGen | |
|
) |
| | |
Make generator deterministic.
(function wrapper)
- Parameters:
-
| rGen | Reference to generator |
| rResGen | Reference to resulting deterministic generator |
Example: Converting a nondeterministic mtcGenerator to a deterministic one
Original mtcGenerator gen |
|
The mtcGenerator contains two initial states and, leaving from state 2, it has two transitions containing the same event b which are leading to two separate states. |
|
Result of the deterministic operation |
|
Both initial states are combined to a single one. All color labels appearing in all original states are adapted to the new initial state. Furthermore, states are merged in that way that the generator's language stays the same, but the generator gets deterministic. |
|
void faudes::InvProject |
( |
mtcGenerator & |
rGen, |
|
|
const EventSet & |
rProjectAlphabet | |
|
) |
| | |
Inverse projection.
This adds selfloop transition at every state for all missing events.
- Parameters:
-
| rGen | Reference to generator |
| rProjectAlphabet | Alphabet for inverse projection |
Example: Inverse projection of an mtcGenerator for a specified alphabet which is larger than the mtcGenerator's one.
Original mtcGenerator |
|
The projection alphabet contains the events {a, b, c}. |
|
Result of the projection |
|
Events, that are not part of the mtcGenerator's alphabet are inserted as self-loops into every state. |
|
Compute an optimal subset of the colors that should be removed.
This function tries to find an optimal subset of colors that can be removed from the given colored marking generator without affecting supervisor synthesis. Here, optimality is defined w.r.t. the smallest number of states of a high-level generator after removing the colors.
- Parameters:
-
| rGen | input colored marking generator |
| rOptimalColors | optimal color set to be removed |
| rHighAlph | hgh-level alphabet for hierarchical abstraction after color removal. Initially, the alphabet should contain all events that must be present in the high-level alphabet |
void faudes::Parallel |
( |
const mtcGenerator & |
rGen1, |
|
|
const mtcGenerator & |
rGen2, |
|
|
mtcGenerator & |
rResGen | |
|
) |
| | |
Parallel composition of two colored marking generators, controllability status is observed.
- Parameters:
-
| rGen1 | First mtcGenerator for parallel composition |
| rGen2 | Second mtcGenerator for parallel composition |
| rResGen | mtcGenerator in which the result of the parallel composition is saved |
Example: Parallel composition of two colored marking generators
mtcGenerators for composition |
|
|
The left mtcGenerator contains only one colored state, state 2, whereas the right one possesses two color labels - one for each state. |
|
Result of the parallel composition |
|
The composed mtcGenerator contains all colors that appear in both single mtcGenerators.
The single states are labeled with a color when both states to combine are labeled with it. A color label is also added when it occurs in one of the two currently regarded states to compose and, at the same time, it does not appear in the second single mtcGenerator. |
|
void faudes::Project |
( |
const mtcGenerator & |
rGen, |
|
|
const EventSet & |
rProjectAlphabet, |
|
|
mtcGenerator & |
rResGen | |
|
) |
| | |
Minimized Deterministic projection.
This function does not modify the mtcGenerator. It calls project, determine and statemin.
- Parameters:
-
| rGen | Reference to generator |
| rProjectAlphabet | Projection alphabet |
| rResGen | Reference to resulting deterministic generator |
Example: Projection of an mtcGenerator to a specified alphabet
Original mtcGenerator gen |
|
The projection alphabet contains the events {a, b, d}. |
|
Result of the projection |
|
The resulting mtcGenerator contains all events that appear in the oringinal mtcGenerator and in the specified alphabet. Moreover, the resulting mtcGenerator is deterministic. |
|
void faudes::ProjectNonDet |
( |
mtcGenerator & |
rGen, |
|
|
const EventSet & |
rProjectAlphabet | |
|
) |
| | |
Project generator to alphabet rProjectAlphabet.
- Parameters:
-
| rGen | Reference to generator |
| rProjectAlphabet | Projection alphabet |
void faudes::SupCon |
( |
const mtcGenerator & |
rPlantGen, |
|
|
const mtcGenerator & |
rSpecGen, |
|
|
mtcGenerator & |
rResGen | |
|
) |
| | |
Supremal Controllable Sublanguage (wrapper function).
- Parameters:
-
| rPlantGen | Plant mtcGenerator |
| rSpecGen | Specification mtcGenerator |
| rResGen | Reference to resulting mtcGenerator, the minimal restrictive supervisor |
- Exceptions:
-
| Exception |
- Alphabets of generators don't match (id 500)
- plant nondeterministic (id 501)
- spec nondeterministic (id 503)
- plant and spec nondeterministic (id 504)
|
Example: Synthesis of a multitasking supervisor for a model and a corresponding specification. Supervisor does not take care of nonblocking behavior.
Model mtcGenerator |
|
The model contains one state that results in a blocking behavior. |
Specification mtcGenerator |
|
The specification expresses, that after an event b an event c has to occur before b can happen again. Furthermore, it forbids that event c occurs before event b has taken place.
Before being able to compute a supervisor, an inverse projection step has to be applied on the specification. It inserts self-loops for event a in both states, as the alphabets of model and specification must be identical. |
|
Strongly nonblocking supervisor |
|
The supervisor synthesized by this function is strongly nonblocking. Of course, it ensures that the specification condition is fulfilled. |
|
void faudes::SupConNB |
( |
const mtcGenerator & |
rPlantGen, |
|
|
const mtcGenerator & |
rSpecGen, |
|
|
mtcGenerator & |
rResGen | |
|
) |
| | |
Nonblocking Supremal Controllable Sublanguage (wrapper function).
Computes symbolic state names in resulting supervisor automaton if symbolic state names are enabled in rPlantGen and rSpecGen
- Parameters:
-
| rPlantGen | Plant mtcGenerator |
| rSpecGen | Specification mtcGenerator |
| rResGen | Reference to resulting mtcGenerator, the minimal restrictive nonblocking supervisor |
- Exceptions:
-
| Exception |
- Alphabets of generators don't match (id 500)
- plant nondeterministic (id 501)
- spec nondeterministic (id 503)
- plant and spec nondeterministic (id 504)
|
Example: Synthesis of a strongly nonblocking supervisor for a model and a corresponding specification
Model mtcGenerator |
|
The model contains one state that results in a blocking behavior. |
Specification mtcGenerator |
|
The specification expresses, that after an event b an event c has to occur before b can happen again. Furthermore, it forbids that event c occurs before event b has taken place.
Before being able to compute a supervisor, an inverse projection step has to be applied on the specification. It inserts self-loops for event a in both states, as the alphabets of model and specification must be identical. |
|
Strongly nonblocking supervisor |
|
The synthesized supervisor ensures that the specification condition is fulfilled. That is why state 5 of the model and the corresponding transitions are erased. Observe that the operation does not make a generator nonblocking, as is shown in the example where state 3 is still existing. |
|
|