FMU/Source/Occupant.cpp
/**
 * @brief the occupant timestep function
 * @detail moves the agent to their new state, calls the agents understanding
 * of zone that an agent will be interacting with.
 */
@brief the occupant timestep function
@detail moves the agent to their new state, calls the agents understanding
of zone that an agent will be interacting with.
@brief the occupant timestep function @detail moves the agent to their new state calls the agents understanding of zone that an agent will be interacting with .
void Occupant::step() {
    int stepCount = Configuration::getStepCount();
    int newStateID = activities.at(stepCount);
    zonePtrPrevious = state.getZonePtr();
    state = stateMachine.transistionTo(newStateID);
    std::shared_ptr<Building_Zone> zonePtr = state.getZonePtr();
    metabolicRate = state.getMetabolicRate();
    clo = state.getClo();
    for (Occupant_Zone &agentZone : agentZones) {
      agentZone.setClo(clo);
      agentZone.setMetabolicRate(metabolicRate);
      agentZone.step(*zonePtr, *zonePtrPrevious, activities);
      agentZone.stepPre(*zonePtr, *zonePtrPrevious, activities);
    }
    DataStore::addValue(datastoreIdHeatGains,
                                getCurrentRadientGains(*zonePtr));
    DataStore::addValue(datastoreIdActivity, newStateID);
}
void Occupant :: step ( ) { int stepCount = Configuration :: getStepCount ( ) ; int newStateID = activities . at ( stepCount ) ; zonePtrPrevious = state . getZonePtr ( ) ; state = stateMachine . transistionTo ( newStateID ) ; std :: shared_ptr < Building_Zone > zonePtr = state . getZonePtr ( ) ; metabolicRate = state . getMetabolicRate ( ) ; clo = state . getClo ( ) ; for ( Occupant_Zone & agentZone : agentZones ) { agentZone . setClo ( clo ) ; agentZone . setMetabolicRate ( metabolicRate ) ; agentZone . step ( * zonePtr , * zonePtrPrevious , activities ) ; agentZone . stepPre ( * zonePtr , * zonePtrPrevious , activities ) ; } DataStore :: addValue ( datastoreIdHeatGains , getCurrentRadientGains ( * zonePtr ) ) ; DataStore :: addValue ( datastoreIdActivity , newStateID ) ; }
@brief the occupant timestep function
 @detail moves the agent to their new state, calls the agents understanding
 of zone that an agent will be interacting with.
@brief the occupant timestep function @detail moves the agent to their new state calls the agents understanding of zone that an agent will be interacting with .