discrete_optimization.singlemachine.transformations package
Submodules
discrete_optimization.singlemachine.transformations.to_jsp module
Transformation from Single Machine Scheduling to Job Shop Problem.
This is a LOSSY transformation because: - Due dates are lost (JSP doesn’t model deadlines) - Weights are lost (JSP optimizes makespan, not weighted tardiness) - Release dates may not be fully enforced (JSP doesn’t have built-in release constraints)
- class discrete_optimization.singlemachine.transformations.to_jsp.SingleMachineToJspTransformation[source]
Bases:
ProblemTransformation[WeightedTardinessProblem,WTSolution,JobShopProblem,JobShopSolution]Transform Single Machine Scheduling to Job Shop Problem.
Mapping: - Single machine → JSP with 1 machine - Each job → JSP job with 1 subjob - All subjobs assigned to machine 0 - Processing times map directly
Information Loss: - Due dates: Lost (JSP doesn’t model deadlines) - Weights: Lost (JSP only optimizes makespan) - Release dates: Partially lost (not enforced in standard JSP)
This transformation is LOSSY but still useful for: - Reusing powerful JSP solvers for single machine scheduling - Focusing on minimizing makespan (ignoring tardiness) - Benchmarking JSP solvers on single-machine instances
- back_transform_solution(solution: JobShopSolution, source_problem: WeightedTardinessProblem) WTSolution[source]
Transform JSP solution back to Single Machine solution.
- Parameters:
solution – JSP solution (schedule for jobs on 1 machine)
source_problem – Original WeightedTardinessProblem
- Returns:
Equivalent WTSolution (permutation + schedule)
- forward_transform_solution(solution: WTSolution, target_problem: JobShopProblem) JobShopSolution | None[source]
Transform Single Machine solution to JSP solution (for warmstart).
- Parameters:
solution – WTSolution (permutation + schedule)
target_problem – Target JobShopProblem
- Returns:
Equivalent JobShopSolution
- get_forward_metadata() TransformationMetadata[source]
Metadata for forward transformation (SingleMachine → JSP).
- transform_problem(source_problem: WeightedTardinessProblem) JobShopProblem[source]
Transform Single Machine problem to JSP.
- Parameters:
source_problem – WeightedTardinessProblem instance
- Returns:
Equivalent JobShopProblem (single machine, single subjob per job)
Module contents
Transformations from Single Machine Scheduling to other problems.
- class discrete_optimization.singlemachine.transformations.SingleMachineToJspTransformation[source]
Bases:
ProblemTransformation[WeightedTardinessProblem,WTSolution,JobShopProblem,JobShopSolution]Transform Single Machine Scheduling to Job Shop Problem.
Mapping: - Single machine → JSP with 1 machine - Each job → JSP job with 1 subjob - All subjobs assigned to machine 0 - Processing times map directly
Information Loss: - Due dates: Lost (JSP doesn’t model deadlines) - Weights: Lost (JSP only optimizes makespan) - Release dates: Partially lost (not enforced in standard JSP)
This transformation is LOSSY but still useful for: - Reusing powerful JSP solvers for single machine scheduling - Focusing on minimizing makespan (ignoring tardiness) - Benchmarking JSP solvers on single-machine instances
- back_transform_solution(solution: JobShopSolution, source_problem: WeightedTardinessProblem) WTSolution[source]
Transform JSP solution back to Single Machine solution.
- Parameters:
solution – JSP solution (schedule for jobs on 1 machine)
source_problem – Original WeightedTardinessProblem
- Returns:
Equivalent WTSolution (permutation + schedule)
- forward_transform_solution(solution: WTSolution, target_problem: JobShopProblem) JobShopSolution | None[source]
Transform Single Machine solution to JSP solution (for warmstart).
- Parameters:
solution – WTSolution (permutation + schedule)
target_problem – Target JobShopProblem
- Returns:
Equivalent JobShopSolution
- get_forward_metadata() TransformationMetadata[source]
Metadata for forward transformation (SingleMachine → JSP).
- transform_problem(source_problem: WeightedTardinessProblem) JobShopProblem[source]
Transform Single Machine problem to JSP.
- Parameters:
source_problem – WeightedTardinessProblem instance
- Returns:
Equivalent JobShopProblem (single machine, single subjob per job)