FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
Loading...
Searching...
No Matches
org.jacop.constraints.knapsack.KnapsackCloneable Class Reference

A cloneable version of the Knapsack constraint. More...

Inheritance diagram for org.jacop.constraints.knapsack.KnapsackCloneable:

Public Member Functions

 KnapsackCloneable (KnapsackItem[] items, IntVarCloneable cap, IntVarCloneable profit)
 Constructor.
 KnapsackCloneable (int[] profits, int[] weights, IntVarCloneable[] quantity, IntVarCloneable knapsackCapacity, IntVarCloneable knapsackProfit)
 It constructs the knapsack constraint.
KnapsackCloneable cloneInto (StoreCloneable targetStore) throws FailException

Detailed Description

A cloneable version of the Knapsack constraint.

Author
Thomas Leaute

Constructor & Destructor Documentation

◆ KnapsackCloneable() [1/2]

org.jacop.constraints.knapsack.KnapsackCloneable.KnapsackCloneable ( KnapsackItem[] items,
IntVarCloneable cap,
IntVarCloneable profit )

Constructor.

Parameters
itemsthe items in the knapsack
capthe capacity
profitthe profit

Referenced by cloneInto().

◆ KnapsackCloneable() [2/2]

org.jacop.constraints.knapsack.KnapsackCloneable.KnapsackCloneable ( int[] profits,
int[] weights,
IntVarCloneable[] quantity,
IntVarCloneable knapsackCapacity,
IntVarCloneable knapsackProfit )

It constructs the knapsack constraint.

Parameters
profitsthe list of profits, each for the corresponding item no.
weightsthe list of weights, each for the corresponding item no.
quantityfinite domain variable specifying allowed values for the vars.
knapsackCapacityfinite domain variable specifying the capacity limit of the knapsack.
knapsackProfitfinite domain variable defining the profit

Member Function Documentation

◆ cloneInto()

KnapsackCloneable org.jacop.constraints.knapsack.KnapsackCloneable.cloneInto ( StoreCloneable targetStore) throws FailException

The documentation for this class was generated from the following file: