discrete_optimization.rcpsp_multiskill.transformations package
Submodules
discrete_optimization.rcpsp_multiskill.transformations.generic_scheduling_impl module
Transformation from/to generic scheduling to/from RCPSP Multiskill.
- class discrete_optimization.rcpsp_multiskill.transformations.generic_scheduling_impl.GenericSchedulingToMultiskillRcpspTransformation[source]
Bases:
FromGenericSchedulingImpl[MultiskillRcpspProblem,MultiskillRcpspSolution]Transform GenericSchedulingImplProblem to RCPSP multiskill.
- get_forward_metadata() TransformationMetadata[source]
Get metadata for problem transformation (P1 → P2).
Documents what information is lost when transforming the PROBLEM.
Override this method to provide detailed information about: - Constraints that cannot be represented in target problem - Objectives that are ignored or approximated - Assumptions made during transformation
- Returns:
TransformationMetadata documenting losses in problem transformation
- Default:
Returns exact_transformation() (no losses documented)
Note
Solutions from the target problem always map back MECHANICALLY via back_transform_solution(), but may not satisfy all constraints from the original source problem if this transformation is lossy.
- Example: BinPack → SALBP loses incompatibility constraints.
Solutions from SALBP solvers map back to BinPack allocations, but may violate incompatibility if that constraint was present.
Always verify solutions in the original problem after solving via transformation!
- transform_problem(source_problem: GenericSchedulingImplProblem) MultiskillRcpspProblem[source]
- Parameters:
source_problem
Returns:
- class discrete_optimization.rcpsp_multiskill.transformations.generic_scheduling_impl.MultiskillRcpspToGenericSchedulingTransformation[source]
Bases:
ToGenericSchedulingImpl[MultiskillRcpspProblem,MultiskillRcpspSolution]Transform RCPSP multiskill to GenericSchedulingImplProblem.
- get_forward_metadata() TransformationMetadata[source]
Get metadata for problem transformation (P1 → P2).
Documents what information is lost when transforming the PROBLEM.
Override this method to provide detailed information about: - Constraints that cannot be represented in target problem - Objectives that are ignored or approximated - Assumptions made during transformation
- Returns:
TransformationMetadata documenting losses in problem transformation
- Default:
Returns exact_transformation() (no losses documented)
Note
Solutions from the target problem always map back MECHANICALLY via back_transform_solution(), but may not satisfy all constraints from the original source problem if this transformation is lossy.
- Example: BinPack → SALBP loses incompatibility constraints.
Solutions from SALBP solvers map back to BinPack allocations, but may violate incompatibility if that constraint was present.
Always verify solutions in the original problem after solving via transformation!
- transform_solution_from_raw_generic_to_specific(raw_sol: RawSolution[Hashable, Hashable, Hashable], source_problem: MultiskillRcpspProblem) MultiskillRcpspSolution[source]
Convert a raw solution (from generic problem) into a specific solution to the source problem.
- Parameters:
source_problem
Returns:
- discrete_optimization.rcpsp_multiskill.transformations.generic_scheduling_impl.transform_solution_from_raw_generic_to_rcpsp_ms(raw_sol: RawSolution[Hashable, Hashable, Hashable], problem: MultiskillRcpspProblem) MultiskillRcpspSolution[source]
Convert generic solution to RCPSP multiskill solution.
- Parameters:
solution
problem
Returns: