import ompl as _ompl
from collections.abc import Callable, Mapping, Sequence
import datetime
from typing import overload






class Status:
    def __init__(self) -> None: ...

    @property
    def running(self) -> bool: ...

    @running.setter
    def running(self, arg: bool, /) -> None: ...

    @property
    def activeRun(self) -> int: ...

    @activeRun.setter
    def activeRun(self, arg: int, /) -> None: ...

    @property
    def progressPercentage(self) -> float: ...

    @progressPercentage.setter
    def progressPercentage(self, arg: float, /) -> None: ...

    @property
    def activePlanner(self) -> str: ...

    @activePlanner.setter
    def activePlanner(self, arg: str, /) -> None: ...

class RunProperties:
    def __init__(self) -> None: ...

    def __getitem__(self, arg: str, /) -> str: ...

    def __setitem__(self, arg0: str, arg1: str, /) -> None: ...

    def __len__(self) -> int: ...

    def __contains__(self, arg: str, /) -> bool: ...

    def to_dict(self) -> dict[str, str]:
        """Convert to a Python dictionary copy."""

class PlannerExperiment:
    def __init__(self) -> None: ...

    @property
    def name(self) -> str: ...

    @name.setter
    def name(self, arg: str, /) -> None: ...

    @property
    def runs(self) -> list[RunProperties]: ...

    @runs.setter
    def runs(self, arg: Sequence[RunProperties], /) -> None: ...

    @property
    def progressPropertyNames(self) -> list[str]: ...

    @progressPropertyNames.setter
    def progressPropertyNames(self, arg: Sequence[str], /) -> None: ...

    @property
    def runsProgressData(self) -> list[list[dict[str, str]]]: ...

    @runsProgressData.setter
    def runsProgressData(self, arg: Sequence[Sequence[Mapping[str, str]]], /) -> None: ...

    @property
    def common(self) -> RunProperties: ...

    @common.setter
    def common(self, arg: RunProperties, /) -> None: ...

    def __eq__(self, arg: PlannerExperiment, /) -> bool: ...

class CompleteExperiment:
    def __init__(self) -> None: ...

    @property
    def name(self) -> str: ...

    @name.setter
    def name(self, arg: str, /) -> None: ...

    @property
    def planners(self) -> list[PlannerExperiment]: ...

    @planners.setter
    def planners(self, arg: Sequence[PlannerExperiment], /) -> None: ...

    @property
    def maxTime(self) -> float: ...

    @maxTime.setter
    def maxTime(self, arg: float, /) -> None: ...

    @property
    def maxMem(self) -> float: ...

    @maxMem.setter
    def maxMem(self, arg: float, /) -> None: ...

    @property
    def runCount(self) -> int: ...

    @runCount.setter
    def runCount(self, arg: int, /) -> None: ...

    @property
    def startTime(self) -> datetime.datetime: ...

    @startTime.setter
    def startTime(self, arg: datetime.datetime | datetime.date | datetime.time, /) -> None: ...

    @property
    def totalDuration(self) -> float: ...

    @totalDuration.setter
    def totalDuration(self, arg: float, /) -> None: ...

    @property
    def setupInfo(self) -> str: ...

    @setupInfo.setter
    def setupInfo(self, arg: str, /) -> None: ...

    @property
    def seed(self) -> int: ...

    @seed.setter
    def seed(self, arg: int, /) -> None: ...

    @property
    def host(self) -> str: ...

    @host.setter
    def host(self, arg: str, /) -> None: ...

    @property
    def cpuInfo(self) -> str: ...

    @cpuInfo.setter
    def cpuInfo(self, arg: str, /) -> None: ...

    @property
    def parameters(self) -> dict[str, str]: ...

    @parameters.setter
    def parameters(self, arg: Mapping[str, str], /) -> None: ...

class Request:
    def __init__(self, maxTime: float = 5.0, maxMem: float = 4096.0, runCount: int = 100, timeBetweenUpdates: float = 0.05, displayProgress: bool = True, saveConsoleOutput: bool = True, simplify: bool = True) -> None: ...

    @property
    def maxTime(self) -> float: ...

    @maxTime.setter
    def maxTime(self, arg: float, /) -> None: ...

    @property
    def maxMem(self) -> float: ...

    @maxMem.setter
    def maxMem(self, arg: float, /) -> None: ...

    @property
    def runCount(self) -> int: ...

    @runCount.setter
    def runCount(self, arg: int, /) -> None: ...

    @property
    def timeBetweenUpdates(self) -> float: ...

    @timeBetweenUpdates.setter
    def timeBetweenUpdates(self, arg: float, /) -> None: ...

    @property
    def displayProgress(self) -> bool: ...

    @displayProgress.setter
    def displayProgress(self, arg: bool, /) -> None: ...

    @property
    def saveConsoleOutput(self) -> bool: ...

    @saveConsoleOutput.setter
    def saveConsoleOutput(self, arg: bool, /) -> None: ...

    @property
    def simplify(self) -> bool: ...

    @simplify.setter
    def simplify(self, arg: bool, /) -> None: ...

class Benchmark:
    @overload
    def __init__(self, setup: _ompl.geometric.SimpleSetup, name: str = '') -> None: ...

    @overload
    def __init__(self, setup: _ompl.control.SimpleSetup, name: str = '') -> None: ...

    def addExperimentParameter(self, name: str, type: str, value: str) -> None: ...

    def getExperimentParameters(self) -> dict[str, str]: ...

    def numExperimentParameters(self) -> int: ...

    def setExperimentName(self, name: str) -> None: ...

    def getExperimentName(self) -> str: ...

    def addPlanner(self, planner: _ompl.base.Planner) -> None: ...

    def addPlannerAllocator(self, pa: Callable[[_ompl.base.SpaceInformation], _ompl.base.Planner]) -> None: ...

    def clearPlanners(self) -> None: ...

    def setPlannerSwitchEvent(self, event: Callable[[_ompl.base.Planner], None]) -> None: ...

    def setPreRunEvent(self, event: Callable[[_ompl.base.Planner], None]) -> None: ...

    def setPostRunEvent(self, event: Callable[[_ompl.base.Planner, RunProperties], None]) -> None: ...

    def benchmark(self, req: Request) -> None: ...

    def getStatus(self) -> Status: ...

    def getRecordedExperimentData(self) -> CompleteExperiment: ...

    def saveResultsToStream(self) -> bool:
        """Save the results of the benchmark to stdout."""

    @overload
    def saveResultsToFile(self, filename: str) -> bool:
        """Save the results of the benchmark to a file."""

    @overload
    def saveResultsToFile(self) -> bool:
        """Save the results of the benchmark to a file with auto-generated name."""
