specless.synthesis.ServiceTSPSynthesisAlgorithm
- class specless.synthesis.ServiceTSPSynthesisAlgorithm(tspsolver=None)[source]
Bases:
SynthesisAlgorithm
Traveling Salesman Problem based synthesis algorithm
Methods
construct_tpo_constraints
Synthesizes a PlanStrategy in an env given the specification.
- synthesize(env: Env, specification: Specification, num_agent: int = 1, init_nodes: List[Any] | None = None, services=None, *args, **kwargs) Strategy [source]
Synthesizes a PlanStrategy in an env given the specification.
Env+#Agent -> TS+#Agent -> (Nodes, Costs, ServiceTimes)+#Agent -> List[Strategy] -> MultiEnv * How should I deal with multiple robots?
- Parameters:
env (gym.Env) – The environment in which to synthesize the strategy.
specification (Specification) – The specification for the strategy.
num_agent (int, optional) – The number of agents. Default is 1.
- Returns:
The synthesized strategy.
- Return type:
- Raises:
Exception – If the environment is not wrapped by MiniGridTransitionSystemWrapper.