vipra-uwf / vipra

1 stars 1 forks source link

Add example behaviors/actions/selectors to the model #103

Open rpahle opened 1 year ago

rpahle commented 1 year ago

Connect with John about domain specific language and simplification thereof.

GoodenoughR commented 1 year ago

output

Always stop applied to 5 pedestrians 23, 38, 72, 76, 99 are all stopped.

Next is adding conditional actions

rpahle commented 1 year ago
GoodenoughR commented 1 year ago

output

added mock behaviors for grabbing luggage and disembarking (GIF only showing disembarking)

This GIF is with goal range cranked up to 0.3 to get around race conditions to better see it in action.

There are still race conditions so it's a bit odd

rpahle commented 1 year ago

Switching to handling events rather than transitions

GoodenoughR commented 1 year ago

output

Here you can see a simple behavior of an announcement happening and the pedestrians stopping to listen

the announcement starts at about timestep 300 and goes till about 1200

GoodenoughR commented 1 year ago

Currently the behaviors are still pretty limited. We need to add more actions, conditions, and make changes to some constructs like selectors.

Important Annoucement: An announcement occurs after 5 seconds and lasts 10 seconds, while it is occuring the pedestrians stop.

The stop is rather abrupt, so we might want to add a gradual slowing then stop.

important_announcement_stop

The Behavior File:

Consider an announcement_listener.
Everyone is an announcement_listener.
An !announcement event will occur after 5 seconds from !start and end after 10 seconds from !announcement.
An announcement_listener will @stop while an !announcement event is occurring.

Fire Emergency: A fire starts at the beginning of the simulation, this causes everyone to walk 2 times their normal speed.

As you can see, pedestrians still get blocked by one another; we will add a way for pedestrians to push each other.

fire_emergency

The Behavior file:

consider a person.
everyone is a person.
a !fire will occur after 0 seconds from the !start.
a person will @walk 2.0x their normal speed given a !fire has occurred.