discrete_optimization.generic_tasks_tools.objectives package
Submodules
discrete_optimization.generic_tasks_tools.objectives.allocated_tasks module
- class discrete_optimization.generic_tasks_tools.objectives.allocated_tasks.AllocatedTasksObjective(problem: TasksProblem[Task] = None, weight_objective: float = 1.0)[source]
Bases:
ObjectiveComputer[Task],Generic[Task,UnaryResource]- compute_objective(solution: AllocationSolution[Task, UnaryResource])[source]
- problem: AllocationProblem[Task, UnaryResource]
discrete_optimization.generic_tasks_tools.objectives.allocation_changes module
- class discrete_optimization.generic_tasks_tools.objectives.allocation_changes.AllocationSwitchObjectiveComputer(problem: AllocationProblem[Task, UnaryResource], base_allocation_solution: AllocationSolution[Task, UnaryResource] = None, weight_objective: float = 1.0, switch_on_cost: dict[Task, dict[UnaryResource, int]] = None, switch_off_cost: dict[Task, dict[UnaryResource, int]] = None)[source]
Bases:
ObjectiveComputer[Task],Generic[Task,UnaryResource]- base_allocation_solution: AllocationSolution[Task, UnaryResource]
- compute_objective(solution: AllocationSolution[Task, UnaryResource]) float[source]
- problem: AllocationProblem[Task, UnaryResource]
- set_base_allocation_solution(allocation_solution: AllocationSolution[Task, UnaryResource])[source]
discrete_optimization.generic_tasks_tools.objectives.allocation_cost module
- class discrete_optimization.generic_tasks_tools.objectives.allocation_cost.AllocationCostComputer(problem: AllocationProblem[Task, UnaryResource] = None, weight_objective: float = 1.0, cost_allocation_resource_to_task: dict[Task, dict[UnaryResource, int]] = None)[source]
Bases:
ObjectiveComputer[Task],Generic[Task,UnaryResource]- compute_objective(solution: AllocationSolution[Task, UnaryResource]) float[source]
- problem: AllocationProblem[Task, UnaryResource]
- class discrete_optimization.generic_tasks_tools.objectives.allocation_cost.AllocationCostComputerMultimode(problem: MultimodeAllocationProblem[Task, UnaryResource] = None, weight_objective: float = 1.0, cost_allocation_resource_to_task_mode: dict[tuple[Task, int], dict[UnaryResource, int]] = None)[source]
Bases:
ObjectiveComputer[Task],Generic[Task,UnaryResource]- compute_objective(solution: MultimodeAllocationSolution[Task, UnaryResource]) float[source]
- cost_allocation_resource_to_task_mode(task: Task, mode: int, unary_resource: UnaryResource) float[source]
- problem: MultimodeAllocationProblem[Task, UnaryResource]
- class discrete_optimization.generic_tasks_tools.objectives.allocation_cost.MultimodeAllocationProblem[source]
Bases:
AllocationProblem[Task,UnaryResource],MultimodeProblem[Task]
- class discrete_optimization.generic_tasks_tools.objectives.allocation_cost.MultimodeAllocationSolution(problem: Problem)[source]
Bases:
AllocationSolution[Task,UnaryResource],MultimodeSolution[Task]
discrete_optimization.generic_tasks_tools.objectives.cumul_cost module
- class discrete_optimization.generic_tasks_tools.objectives.cumul_cost.CumulCostComputer(problem: GenericSchedulingProblem[Task, UnaryResource, Skill, NonSkillCumulativeResource, NonRenewableResource] = None, weight_objective: float = 1.0, cumul_dimensions: list[CUMUL_DIMENSIONS] = None, value_tasks: dict[CUMUL_DIMENSIONS, dict[Task, float]] = None, value_tasks_per_mode: dict[CUMUL_DIMENSIONS, dict[tuple[Task, int], float]] = None)[source]
Bases:
ObjectiveComputer[Task],Generic[Task,UnaryResource,Skill,NonSkillCumulativeResource,NonRenewableResource]- compute_objective(solution: GenericSchedulingSolution[Task, UnaryResource, Skill, NonSkillCumulativeResource, NonRenewableResource]) float[source]
- problem: GenericSchedulingProblem[Task, UnaryResource, Skill, NonSkillCumulativeResource, NonRenewableResource]
discrete_optimization.generic_tasks_tools.objectives.earliness_tardiness module
- class discrete_optimization.generic_tasks_tools.objectives.earliness_tardiness.EarlinessTardinessComputer(problem: SchedulingProblem[Task], weight_objective: float = 1.0, max_start_and_weight_for_tardiness: dict[Task, tuple[int | None, int | None]] = None, max_end_and_weight_for_tardiness: dict[Task, tuple[int | None, int | None]] = None, min_start_and_weight_for_earliness: dict[Task, tuple[int | None, int | None]] = None, min_end_and_weight_for_earliness: dict[Task, tuple[int | None, int | None]] = None)[source]
Bases:
ObjectiveComputer[Task]- compute_aggregated_cost(solution: SchedulingSolution[Task]) float[source]
- compute_earliness_cost(solution: SchedulingSolution[Task]) float[source]
- compute_earliness_end(solution: SchedulingSolution[Task], task: Task) float[source]
- compute_earliness_start(solution: SchedulingSolution[Task], task: Task) float[source]
- compute_objective(solution: TasksSolution) float[source]
- compute_tardiness_cost(solution: SchedulingSolution[Task]) float[source]
- compute_tardiness_end(solution: SchedulingSolution[Task], task: Task) float[source]
- compute_tardiness_start(solution: SchedulingSolution[Task], task: Task) float[source]
- detailed_objectives(solution: SchedulingSolution[Task]) dict[tuple[str, str], dict[Task, int]][source]
- problem: SchedulingProblem[Task]
discrete_optimization.generic_tasks_tools.objectives.makespan module
- class discrete_optimization.generic_tasks_tools.objectives.makespan.MakespanObjectiveComputer(problem: TasksProblem[Task] = None, weight_objective: float = 1.0)[source]
Bases:
ObjectiveComputer[Task]- compute_objective(solution: SchedulingSolution[Task]) int[source]
- problem: SchedulingProblem[Task]
discrete_optimization.generic_tasks_tools.objectives.mode_cost module
- class discrete_optimization.generic_tasks_tools.objectives.mode_cost.ModeCostComputer(problem: MultimodeProblem[Task] = None, weight_objective: float = 1.0, mode_cost: dict[Task, dict[int, int]] = None)[source]
Bases:
ObjectiveComputer[Task]- compute_objective(solution: MultimodeSolution[Task]) float[source]
- problem: MultimodeProblem[Task]
discrete_optimization.generic_tasks_tools.objectives.objective_computer module
- class discrete_optimization.generic_tasks_tools.objectives.objective_computer.ObjectiveComputer(problem: TasksProblem[Task] = None, weight_objective: float = 1.0)[source]
Bases:
ABC,Generic[Task]- abstractmethod compute_objective(solution: TasksSolution) float[source]
- problem: TasksProblem[Task]
- set_problem(problem: TasksProblem[Task])[source]
- property weight_cost: float
discrete_optimization.generic_tasks_tools.objectives.resource_levels module
- class discrete_optimization.generic_tasks_tools.objectives.resource_levels.CalendarRenewableResourceLevelObjectiveComputer(problem: CalendarResourceProblem[Task, Resource], weight_objective: float = 1.0, weight_resource: dict[Resource, float] = None)[source]
Bases:
ObjectiveComputer[Task],Generic[Task,Resource]- compute_objective(solution: CalendarResourceSolution[Task, Resource]) float[source]
- problem: CalendarResourceProblem[Task, Resource]
- class discrete_optimization.generic_tasks_tools.objectives.resource_levels.NonRenewableResourceLevelObjectiveComputer(problem: NonRenewableResourceProblem[Task, Resource], weight_objective: float = 1.0, weight_resource: dict[Resource, float] = None)[source]
Bases:
ObjectiveComputer[Task],Generic[Task,NonRenewableResource]- compute_objective(solution: NonRenewableResourceSolution[Task, NonRenewableResource]) float[source]
- problem: NonRenewableResourceProblem[Task, NonRenewableResource]
discrete_optimization.generic_tasks_tools.objectives.schedule_changes module
- class discrete_optimization.generic_tasks_tools.objectives.schedule_changes.ScheduleChangesComputer(problem: SchedulingProblem[Task], base_scheduling_solution: SchedulingSolution[Task], weight_objective: float = 1.0, cost_any_shift: dict[Task, float] = None, cost_unit_deviation: dict[Task, float] = None)[source]
Bases:
ObjectiveComputer[Task]- base_scheduling_solution: SchedulingSolution[Task]
- compute_any_shift_cost(solution: SchedulingSolution[Task]) float[source]
- compute_objective(solution: TasksSolution) float[source]
- compute_unit_deviation_cost(solution: SchedulingSolution[Task]) float[source]
- cost_any_shift(task: Task) int[source]
Cost of any move of the task (whatever deviation) :param task: task of the scheduling problem :return: the cost of any move of the task
- cost_unit_deviation(task: Task) int[source]
Cost of shifting one unit of time so the total cost will be : unit*abs(new_time-prev_time)
- problem: SchedulingProblem[Task]
discrete_optimization.generic_tasks_tools.objectives.scheduled_tasks module
- class discrete_optimization.generic_tasks_tools.objectives.scheduled_tasks.ScheduledTasksComputer(problem: SchedulingProblem[Task], weight_objective: float = 1.0, weight_per_task: dict[Task, int] | None = None)[source]
Bases:
ObjectiveComputer[Task],Generic[Task]- compute_objective(solution: SchedulingSolution[Task]) float[source]
- problem: SchedulingProblem[Task]
discrete_optimization.generic_tasks_tools.objectives.soft_time_penalty module
- class discrete_optimization.generic_tasks_tools.objectives.soft_time_penalty.SoftTimePenaltyComputer(problem: TasksProblem[Task] = None, weight_objective: float = 1.0)[source]
Bases:
ObjectiveComputer[Task],Generic[Task,UnaryResource,Skill,NonSkillCumulativeResource,NonRenewableResource]- compute_objective(solution: GenericSchedulingSolution[Task, UnaryResource, Skill, NonSkillCumulativeResource, NonRenewableResource]) float[source]
- penalty = 0
- problem: GenericSchedulingProblem[Task, UnaryResource, Skill, NonSkillCumulativeResource, NonRenewableResource]
discrete_optimization.generic_tasks_tools.objectives.unary_resource_used module
- class discrete_optimization.generic_tasks_tools.objectives.unary_resource_used.UnaryResourcesUsedComputer(problem: AllocationProblem[Task, UnaryResource] = None, weight_objective: float = 1.0, weight_per_unary_resource: dict[UnaryResource, float] = None)[source]
Bases:
ObjectiveComputer[Task],Generic[Task,UnaryResource]- compute_objective(solution: AllocationSolution[Task, UnaryResource])[source]
- problem: AllocationProblem[Task, UnaryResource]
discrete_optimization.generic_tasks_tools.objectives.utils module
- discrete_optimization.generic_tasks_tools.objectives.utils.get_objective_computer_class(objective: Objective) Type[ObjectiveComputer][source]