DataType
- data type of the permutation problem, required to implement the IntegerIdentifiedData
interfacepublic class PermutationProblem<DataType extends org.jamesframework.core.problems.datatypes.IntegerIdentifiedData> extends org.jamesframework.core.problems.AbstractProblem<PermutationSolution,DataType>
PermutationSolution
so that a permutation is coded as an ordered sequence
of these IDs. The data type can be any class or interface that implements/extends the IntegerIdentifiedData
interface which imposes the assignment of IDs to items in the data set.Constructor and Description |
---|
PermutationProblem(org.jamesframework.core.problems.objectives.Objective<? super PermutationSolution,? super DataType> objective,
DataType data)
Create a permutation problem with given objective and data.
|
Modifier and Type | Method and Description |
---|---|
PermutationSolution |
createRandomSolution()
Create a random permutation solution.
|
addMandatoryConstraint, addPenalizingConstraint, evaluate, evaluate, getData, getObjective, getViolatedConstraints, isMinimizing, removeMandatoryConstraint, removePenalizingConstraint, setData, setObjective, validate, validate
public PermutationProblem(org.jamesframework.core.problems.objectives.Objective<? super PermutationSolution,? super DataType> objective, DataType data)
objective
- objective of the problemdata
- underlying dataNullPointerException
- if objective
is null
public PermutationSolution createRandomSolution()
Copyright © 2015. All rights reserved.