job-shop-lib 1.0.0b1__tar.gz → 1.0.0b2__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/PKG-INFO +7 -3
  2. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/README.md +6 -2
  3. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/__init__.py +1 -1
  4. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/dispatching/__init__.py +4 -3
  5. job_shop_lib-1.0.0b2/job_shop_lib/dispatching/_optimal_operations_observer.py +115 -0
  6. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/dispatching/rules/__init__.py +37 -1
  7. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/dispatching/rules/_dispatching_rule_solver.py +27 -5
  8. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/visualization/graphs/__init__.py +1 -1
  9. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/pyproject.toml +1 -1
  10. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/LICENSE +0 -0
  11. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/_base_solver.py +0 -0
  12. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/_job_shop_instance.py +0 -0
  13. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/_operation.py +0 -0
  14. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/_schedule.py +0 -0
  15. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/_scheduled_operation.py +0 -0
  16. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/benchmarking/__init__.py +0 -0
  17. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/benchmarking/_load_benchmark.py +0 -0
  18. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/benchmarking/benchmark_instances.json +0 -0
  19. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/constraint_programming/__init__.py +0 -0
  20. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/constraint_programming/_ortools_solver.py +0 -0
  21. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/dispatching/_dispatcher.py +0 -0
  22. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/dispatching/_dispatcher_observer_config.py +0 -0
  23. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/dispatching/_factories.py +0 -0
  24. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/dispatching/_history_observer.py +0 -0
  25. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/dispatching/_ready_operation_filters.py +0 -0
  26. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/dispatching/_unscheduled_operations_observer.py +0 -0
  27. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/dispatching/feature_observers/__init__.py +0 -0
  28. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/dispatching/feature_observers/_composite_feature_observer.py +0 -0
  29. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/dispatching/feature_observers/_duration_observer.py +0 -0
  30. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/dispatching/feature_observers/_earliest_start_time_observer.py +0 -0
  31. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/dispatching/feature_observers/_factory.py +0 -0
  32. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/dispatching/feature_observers/_feature_observer.py +0 -0
  33. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/dispatching/feature_observers/_is_completed_observer.py +0 -0
  34. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/dispatching/feature_observers/_is_ready_observer.py +0 -0
  35. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/dispatching/feature_observers/_is_scheduled_observer.py +0 -0
  36. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/dispatching/feature_observers/_position_in_job_observer.py +0 -0
  37. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/dispatching/feature_observers/_remaining_operations_observer.py +0 -0
  38. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/dispatching/rules/_dispatching_rule_factory.py +0 -0
  39. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/dispatching/rules/_dispatching_rules_functions.py +0 -0
  40. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/dispatching/rules/_machine_chooser_factory.py +0 -0
  41. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/dispatching/rules/_utils.py +0 -0
  42. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/exceptions.py +0 -0
  43. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/generation/__init__.py +0 -0
  44. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/generation/_general_instance_generator.py +0 -0
  45. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/generation/_instance_generator.py +0 -0
  46. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/generation/_transformations.py +0 -0
  47. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/generation/_utils.py +0 -0
  48. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/graphs/__init__.py +0 -0
  49. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/graphs/_build_disjunctive_graph.py +0 -0
  50. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/graphs/_build_resource_task_graphs.py +0 -0
  51. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/graphs/_constants.py +0 -0
  52. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/graphs/_job_shop_graph.py +0 -0
  53. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/graphs/_node.py +0 -0
  54. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/graphs/graph_updaters/__init__.py +0 -0
  55. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/graphs/graph_updaters/_graph_updater.py +0 -0
  56. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/graphs/graph_updaters/_residual_graph_updater.py +0 -0
  57. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/graphs/graph_updaters/_utils.py +0 -0
  58. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/reinforcement_learning/__init__.py +0 -0
  59. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/reinforcement_learning/_multi_job_shop_graph_env.py +0 -0
  60. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/reinforcement_learning/_reward_observers.py +0 -0
  61. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/reinforcement_learning/_single_job_shop_graph_env.py +0 -0
  62. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/reinforcement_learning/_types_and_constants.py +0 -0
  63. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/reinforcement_learning/_utils.py +0 -0
  64. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/visualization/__init__.py +0 -0
  65. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/visualization/gantt/__init__.py +0 -0
  66. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/visualization/gantt/_gantt_chart_creator.py +0 -0
  67. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/visualization/gantt/_gantt_chart_video_and_gif_creation.py +0 -0
  68. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/visualization/gantt/_plot_gantt_chart.py +0 -0
  69. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/visualization/graphs/_plot_disjunctive_graph.py +0 -0
  70. {job_shop_lib-1.0.0b1 → job_shop_lib-1.0.0b2}/job_shop_lib/visualization/graphs/_plot_resource_task_graph.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: job-shop-lib
