Class FLPSolutionExporter
java.lang.Object
es.urjc.etsii.grafo.io.serializers.SolutionSerializer<FLPSolution, FLPInstance>
es.urjc.etsii.grafo.flayouts.io.FLPSolutionExporter
Serialize solutions using a custom format
Each row represents a facility row, with positive numbers being the facility id, and negative numbers a fake facility and its width.
Example: 1 3 5 -2 --> Facility 1, 3 and 5, and a fake facility with width 2.
-
Field Summary
Fields inherited from class SolutionSerializer
config -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new solution serializer with the given config -
Method Summary
Modifier and TypeMethodDescriptionvoidexport(BufferedWriter writer, WorkUnitResult<FLPSolution, FLPInstance> result) Custom export implementation.Methods inherited from class SolutionSerializer
export, exportSolution, getConfig, getFilename, isEnabled, toString
-
Constructor Details
-
FLPSolutionExporter
Create a new solution serializer with the given config- Parameters:
config-
-
-
Method Details
-
export
public void export(BufferedWriter writer, WorkUnitResult<FLPSolution, FLPInstance> result) throws IOException Description copied from class:SolutionSerializerCustom export implementation. Exports the given solution to disk. You do not need to handle IOExceptions. If an IOException occurs, the given solution export is skipped.- Specified by:
exportin classSolutionSerializer<FLPSolution, FLPInstance>- Parameters:
writer- Output, write data hereresult- Solution to export- Throws:
IOException- exception thrown in case something goes wrong
-