Actions

class archABM.actions.Actions(env: simpy.core.Environment, db: archABM.database.Database)[source]

Actions applied to any asset in Database

env: simpy.core.Environment
db: archABM.database.Database
find_place(model: archABM.event_model.EventModel, person: archABM.person.Person)None[source]

Find a place to carry out a certain EventModel.

The selected place must share the same activity as the indicated EventModel. Places that are open (allow = True) and not full (num_people < capacity) are only considered as valid.

Note

Movement restrictions (between buildings and between departments) are also considered.

Attention

The list of places is shuffled after each search procedure.

Parameters
  • model (EventModel) – activity model to which find a place

  • person (Person) – person invoking the place search

Returns

selected place

Return type

Place

static create_event(model: archABM.event_model.EventModel, place: archABM.place.Place, duration: int)archABM.event.Event[source]

Wrapper to create an Event

Parameters
  • model (EventModel) – type of event or activity

  • place (Place) – physical location of the event

  • duration (int) – time duration in minutes

Returns

created Event instance

Return type

Event

static assign_event(event: archABM.event.Event, people: List[archABM.person.Person])None[source]

Assign an event to certain people

Parameters
  • event (Event) – Event instance to be assigned

  • people (List[Person]) – list of people to be interrupted from their current events

create_collective_event(model: archABM.event_model.EventModel, place: archABM.place.Place, duration: int, person: archABM.person.Person)None[source]

Creates a collective event of certain type EventModel at a physical location Place and for a time duration in minutes.

Important

The number of people called into the collective event is a random integer between the current number of people at that place and the total place capacity.

Note

Movement restrictions (between buildings and between departments) are also considered to select the people called into the collective event.

Parameters
  • model (EventModel) – type of event or activity

  • place (Place) – physical location of the event

  • duration (int) – time duration in minutes

  • person (Person) – person invoking the collective event

Returns

generated collective event

Return type

Event