positions module¶
Contains entities to represent positions in the data model.
-
class
jinete.models.positions.GeometricPosition(coordinates, *args, **kwargs)[source]¶ Bases:
jinete.models.positions.PositionRepresents a geometric point on the
Surfaceto which belongs.-
__init__(coordinates, *args, **kwargs)[source]¶ - Parameters
coordinates (Sequence[float]) – The coordinates which identifies the position.
args – Additional positional parameters.
kwargs – Additional named parameters.
-
coordinates¶ The coordinated representation of
self.
-
distance_to(other)¶ Computes the distance from
selftoother.- Parameters
other (
jinete.models.positions.Position) – Position to compute the distance fromself.- Return type
- Returns
distance between
selfandother.
-
time_to(other, now=None)¶ Computes the time from
selftoother.- Parameters
other (
jinete.models.positions.Position) – Position to compute the time fromself.now (
typing.Optional[float]) – The time at starting time (to model starting time dependent duration).
- Return type
- Returns
time between
selfandother.
-
-
class
jinete.models.positions.Position(surface)[source]¶ Bases:
jinete.models.abc.Model,abc.ABCRepresents a point on the
Surfaceto which belongs.-
__init__(surface)[source]¶ Constructor of the class.
- Parameters
surface (Surface) – The surface to which the position belongs.
-
abstract property
coordinates¶ The coordinated representation of
self.- Return type
Tuple[Any]
- Returns
The coordinated representation of
self.
-
distance_to(other)[source]¶ Computes the distance from
selftoother.- Parameters
other (
jinete.models.positions.Position) – Position to compute the distance fromself.- Return type
- Returns
distance between
selfandother.
-
time_to(other, now=None)[source]¶ Computes the time from
selftoother.- Parameters
other (
jinete.models.positions.Position) – Position to compute the time fromself.now (
typing.Optional[float]) – The time at starting time (to model starting time dependent duration).
- Return type
- Returns
time between
selfandother.
-