jenes.tutorials.problem6
Class KnapsackProblem
java.lang.Object
jenes.tutorials.problem6.KnapsackProblem
public class KnapsackProblem
- extends java.lang.Object
Tutorial showing how to minimization and maximization sub-prolems can cohesists in
the breeding structure of Jenes.
This class defines the problem to solve.
- Since:
- 1.0
- Version:
- 1.0
- Author:
- Luigi Troiano, Pierpaolo Lombardi
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KnapsackProblem
public KnapsackProblem(double[] utilities,
double[] weights)
run
public void run()
getCapacity
public double getCapacity()
setCapacity
public void setCapacity(double c)
getUtilities
public double[] getUtilities()
getWeights
public double[] getWeights()
build
public static KnapsackProblem build(int n)
main
public static void main(java.lang.String[] args)