aamks / aamks

Probabilistic fire risk assessment framework
https://aamks.apoz.edu.pl
GNU General Public License v3.0
15 stars 5 forks source link

No FED increase out of origin floor #346

Open kowalskiw opened 1 week ago

kowalskiw commented 1 week ago

While agents are teleported to other floor than one their originated from FED mechanism does not work. Their FED increase on the origin floor only.

kowalskiw commented 1 week ago

Potential issue with rvo2_dto.EvacEnv.update_fed().

 def update_fed(self):
        fed_over_1 = False
        for i in range(self.evacuees.get_number_of_pedestrians()):
            if (self.evacuees.get_finshed_of_pedestrian(i)) == 0:
                continue
            else:
                #try:
                # find activity level
                activity = 1
                position = self.evacuees.get_position_of_pedestrian(i)
                if self.evacuees.get_velocity_of_pedestrian(i) == (0, 0):
                    activity = 0
                elif 's' in self.smoke_query.xy2room(position):
                    activity = 2

                dfed = self.smoke_query.get_fed_sfpe(position, activity_level=activity)
                if i == 0:
                    self.elog.debug('FED calculated: {}'.format(dfed))
                #except:
                #    self.elog.warning('Simulation without FED')
                #    fed = 0.0
                fed_over_1 = False if self.evacuees.update_fed_of_pedestrian(i, dfed) < 1 else True
                self.evacuees.update_symbolic_fed_of_pedestrian(i)

        # return True if at least one agent has FED=1 (ASET criterion)
        return  fed_over_1

Evacuees moved from floor A to floor B are designated as finished. Their fed is not updated anymore at floor A, but should be updated on floor B. To be tracked why it is not visible in animator.

kowalskiw commented 4 days ago

The issue is only with staircases. Once agent is pushed out to the room by others - the FED increases as it should. It is probably a part of never-ending story with staircase virtual rooms naming (sX, sX.Y, sX.Z...)