public abstract class AbstractGenericSolution<T,P extends Problem> extends Object implements Solution<T>
| Modifier and Type | Field and Description |
|---|---|
protected Map<Object,Object> |
attributes |
protected int |
numberOfViolatedConstraints |
protected double |
overallConstraintViolationDegree |
protected P |
problem |
protected JMetalRandom |
randomGenerator |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractGenericSolution(P problem)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
Object |
getAttribute(Object id) |
int |
getNumberOfObjectives() |
int |
getNumberOfVariables() |
int |
getNumberOfViolatedConstraints() |
double |
getObjective(int index) |
double |
getOverallConstraintViolationDegree() |
T |
getVariableValue(int index) |
int |
hashCode() |
protected void |
initializeObjectiveValues() |
void |
setAttribute(Object id,
Object value) |
void |
setNumberOfViolatedConstraints(int numberOfViolatedConstraints) |
void |
setObjective(int index,
double value) |
void |
setOverallConstraintViolationDegree(double violationDegree) |
void |
setVariableValue(int index,
T value) |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcopy, getVariableValueStringprotected double overallConstraintViolationDegree
protected int numberOfViolatedConstraints
protected final JMetalRandom randomGenerator
protected AbstractGenericSolution(P problem)
public void setAttribute(Object id, Object value)
setAttribute in interface Solution<T>public Object getAttribute(Object id)
getAttribute in interface Solution<T>public void setObjective(int index,
double value)
setObjective in interface Solution<T>public double getObjective(int index)
getObjective in interface Solution<T>public T getVariableValue(int index)
getVariableValue in interface Solution<T>public void setVariableValue(int index,
T value)
setVariableValue in interface Solution<T>public int getNumberOfVariables()
getNumberOfVariables in interface Solution<T>public int getNumberOfObjectives()
getNumberOfObjectives in interface Solution<T>public double getOverallConstraintViolationDegree()
getOverallConstraintViolationDegree in interface Solution<T>public void setOverallConstraintViolationDegree(double violationDegree)
setOverallConstraintViolationDegree in interface Solution<T>public int getNumberOfViolatedConstraints()
getNumberOfViolatedConstraints in interface Solution<T>public void setNumberOfViolatedConstraints(int numberOfViolatedConstraints)
setNumberOfViolatedConstraints in interface Solution<T>protected void initializeObjectiveValues()
Copyright © 2015. All rights reserved.