Compartments¶

cromosim.comp.
iteration
(it, Nrooms, DoorRoomCapacity, NPir, NPrir, NPwir, Nior, List_iOr, T_iOr, Flux)[source]¶ To run one iteration (which corresponds to 1 second) of the compartment model. The compartments shall be identified to nodes of a network, those nodes are connected by edges, which correspond to paths between nodesself.
 Parameters
 it: integer
iteration number
 Nrooms: int
number of rooms
 DoorRoomCapacity: numpy array
capacities of each door (number of persons per second)
 NPir: numpy array
numbers of persons for each room
 NPrir: numpy array
inlets for each room
 NPwir: numpy array
numbers of persons who are waiting to leave each room
 Nior: numpy array
numbers of inlets for each room
 List_iOr: numpy array
room numbers associated to the inlets for each room
 T_iOr: numpy array
travel times to cross each room
 Flux: numpy array
numbers of persons upstream the exits
 Returns
 Flux: numpy array
new numbers of persons upstream the exits
 NPir: numpy array
new numbers of persons for each room
 NPwir: numpy array
new numbers of persons who are waiting to leave each room
 NPrir: numpy array
new inlets for each room

cromosim.comp.
plot_compt
(ifig, RoomNames, RoomCenters, DoorCenters, CircAngles, NPir, NPrir, NPwir, Nior, List_iOr, dom, area, savefig=False, filename='fig.png', title='')[source]¶ To draw
 Parameters
 ifig: int
figure number
 RoomNames: list
number of rooms
 RoomCenters: numpy array
coordinates of the room centers
 DoorCenters: numpy array
coordinates of the door centers
 CircAngles: numpy array
rotational angles of the halfdisks localized at each door
 NPir: numpy array
numbers of persons for each room
 NPrir: numpy array
inlets for each room
 NPwir: numpy array
numbers of persons who are waiting to leave each room
 Nior: numpy array
numbers of inlets for each room
 List_iOr: numpy array
room numbers associated to the inlets for each room
 dom: Domain
contains everything for managing the domain
 area: float
typical area size in m^2 of one individual
 savefig: boolean
writes the figure as a png file if true
 filename: string
png filename used to write the figure
 title: string
title of the figure