Main Page   Class Hierarchy   Data Structures   File List   Data Fields   Globals  

CTSRModel Class Reference

A model. More...

#include <tvu_sr.h>

Inheritance diagram for CTSRModel::

CTObject CTSREvent CTSRScenario CTSRState

Public Methods

 CTSRModel ()
 Constructor/destructor. More...

 ~CTSRModel ()
 DEFINE_ID_FUNCTIONS (CTSRModel, CTObject, CLASSNAME_SR_SRMODEL_ID, CLASSNAME_SR_SRMODEL) public
virtual CTAlarmGenerateAlarm (CTObject *ScenarioInstance)
 Generate an alarm: this fnction generates a new alarm when a behavior of this model is just recognised. More...

virtual TBOOL IsPrimaryModel ()
 To verify if it's a primary model: normally, it's state model This function run correctly is Build was called. More...

virtual TINT ActorOfTypeCount (TINT Type)
 Get the number of actor variable of a type (zone, equipement, wall, ...). More...

virtual CTSRModel* GenerateUncertainModel (TLPCSTR SubscenarioName)
 =============================================================== FOR UNCERTAIN PROCESSING: these functions will be called before all processings Generate a scenrio model by removing a sub-scenario. More...

virtual CTList FindEntityPrivateActorVariables (CTSREntityHolder *pEntity, TBOOL bExpectedEntity=TTRUE)
 Find the actor variables the appear in a given entity but do not appear in the others. More...

virtual TBOOL RemoveAnEntity (TLPCSTR SubscenarioName)
 Remove an entity by it name. More...

virtual TBOOL RemoveConstraints (TLPCSTR VariableName)
 Remove all constraints containing a variable. More...

virtual TBOOL Build ()
 Build the constraints Objects: list of environment objects. More...

virtual TBOOL VerifyActorVariable (CTSRVar *pVar)
 For the composed scenarios, we need to verify that all actor variables present in entities. More...

virtual TBOOL VerifyActorVariables ()
virtual TBOOL CreateNegativeActorVariables ()
 Create negative actor variables for the model. More...

virtual TBOOL OrderSubScenarios ()
 To order in time the sub-scenarios of the scenario model To do this, we use the method of C. Dousson and M. Ghallab to build a graph of temporal relations of sub-scenarios. More...

virtual TBOOL CreateEntityVars ()
 Create entity variables from EntityHolders: Create variable and category them in POSITIVE and NEGATIVE After OrderSubScenarios(). More...

virtual TBOOL AttachVarConstraints ()
 Attach variable for the constraints: attach object for the variable presenting in the constraints and create temporal variables if neccessary This fnction must be called after set context for the motor and after CreateEntityVars(); and before ClassifyConstraints();. More...

TBOOL ClassifyConstraints ()
 Classify the constraints into 2 categories: Positive constraints and Negative constraints. More...

TBOOL IsPositiveConstraints (CTList Expression)
TBOOL CreateNeededNegativeVars ()
 Create the list of all needed negative variables for all negative constraints. More...

CTList GetConstraintNeededNegativeVars (CTList Expression, CTList pResult=TNULL)
 Create the list of negative variable needed to evalue a negative constraint Expression: expression to calculate pResult: the list to stock all variables, NULL: create a new list. More...

virtual TBOOL BuildActorVarConstraints ()
 Build the constraints for the actor variables: gather the constraints for the actor variables Must be called after AttachVarConstraints(). More...

virtual TBOOL BuildEntityVarConstraints ()
 Build the constraints for the entity variables: gather the constraints for the entity variables Must be called after CreateEntityVars(), ClassifyConstraints(), AttachVarConstraints(). More...

virtual TBOOL ModifyTemporalConstraints ()
 Replace a temporal variable by an expression to acces to the variable in an intermediate model. More...

virtual TBOOL ModifyTemporalConstraint (CTList pConstraint, CTList pVars, TINT iOrder=-1)
virtual CTList GetDependenceModelNames ()
 Return the list of dependence model (sub-scenario model) names Before delete tehh list, must call Delete(TFALSE) for remove the list without remove the holded elements. More...

virtual CTList BuildIntermediateModels ()
 Generate the list of intermediate models: The list of sub-scenarios must be ordered in time before calling this function S = (S1, S2, S3, S4) => (((S1, S2), S3), S4). More...

virtual CTSREntityHolderBuildFromOrigin (CTSRModel *pOriginModel, CTSREntityHolder *Start, CTSREntityHolder *Termination)
 An intermediate model build the lists of actors, constraints,... from an original model. More...

