discrete_optimization.singlebatch.transformations package

Submodules

discrete_optimization.singlebatch.transformations.to_ovensched module

Transformation from SingleBatch to OvenSched.

SingleBatch is a special case of OvenSched with: - 1 machine - 1 attribute (all jobs have same type) - No setup times/costs - No time windows - Fixed processing times (min_duration = max_duration)

class discrete_optimization.singlebatch.transformations.to_ovensched.SinglebatchToOvenschedTransformation[source]

Bases: ProblemTransformation[SingleBatchProcessingProblem, BatchProcessingSolution, OvenSchedulingProblem, OvenSchedulingSolution]

Transform SingleBatch problem to OvenSched problem.

SingleBatch is a special case of OvenSched, so this is a SUBSET transformation (exact).

Mapping: - Single machine → 1 machine in OvenSched - Jobs → Tasks with:

  • Single attribute (all tasks have attribute=0)

  • min_duration = max_duration = processing_time

  • size → size

  • earliest_start = 0

  • latest_end = large value (no deadline)

  • eligible_machines = {0} (only the single machine)

  • Capacity → machine capacity

  • No setup times → all setup_times[i][j] = 0

  • No setup costs → all setup_costs[i][j] = 0

  • Machine availability → [(0, large_value)] (always available)

This is an EXACT transformation: - Forward: Every SingleBatch problem is a valid OvenSched problem - Backward: Solutions map directly (batch assignments are preserved)

back_transform_solution(solution: OvenSchedulingSolution, source_problem: SingleBatchProcessingProblem) BatchProcessingSolution[source]

Transform OvenSched solution back to SingleBatch solution.

Parameters:
  • solution – OvenSched solution

  • source_problem – Original SingleBatch problem

Returns:

Equivalent SingleBatch solution

forward_transform_solution(solution: BatchProcessingSolution, target_problem: OvenSchedulingProblem) OvenSchedulingSolution | None[source]

Transform SingleBatch solution to OvenSched solution (for warmstart).

Parameters:
  • solution – SingleBatch solution

  • target_problem – Target OvenSched problem

Returns:

Equivalent OvenSched solution for warmstart

get_forward_metadata() TransformationMetadata[source]

Metadata for forward problem transformation (SingleBatch → OvenSched).

This is a SUBSET transformation: SingleBatch ⊂ OvenSched.

transform_problem(source_problem: SingleBatchProcessingProblem) OvenSchedulingProblem[source]

Transform SingleBatch to OvenSched.

Parameters:

source_problem – SingleBatch problem instance

Returns:

Equivalent OvenSched problem with 1 machine and 1 attribute

Module contents

Transformations for SingleBatch problem.

class discrete_optimization.singlebatch.transformations.SinglebatchToOvenschedTransformation[source]

Bases: ProblemTransformation[SingleBatchProcessingProblem, BatchProcessingSolution, OvenSchedulingProblem, OvenSchedulingSolution]

Transform SingleBatch problem to OvenSched problem.

SingleBatch is a special case of OvenSched, so this is a SUBSET transformation (exact).

Mapping: - Single machine → 1 machine in OvenSched - Jobs → Tasks with:

  • Single attribute (all tasks have attribute=0)

  • min_duration = max_duration = processing_time

  • size → size

  • earliest_start = 0

  • latest_end = large value (no deadline)

  • eligible_machines = {0} (only the single machine)

  • Capacity → machine capacity

  • No setup times → all setup_times[i][j] = 0

  • No setup costs → all setup_costs[i][j] = 0

  • Machine availability → [(0, large_value)] (always available)

This is an EXACT transformation: - Forward: Every SingleBatch problem is a valid OvenSched problem - Backward: Solutions map directly (batch assignments are preserved)

back_transform_solution(solution: OvenSchedulingSolution, source_problem: SingleBatchProcessingProblem) BatchProcessingSolution[source]

Transform OvenSched solution back to SingleBatch solution.

Parameters:
  • solution – OvenSched solution

  • source_problem – Original SingleBatch problem

Returns:

Equivalent SingleBatch solution

forward_transform_solution(solution: BatchProcessingSolution, target_problem: OvenSchedulingProblem) OvenSchedulingSolution | None[source]

Transform SingleBatch solution to OvenSched solution (for warmstart).

Parameters:
  • solution – SingleBatch solution

  • target_problem – Target OvenSched problem

Returns:

Equivalent OvenSched solution for warmstart

get_forward_metadata() TransformationMetadata[source]

Metadata for forward problem transformation (SingleBatch → OvenSched).

This is a SUBSET transformation: SingleBatch ⊂ OvenSched.

transform_problem(source_problem: SingleBatchProcessingProblem) OvenSchedulingProblem[source]

Transform SingleBatch to OvenSched.

Parameters:

source_problem – SingleBatch problem instance

Returns:

Equivalent OvenSched problem with 1 machine and 1 attribute