SimulationStructure

It's the simulation Structure. It specifies all the types, connecting them to the other types in the simulator

trait Structure
class Object
trait Matchable
class Any

Type members

Types

override type Position = Point2D
override type Probability = Double
override type SimulationTime = TimeStamp

Value members

Abstract methods

Method to allow to update the state of internal entities.

Method to allow to update the state of internal entities.

Value parameters:
f

the function that update the state. The function returns an Option. If the option is None then the entity will exit from the structure.

Returns:

The modified instance of the structure with the entities updated

Concrete methods

override protected def checkEnter(entity: BaseEntity): Boolean
Definition Classes
override protected def notEntered(entity: SimulationEntity, timeStamp: TimeStamp): SimulationStructure
Definition Classes

Inherited methods

def capacity: Int

Each structure has a capacity in terms of how many entities can be at the same time inside.

Each structure has a capacity in terms of how many entities can be at the same time inside.

Returns:

the maximum number of entity contained by the structure

Inherited from:
Structure
protected def enter(entity: BaseEntity, timestamp: SimulationTime): BaseStructure

Method that insert the entity inside the structure.

Method that insert the entity inside the structure.

Value parameters:
entity

the entity that want to enter

timestamp

the timestamp in which the entity is entered

Returns:

The modified instance of the structure

Inherited from:
Structure
Returns:

the entities that are inside the structure

Inherited from:
Structure

Method that allows an entity to exit from the structure. This method WILL NOT handle the entity position, but it will only remove the entity from internal structures.

Method that allows an entity to exit from the structure. This method WILL NOT handle the entity position, but it will only remove the entity from internal structures.

Value parameters:
entity

the entity that need to exit

Returns:

The modified instance of the structure without the entity inside

Inherited from:
Structure

Each structure has associated a strategy that affects the enter of entities.

Each structure has associated a strategy that affects the enter of entities.

Returns:

the strategy

Inherited from:
Structure
protected def exit(entity: BaseEntity): BaseStructure

Method that remove an entity from the structure.

Method that remove an entity from the structure.

Value parameters:
entity

the entity that want to exit

Returns:

the modified instance of the structure without the entity inside.

Inherited from:
Structure

Each structure has an infection probability that influence the infection of an entity that is inside.

Each structure has an infection probability that influence the infection of an entity that is inside.

Returns:

the infection probability when an entity is inside the structure

Inherited from:
Structure

Each structure has a permanence time defined by a time distribution.

Each structure has a permanence time defined by a time distribution.

Returns:

the time distribution that describe the permanence time

Inherited from:
Structure

Being placeable, the structure has a position.

Being placeable, the structure has a position.

Returns:

the position of the structure

Inherited from:
Structure

Method that allows an entity to try to enter inside the structure. Note that an entity could not be allowed to enter based on the characteristics of the structure.

Method that allows an entity to try to enter inside the structure. Note that an entity could not be allowed to enter based on the characteristics of the structure.

Value parameters:
entity

the entity that wants to enter

Returns:

The modified instance of the structure if entered

Inherited from:
Structure