discrete_optimization.generic_tasks_tools.solvers package
Subpackages
- discrete_optimization.generic_tasks_tools.solvers.cpsat package
- Submodules
- discrete_optimization.generic_tasks_tools.solvers.cpsat.allocation module
AllocationBinaryOrIntegerModellingCpSatSolverAllocationBinaryOrIntegerModellingCpSatSolver.add_allocation_changes_constraints()AllocationBinaryOrIntegerModellingCpSatSolver.add_constraint_on_task_unary_resource_allocation()AllocationBinaryOrIntegerModellingCpSatSolver.allocation_modellingAllocationBinaryOrIntegerModellingCpSatSolver.get_binary_allocation_variable()AllocationBinaryOrIntegerModellingCpSatSolver.get_integer_allocation_variable()AllocationBinaryOrIntegerModellingCpSatSolver.get_task_allocation_variable()AllocationBinaryOrIntegerModellingCpSatSolver.get_task_unary_resource_is_present_variable()
AllocationCpSatSolverAllocationCpSatSolver.add_allocation_changes_constraints()AllocationCpSatSolver.add_at_most_one_unary_resource_per_task_constraints()AllocationCpSatSolver.add_constraint_nb_unary_resource_usages()AllocationCpSatSolver.add_constraint_on_nb_allocation_changes()AllocationCpSatSolver.add_constraint_on_task_unary_resource_allocation()AllocationCpSatSolver.add_constraint_on_total_nb_usages()AllocationCpSatSolver.add_constraint_on_unary_resource_nb_usages()AllocationCpSatSolver.allocation_changes_variablesAllocationCpSatSolver.allocation_changes_variables_createdAllocationCpSatSolver.at_most_one_unary_resource_per_taskAllocationCpSatSolver.at_most_one_unary_resource_per_task_constraints_addedAllocationCpSatSolver.create_allocation_changes_variables()AllocationCpSatSolver.create_done_variables()AllocationCpSatSolver.create_used_variables()AllocationCpSatSolver.done_variablesAllocationCpSatSolver.done_variables_createdAllocationCpSatSolver.get_default_tasks_n_unary_resources()AllocationCpSatSolver.get_nb_tasks_done_variable()AllocationCpSatSolver.get_nb_unary_resources_used_variable()AllocationCpSatSolver.get_task_unary_resource_is_present_variable()AllocationCpSatSolver.init_model()AllocationCpSatSolver.subset_tasks_of_interestAllocationCpSatSolver.subset_unaryresources_allowedAllocationCpSatSolver.used_variablesAllocationCpSatSolver.used_variables_created
AllocationIntegerModellingCpSatSolverAllocationIntegerModellingCpSatSolver.add_allocation_changes_constraints()AllocationIntegerModellingCpSatSolver.add_constraint_on_task_unary_resource_allocation()AllocationIntegerModellingCpSatSolver.create_is_present_variables()AllocationIntegerModellingCpSatSolver.get_task_allocation_variable()AllocationIntegerModellingCpSatSolver.get_task_unary_resource_is_present_variable()AllocationIntegerModellingCpSatSolver.init_model()AllocationIntegerModellingCpSatSolver.is_present_variablesAllocationIntegerModellingCpSatSolver.is_present_variables_created
AllocationModelling
- discrete_optimization.generic_tasks_tools.solvers.cpsat.auto module
GenericSchedulingAutoCpSatSolverGenericSchedulingAutoCpSatSolver.all_used_variablesGenericSchedulingAutoCpSatSolver.all_used_variables_createdGenericSchedulingAutoCpSatSolver.allocation_intervalsGenericSchedulingAutoCpSatSolver.allocation_is_presentGenericSchedulingAutoCpSatSolver.check_resources_lists()GenericSchedulingAutoCpSatSolver.compute_task_bounds()GenericSchedulingAutoCpSatSolver.convert_task_variables_to_solution()GenericSchedulingAutoCpSatSolver.duplicate_start_var_per_modeGenericSchedulingAutoCpSatSolver.duration_variablesGenericSchedulingAutoCpSatSolver.exactly_one_unary_resource_per_taskGenericSchedulingAutoCpSatSolver.get_aggregated_resources_consumptions_variable()GenericSchedulingAutoCpSatSolver.get_nb_resources_used_variable()GenericSchedulingAutoCpSatSolver.get_task_mode_interval()GenericSchedulingAutoCpSatSolver.get_task_mode_is_present_variable()GenericSchedulingAutoCpSatSolver.get_task_start_or_end_lower_bound()GenericSchedulingAutoCpSatSolver.get_task_start_or_end_upper_bound()GenericSchedulingAutoCpSatSolver.get_task_start_or_end_variable()GenericSchedulingAutoCpSatSolver.get_task_unary_resource_interval()GenericSchedulingAutoCpSatSolver.get_task_unary_resource_is_present_variable()GenericSchedulingAutoCpSatSolver.include_constraint_on_cumulative_resource()GenericSchedulingAutoCpSatSolver.init_model()GenericSchedulingAutoCpSatSolver.modes_intervalsGenericSchedulingAutoCpSatSolver.modes_is_presentGenericSchedulingAutoCpSatSolver.modes_start_variablesGenericSchedulingAutoCpSatSolver.needs_duration_variablesGenericSchedulingAutoCpSatSolver.needs_task_intervalGenericSchedulingAutoCpSatSolver.objectiveGenericSchedulingAutoCpSatSolver.objective_resource_weightsGenericSchedulingAutoCpSatSolver.resource_consumption_variablesGenericSchedulingAutoCpSatSolver.resource_consumption_variables_createdGenericSchedulingAutoCpSatSolver.retrieve_solution()GenericSchedulingAutoCpSatSolver.retrieve_tasks_variables()GenericSchedulingAutoCpSatSolver.set_warm_start()GenericSchedulingAutoCpSatSolver.start_or_end_variablesGenericSchedulingAutoCpSatSolver.task_interval_variablesGenericSchedulingAutoCpSatSolver.use_cpm_for_task_bounds
ObjectiveSinglemodeGenericSchedulingAutoCpSatSolverTaskVariableTemporarySolution
- discrete_optimization.generic_tasks_tools.solvers.cpsat.calendar_resource module
- discrete_optimization.generic_tasks_tools.solvers.cpsat.cumulative_resource module
- discrete_optimization.generic_tasks_tools.solvers.cpsat.generic_scheduling module
- discrete_optimization.generic_tasks_tools.solvers.cpsat.multimode module
- discrete_optimization.generic_tasks_tools.solvers.cpsat.multimode_scheduling module
- discrete_optimization.generic_tasks_tools.solvers.cpsat.non_renewable_resource module
- discrete_optimization.generic_tasks_tools.solvers.cpsat.precedence_scheduling module
- discrete_optimization.generic_tasks_tools.solvers.cpsat.scheduling module
SchedulingCpSatSolverSchedulingCpSatSolver.add_constraint_chaining_tasks()SchedulingCpSatSolver.add_constraint_on_task()SchedulingCpSatSolver.constraints_on_makespanSchedulingCpSatSolver.get_global_makespan_variable()SchedulingCpSatSolver.get_subtasks_makespan_variable()SchedulingCpSatSolver.get_subtasks_sum_end_time_variable()SchedulingCpSatSolver.get_subtasks_sum_start_time_variable()SchedulingCpSatSolver.get_task_start_or_end_variable()SchedulingCpSatSolver.init_model()SchedulingCpSatSolver.remove_constraints_on_objective()
- Module contents
- discrete_optimization.generic_tasks_tools.solvers.lns_cp package
- Submodules
- discrete_optimization.generic_tasks_tools.solvers.lns_cp.constraint_extractor module
BaseConstraintExtractorChainingConstraintExtractorConstraintExtractorListConstraintExtractorPortfolioDummyConstraintExtractorMultimodeConstraintExtractorNbChangesAllocationConstraintExtractorNbUsagesAllocationConstraintExtractorParamsConstraintExtractorSchedulingConstraintExtractorSubresourcesAllocationConstraintExtractorSubtasksAllocationConstraintExtractorbuild_default_constraint_extractor()
- discrete_optimization.generic_tasks_tools.solvers.lns_cp.constraint_handler module
- discrete_optimization.generic_tasks_tools.solvers.lns_cp.neighbor_tools module
- Module contents
- discrete_optimization.generic_tasks_tools.solvers.optalcp package
- Submodules
- discrete_optimization.generic_tasks_tools.solvers.optalcp.allocation module
AllocationOptalSolverAllocationOptalSolver.add_allocation_changes_constraints()AllocationOptalSolver.add_constraint_nb_unary_resource_usages()AllocationOptalSolver.add_constraint_on_nb_allocation_changes()AllocationOptalSolver.add_constraint_on_task_unary_resource_allocation()AllocationOptalSolver.add_constraint_on_total_nb_usages()AllocationOptalSolver.add_constraint_on_unary_resource_nb_usages()AllocationOptalSolver.allocation_changes_variablesAllocationOptalSolver.allocation_changes_variables_createdAllocationOptalSolver.at_most_one_unary_resource_per_taskAllocationOptalSolver.create_allocation_changes_variables()AllocationOptalSolver.create_done_variables()AllocationOptalSolver.create_used_variables()AllocationOptalSolver.done_variablesAllocationOptalSolver.done_variables_createdAllocationOptalSolver.get_default_tasks_n_unary_resources()AllocationOptalSolver.get_nb_tasks_done_variable()AllocationOptalSolver.get_nb_unary_resources_used_variable()AllocationOptalSolver.get_task_unary_resource_is_present_variable()AllocationOptalSolver.init_model()AllocationOptalSolver.subset_tasks_of_interestAllocationOptalSolver.subset_unaryresources_allowedAllocationOptalSolver.used_variablesAllocationOptalSolver.used_variables_created
- discrete_optimization.generic_tasks_tools.solvers.optalcp.multimode module
- discrete_optimization.generic_tasks_tools.solvers.optalcp.scheduling module
SchedulingOptalSolverSchedulingOptalSolver.add_constraint_chaining_tasks()SchedulingOptalSolver.add_constraint_on_task()SchedulingOptalSolver.get_subtasks_makespan_variable()SchedulingOptalSolver.get_subtasks_sum_end_time_variable()SchedulingOptalSolver.get_subtasks_sum_start_time_variable()SchedulingOptalSolver.get_task_interval_variable()SchedulingOptalSolver.get_task_start_or_end_variable()
- Module contents
Submodules
discrete_optimization.generic_tasks_tools.solvers.cpm module
CPM to compute lower/uppe bound on start/end of tasks
- class discrete_optimization.generic_tasks_tools.solvers.cpm.Cpm(problem: GenericSchedulingProblem[Task, UnaryResource, CumulativeResource, NonRenewableResource], horizon: int | None = None)[source]
Bases:
Generic[Task,UnaryResource,CumulativeResource,NonRenewableResource]Propagator of bounds trough precedence graph according to minimum duration of each task.
For that we use: - multimode-scheduling: we know all possible durations - precedence: we use the precedence constraints
We first do a forward pass on all tasks in precedence graph for lower bounds and then a backward pass for upper bounds.
We start from lower bound 0 and upper bound horizon (problem horizon can be overriden).
This differs from classic CPM as we know that other non-precedence constraints can occur so that we cannot assume end lower_bounds = end upper bound for sink tasks. So sink tasks end upper bound will be set to horizon instead.
For each task, we take best of propagated bound and existing problem bound on start/end (via problem.get_task_start_or_end_lower_bound()).
- horizon
if set, override problem.get_makespan_upper_bound().
- compute_task_bounds() None[source]
Compute task bounds by forxard/backward propagation through precedence graph
Returns:
- get_a_critical_path() list[Task][source]
Compute a critical path.
It takes into account no other constraints that precedence constraints. It starts from a task without predecessor to a task without successor.
Returns:
- class discrete_optimization.generic_tasks_tools.solvers.cpm.Taskbounds(start_lower_bound: int | None = None, end_lower_bound: int | None = None, start_upper_bound: int | None = None, end_upper_bound: int | None = None)[source]
Bases:
object- end_lower_bound: int | None = None
- end_upper_bound: int | None = None
- start_lower_bound: int | None = None
- start_upper_bound: int | None = None