Class SubEnvironmentDescription

Class Documentation

class SubEnvironmentDescription

This class provides an interface to a mapping between a parent and submodel’s environment properties

Public Functions

void autoMap()

Automatically map all compatible properties and macro properties In order to be compatible, properties must share the same name, type, dimensions/length (number of elements) Const master properties cannot be mapped to non-const sub properties, however the inverse is permitted

void autoMapProperties()

Automatically map all compatible properties In order to be compatible, properties must share the same name, type, length (number of elements) Const master properties cannot be mapped to non-const sub properties, however the inverse is permitted

void autoMapMacroProperties()

Automatically map all compatible macro properties In order to be compatible, properties must share the same name, type, dimensions

void mapProperty(const std::string &sub_property_name, const std::string &master_property_name)

Links the named properties between the master and sub environment In order to be compatible, properties must share the same name, type, length (number of elements) Const master properties cannot be mapped to non-const sub properties, however the inverse is permitted

Parameters
  • sub_property_name – Name of the property in the sub models agent

  • master_property_name – Name of the property in the master models agent

Throws
void mapMacroProperty(const std::string &sub_property_name, const std::string &master_property_name)

Links the named macro properties between the master and sub environment In order to be compatible, macro properties must share the same name, type, dimensions

Parameters
  • sub_property_name – Name of the macro property in the sub models agent

  • master_property_name – Name of the macro property in the master models agent

Throws
std::string getPropertyMapping(const std::string &sub_property_name)

Returns the name of the master property which has been mapped to the named subenvironment property

Parameters

sub_property_name – Name of the state in the sub agent to check

Throws

exception::InvalidEnvProperty – If the sub environment property does not exist or has not been mapped yet

Returns

The name of the state within the master agent which is mapped

std::string getMacroPropertyMapping(const std::string &sub_property_name)

Returns the name of the master macro property which has been mapped to the named subenvironment macro property

Parameters

sub_property_name – Name of the state in the sub agent to check

Throws

exception::InvalidEnvProperty – If the sub environment property does not exist or has not been mapped yet

Returns

The name of the state within the master agent which is mapped