virtual TLPSTR GenerateItermediateModelName (TLPSTR pBuff, TINT nModel)
 Generate name for an intermediate model. More...

virtual TBOOL BuildEntities ()
 Build entities: link to the variables/actors/objects of enviremet. More...

virtual TBOOL BuildExpectedModels (CTList pModels)
 Build the expected models: create the trigger models. More...

virtual TBOOL IsSatisfied (CTSRTriggerInstance *pTrigger, TBOOL FirstSolution)
 When the actor variables are well attached a value. We call this function to verify if it exists a sequences of entities matching the model. This process will assign for each temporal variable a value. pTrigger: the trigger to verify. NULL -> nothing to verify (primary model). Normally: a complex scenario contains 2 sub-scenarios (start & termination). The termination is contained in the trigger. So we must search only a value for the start. More...

virtual TBOOL VerifyNegativeConstraints ()
 If the scenario model contains a negative entity, we need verifying it. Do to this, we need find a recognized scenario sf corresponding the forbidden entity. If it exists a sf satisfying all constraints => the scenario is not recognized. This function is only called in the recgnition of a composed scenario. More...

virtual TBOOL Exists (CTList pEntities, CTList pValues=TNULL)
virtual CTList CreateTriggers (CTList pTriggerInstances, CTSRBehaviourInstance *pTermination, TLPCSTR lpCreatedTriggers=TNULL)
 Create the list of trigger instances if the model is satisfied lpCreatedTriggers([0, 1, 1,....]): marks the triggers are used. NULL => create all. More...

CTSRObjectProduce ()
 Create and fill in every fields of the produced object. More...

virtual TBOOL IsAutoProlongable ()
 Determine if the behaviour may be prolonged automatically without reverification of its constraints This will be called by the initial module. More...

CTSRModel& operator= (CTSRModel &Object)
 Operations. More...


Data Fields

CTList m_ActorVars
 The actor variables of the model. More...

CTList m_ExpectedEntities
 For loading the model: This is the definition of experts. More...

CTList m_ForbiddenEntities
 The expected sub behaviors. More...

CTList m_Constraints
 The behaviors are forbidden. More...

CTList m_ProductionFormulas
 All the constraints defined by experts. More...

CTSRAlarmModel* m_AlarmModel
 Object containing every formulas to be used to product a new entity. More...

CTList m_EnVars
 Model of the alarm model Optional. More...

CTSREntityHolderm_Start
 For model environment variables For compiled model: This is for recognizing the model. More...

CTSREntityHolderm_Termination
 The start of a behavior. More...

CTList m_PositiveConstraints
 The termination of a behavior. More...

CTList m_NegativeConstraints
 The constraints have not any negative variable. More...

CTSRModel* m_pOriginalModel
 The constraints have atleast one negative variable. More...

CTList m_MissedVariables
 This is used for the intermediate models to indicate its original model. More...

CTList m_Triggers
 This is used to store the temporal variables will be generated by the intermediate models Trigger models: automatically generated by the compiler. More...

TBOOL m_IsBaseClass
 If the model is needed to construct another model. More...

TBOOL m_IsAutoProlongable
 If the behaviour is automatically prolonged: not necessary to reverify the constraints Default: TTRUE. More...

TBOOL m_OneSolutionForPerson
 If the scenario accepts only one solution for a person: e.x. Inside_Zone Default: TFALSE. More...

CTList m_PositiveEntityVars
 Temporal variables: automatically generated by the scenario model compiler. More...

CTList m_NegativeEntityVars
 Temporal variables corresponding to the expected entities. More...

CTList m_NegativeActorsVars
 Temporal variables corresponding to the forbidden entities. More...

CTList m_NeededNegativeVars
 Temporal variables corresponding to the forbidden actors. More...

CTList m_TempVars
 List of list of needed negative variables for each negative constraint. More...

CTList m_ProductionVars
 Temporal variables for the model. More...

CTTree m_OldItemConstructors
 Tree of default constructors. More...


Static Public Attributes

CTList m_BuiltExpectedModels
 To stock the models to be built the expected models. More...


Detailed Description

A model.


Constructor & Destructor Documentation

CTSRModel::CTSRModel ( )
 

Constructor/destructor.


Member Function Documentation

TINT CTSRModel::ActorOfTypeCount ( TINT Type ) [virtual]
 

Get the number of actor variable of a type (zone, equipement, wall, ...).

TBOOL CTSRModel::AttachVarConstraints ( ) [virtual]
 

