be.cetic.ddolibscala.examples.layered.knapsack

Members list

Type members

Classlikes

Example of KnapSack resolution with DDO Solver.

Example of KnapSack resolution with DDO Solver.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
class KnapSack(val capa: Int, val profit: Array[Int], val weight: Array[Int]) extends Problem[Int]

Represents an instance of the Knapsack Problem as a be.cetic.ddolibscala.layered.modeling.Problem.

Represents an instance of the Knapsack Problem as a be.cetic.ddolibscala.layered.modeling.Problem.

The problem consists of choosing a subset of items to maximize total profit without exceeding a fixed capacity. Each item can either be taken or left out.

The state of the problem is represented by an Int indicating the remaining capacity.

Value parameters

capa

the total capacity of the knapsack

profit

the profit of each item

weight

the weight of each item

Attributes

Companion
object
Supertypes
trait Problem[Int]
trait Problem[Int]
class Object
trait Matchable
class Any
object KnapSack

Companion object of the KnapSack class.

Companion object of the KnapSack class.

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
KnapSack.type
class KnapSackFlb(problem: KnapSack) extends FastLowerBound[Int]

Compute a be.cetic.ddolibscala.layered.modeling.FastLowerBound for the KnapSack Problem.

Compute a be.cetic.ddolibscala.layered.modeling.FastLowerBound for the KnapSack Problem.

Value parameters

problem

the associated KnapSack problem instance

Attributes

Supertypes
trait FastLowerBound[Int]
trait FastLowerBound[Int]
class Object
trait Matchable
class Any
class KnapSackRanking extends StateRanking[Int]

Implements a ranking strategy for states in the KnapSack Problem.

Implements a ranking strategy for states in the KnapSack Problem.

The ranking is based on the fact that low capacity offers lower payoff

Attributes

Supertypes
trait StateRanking[Int]
trait StateRanking[Int]
trait Comparator[Int]
class Object
trait Matchable
class Any
Show all
class KnapSackRelaxation extends Relaxation[Int]

Relaxation operators for the Knapsack Problem.

Relaxation operators for the Knapsack Problem.

Merging takes the maximum remaining capacity among the merged states, so that no feasible decision is ever lost: any item that fit in one of the original states still fits in the merged one.

The cost of an edge redirected to a merged node does not need to be adjusted.

Attributes

Supertypes
trait Relaxation[Int]
trait Relaxation[Int]
class Object
trait Matchable
class Any