grasp module

GRASP-based algorithm class definitions.

class jinete.algorithms.metaheuristics.grasp.GraspAlgorithm(no_improvement_threshold=1, first_solution_kwargs=None, local_search_kwargs=None, seed=56, *args, **kwargs)[source]

Bases: jinete.algorithms.abc.Algorithm

GRASP algorithm implementation.

This implementation is based on the Greedy Randomized Adaptive Search Procedure meta-heuristic. For more information about how it works, you can visit the following link: https://en.wikipedia.org/wiki/Greedy_randomized_adaptive_search_procedure

__init__(no_improvement_threshold=1, first_solution_kwargs=None, local_search_kwargs=None, seed=56, *args, **kwargs)[source]

Construct a new instance.

Parameters
  • no_improvement_threshold (int) – Manages the number of allowed iterations without any improvement.

  • first_solution_kwargs (Dict[str, Any]) – Named arguments for the first solution algorithm.

  • local_search_kwargs (Dict[str, Any]) – Named arguments for the local search algorithm.

  • 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.