Attach variable for the constraints: attach object for the variable presenting in the constraints and create temporal variables if neccessary This fnction must be called after set context for the motor and after CreateEntityVars(); and before ClassifyConstraints();.

TBOOL CTSRModel::Build ( ) [virtual]
 

Build the constraints Objects: list of environment objects.

TBOOL CTSRModel::BuildActorVarConstraints ( ) [virtual]
 

Build the constraints for the actor variables: gather the constraints for the actor variables Must be called after AttachVarConstraints().

TBOOL CTSRModel::BuildEntities ( ) [virtual]
 

Build entities: link to the variables/actors/objects of enviremet.

TBOOL CTSRModel::BuildEntityVarConstraints ( ) [virtual]
 

Build the constraints for the entity variables: gather the constraints for the entity variables Must be called after CreateEntityVars(), ClassifyConstraints(), AttachVarConstraints().

TBOOL CTSRModel::BuildExpectedModels ( CTList pModels ) [virtual]
 

Build the expected models: create the trigger models.

CTSREntityHolder * CTSRModel::BuildFromOrigin ( CTSRModel * pOriginModel,
CTSREntityHolder * Start,
CTSREntityHolder * Termination ) [virtual]
 

An intermediate model build the lists of actors, constraints,... from an original model.

CTList CTSRModel::BuildIntermediateModels ( ) [virtual]
 

Generate the list of intermediate models: The list of sub-scenarios must be ordered in time before calling this function S = (S1, S2, S3, S4) => (((S1, S2), S3), S4).

TBOOL CTSRModel::ClassifyConstraints ( )
 

Classify the constraints into 2 categories: Positive constraints and Negative constraints.

TBOOL CTSRModel::CreateEntityVars ( ) [virtual]
 

Create entity variables from EntityHolders: Create variable and category them in POSITIVE and NEGATIVE After OrderSubScenarios().

TBOOL CTSRModel::CreateNeededNegativeVars ( )
 

Create the list of all needed negative variables for all negative constraints.

TBOOL CTSRModel::CreateNegativeActorVariables ( ) [virtual]
 

Create negative actor variables for the model.

CTList CTSRModel::CreateTriggers ( CTList pTriggerInstances,
CTSRBehaviourInstance * pTermination,
TLPCSTR lpCreatedTriggers = TNULL ) [virtual]
 

Create the list of trigger instances if the model is satisfied lpCreatedTriggers([0, 1, 1,....]): marks the triggers are used. NULL => create all.

CTList CTSRModel::FindEntityPrivateActorVariables ( CTSREntityHolder * pEntity,
TBOOL bExpectedEntity = TTRUE ) [virtual]
 

Find the actor variables the appear in a given entity but do not appear in the others.

CTAlarm * CTSRModel::GenerateAlarm ( CTObject * ScenarioInstance ) [virtual]
 

Generate an alarm: this fnction generates a new alarm when a behavior of this model is just recognised.

TLPSTR CTSRModel::GenerateItermediateModelName ( TLPSTR pBuff,
TINT nModel ) [inline, virtual]
 

Generate name for an intermediate model.

00619                         { sprintf((char*)pBuff, "%s_%02d", GetName(), nModel); return pBuff; };

CTSRModel * CTSRModel::GenerateUncertainModel ( TLPCSTR SubscenarioName ) [virtual]
 

=============================================================== FOR UNCERTAIN PROCESSING: these functions will be called before all processings Generate a scenrio model by removing a sub-scenario.

CTList CTSRModel::GetConstraintNeededNegativeVars ( CTList Expression,
CTList pResult = TNULL )
 

Create the list of negative variable needed to evalue a negative constraint Expression: expression to calculate pResult: the list to stock all variables, NULL: create a new list.

CTList CTSRModel::GetDependenceModelNames ( ) [virtual]
 

Return the list of dependence model (sub-scenario model) names Before delete tehh list, must call Delete(TFALSE) for remove the list without remove the holded elements.

TBOOL CTSRModel::IsAutoProlongable ( ) [virtual]
 

Determine if the behaviour may be prolonged automatically without reverification of its constraints This will be called by the initial module.

TBOOL CTSRModel::IsPrimaryModel ( ) [inline, virtual]
 

To verify if it's a primary model: normally, it's state model This function run correctly is Build was called.

00535 { return m_Termination == TNULL; };

TBOOL CTSRModel::IsSatisfied ( CTSRTriggerInstance * pTrigger,
TBOOL FirstSolution ) [virtual]
 

