services module

Contains entities to represent services in the data model.

class jinete.models.services.Service(position, earliest=0.0, latest=inf, duration=0.0)[source]

Bases: jinete.models.abc.Model

Represents the requested action to visit a specific position, having some time restrictions and costs.

__init__(position, earliest=0.0, latest=inf, duration=0.0)[source]

The constructor of the class.

Parameters
  • position (Position) – The geometric position in which the service should be performed.

  • earliest (float) – The earliest time to be able to perform the service.

  • latest (float) – The latest time to be able to perform the service.

  • duration (float) – The requested time to perform the service.

distance_to(other)[source]

Computes the distance from self to other.

Parameters

other (jinete.models.services.Service) – Service to compute the distance from self.

Return type

float

Returns

distance between self and other.

duration

The duration to perform the service. Commonly known as the load_time in another contexts.

earliest

The earliest time to start the service.

latest

The latest time to start the service.

position

The position of the service.

time_to(other, *args, **kwargs)[source]

Computes the time from self to other.

Parameters

other (jinete.models.services.Service) – Service to compute the time from self.

Return type

float

Returns

time between self and other.