specless.api.ortools_interface.OrtoolsInterface

class specless.api.ortools_interface.OrtoolsInterface(weights: List[List[int]], num_robot: int = 1, starts: List[int] | None = None, ends: List[int] | None = None)[source]

Bases: object

Ortools Interface for Robotics Task Allocation and Scheduling

This class is a wrapper around the ortools library for solving robotics task allocation and scheduling problems.

Parameters:
  • weights (List[List[int]]) – A list of lists of integers representing the weights of the edges in the graph.

  • num_robot (int, optional) – The number of robots in the system. Defaults to 1.

  • starts (List[int], optional) – A list of integers representing the starting nodes for each robot. Defaults to None.

  • ends (List[int], optional) – A list of integers representing the ending nodes for each robot. Defaults to None.

Examples

>>> weights = [[1, 2, 3], [4, 5, 6]]
>>> model = OrtoolsInterface(weights)

Notes

The weights must be a list of lists of integers.

Methods

set_edge_capacity

set_node_capacity

set_node_weight

solve