Record Class SolutionGeneratedEvent
java.lang.Object
java.lang.Record
es.urjc.etsii.grafo.events.types.SolutionGeneratedEvent
- All Implemented Interfaces:
MorkEvent
public record SolutionGeneratedEvent(UUID resultId, boolean success, String experimentName, String instanceName, String algorithmName, String iteration, Map<String,Double> objectives, double score, long executionTime, long timeToBest)
extends Record
implements MorkEvent
Lightweight event triggered each time an algorithm finishes creating a result.
-
Constructor Summary
ConstructorsConstructorDescriptionSolutionGeneratedEvent(WorkUnitResult<?, ?> result) Create event from stored result data.SolutionGeneratedEvent(UUID resultId, boolean success, String experimentName, String instanceName, String algorithmName, String iteration, Map<String, Double> objectives, double score, long executionTime, long timeToBest) Creates an instance of aSolutionGeneratedEventrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thealgorithmNamerecord component.final booleanIndicates whether some other object is "equal to" this one.longReturns the value of theexecutionTimerecord component.Returns the value of theexperimentNamerecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theinstanceNamerecord component.Returns the value of theiterationrecord component.Returns the value of theobjectivesrecord component.resultId()Returns the value of theresultIdrecord component.doublescore()Returns the value of thescorerecord component.booleansuccess()Returns the value of thesuccessrecord component.longReturns the value of thetimeToBestrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SolutionGeneratedEvent
public SolutionGeneratedEvent(UUID resultId, boolean success, String experimentName, String instanceName, String algorithmName, String iteration, Map<String, Double> objectives, double score, long executionTime, long timeToBest) Creates an instance of aSolutionGeneratedEventrecord class.- Parameters:
resultId- the value for theresultIdrecord componentsuccess- the value for thesuccessrecord componentexperimentName- the value for theexperimentNamerecord componentinstanceName- the value for theinstanceNamerecord componentalgorithmName- the value for thealgorithmNamerecord componentiteration- the value for theiterationrecord componentobjectives- the value for theobjectivesrecord componentscore- the value for thescorerecord componentexecutionTime- the value for theexecutionTimerecord componenttimeToBest- the value for thetimeToBestrecord component
-
SolutionGeneratedEvent
Create event from stored result data.- Parameters:
result- stored work-unit result
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
resultId
Returns the value of theresultIdrecord component.- Returns:
- the value of the
resultIdrecord component
-
success
public boolean success()Returns the value of thesuccessrecord component.- Returns:
- the value of the
successrecord component
-
experimentName
Returns the value of theexperimentNamerecord component.- Returns:
- the value of the
experimentNamerecord component
-
instanceName
Returns the value of theinstanceNamerecord component.- Returns:
- the value of the
instanceNamerecord component
-
algorithmName
Returns the value of thealgorithmNamerecord component.- Returns:
- the value of the
algorithmNamerecord component
-
iteration
Returns the value of theiterationrecord component.- Returns:
- the value of the
iterationrecord component
-
objectives
-
score
public double score()Returns the value of thescorerecord component.- Returns:
- the value of the
scorerecord component
-
executionTime
public long executionTime()Returns the value of theexecutionTimerecord component.- Returns:
- the value of the
executionTimerecord component
-
timeToBest
public long timeToBest()Returns the value of thetimeToBestrecord component.- Returns:
- the value of the
timeToBestrecord component
-