discrete_optimization.maximum_independent_set.transformations package

Submodules

discrete_optimization.maximum_independent_set.transformations.to_generic module

Transformation from Knapsack to GenSchedulingImpl

class discrete_optimization.maximum_independent_set.transformations.to_generic.MisToGenericSchedulingTransformation[source]

Bases: ProblemTransformation[MisProblem, MisSolution, GenericSchedulingImplProblem, GenericSchedulingImplSolution]

Transform MIS to GenericSchedulingImpl.

back_transform_solution(solution: GenericSchedulingImplSolution, source_problem: MisProblem) → MisSolution[source]

Transform GenericSchedulingImpl solution back to Knapsack solution.

Returns:

Equivalent Knapsack solution

get_forward_metadata() → TransformationMetadata[source]

Metadata for forward problem transformation (MIS → GenSchedulingImpl).

This direction is EXACT: all constraints can be represented in GenSchedulingImpl.

transform_problem(source_problem: MisProblem) → GenericSchedulingImplProblem[source]

Transform MisProblem to GenericSchedulingImpl problem.

Parameters:

source_problem – MisProblem problem instance

Returns:

Equivalent GenericSchedulingImpl problem

Module contents