positions module¶
Contains entities to represent positions in the data model.
-
class
jinete.models.positions.
GeometricPosition
(coordinates, *args, **kwargs)[source]¶ Bases:
jinete.models.positions.Position
Represents a geometric point on the
Surface
to 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
self
toother
.- Parameters
other (
jinete.models.positions.Position
) – Position to compute the distance fromself
.- Return type
- Returns
distance between
self
andother
.
-
time_to
(other, now=None)¶ Computes the time from
self
toother
.- 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
self
andother
.
-
-
class
jinete.models.positions.
Position
(surface)[source]¶ Bases:
jinete.models.abc.Model
,abc.ABC
Represents a point on the
Surface
to 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
self
toother
.- Parameters
other (
jinete.models.positions.Position
) – Position to compute the distance fromself
.- Return type
- Returns
distance between
self
andother
.
-
time_to
(other, now=None)[source]¶ Computes the time from
self
toother
.- 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
self
andother
.
-