Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Models Out Of Use in Evacuation Module #7

Open
godisreal opened this issue Jun 9, 2019 · 1 comment
Open

Models Out Of Use in Evacuation Module #7

godisreal opened this issue Jun 9, 2019 · 1 comment

Comments

@godisreal
Copy link
Owner

godisreal commented Jun 9, 2019

There are several models in evacuation module which seem out of use for long.
Is there any instruction on how to use them?

1 hawk-dove game
2 group model
3 fall down model

@godisreal
Copy link
Owner Author

godisreal commented Dec 5, 2019

3 Falling Down Model:
I just test the falling down model in a doorway example and it works fine generally.
There are several cases that cause falling down of agents.

(1)


          L_FALLEN_DOWN = .FALSE.
          IF (HR%T_FallenDown < T) THEN
             ! This agent has already fallen down
             L_FALLEN_DOWN = .TRUE.
             GATH = 0.0_EB
             A_WALL = 0.0_EB
          END IF
          HoleFallLoop: DO J = 1, N_HOLES
             EHX => EVAC_HOLES(J)
             IF (EHX%TIME_FALL_DOWN<0.0_EB .OR. EHX%IMESH/=NM) CYCLE HoleFallLoop
             IF (EHX%TIME_FALL_DOWN<T .AND. &
                  EHX%X1<=HR%X .AND. EHX%X2>=HR%X .AND. EHX%Y1<=HR%Y .AND. EHX%Y2>=HR%Y) THEN
                L_FALLEN_DOWN = .TRUE.
                N_DEAD = N_DEAD+1
                HR%T_FallenDown = T
                GATH = 0.0_EB
                A_WALL = 0.0_EB
                EHX%TIME_FALL_DOWN = -1.0_EB
                CYCLE HoleFallLoop
             END IF
          END DO HoleFallLoop
          L_DEAD  = .FALSE.
          IF ( HR%INTDOSE >= 1.0_EB  ) THEN
             L_DEAD = .TRUE.
             ! No random force for a dead person.
             GATH = 0.0_EB
             ! No psychological force terms for a dead person.
             A_WALL = 0.0_EB
             IF (HR%TPRE /= HUGE(HR%TPRE)) THEN
                IF (L_FALLEN_DOWN) N_DEAD = N_DEAD-1 ! Do not duoble count
                N_DEAD = N_DEAD+1
                WRITE (LU_EVACOUT,FMT='(A,I6,A,F8.2,A,I6)') ' EVAC: Agent n:o', &
                     HR%ILABEL, ' dead at ', T, ' s, number of casualties ', N_DEAD
             END IF
             IF (.NOT. L_FALLEN_DOWN) THEN
                HR%T_FallenDown = T
                L_FALLEN_DOWN = .TRUE.
             END IF
             HR%TPRE = HUGE(HR%TPRE)
             HR%TDET = HUGE(HR%TDET)
             HR%COLOR_INDEX = EVAC_AVATAR_NCOLOR
          ELSE
             FED_MAX_ALIVE = MAX(FED_MAX_ALIVE,HR%INTDOSE)
          END IF
          IF (L_FALLEN_DOWN) HR%COLOR_INDEX = EVAC_AVATAR_NCOLOR
          FED_MAX = MAX(FED_MAX,HR%INTDOSE)  ! Dead or alive
          HR_TAU      = HR%TAU
          HR_TAU_INER = HR%TAU_INER
          ! MAX(0,HR%GROUP_ID)  Group index
          IF (MAX(0,HR%GROUP_ID)==0) THEN
             TPRE = HR%TPRE + HR%TDET ! Lonely agent
          ELSE
             TPRE = HR%TDET ! Member of a group
          END IF

(2)

IF (TAU_FALL_DOWN >= 0.0_EB .AND. TIM_DIST <= R_TMP(III)+R_TMP(JJJ)-D_OVERLAP_FALL) THEN
                         ! Circles are touching each others more than D_OVERLAP_FALL => Fall down
                         IF (L_HRE_FALLEN_DOWN) COSPHIFAC = 0.0_EB ! On top of a fallen agent, no social force anymore
                         IF (T > HR%TDET .AND. L_FALLDOWN_THIS_TIME_STEP .AND. L_HRE_FALLEN_DOWN .AND. .NOT.L_FALLEN_DOWN) THEN
                            L_FALLEN_DOWN = .TRUE.
                            HR%T_FallenDown = T
                            HR%Angle_FallenDown = HR%angle
                            HR%SizeFac_FallenDown = 0.0_EB
                            N_DEAD = N_DEAD+1
                         END IF
                      END IF 

(3)

          ! Fall down algorithm: Check the resultant contact force
          IF (TAU_FALL_DOWN >= 0.0_EB .AND. T > HR%TDET) THEN
             IF (.NOT.L_FALLEN_DOWN .AND. SQRT(CONTACT_FX**2+CONTACT_FY**2) > HR%F_FallDown) THEN
                L_FALLEN_DOWN = .TRUE.
                N_DEAD = N_DEAD+1
                HR%T_FallenDown = T
                HR%Angle_FallenDown = HR%angle
                HR%SizeFac_FallenDown = 0.0_EB
             END IF
          END IF

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant