Package es.urjc.etsii.grafo.services
Class IOManager<S extends Solution<S,I>,I extends Instance>
java.lang.Object
es.urjc.etsii.grafo.services.IOManager<S,I>
- Type Parameters:
S
- Solution classI
- Instance class
IO Service to export solutions, errors and load instances
-
Constructor Summary
ConstructorsConstructorDescriptionIOManager
(ErrorConfig errorConfig, List<SolutionSerializer<S, I>> solutionSerializers) Initialize IOManager -
Method Summary
Modifier and TypeMethodDescriptionvoid
Export an error to diskvoid
exportSolution
(WorkUnitResult<S, I> r, SolutionExportFrequency current) Write a solution to disk.
-
Constructor Details
-
IOManager
Initialize IOManager- Parameters:
errorConfig
- error configurationsolutionSerializers
- solution serializers
-
-
Method Details
-
exportSolution
Write a solution to disk.- Parameters:
r
- work unit resultcurrent
- current frequency
-
exportError
public void exportError(String experimentName, Algorithm<S, I> alg, I i, Throwable t, String stacktrace) Export an error to disk- Parameters:
experimentName
- current experiment namealg
- algorithm where this error generated fromi
- instance being solved when the error was thrownt
- Error thrownstacktrace
- Error stacktrace as string
-