Commit 37dde7c2 authored by Vladislav Kiselev's avatar Vladislav Kiselev

Исправлены конечные положения объектов.

parent a3b849d8
...@@ -314,7 +314,7 @@ public class ConversionUtil { ...@@ -314,7 +314,7 @@ public class ConversionUtil {
writeArray(writer, "is_continuous_operation", isMovingObj); writeArray(writer, "is_continuous_operation", isMovingObj);
} }
{ // Конечные положения объектов. { // Конечные положения объектов.
ArrayList<Integer> finalStates = integerArray(movingObjects.size(), 0); ArrayList<Integer> finalStates = integerArray(movingObjects.size(), -1);
for (MovingObjectState state : task.getVesselEndState()) { for (MovingObjectState state : task.getVesselEndState()) {
finalStates.set(mObjToN.apply(state.getVessel()), getLocNById.apply(state.getLocation().getId(), false)); finalStates.set(mObjToN.apply(state.getVessel()), getLocNById.apply(state.getLocation().getId(), false));
} }
...@@ -580,6 +580,9 @@ public class ConversionUtil { ...@@ -580,6 +580,9 @@ public class ConversionUtil {
result = Integer.parseInt(line); result = Integer.parseInt(line);
continue; continue;
} }
if (line.equals("=====UNSATISFIABLE=====")) {
throw new ParserException("No solution.");
}
break; break;
} }
if (operations == null) { if (operations == null) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment