faudes::TlhaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr > Class Template Reference

#include <hyb_hgenerator.h>

Public Member Functions

 TlhaGenerator (void)
 
 TlhaGenerator (const TlhaGenerator &rOtherGen)
 
 TlhaGenerator (const vGenerator &rOtherGen)
 
 TlhaGenerator (const std::string &rFileName)
 
TlhaGeneratorNew (void) const
 
TlhaGeneratorCopy (void) const
 
virtual const TypeCast (const Type *pOther) const
 
virtual TlhaGeneratoroperator= (const TlhaGenerator &rOtherGen)
 
virtual TlhaGeneratoroperator= (const vGenerator &rOtherGen)
 
int Dimension (void) const
 
const PolyhedronStateSpace (void) const
 
void StateSpace (const Polyhedron &rStateSpace)
 
const PolyhedronInvariant (Idx idx) const
 
PolyhedronInvariantp (Idx idx)
 
void Invariant (Idx idx, const Polyhedron &rInvariant)
 
const PolyhedronInvariant (const std::string &name) const
 
void Invariant (const std::string &name, const Polyhedron &rInvariant)
 
const PolyhedronInitialConstraint (Idx idx) const
 
PolyhedronInitialConstraintp (Idx idx)
 
void InitialConstraint (Idx idx, const Polyhedron &rInitialConstraint)
 
const PolyhedronInitialConstraint (const std::string &name) const
 
void InitialConstraint (const std::string &name, const Polyhedron &rInitialConstraint)
 
const PolyhedronRate (Idx idx) const
 
PolyhedronRatep (Idx idx)
 
void Rate (Idx idx, const Polyhedron &rRate)
 
const PolyhedronRate (const std::string &name) const
 
void Rate (const std::string &name, const Polyhedron &rRate)
 
const PolyhedronGuard (const Transition &rTrans) const
 
PolyhedronGuardp (const Transition &rTrans)
 
void Guard (const Transition &rTrans, const Polyhedron &rGuard)
 
const LinearRelationReset (const Transition &rTrans) const
 
LinearRelationResetp (const Transition &rTrans)
 
void Reset (const Transition &rTrans, const LinearRelation &rReset)
 
virtual bool Valid (void) const
 
virtual bool UpdateAttributes (void)
 
- Public Member Functions inherited from faudes::TaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >
 TaGenerator (void)
 
 TaGenerator (const TaGenerator &rOtherGen)
 
 TaGenerator (const vGenerator &rOtherGen)
 
 TaGenerator (const std::string &rFileName)
 
virtual TaGenerator NewAGen (void) const
 
virtual ~TaGenerator (void)
 
virtual TaGeneratorAssign (const Type &rSrc)
 
TaGeneratoroperator= (const TaGenerator &rOtherGen)
 
virtual void Move (TaGenerator &rGen)
 
virtual void Move (Generator &rGen)
 
virtual void Clear (void)
 
const TaEventSet< EventAttr > & Alphabet (void) const
 
const TaStateSet< StateAttr > & States (void) const
 
const ATransSetTransRel (void) const
 
void TransRel (TransSetX1EvX2 &res) const
 
void TransRel (TransSetEvX1X2 &res) const
 
void TransRel (TransSetEvX2X1 &res) const
 
void TransRel (TransSetX2EvX1 &res) const
 
void TransRel (TransSetX2X1Ev &res) const
 
void TransRel (TransSetX1X2Ev &res) const
 
bool InsEvent (Idx index)
 
Idx InsEvent (const std::string &rName)
 
bool InsEvent (Idx index, const EventAttr &rAttr)
 
Idx InsEvent (const std::string &rName, const EventAttr &rAttr)
 
void InjectAlphabet (const EventSet &rNewalphabet)
 
void InjectAlphabet (const TaEventSet< EventAttr > &rNewalphabet)
 
Idx InsState (void)
 
Idx InsState (const StateAttr &attr)
 
bool InsState (Idx index)
 
Idx InsState (const std::string &rName)
 
Idx InsState (const std::string &rName, const StateAttr &attr)
 
bool InsState (Idx index, const StateAttr &attr)
 
void InjectStates (const StateSet &rNewStates)
 
void InjectStates (const TaStateSet< StateAttr > &rNewStates)
 
bool SetTransition (Idx x1, Idx ev, Idx x2)
 
bool SetTransition (const std::string &rX1, const std::string &rEv, const std::string &rX2)
 
bool SetTransition (const Transition &rTransition)
 
bool SetTransition (const Transition &rTransition, const TransAttr &rAttr)
 
void InjectTransRel (const TransSet &rNewtransrel)
 
void InjectTransRel (const ATransSet &rNewtransrel)
 
void EventAttribute (Idx index, const EventAttr &rAttr)
 
void EventAttribute (Idx index, const Type &rAttr)
 
const EventAttr & EventAttribute (Idx index) const
 
const EventAttr & EventAttribute (const std::string &rName) const
 
EventAttr * EventAttributep (Idx index)
 
EventAttr * EventAttributep (const std::string &rName)
 
void StateAttribute (Idx index, const StateAttr &rAttr)
 
void StateAttribute (Idx index, const Type &rAttr)
 
const StateAttr & StateAttribute (Idx index) const
 
StateAttr * StateAttributep (Idx index)
 
void TransAttribute (const Transition &rTrans, const TransAttr &rAttr)
 
void TransAttribute (const Transition &rTrans, const Type &rAttr)
 
const TransAttr & TransAttribute (const Transition &rTrans) const
 
TransAttr * TransAttributep (const Transition &rTrans)
 
void GlobalAttribute (const GlobalAttr &rAttr)
 
void GlobalAttribute (const Type &rAttr)
 
const GlobalAttr & GlobalAttribute (void) const
 
GlobalAttr * GlobalAttributep (void)
 
- Public Member Functions inherited from faudes::vGenerator
 vGenerator (void)
 
 vGenerator (const vGenerator &rOtherGen)
 
 vGenerator (const std::string &rFileName)
 
virtual ~vGenerator (void)
 
virtual vGeneratorAssignWithoutAttributes (const vGenerator &rGen)
 
vGeneratoroperator= (const vGenerator &rOtherGen)
 
virtual void Version (const std::string &rVersion, vGenerator &rResGen) const
 
virtual void Version (Idx version, vGenerator &rResGen) const
 
virtual void Version (const std::string &rPattern, const std::string &rReplacement, vGenerator &rResGen) const
 
void Name (const std::string &rName)
 
const std::string & Name (void) const
 
void ClearStates (void)
 
Idx AlphabetSize (void) const
 
Idx Size (void) const
 
Idx TransRelSize (void) const
 
Idx InitStatesSize (void) const
 
Idx MarkedStatesSize (void) const
 
bool Empty (void) const
 
bool AlphabetEmpty (void) const
 
bool TransRelEmpty (void) const
 
bool InitStatesEmpty (void) const
 
bool MarkedStatesEmpty (void) const
 
SymbolTableEventSymbolTablep (void) const
 
virtual void EventSymbolTablep (SymbolTable *pSymTab)
 
virtual void EventSymbolTablep (const vGenerator &rOtherGen)
 
EventSet NewEventSet (void) const
 
EventSetNewEventSetp (void) const
 
Idx EventIndex (const std::string &rName) const
 
std::string EventName (Idx index) const
 
void EventName (Idx index, const std::string &rName)
 
std::string UniqueEventName (const std::string &rName) const
 
bool EventRename (Idx event, const std::string &rNewName)
 
bool EventRename (const std::string &rOldName, const std::string &rNewName)
 
const SymbolTableStateSymbolTable (void) const
 
void StateSymbolTable (const SymbolTable &rSymTab)
 
Idx StateIndex (const std::string &rName) const
 
std::string StateName (Idx index) const
 
void StateName (Idx index, const std::string &rName)
 
void ClearStateNames (void)
 
void ClrStateName (Idx index)
 
void ClrStateName (const std::string &rName)
 
bool StateNamesEnabled (void) const
 
void StateNamesEnabled (bool flag)
 
void SetDefaultStateNames (void)
 
void EnforceStateNames (const std::string &rTemplate)
 
std::string UniqueStateName (const std::string &rName) const
 
EventSet::Iterator AlphabetBegin (void) const
 
EventSet::Iterator AlphabetEnd (void) const
 
bool ExistsEvent (Idx index) const
 
bool ExistsEvent (const std::string &rName) const
 
EventSet::Iterator FindEvent (Idx index) const
 
EventSet::Iterator FindEvent (const std::string &rName) const
 
const EventSetAlphabet (void) const
 
StateSet::Iterator StatesBegin (void) const
 
StateSet::Iterator StatesEnd (void) const
 
bool ExistsState (Idx index) const
 
bool ExistsState (const std::string &name) const
 
StateSet::Iterator FindState (Idx index) const
 
StateSet::Iterator FindState (const std::string &rName) const
 
const StateSetStates (void) const
 
Idx InitState (void) const
 
StateSet::Iterator InitStatesBegin (void) const
 
StateSet::Iterator InitStatesEnd (void) const
 
bool ExistsInitState (Idx index) const
 
StateSet::Iterator FindInitState (Idx index) const
 
const StateSetInitStates (void) const
 
StateSet::Iterator MarkedStatesBegin (void) const
 
StateSet::Iterator MarkedStatesEnd (void) const
 
bool ExistsMarkedState (Idx index) const
 
StateSet::Iterator FindMarkedState (Idx index) const
 
const StateSetMarkedStates (void) const
 
TransSet::Iterator TransRelBegin (void) const
 
TransSet::Iterator TransRelEnd (void) const
 
TransSet::Iterator TransRelBegin (Idx x1) const
 
TransSet::Iterator TransRelEnd (Idx x1) const
 
TransSet::Iterator TransRelBegin (Idx x1, Idx ev) const
 
TransSet::Iterator TransRelEnd (Idx x1, Idx ev) const
 
TransSet::Iterator FindTransition (const std::string &rX1, const std::string &rEv, const std::string &rX2) const
 
TransSet::Iterator FindTransition (Idx x1, Idx ev, Idx x2) const
 
TransSet::Iterator FindTransition (const Transition &rTrans) const
 
bool ExistsTransition (const std::string &rX1, const std::string &rEv, const std::string &rX2) const
 
bool ExistsTransition (Idx x1, Idx ev, Idx x2) const
 
bool ExistsTransition (const Transition &rTrans) const
 
bool ExistsTransition (Idx x1, Idx ev) const
 
bool ExistsTransition (Idx x1) const
 
const TransSetTransRel (void) const
 
void TransRel (TransSetX1EvX2 &res) const
 
void TransRel (TransSetEvX1X2 &res) const
 
void TransRel (TransSetEvX2X1 &res) const
 
void TransRel (TransSetX2EvX1 &res) const
 
void TransRel (TransSetX2X1Ev &res) const
 
void TransRel (TransSetX1X2Ev &res) const
 
Transition TransitionByNames (const std::string &rX1, const std::string &rEv, const std::string &rX2) const
 
bool InsEvent (Idx index)
 
Idx InsEvent (const std::string &rName)
 
void InsEvents (const EventSet &events)
 
bool DelEvent (Idx index)
 
bool DelEvent (const std::string &rName)
 
void DelEvents (const EventSet &rEvents)
 
bool DelEventFromAlphabet (Idx index)
 
void InjectAlphabet (const EventSet &rNewalphabet)
 
void RestrictAlphabet (const EventSet &rNewalphabet)
 
Idx InsState (void)
 
bool InsState (Idx index)
 
Idx InsState (const std::string &rName)
 
void InsStates (const StateSet &rStates)
 
bool DelState (Idx index)
 
bool DelState (const std::string &rName)
 
void DelStates (const StateSet &rDelStates)
 
bool DelStateFromStates (Idx index)
 
StateSet::Iterator DelStateFromStates (StateSet::Iterator pos)
 
void RestrictStates (const StateSet &rStates)
 
void InjectState (Idx index)
 
void InjectStates (const StateSet &rNewStates)
 
Idx InsInitState (void)
 
bool InsInitState (Idx index)
 
Idx InsInitState (const std::string &rName)
 
void InsInitStates (const StateSet &rStates)
 
Idx InsMarkedState (void)
 
bool InsMarkedState (Idx index)
 
Idx InsMarkedState (const std::string &rName)
 
void InsMarkedStates (const StateSet &rStates)
 
void SetInitState (Idx index)
 
void SetInitState (const std::string &rName)
 
void InjectInitStates (const StateSet &rNewInitStates)
 
void ClrInitState (Idx index)
 
void ClrInitState (const std::string &rName)
 
StateSet::Iterator ClrInitState (StateSet::Iterator pos)
 
void ClearInitStates (void)
 
void SetMarkedState (Idx index)
 
void SetMarkedState (const std::string &rName)
 
void ClrMarkedState (Idx index)
 
void ClrMarkedState (const std::string &rName)
 
StateSet::Iterator ClrMarkedState (StateSet::Iterator pos)
 
void ClearMarkedStates (void)
 
void InjectMarkedStates (const StateSet &rNewMarkedStates)
 
bool SetTransition (Idx x1, Idx ev, Idx x2)
 
bool SetTransition (const std::string &rX1, const std::string &rEv, const std::string &rX2)
 
bool SetTransition (const Transition &rTransition)
 
void ClrTransition (Idx x1, Idx ev, Idx x2)
 
void ClrTransition (const Transition &rTrans)
 
TransSet::Iterator ClrTransition (TransSet::Iterator it)
 
void ClrTransitions (Idx x1, Idx ev)
 
void ClrTransitions (Idx x1)
 
void ClearTransRel (void)
 
void InjectTransition (const Transition &rTrans)
 
void InjectTransRel (const TransSet &rNewtransrel)
 
virtual void ClearAttributes (void)
 
virtual void ClearEventAttributes (void)
 
virtual void ClrEventAttribute (Idx index)
 
virtual void EventAttributes (const EventSet &rEventSet)
 
virtual void ClearStateAttributes (void)
 
virtual void ClrStateAttribute (Idx index)
 
virtual void ClearTransAttributes (void)
 
virtual void ClrTransAttribute (const Transition &rTrans)
 
virtual void ClearGlobalAttribute (void)
 
virtual void GlobalAttributeTry (const Type &rAttr)
 
StateSet AccessibleSet (void) const
 
bool Accessible (void)
 
bool IsAccessible (void) const
 
StateSet CoaccessibleSet (void) const
 
bool Coaccessible (void)
 
bool IsCoaccessible (void) const
 
StateSet BlockingStates (void) const
 
StateSet TerminalStates (void) const
 
StateSet TerminalStates (const StateSet &rStates) const
 
bool IsComplete (void) const
 
bool IsComplete (const StateSet &rStates) const
 
bool IsComplete (const EventSet &rSigmaO) const
 
bool Complete (void)
 
bool Complete (const EventSet &rSigmaO)
 
StateSet TrimSet (void) const
 
bool Trim (void)
 
bool IsTrim (void) const
 
bool OmegaTrim (void)
 
bool IsOmegaTrim (void) const
 
EventSet UsedEvents (void) const
 
EventSet UnusedEvents (void) const
 
