labscheduler.dev_tools.schedule_problem module¶
A simple commandline script to run the scheduler on a specific instance with a specific solver. Lab_config file, timelimit and solver can be set via command line options. Example usage: python schedule_problem.py tests/test_data/IncubateAbsorbance.json -t 20 -s CP-Solver
- labscheduler.dev_tools.schedule_problem.adapt_times(operations: list[Operation], timestamp: datetime)[source]¶
Adds the difference between now and the given timestamp to start and finish of all operations it that is not None and thereby reverts the problem to the state at timestamp.
- labscheduler.dev_tools.schedule_problem.main(instance: str = <typer.models.ArgumentInfo object>, lab_config: str | None = <typer.models.OptionInfo object>, solver: str = <typer.models.OptionInfo object>, time_limit: float = <typer.models.OptionInfo object>, show_wfg: bool = <typer.models.OptionInfo object>, show_result: bool = <typer.models.OptionInfo object>)[source]¶
Solves a scheduling problem instance using the specified solver and configuration.
- Parameters:
show_result – Option to visualize problem
show_wfg – Option to visualize solution
instance – Path to the problem instance file. Must be a JSON or Python file.
lab_config – Path to the lab configuration file. Optional.
solver – Name of the solver to use. Defaults to “BottleneckPD”.
time_limit – Time limit for the solver in seconds. Defaults to 3 seconds.
The instance file can either be: - A JSON file containing the problem description. - A Python file (requires the laborchestrator package for PythonLab descriptions).
If a lab configuration file is provided, it will be used to configure the job shop.