bpo.predicters module¶
Classes:
A |
|
A |
|
Abstract class that all predicters must implement. |
- class bpo.predicters.ImbalancedPredicter[source]¶
Bases:
bpo.predicters.PredicterA
Predicterthat predicts for instances of theImbalancedProblem.Methods:
predict_next_task(problem, environment)Predicts the next task that will arrive.
predict_processing_time_task(problem, ...)Predicts the time it will take a resource to perform a task in a specific problem instance.
predict_remaining_processing_time(problem, ...)Predicts the time a resource needs to complete a task that was already started.
- static predict_processing_time_task(problem, resource, task)[source]¶
Predicts the time it will take a resource to perform a task in a specific problem instance.
- Parameters
problem – an instance of a
Problem.resource – one of the
Problem.resourcesof the problem.task – a
Taskthat should come from the problem.
- Returns
a float representing a duration in simulation time.
- static predict_remaining_processing_time(problem, resource, task, start_time, now)[source]¶
Predicts the time a resource needs to complete a task that was already started.
- Parameters
problem – an instance of a
Problem.resource – one of the
Problem.resourcesof the problem.task – a
Taskthat should come from the problem.start_time – the simulation time at which the resource started processing the task.
now – the current simulation time.
- Returns
a float representing a duration in simulation time.
- class bpo.predicters.MeanPredicter[source]¶
Bases:
bpo.predicters.PredicterA
Predicterthat predicts that the time a resource will take to perform a task is the historical mean. Works only for instances of theproblems.MinedProblem.Methods:
predict_next_task(problem, environment)Predicts the next task that will arrive.
predict_processing_time_task(problem, ...)Predicts the time it will take a resource to perform a task in a specific problem instance.
predict_remaining_processing_time(problem, ...)Predicts the time a resource needs to complete a task that was already started.
- static predict_processing_time_task(problem, resource, task)[source]¶
Predicts the time it will take a resource to perform a task in a specific problem instance.
- Parameters
problem – an instance of a
Problem.resource – one of the
Problem.resourcesof the problem.task – a
Taskthat should come from the problem.
- Returns
a float representing a duration in simulation time.
- static predict_remaining_processing_time(problem, resource, task, start_time, now)[source]¶
Predicts the time a resource needs to complete a task that was already started.
- Parameters
problem – an instance of a
Problem.resource – one of the
Problem.resourcesof the problem.task – a
Taskthat should come from the problem.start_time – the simulation time at which the resource started processing the task.
now – the current simulation time.
- Returns
a float representing a duration in simulation time.
- class bpo.predicters.Predicter[source]¶
Bases:
abc.ABCAbstract class that all predicters must implement.
Methods:
predict_next_task(problem, environment)Predicts the next task that will arrive.
predict_processing_time_task(problem, ...)Predicts the time it will take a resource to perform a task in a specific problem instance.
predict_remaining_processing_time(problem, ...)Predicts the time a resource needs to complete a task that was already started.
- abstract static predict_next_task(problem, environment)[source]¶
Predicts the next task that will arrive.
- abstract static predict_processing_time_task(problem, resource, task)[source]¶
Predicts the time it will take a resource to perform a task in a specific problem instance.
- Parameters
problem – an instance of a
Problem.resource – one of the
Problem.resourcesof the problem.task – a
Taskthat should come from the problem.
- Returns
a float representing a duration in simulation time.
- abstract static predict_remaining_processing_time(problem, resource, task, start_time, now)[source]¶
Predicts the time a resource needs to complete a task that was already started.
- Parameters
problem – an instance of a
Problem.resource – one of the
Problem.resourcesof the problem.task – a
Taskthat should come from the problem.start_time – the simulation time at which the resource started processing the task.
now – the current simulation time.
- Returns
a float representing a duration in simulation time.