When the actor variables are well attached a value. We call this function to verify if it exists a sequences of entities matching the model. This process will assign for each temporal variable a value. pTrigger: the trigger to verify. NULL -> nothing to verify (primary model). Normally: a complex scenario contains 2 sub-scenarios (start & termination). The termination is contained in the trigger. So we must search only a value for the start.

TBOOL CTSRModel::ModifyTemporalConstraints ( ) [virtual]
 

Replace a temporal variable by an expression to acces to the variable in an intermediate model.

TBOOL CTSRModel::OrderSubScenarios ( ) [virtual]
 

To order in time the sub-scenarios of the scenario model To do this, we use the method of C. Dousson and M. Ghallab to build a graph of temporal relations of sub-scenarios.

CTSRObject * CTSRModel::Produce ( )
 

Create and fill in every fields of the produced object.

TBOOL CTSRModel::RemoveAnEntity ( TLPCSTR SubscenarioName ) [virtual]
 

Remove an entity by it name.

TBOOL CTSRModel::RemoveConstraints ( TLPCSTR VariableName ) [virtual]
 

Remove all constraints containing a variable.

TBOOL CTSRModel::VerifyActorVariable ( CTSRVar * pVar ) [virtual]
 

For the composed scenarios, we need to verify that all actor variables present in entities.

TBOOL CTSRModel::VerifyNegativeConstraints ( ) [virtual]
 

If the scenario model contains a negative entity, we need verifying it. Do to this, we need find a recognized scenario sf corresponding the forbidden entity. If it exists a sf satisfying all constraints => the scenario is not recognized. This function is only called in the recgnition of a composed scenario.

CTSRModel & CTSRModel::operator= ( CTSRModel & Object )
 

Operations.


Field Documentation

CTList CTSRModel::m_ActorVars
 

The actor variables of the model.

CTSRAlarmModel * CTSRModel::m_AlarmModel
 

Object containing every formulas to be used to product a new entity.

CTList CTSRModel::m_BuiltExpectedModels [static]
 

To stock the models to be built the expected models.

CTList CTSRModel::m_Constraints
 

The behaviors are forbidden.

CTList CTSRModel::m_EnVars
 

Model of the alarm model Optional.

CTList CTSRModel::m_ExpectedEntities
 

For loading the model: This is the definition of experts.

CTList CTSRModel::m_ForbiddenEntities
 

The expected sub behaviors.

TBOOL CTSRModel::m_IsAutoProlongable
 

If the behaviour is automatically prolonged: not necessary to reverify the constraints Default: TTRUE.

TBOOL CTSRModel::m_IsBaseClass
 

If the model is needed to construct another model.

CTList CTSRModel::m_MissedVariables
 

This is used for the intermediate models to indicate its original model.

CTList CTSRModel::m_NeededNegativeVars
 

Temporal variables corresponding to the forbidden actors.

CTList CTSRModel::m_NegativeActorsVars
 

Temporal variables corresponding to the forbidden entities.

CTList CTSRModel::m_NegativeConstraints
 

The constraints have not any negative variable.

CTList CTSRModel::m_NegativeEntityVars
 

Temporal variables corresponding to the expected entities.

CTTree CTSRModel::m_OldItemConstructors
 

Tree of default constructors.

TBOOL CTSRModel::m_OneSolutionForPerson
 

If the scenario accepts only one solution for a person: e.x. Inside_Zone Default: TFALSE.

CTList CTSRModel::m_PositiveConstraints
 

The termination of a behavior.

CTList CTSRModel::m_PositiveEntityVars
 

Temporal variables: automatically generated by the scenario model compiler.

CTList CTSRModel::m_ProductionFormulas
 

All the constraints defined by experts.

CTList CTSRModel::m_ProductionVars
 

Temporal variables for the model.

CTSREntityHolder * CTSRModel::m_Start
 

For model environment variables For compiled model: This is for recognizing the model.

CTList CTSRModel::m_TempVars
 

List of list of needed negative variables for each negative constraint.

CTSREntityHolder * CTSRModel::m_Termination
 

The start of a behavior.

CTList CTSRModel::m_Triggers
 

This is used to store the temporal variables will be generated by the intermediate models Trigger models: automatically generated by the compiler.

CTSRModel * CTSRModel::m_pOriginalModel
 

The constraints have atleast one negative variable.


The documentation for this class was generated from the following file:
Generated at Wed Aug 6 15:59:01 2003 for TVU's libraries for video surveillance: by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001