public class

KnapsackCapacityPropagatorImpl

extends AbstractKnapsackPropagator
java.lang.Object
   ↳ org.apache.helix.controller.strategy.knapsack.AbstractKnapsackPropagator
     ↳ org.apache.helix.controller.strategy.knapsack.KnapsackCapacityPropagatorImpl

Class Overview

A knapsack propagator that constrains assignments based on knapsack capacity for a given dimension

Based on the C++ knapsack solver in Google's or-tools package.

Summary

Public Constructors
KnapsackCapacityPropagatorImpl(KnapsackState state, long capacity)
Initialize the propagator
Public Methods
void computeProfitBounds()
int getNextItemId()
Protected Methods
void copyCurrentStateToSolutionPropagator(ArrayList<Boolean> solution)
void initPropagator()
boolean updatePropagator(boolean revert, KnapsackAssignment assignment)
[Expand]
Inherited Methods
From class org.apache.helix.controller.strategy.knapsack.AbstractKnapsackPropagator
From class java.lang.Object
From interface org.apache.helix.controller.strategy.knapsack.KnapsackPropagator

Public Constructors

public KnapsackCapacityPropagatorImpl (KnapsackState state, long capacity)

Initialize the propagator

Parameters
state the current knapsack state
capacity the knapsack capacity for this dimension

Public Methods

public void computeProfitBounds ()

public int getNextItemId ()

Protected Methods

protected void copyCurrentStateToSolutionPropagator (ArrayList<Boolean> solution)

protected void initPropagator ()

protected boolean updatePropagator (boolean revert, KnapsackAssignment assignment)