3
- Version: 1.0.0b1
3
+ Version: 1.0.0b2
4
4
  Summary: An easy-to-use and modular Python library for the Job Shop Scheduling Problem (JSSP)
5
5
  License: MIT
6
6
  Author: Pabloo22
@@ -57,10 +57,10 @@ pip install job-shop-lib
57
57
  See [this](https://colab.research.google.com/drive/1XV_Rvq1F2ns6DFG8uNj66q_rcowwTZ4H?usp=sharing) Google Colab notebook for a quick start guide!
58
58
 
59
59
 
60
- Version 1.0.0 is currently in alpha stage and can be installed with:
60
+ Version 1.0.0 is currently in beta stage and can be installed with:
61
61
 
62
62
  ```bash
63
- pip install job-shop-lib==1.0.0b1
63
+ pip install job-shop-lib==1.0.0b2
64
64
  ```
65
65
 
66
66
  Although this version is not stable and may contain breaking changes in subsequent releases, it is recommended to install it to access the new reinforcement learning environments and familiarize yourself with new changes (see the [latest pull requests](https://github.com/Pabloo22/job_shop_lib/pulls?q=is%3Apr+is%3Aclosed)). There is a [documentation page](https://job-shop-lib.readthedocs.io/en/latest/) for versions 1.0.0a3 and onward.
@@ -89,7 +89,11 @@ Although this version is not stable and may contain breaking changes in subseque
89
89
  - **Agent-Task Graphs**: Encode instances as agent-task graphs (introduced in [ScheduleNet paper](https://arxiv.org/abs/2106.03051)). See [Agent-Task Graph](https://github.com/Pabloo22/job_shop_lib/blob/main/docs/source/examples/07-Agent-Task-Graph.ipynb).
90
90
  - Build your own custom graphs with the `JobShopGraph` class.
91
91
 
92
+ <<<<<<< HEAD
92
93
  - **Gymnasium Environments**: Two environments for solving the problem with graph neural networks (GNNs) or any other method, and reinforcement learning (RL). See [SingleJobShopGraphEnv](https://github.com/Pabloo22/job_shop_lib/blob/main/docs/source/examples/09-SingleJobShopGraphEnv.ipynb) and [MultiJobShopGraphEnv](https://github.com/Pabloo22/job_shop_lib/blob/main/docs/source/examples/10-MultiJobShopGraphEnv.ipynb).
94
+ =======
95
+ - **Gymnasium Environments**: Two environments for solving the problem with Graph Neural Networks (GNNs) or any other method, and Reinforcement Learning (RL). See [SingleJobShopGraphEnv](https://github.com/Pabloo22/job_shop_lib/blob/main/docs/source/examples/09-SingleJobShopGraphEnv.ipynb) and [MultiJobShopGraphEnv](https://github.com/Pabloo22/job_shop_lib/blob/main/docs/source/examples/10-MultiJobShopGraphEnv.ipynb).
96
+ >>>>>>> 031bdf3 ([Docs] Update links in README to point to the correct GitHub URLs for tutorials and examples)
93
97
 
94
98
  <!-- end key features -->
95
99
 
@@ -33,10 +33,10 @@ pip install job-shop-lib
33
33
  See [this](https://colab.research.google.com/drive/1XV_Rvq1F2ns6DFG8uNj66q_rcowwTZ4H?usp=sharing) Google Colab notebook for a quick start guide!
34
34
 
35
35
 
36
- Version 1.0.0 is currently in alpha stage and can be installed with:
36
+ Version 1.0.0 is currently in beta stage and can be installed with:
37
37
 
38
38
  ```bash
39
- pip install job-shop-lib==1.0.0b1
39
+ pip install job-shop-lib==1.0.0b2
40
40
  ```
41
41
 
42
42
  Although this version is not stable and may contain breaking changes in subsequent releases, it is recommended to install it to access the new reinforcement learning environments and familiarize yourself with new changes (see the [latest pull requests](https://github.com/Pabloo22/job_shop_lib/pulls?q=is%3Apr+is%3Aclosed)). There is a [documentation page](https://job-shop-lib.readthedocs.io/en/latest/) for versions 1.0.0a3 and onward.
@@ -65,7 +65,11 @@ Although this version is not stable and may contain breaking changes in subseque
65
65
  - **Agent-Task Graphs**: Encode instances as agent-task graphs (introduced in [ScheduleNet paper](https://arxiv.org/abs/2106.03051)). See [Agent-Task Graph](https://github.com/Pabloo22/job_shop_lib/blob/main/docs/source/examples/07-Agent-Task-Graph.ipynb).
66
66
  - Build your own custom graphs with the `JobShopGraph` class.
67
67
 
68
+ <<<<<<< HEAD
68
69
  - **Gymnasium Environments**: Two environments for solving the problem with graph neural networks (GNNs) or any other method, and reinforcement learning (RL). See [SingleJobShopGraphEnv](https://github.com/Pabloo22/job_shop_lib/blob/main/docs/source/examples/09-SingleJobShopGraphEnv.ipynb) and [MultiJobShopGraphEnv](https://github.com/Pabloo22/job_shop_lib/blob/main/docs/source/examples/10-MultiJobShopGraphEnv.ipynb).
70
+ =======
71
+ - **Gymnasium Environments**: Two environments for solving the problem with Graph Neural Networks (GNNs) or any other method, and Reinforcement Learning (RL). See [SingleJobShopGraphEnv](https://github.com/Pabloo22/job_shop_lib/blob/main/docs/source/examples/09-SingleJobShopGraphEnv.ipynb) and [MultiJobShopGraphEnv](https://github.com/Pabloo22/job_shop_lib/blob/main/docs/source/examples/10-MultiJobShopGraphEnv.ipynb).
72
+ >>>>>>> 031bdf3 ([Docs] Update links in README to point to the correct GitHub URLs for tutorials and examples)
69
73
 
70
74
  <!-- end key features -->
71
75
 
@@ -19,7 +19,7 @@ from job_shop_lib._schedule import Schedule
19
19
  from job_shop_lib._base_solver import BaseSolver, Solver
20
20
 
21
21
 
22
- __version__ = "1.0.0-b.1"
22
+ __version__ = "1.0.0-b.2"
23
23
 
24
24
  __all__ = [
25
25
  "Operation",
@@ -8,6 +8,7 @@ Problem step-by-step.
8
8
  DispatcherObserver
9
9
  HistoryObserver
10
10
  UnscheduledOperationsObserver
11
+ OptimalOperationsObserver
11
12
  ReadyOperationsFilter
12
13
  DispatcherObserverConfig
13
14
  filter_dominated_operations
@@ -25,9 +26,8 @@ from ._dispatcher import Dispatcher, DispatcherObserver
25
26
  from ._history_observer import (
26
27
  HistoryObserver,
27
28
  )
28
- from ._unscheduled_operations_observer import (
29
- UnscheduledOperationsObserver,
30
- )
29
+ from ._unscheduled_operations_observer import UnscheduledOperationsObserver
30
+ from ._optimal_operations_observer import OptimalOperationsObserver
31
31
  from ._ready_operation_filters import (
32
32
  filter_dominated_operations,
33
33
  filter_non_immediate_machines,
@@ -57,4 +57,5 @@ __all__ = [
57
57
  "ReadyOperationsFilter",
58
58
  "filter_non_idle_machines",
59
59
  "filter_non_immediate_operations",
60
+ "OptimalOperationsObserver",
60
61
  ]
@@ -0,0 +1,115 @@
1
+ """Home of the `OptimalOperationsObserver` class."""
2
+
3
+ from typing import List, Set, Dict
4
+ from job_shop_lib.dispatching import DispatcherObserver, Dispatcher
5
+ from job_shop_lib import Schedule, Operation, ScheduledOperation
6
+ from job_shop_lib.exceptions import ValidationError
7
+
8
+
9
+ class OptimalOperationsObserver(DispatcherObserver):
10
+ """Observer that identifies which available operations are optimal based on
11
+ a reference schedule.
12
+
13
+ This observer compares the available operations at each step with a
14
+ reference schedule to determine which operations would lead to the optimal
15
+ solution. It can be used for training purposes or to analyze decision
16
+ making in dispatching algorithms.
17
+
18
+ Attributes:
19
+ optimal_operations: Set of operations that are considered optimal
20
+ based on the reference schedule.
21
+ reference_schedule: The reference schedule used to determine optimal
22
+ operations.
23
+ _operation_to_scheduled: Dictionary mapping operations to their
24
+ scheduled versions in the reference schedule.
25
+
26
+ Args:
27
+ dispatcher: The dispatcher instance to observe.
28
+ reference_schedule: A complete schedule that represents the optimal
29
+ or reference solution.
30
+ subscribe: If True, automatically subscribes to the dispatcher.
31
+
32
+ Raises:
33
+ ValidationError: If the reference schedule is incomplete or if it
34
+ doesn't match the dispatcher's instance.
35
+ """
36
+
37
+ _is_singleton = False
38
+
39
+ def __init__(
40
+ self,
41
+ dispatcher: Dispatcher,
42
+ reference_schedule: Schedule,
43
+ *,
44
+ subscribe: bool = True,
45
+ ):
46
+ super().__init__(dispatcher, subscribe=subscribe)
47
+
48
+ if not reference_schedule.is_complete():
49
+ raise ValidationError("Reference schedule must be complete.")
50
+
51
+ if reference_schedule.instance != dispatcher.instance:
52
+ raise ValidationError(
53
+ "Reference schedule instance does not match dispatcher "
54
+ "instance."
55
+ )
56
+
57
+ self.reference_schedule = reference_schedule
58
+ self.optimal_available: Set[Operation] = set()
59
+ self._operation_to_scheduled: Dict[Operation, ScheduledOperation] = {}
60
+ self._machine_next_operation_index: List[int] = [0] * len(
61
+ reference_schedule.schedule
62
+ )
63
+
64
+ self._build_operation_mapping()
65
+ self._update_optimal_operations()
66
+
67
+ def _build_operation_mapping(self) -> None:
68
+ """Builds a mapping from operations to their scheduled versions in
69
+ the reference schedule."""
70
+ for machine_schedule in self.reference_schedule.schedule:
71
+ for scheduled_op in machine_schedule:
72
+ self._operation_to_scheduled[scheduled_op.operation] = (
73
+ scheduled_op
74
+ )
75
+
76
+ def _update_optimal_operations(self) -> None:
77
+ """Updates the set of optimal operations based on current state.
78
+
79
+ An operation is considered optimal if it is the next unscheduled
80
+ operation in its machine's sequence according to the reference
81
+ schedule.
82
+ """
83
+ self.optimal_available.clear()
84
+ available_operations = self.dispatcher.available_operations()
85
+
86
+ if not available_operations:
87
+ return
88
+
89
+ for operation in available_operations:
90
+ scheduled_op = self._operation_to_scheduled[operation]
91
+ machine_index = scheduled_op.machine_id
92
+ next_index = self._machine_next_operation_index[machine_index]
93
+
94
+ if (
95
+ scheduled_op
96
+ == self.reference_schedule.schedule[machine_index][next_index]
97
+ ):
98
+ self.optimal_available.add(operation)
99
+
100
+ def update(self, scheduled_operation: ScheduledOperation) -> None:
101
+ """Updates the optimal operations after an operation is scheduled.
102
+
103
+ Args:
104
+ scheduled_operation: The operation that was just scheduled.
105
+ """
106
+ self._machine_next_operation_index[scheduled_operation.machine_id] += 1
107
+ self._update_optimal_operations()
108
+
109
+ def reset(self) -> None:
110
+ """Resets the observer to its initial state."""
111
+ self._machine_next_operation_index = [0] * len(
112
+ self.dispatcher.schedule.schedule
113
+ )
114
+ self.optimal_available.clear()
115
+ self._update_optimal_operations()
@@ -1,4 +1,40 @@
1
- """Contains the dispatching rules for the job shop scheduling problem."""
1
+ """Contains the dispatching rules for the job shop scheduling problem.
2
+
3
+ Main objects:
4
+
5
+ .. autosummary::
6
+
7
+ DispatchingRuleSolver
8
+ dispatching_rule_factory
9
+ DispatchingRuleType
10
+ MachineChooserType
11
+ dispatching_rule_factory
12
+ machine_chooser_factory
13
+
14
+ Dispatching rules:
15
+
16
+ .. autosummary::
17
+
18
+ shortest_processing_time_rule
19
+ first_come_first_served_rule
20
+ most_work_remaining_rule
21
+ most_operations_remaining_rule
22
+ random_operation_rule
23
+ score_based_rule
24
+ score_based_rule_with_tie_breaker
25
+ observer_based_most_work_remaining_rule
26
+
27
+ Dispatching rule scorers:
28
+
29
+ .. autosummary::
30
+
31
+ shortest_processing_time_score
32
+ first_come_first_served_score
33
+ MostWorkRemainingScorer
34
+ most_operations_remaining_score
35
+ random_score
36
+
37
+ """
2
38
 
3
39
  from ._dispatching_rules_functions import (
4
40
  shortest_processing_time_rule,
@@ -30,14 +30,14 @@ class DispatchingRuleSolver(BaseSolver):
30
30
  Used to choose the machine where the operation will be dispatched
31
31
  to. It is only used if the operation can be dispatched to multiple
32
32
  machines.
33
- pruning_function:
34
- The pruning function to use. It is used to initialize the
33
+ ready_operations_filter:
34
+ The ready operations filter to use. It is used to initialize the
35
35
  dispatcher object internally when calling the solve method.
36
36
 
37
37
  Args:
38
38
  dispatching_rule:
39
39
  The dispatching rule to use. It can be a string with the name
40
- of the dispatching rule, a class`DispatchingRuleType` enum member,
40
+ of the dispatching rule, a :class:`DispatchingRuleType` member,
41
41
  or a callable that takes a dispatcher and returns the operation to
42
42
  be dispatched next.
43
43
  machine_chooser:
@@ -110,8 +110,30 @@ class DispatchingRuleSolver(BaseSolver):
110
110
  instance: JobShopInstance,
111
111
  dispatcher: Optional[Dispatcher] = None,
112
112
  ) -> Schedule:
113
- """Returns a schedule for the given job shop instance using the
114
- dispatching rule algorithm."""
113
+ """Solves the instance using the dispatching rule and machine chooser
114
+ algorithms.
115
+
116
+ Args:
117
+ instance:
118
+ The job shop instance to be solved.
119
+ dispatcher:
120
+ The dispatcher object that will be used to dispatch the
121
+ operations. If not provided, a new dispatcher will be created
122
+ using the ready operations filter provided in the constructor.
123
+
124
+ Returns:
125
+ The schedule obtained after solving the instance.
126
+
127
+ .. tip::
128
+ Another way to use the solver is by calling it as a function. This
129
+ will call the ``solve`` method internally and will add metadata to
130
+ the schedule. For example:
131
+
132
+ .. code-block:: python
133
+
134
+ solver = DispatchingRuleSolver()
135
+ schedule = solver(instance)
136
+ """
115
137
  if dispatcher is None:
116
138
  dispatcher = Dispatcher(
117
139
  instance, ready_operations_filter=self.ready_operations_filter
@@ -3,7 +3,7 @@
3
3
  .. autosummary::
4
4
 
5
5
  plot_disjunctive_graph
6
- plot_heterogeneous_graph
6
+ plot_resource_task_graph
7
7
  three_columns_layout
8
8
  duration_labeler
9
9
  color_nodes_by_machine
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "job-shop-lib"
3
- version = "1.0.0-beta.1"
3
+ version = "1.0.0-beta.2"
4
4
  description = "An easy-to-use and modular Python library for the Job Shop Scheduling Problem (JSSP)"
5
5
  authors = ["Pabloo22 <pablete.arino@gmail.com>"]
6
6
  license = "MIT"
File without changes