void MinimizeAlphabet (void)
 
EventSet ActiveEventSet (Idx x1) const
 
TransSet ActiveTransSet (Idx x1) const
 
StateSet TransRelStates (void) const
 
Idx SuccessorState (Idx x1, Idx ev) const
 
StateSet SuccessorStates (Idx x1) const
 
StateSet SuccessorStates (Idx x1, Idx ev) const
 
bool IsDeterministic (void) const
 
void SetMinStateIndexMap (void) const
 
void ClearMinStateIndexMap (void) const
 
Idx MinStateIndex (Idx index) const
 
void MinStateIndex (void)
 
Idx MaxStateIndex (void) const
 
const std::map< Idx, Idx > & MinStateIndexMap (void) const
 
std::string EStr (Idx index) const
 
std::string SStr (Idx index) const
 
std::string TStr (const Transition &rTrans) const
 
void GraphWrite (const std::string &rFileName, const std::string &rOutFormat="", const std::string &rDotExec="dot") const
 
bool operator< (const vGenerator &rOtherGen) const
 
void WriteAlphabet (void) const
 
std::string AlphabetToString (void) const
 
void WriteAlphabet (TokenWriter &rTw) const
 
void WriteStateSet (const StateSet &rStateSet) const
 
std::string StateSetToString (const StateSet &rStateSet) const
 
std::string StateSetToText (const StateSet &rStateSet) const
 
void WriteStateSet (TokenWriter &rTw, const StateSet &rStateSet) const
 
void DWriteStateSet (TokenWriter &rTw, const StateSet &rStateSet) const
 
std::string StatesToString (void) const
 
std::string StatesToText (void) const
 
std::string MarkedStatesToString (void) const
 
std::string InitStatesToString (void) const
 
void WriteTransRel (void) const
 
std::string TransRelToString (void) const
 
std::string TransRelToText (void) const
 
void WriteTransRel (TokenWriter &rTw) const
 
void DWriteTransRel (TokenWriter &rTw) const
 
virtual void DotWrite (const std::string &rFileName) const
 
virtual void DDotWrite (const std::string &rFileName) const
 
virtual void XDotWrite (const std::string &rFileName) const
 
void ReadStateSet (TokenReader &rTr, const std::string &rLabel, StateSet &rStateSet) const
 
bool ReindexOnWrite (void) const
 
void ReindexOnWrite (bool flag)
 
- Public Member Functions inherited from faudes::Type
 Type (void)
 
 Type (const Type &rType)
 
virtual ~Type (void)
 
Typeoperator= (const Type &rSrc)
 
virtual bool Equal (const Type &rOther) const
 
bool operator== (const Type &rOther) const
 
bool operator!= (const Type &rOther) const
 
virtual const std::string & TypeName (void) const
 
void Write (const Type *pContext=0) const
 
void Write (const std::string &pFileName, const std::string &rLabel="", const Type *pContext=0, std::ios::openmode openmode=std::ios::out|std::ios::trunc) const
 
void Write (const std::string &pFileName, std::ios::openmode openmode) const
 
