Class Context
java.lang.Object
es.urjc.etsii.grafo.util.Context
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic interfaceAutoCloseable objective tracking suspension scope.static class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddTimeEvent(String clazz, String methodName, long enter, long exit) static voiddestroy()Destroy the solver context associated with the current thread.evalDeltas(M move) evalSolution(S solution) static RandomGeneratorstatic booleanstatic booleanCheck whether automatic objective tracking is suspended for the current thread.static voidreset()Recreate the solver context associated with the current thread.static <T> Future<T> static <T> Future<T> Temporarily suspend automatic objective tracking for the current thread.validate(S solution)
-
Constructor Details
-
Context
public Context()
-
-
Method Details
-
destroy
public static void destroy()Destroy the solver context associated with the current thread. Does not affect the context of other threads. -
reset
public static void reset()Recreate the solver context associated with the current thread. Does not affect the context of other threads. -
suspendObjectiveTracking
Temporarily suspend automatic objective tracking for the current thread. Suspensions may be nested and should be managed with try-with-resources. The suspension does not propagate to child threads.- Returns:
- scope that resumes objective tracking when closed
-
isObjectiveTrackingSuspended
public static boolean isObjectiveTrackingSuspended()Check whether automatic objective tracking is suspended for the current thread.- Returns:
- true if objective tracking is suspended, false otherwise
-
validate
-
getRandom
-
isExecutionQueueAvailable
public static boolean isExecutionQueueAvailable() -
submit
-
submit
-
getMainObjective
-
getObjectives
-
getObjectivesW
-
evalSolution
-
evalDeltas
-
addTimeEvent
-