public class KnapsackExample extends ExampleFD
Modifier and Type | Field and Description |
---|---|
String[] |
args
It stores the parameters of the main function to be
used by the model functions.
|
Constructor and Description |
---|
KnapsackExample() |
Modifier and Type | Method and Description |
---|---|
static void |
main(String[] args)
It executes the two different models to find a solution to a knapsack problem.
|
void |
model()
It specifies a standard way of modeling the problem.
|
void |
modelBasic()
It creates a model where quantity variable is allowed only to be
between 0 and 1, so if the original description allows n items
n copies of that items must be created.
|
void |
modelBoth()
It does not use Knapsack constraint only SumWeight constraints.
|
void |
modelNoKnapsackConstraint()
It does not use Knapsack constraint only SumWeight constraints.
|
creditSearch, getSearch, getSearchVariables, getStore, printMatrix, search, searchAllAtOnce, searchAllOptimal, searchLDS, searchMasterSlave, searchMaxRegretOptimal, searchMiddle, searchMostConstrainedStatic, searchOptimal, searchSmallestDomain, searchSmallestMedian, searchSmallestMiddle, searchSmallestMin, searchWeightedDegree, searchWithMaxRegret, searchWithRestarts, shavingSearch
public String[] args
public void model()
ExampleFD
public void modelNoKnapsackConstraint()
public void modelBoth()
public void modelBasic()
public static void main(String[] args)
args
- Copyright © 2015. All rights reserved.