jupedsim.serialization#

Serialization/deserialization support

In this file you will find interfaces and implementations to serialize and deserialize different forms of input / output commonly used.

Module Contents#

class TrajectoryWriter[source]#

Interface for trajectory serialization

abstract begin_writing(simulation) None[source]#

Begin writing trajectory data.

This method is intended to handle all data writing that has to be done once before the trajectory data can be written. E.g. Meta information such as frame rate etc…

Return type:

None

abstract write_iteration_state(simulation) None[source]#

Write trajectory data of one simulation iteration.

This method is intended to handle serialization of the trajectory data of a single iteration.

Return type:

None

abstract every_nth_frame() int[source]#

Returns the interval of this writer in frames between writes.

1 indicates all frames are written, 10 indicates every 10th frame is writen and so on.

Returns:

Number of frames between writes as int

Return type:

int