|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.usa.rharder.tabusearch22.TSSolution
The user has complete flexibility in describing a solution. It could be an array of integers or booleans. It could be a collection of objects, some "active" and some not. The important thing is that it stand on its own. As solutions get evaluated here and there in the engine, it is necessary that a solution object be able to completely describe its state, especially if incremental techniques are used to save processing time.
Constructor Summary | |
TSSolution()
Empty constructor |
|
TSSolution(TSSolution copyThis)
Aids in cloning. |
Method Summary | |
abstract java.lang.Object |
clone()
A common Java method that returns of copy of the object. |
double[] |
getObjectiveValue()
This is the value without the penalties. |
double[] |
getPenaltyValue()
Gets the value of the penalties for the solution. |
double[] |
getValue()
If the value has been set for this solution, then the value will be returned. |
void |
setObjectiveValue(double[] objValue)
Generally used by the TSEngine to set the value of the
objective function (without penalties). |
void |
setPenaltyValue(double[] penValue)
Generally used by the TSEngine to set the penalties
for the solution. |
Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public TSSolution()
public TSSolution(TSSolution copyThis)
super( copyThis )
in
a constructor to copy the objective and penalty function
values.copyThis
- solution to copy.Method Detail |
public abstract java.lang.Object clone()
TSSolution
is identical to this
- Overrides:
- clone in class java.lang.Object
this
.public final double[] getValue()
TSEngine
has not yet
set the solution's value.this
).public final void setObjectiveValue(double[] objValue)
TSEngine
to set the value of the
objective function (without penalties).objValue
- The objective function value.public final double[] getObjectiveValue()
public final void setPenaltyValue(double[] penValue)
TSEngine
to set the penalties
for the solution.penValue
- The value of the penalties.public final double[] getPenaltyValue()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |