iterative module

Iterative algorithm class definitions.

class jinete.algorithms.metaheuristics.iterative.IterativeAlgorithm(episodes=3, algorithm_cls=None, seed=56, restart_mode=True, *args, **kwargs)[source]

Bases: jinete.algorithms.abc.Algorithm

Iterative algorithm implementation.

This class implements an iterative procedure to optimize a planning. It works applying a parametrized algorithm for a defined number of episodes. It’s mostly used as a component of more complicated metaheuristics.

__init__(episodes=3, algorithm_cls=None, seed=56, restart_mode=True, *args, **kwargs)[source]

Construct a new instance.

Parameters
  • episodes (int) – The number of episodes to repeat the algorithm.

  • algorithms_cls – The sequence of algorithm classes to be applied.

  • seed (int) – A seed to manage randomness.

  • args – Additional positional arguments.

  • kwargs – Additional named arguments.

optimize()

Perform an optimization over the job based on the fleet resources.

Generates a Result object containing the generated planning.

Return type

jinete.models.results.Result

Returns

A Result object.