void Write (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 
virtual void XWrite (const std::string &pFileName, const std::string &rLabel="", const Type *pContext=0) const
 
void XWrite (const Type *pContext=0) const
 
void XWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 
std::string ToString (const std::string &rLabel="", const Type *pContext=0) const
 
std::string ToText (const std::string &rLabel="", const Type *pContext=0) const
 
void DWrite (const Type *pContext=0) const
 
void DWrite (const std::string &pFileName, const std::string &rLabel="", const Type *pContext=0, std::ios::openmode openmode=std::ios::out|std::ios::trunc) const
 
void DWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 
void SWrite (TokenWriter &rTw) const
 
void SWrite (void) const
 
std::string ToSText (void) const
 
void Read (const std::string &rFileName, const std::string &rLabel="", const Type *pContext=0)
 
void FromString (const std::string &rString, const std::string &rLabel="", const Type *pContext=0)
 
void Read (TokenReader &rTr, const std::string &rLabel="", const Type *pContext=0)
 

Protected Member Functions

virtual void DoRead (TokenReader &rTr, const std::string &rLabel="", const Type *pContext=0)
 
virtual void DoWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 
- Protected Member Functions inherited from faudes::TaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >
virtual void NewCore (void)
 
virtual void UpdateCore (void)
 
void DoAssign (const TaGenerator &rGen)
 
- Protected Member Functions inherited from faudes::vGenerator
virtual void DeleteCore (void)
 
void ConfigureAttributeTypes (const AttributeVoid *pNewGlobalPrototype, const StateSet *pNewStatesPrototype, const EventSet *pNewAlphabetPrototype, const TransSet *pNewTransRelPrototype)
 
void DoAssign (const vGenerator &rSrc)
 
virtual void DoDWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 
virtual void DoSWrite (TokenWriter &rTw) const
 
virtual void DoXWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 
void ReadAlphabet (TokenReader &rTr)
 
void WriteStates (TokenWriter &rTw) const
 
void ReadStates (TokenReader &rTr)
 
void XReadStateSet (TokenReader &rTr, StateSet &rStateSet, const std::string &rLabel="") const
 
void ReadTransRel (const std::string &rFileName)
 
void ReadTransRel (TokenReader &rTr)
 
void XReadTransRel (TokenReader &rTr)
 
void XWriteStateSet (TokenWriter &rTw, const StateSet &rStateSet, const std::string &rLabel="") const
 
void XWriteTransRel (TokenWriter &rTw) const
 
- Protected Member Functions inherited from faudes::Type
void DoAssign (const Type &rSrc)
 
bool DoEqual (const Type &rOther) const
 
virtual const TypeDefinitionTypeDefinitionp (void) const
 
virtual Token XBeginTag (const std::string &rLabel="", const std::string &rFallbackLabel="") const
 

Additional Inherited Members

- Public Types inherited from faudes::TaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >
typedef TaTransSet< TransAttr > ATransSet
 
- Static Public Member Functions inherited from faudes::vGenerator
static SymbolTableGlobalEventSymbolTablep (void)
 
static void StateNamesEnabledDefault (bool flag)
 
static void ReindexOnWriteDefault (bool flag)
 
static bool ReindexOnWriteDefault (void)
 
- Static Protected Member Functions inherited from faudes::TaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >
static const TaNameSet< EventAttr > & AlphabetTaGen (void)
 
static const TaIndexSet< StateAttr > & StatesTaGen (void)
 
static const ATransSetTransRelTaGen (void)
 
static const GlobalAttr & GlobalTaGen (void)
 
- Static Protected Member Functions inherited from faudes::vGenerator
static const EventSetAlphabetVoid (void)
 
static const StateSetStatesVoid (void)
 
static const TransSetTransRelVoid (void)
 
static const AttributeVoidGlobalVoid (void)
 
- Protected Attributes inherited from faudes::TaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >
TaNameSet< EventAttr > * pAlphabet
 
TaIndexSet< StateAttr > * pStates
 
ATransSetpTransRel
 
GlobalAttr * pGlobalAttribute
 
- Protected Attributes inherited from faudes::vGenerator
std::string mMyName
 
Idx mId
 
SymbolTable mStateSymbolTable
 
SymbolTablempStateSymbolTable
 
SymbolTablempEventSymbolTable
 
bool mStateNamesEnabled
 
bool mReindexOnWrite
 
EventSetmpAlphabet
 
StateSetmpStates
 
TransSetmpTransRel
 
AttributeVoidmpGlobalAttribute
 
const EventSetpAlphabetPrototype
 
const StateSetpStatesPrototype
 
const TransSetpTransRelPrototype
 
const AttributeVoidpGlobalPrototype
 
StateSet mInitStates
 
StateSet mMarkedStates
 
std::map< Idx, IdxmMinStateIndexMap
 
- Static Protected Attributes inherited from faudes::vGenerator
static Idx msObjectCount = 0
 
static bool msStateNamesEnabledDefault = true
 
static bool msReindexOnWriteDefault = false
 

Detailed Description

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
class faudes::TlhaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >

Generator with linear hybrid automata extensions.

Henzinger's Linear Hybrid Automata

The TlhaGenerator implements a linear hybrid automaton as introduced by Henzinger et al. Here the state space consists of a discrete and a continuous component. The discrete component is also referre to as a location. While within a location, the continuous state evolves according to a differential inclusion. Furthermore, each location and each discrete transition is equipped with a so called invariant and a guard, respectively. While in a particular location, the continuous state must satisfy the invariant. Similarly, a transition becomes enabled only when the respective guard is satisfied. When a transition is executed, the continous state is reset according to a resetrelation. For the linear case implemented in libFAUDES, the assume that

  • the right hand side of the differential inclusion is constant and represented by a closed convex polyhedron;
  • invariants and guards are represented by closed convex polyhedra,
  • reset relations are affine transformations with an convex polyhedral offset.

Implementation

The TlhaGenerator is derived from the cGenerator and requires adequate attribute parameters that implement invariants, guards, resets and rates. Suitable attribute classes are provided by AttributeLhaState, AttributeLhaTrans and AttributeLhaGlobal which may be used either directly or as base classes for further derivatives. For the event attribute, the lhaGenerator assumes the AttributeCFlags interface. A convenience definition faudes::lhaGenerator is used for a minimal version with the above mentioned attribute parameters.

File IO

The TlhaGenerator calsses use the TaGenerator file IO, i.e. the file format is the same up to hybrid automata related requirements from the attribute parameters. The below example is from the basic version lhaGenerator.

<Generator name="lha example" ftype="LinearHybridAutomaton">
<Event name="north"/>
<Event name="south"/>
<Event name="west"/>
<State id="1" name="NorthWest">
<Initial/>
<AMatrix rows="4" columns="2">
100 0
-100 0
0 100
0 -100
</AMatrix>
<BVector count="4">
-25 50 50 -25
</BVector>
</Rate>
<AMatrix rows="4" columns="2">
1 0
-1 0
0 1
0 -1
</AMatrix>
<BVector count="4">
100 0 10 0
</BVector>
<AMatrix rows="1" columns="2">
-1 0
</AMatrix>
<BVector count="1">
-80
</BVector>
</State>
<State id="2" name="SouthWest">
<AMatrix rows="4" columns="2">
100 0
-100 0
0 100
0 -100
</AMatrix>
<BVector count="4">
-25 50 -25 50
</BVector>
</Rate>
<AMatrix rows="4" columns="2">
1 0
-1 0
0 1
0 -1
</AMatrix>
<BVector count="4">
100 0 10 0
</BVector>
</State>
<State id="10" name="Target">
<AMatrix rows="0" columns="2"/>
<BVector count="0"/>
</Rate>
<AMatrix rows="4" columns="2">
1 0
-1 0
0 1
0 -1
</AMatrix>
<BVector count="4">
100 0 10 0
</BVector>
</State>
<TransitionRelation>
<Transition x1="1" event="north" x2="2">
<AMatrix rows="1" columns="2">
0 -1
</AMatrix>
<BVector count="1">
-9
</BVector>
<A1Matrix rows="4" columns="2">
-1 0
1 0
0 -1
0 1
</A1Matrix>
<A2Matrix rows="4" columns="2">
1 0
-1 0
0 1
0 -1
</A2Matrix>
<BVector count="4">
-1 1 1 1
</BVector>
</Transition>
<Transition x1="1" event="west" x2="10">
<AMatrix rows="1" columns="2">
1 0
</AMatrix>
<BVector count="1">
1
</BVector>
</Transition>
<Transition x1="2" event="south" x2="1">
<AMatrix rows="1" columns="2">
0 1
</AMatrix>
<BVector count="1">
1
</BVector>
</Transition>
<Transition x1="2" event="west" x2="10">
<AMatrix rows="1" columns="2">
1 0
</AMatrix>
<BVector count="1">
1
</BVector>
</Transition>
</TransitionRelation>
<LhaStateSpace>
<AMatrix rows="4" columns="2">
1 0
-1 0
0 1
0 -1
</AMatrix>
<BVector count="4">
100 0 10 0
</BVector>
</LhaStateSpace>
const TaEventSet< EventAttr > & Alphabet(void) const
const Polyhedron & Rate(Idx idx) const
const Polyhedron & InitialConstraint(Idx idx) const
const Polyhedron & Guard(const Transition &rTrans) const
const Polyhedron & Invariant(Idx idx) const
const LinearRelation & Reset(const Transition &rTrans) const
IndexSet StateSet
Definition: cfl_indexset.h:273
vGenerator Generator

Definition at line 236 of file hyb_hgenerator.h.

Constructor & Destructor Documentation

◆ TlhaGenerator() [1/4]

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
faudes::TlhaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::TlhaGenerator ( void  )

Constructor

Definition at line 690 of file hyb_hgenerator.h.

◆ TlhaGenerator() [2/4]

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
faudes::TlhaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::TlhaGenerator ( const TlhaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr > &  rOtherGen)

Copy constructor

Parameters
rOtherGen

Definition at line 695 of file hyb_hgenerator.h.

◆ TlhaGenerator() [3/4]

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
faudes::TlhaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::TlhaGenerator ( const vGenerator rOtherGen)

Copy constructor (no attributes)

Parameters
rOtherGen

Definition at line 700 of file hyb_hgenerator.h.

◆ TlhaGenerator() [4/4]

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
faudes::TlhaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::TlhaGenerator ( const std::string &  rFileName)

Construct a from file

Parameters
rFileNameFilename
Exceptions
ExceptionIf opening/reading fails an Exception object is thrown (id 1, 50, 51)

Definition at line 705 of file hyb_hgenerator.h.

Member Function Documentation

◆ Cast()

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
virtual const Type* faudes::TlhaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Cast ( const Type pOther) const
inlinevirtual

Type test. Uses C++ dynamic cast to test whether the specified object casts to a System.

Returns
TlhaGenerator reference if dynamic cast succeeds, else NULL

Reimplemented from faudes::TaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >.

Definition at line 296 of file hyb_hgenerator.h.

◆ Copy()

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
TlhaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr > * faudes::TlhaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Copy ( void  ) const
virtual

Construct copy on heap. Constructs a TlhaGenerator on heap with the same attribute types and the same event- and clock-symboltable.

Returns
new Generator

Reimplemented from faudes::TaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >.

Definition at line 722 of file hyb_hgenerator.h.

◆ Dimension()

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
int faudes::TlhaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Dimension ( void  ) const

Get dimension of continuous statespace

Returns
Ref to state space polyhedron

Definition at line 730 of file hyb_hgenerator.h.

◆ DoRead()

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TlhaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::DoRead ( TokenReader rTr,
const std::string &  rLabel = "",
const Type pContext = 0 
)
protectedvirtual

Read generator object from TokenReader, see Type::Read for public wrappers.

We reimplement this vGenerator function in oredr to fix dimensions of default invariants etec.

Parameters
rTrTokenReader to read from
rLabelSection to read
pContextRead context to provide contextual information (ignored)
Exceptions
Exception
  • token mismatch (id 50, 51, 52, 80, 85)
  • IO error (id 1)

Reimplemented from faudes::vGenerator.

Definition at line 1008 of file hyb_hgenerator.h.

◆ DoWrite()

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TlhaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::DoWrite ( TokenWriter rTw,
const std::string &  rLabel = "",
const Type pContext = 0 
) const
protectedvirtual

Write generator object to TokenWriter, see Type::Write for public wrappers.

We reimplement this vGenerator function in oredr opt for XML write

Parameters
rTeTokenWriter to write to
rLabelSection label to write
pContextWrite context to provide contextual information (ignored)
Exceptions
Exception
  • IO error (id 1)

Reimplemented from faudes::vGenerator.

Definition at line 1053 of file hyb_hgenerator.h.

◆ Guard() [1/2]

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
const Polyhedron & faudes::TlhaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Guard ( const Transition rTrans) const

Get guard of a transition

Parameters
rTranstransition to manupilate
Returns
Guard of transition.
Exceptions
Exception
  • transition does not exist (id 60)

Definition at line 900 of file hyb_hgenerator.h.

◆ Guard() [2/2]

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TlhaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Guard ( const Transition rTrans,
const Polyhedron rGuard 
)

Sets guard of a transition

Parameters
rTranstransition to manuipulate
rGuardnew Guard of transition.
Exceptions
Exception
  • dimension mismatch (id 700)
  • transition does not exist (id 60)

Definition at line 924 of file hyb_hgenerator.h.

◆ Guardp()

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
Polyhedron * faudes::TlhaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Guardp ( const Transition rTrans)

Get guard of a transition

Parameters
rTranstransition to manupilate
Returns
Pointer to guard of transition.
Exceptions
Exception
  • transition does not exist (id 60)

Definition at line 912 of file hyb_hgenerator.h.

◆ InitialConstraint() [1/4]

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
const Polyhedron & faudes::TlhaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InitialConstraint ( const std::string &  name) const

Get initial constraint of state by name

Parameters
nameState name
Returns
Const ref to initial constraint
Exceptions
Exception
  • state does not exist (id 90, 95)

Definition at line 839 of file hyb_hgenerator.h.

◆ InitialConstraint() [2/4]

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TlhaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InitialConstraint ( const std::string &  name,
const Polyhedron rInitialConstraint 
)

Set initial constraint of state by name

Parameters
nameState name
rInitialConstraint
New initial constraint
Exceptions
Exception
  • dimension mismatch (id 700)
  • state does not exist (id 90, 95)

Definition at line 845 of file hyb_hgenerator.h.

◆ InitialConstraint() [3/4]

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
const Polyhedron & faudes::TlhaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InitialConstraint ( Idx  idx) const

Get initial constraint of state by index

Parameters
idxState index
Returns

Const ref to initial constraint
Exceptions
Exception
  • state does not exist (id 90, 95)

Definition at line 800 of file hyb_hgenerator.h.

◆ InitialConstraint() [4/4]

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TlhaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InitialConstraint ( Idx  idx,
const Polyhedron rInitialConstraint 
)

Set initial constraint of state by index

Parameters
idxState index
rInitialConstraint
New initial constraint
Exceptions
Exception
  • dimension mismatch (id 700)
  • state does not exist (id 90, 95)

Definition at line 824 of file hyb_hgenerator.h.

◆ InitialConstraintp()

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
Polyhedron * faudes::TlhaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InitialConstraintp ( Idx  idx)

Get initial constraint of state by index

Parameters
idxState index
Returns

Pointer to initial constraint
Exceptions
Exception
  • state does not exist (id 90, 95)

Definition at line 812 of file hyb_hgenerator.h.

◆ Invariant() [1/4]

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
const Polyhedron & faudes::TlhaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Invariant ( const std::string &  name) const

Get invariant of state by name

Parameters
nameState name
Returns
Const ref to invariant
Exceptions
Exception
  • state does not exist (id 90, 95)

Definition at line 786 of file hyb_hgenerator.h.

◆ Invariant() [2/4]

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TlhaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Invariant ( const std::string &  name,
const Polyhedron rInvariant 
)

Set invariant of state by name

Parameters
nameState name
rInvariant
New invariant
Exceptions
Exception
  • dimension mismatch (id 700)
  • state does not exist (id 90, 95)

Definition at line 792 of file hyb_hgenerator.h.

◆ Invariant() [3/4]

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
const Polyhedron & faudes::TlhaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Invariant ( Idx  idx) const

Get invariant of state by index

Parameters
idxState index
Returns

Const ref to invariant
Exceptions
Exception
  • state does not exist (id 90, 95)

Definition at line 751 of file hyb_hgenerator.h.

◆ Invariant() [4/4]

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TlhaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Invariant ( Idx  idx,
const Polyhedron rInvariant 
)

Set invariant of state by index

Parameters
idxState index
rInvariant
New invariant
Exceptions
Exception
  • dimension mismatch (id 700)
  • state does not exist (id 90, 95)

Definition at line 771 of file hyb_hgenerator.h.

◆ Invariantp()

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
Polyhedron * faudes::TlhaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Invariantp ( Idx  idx)

Get invariant of state by index

Parameters
idxState index
Returns

Pointer to invariant
Exceptions
Exception
  • state does not exist (id 90, 95)

Definition at line 761 of file hyb_hgenerator.h.

◆ New()

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
TlhaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr > * faudes::TlhaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::New ( void  ) const
virtual

Construct on heap. Constructs a TlhaGenerator on heap with the same attribute types and the same event- and clock-symboltable.

Returns
new Generator

Reimplemented from faudes::TaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >.

Definition at line 711 of file hyb_hgenerator.h.

◆ operator=() [1/2]

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
virtual TlhaGenerator& faudes::TlhaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::operator= ( const TlhaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr > &  rOtherGen)
inlinevirtual

Assignment operator (uses copy) Note: you must reimplement this operator in derived classes in order to handle internal pointers correctly

Parameters
rOtherGenOther generator

Definition at line 308 of file hyb_hgenerator.h.

◆ operator=() [2/2]

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
virtual TlhaGenerator& faudes::TlhaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::operator= ( const vGenerator rOtherGen)
inlinevirtual

Assignment operator (uses copy)

Parameters
rOtherGenOther generator

Definition at line 316 of file hyb_hgenerator.h.

◆ Rate() [1/4]

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
const Polyhedron & faudes::TlhaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Rate ( const std::string &  name) const

Get rate of state by name

Parameters
nameState name
Returns
Const ref to rate
Exceptions
Exception
  • state does not exist (id 90, 95)

Definition at line 886 of file hyb_hgenerator.h.

◆ Rate() [2/4]

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TlhaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Rate ( const std::string &  name,
const Polyhedron rRate 
)

Set rate of state by name

Parameters
nameState name
rRate
New rate
Exceptions
Exception
  • dimension mismatch (id 700)
  • state does not exist (id 90, 95)

Definition at line 892 of file hyb_hgenerator.h.

◆ Rate() [3/4]

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
const Polyhedron & faudes::TlhaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Rate ( Idx  idx) const

Get rate of state by index

Parameters
idxState index
Returns

Const ref to rate
Exceptions
Exception
  • state does not exist (id 90, 95)

Definition at line 851 of file hyb_hgenerator.h.

◆ Rate() [4/4]

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TlhaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Rate ( Idx  idx,
const Polyhedron rRate 
)

Set rate of state by index

Parameters
idxState index
rRate
New rate
Exceptions
Exception
  • dimension mismatch (id 700)
  • state does not exist (id 90, 95)

Definition at line 871 of file hyb_hgenerator.h.

◆ Ratep()

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
Polyhedron * faudes::TlhaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Ratep ( Idx  idx)

Get rate of state by index

Parameters
idxState index
Returns

Pointer to rate
Exceptions
Exception
  • state does not exist (id 90, 95)

Definition at line 861 of file hyb_hgenerator.h.

◆ Reset() [1/2]

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
const LinearRelation & faudes::TlhaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Reset ( const Transition rTrans) const

Get reset of a transition

Parameters
rTranstransition to manupilate
Returns
Reset of transition.
Exceptions
Exception
  • transition does not exist (id 60)

Definition at line 940 of file hyb_hgenerator.h.

◆ Reset() [2/2]

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TlhaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Reset ( const Transition rTrans,
const LinearRelation rReset 
)

Sets reset of a transition

Parameters
rTranstransition to manuipulate
rResetnew Reset of transition.
Exceptions
Exception
  • dimension mismatch (id 700)
  • transition does not exist (id 60)

Definition at line 964 of file hyb_hgenerator.h.

◆ Resetp()

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
LinearRelation * faudes::TlhaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Resetp ( const Transition rTrans)

Get reset of a transition

Parameters
rTranstransition to manupilate
Returns
Pointer to reset of transition.
Exceptions
Exception
  • transition does not exist (id 60)

Definition at line 952 of file hyb_hgenerator.h.

◆ StateSpace() [1/2]

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
void faudes::TlhaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::StateSpace ( const Polyhedron rStateSpace)

Set continuous statespace

Note: if the new state space doe not match the dimension of the current state space, all invariants, guards etc are invalidated.

Parameters
rStateSpaceNew state space

Definition at line 741 of file hyb_hgenerator.h.

◆ StateSpace() [2/2]

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
const Polyhedron & faudes::TlhaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::StateSpace ( void  ) const

Get continuous statespace

Returns
Ref to state space polyhedron

Definition at line 735 of file hyb_hgenerator.h.

◆ UpdateAttributes()

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
bool faudes::TlhaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::UpdateAttributes ( void  )
virtual

Updates internal attributes. As a demo, we set state flag 0x20000000 for blocking states. Reimplement to your needs.

Returns
true if value changed

Reimplemented from faudes::vGenerator.

Definition at line 1001 of file hyb_hgenerator.h.

◆ Valid()

template<class GlobalAttr , class StateAttr , class EventAttr , class TransAttr >
bool faudes::TlhaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Valid ( void  ) const
virtual

Check if generator is valid.

The current implementation test consitency of dimensions.

Returns
Success

Reimplemented from faudes::TaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >.

Definition at line 981 of file hyb_hgenerator.h.


The documentation for this class was generated from the following file:

libFAUDES 2.33c --- 2025.05.15 --- c++ api documentaion by doxygen