Commit 00fb0844 authored by Vladislav Kiselev's avatar Vladislav Kiselev

Refactoring.

parent d233ebf1
...@@ -3,7 +3,11 @@ ...@@ -3,7 +3,11 @@
rm -f raw_result.txt rm -f raw_result.txt
rm -f result.txt rm -f result.txt
java -classpath "../out/production/Conversion" inport.Main to_MiniZinc in.ipp conversion_0.dzn java -classpath "../out/production/Conversion" inport.Main to_MiniZinc_0 in.ipp conversion_0.dzn
mzn2fzn -o model.fzn "../constraints/conversion_0.mzn" conversion_0.dzn
N_LINES=$(wc -l model.fzn)
echo "Model size : $N_LINES"
START=$(date +%s.%N) START=$(date +%s.%N)
...@@ -12,6 +16,6 @@ minizinc --solver Gecode "../constraints/conversion_0.mzn" conversion_0.dzn >> r ...@@ -12,6 +16,6 @@ minizinc --solver Gecode "../constraints/conversion_0.mzn" conversion_0.dzn >> r
END=$(date +%s.%N) END=$(date +%s.%N)
DIFF=$(echo "$END - $START" | bc) DIFF=$(echo "$END - $START" | bc)
echo $(DIFF) echo $DIFF
java -classpath "../out/production/Conversion" inport.Main resolve_result in.ipp raw_result.txt result.txt java -classpath "../out/production/Conversion" inport.Main resolve_result in.ipp raw_result.txt result.txt
This diff is collapsed.
...@@ -11,13 +11,13 @@ public class Main { ...@@ -11,13 +11,13 @@ public class Main {
String type = args[0]; String type = args[0];
switch (type) { switch (type) {
case "to_MiniZinc" : { case "to_MiniZinc_0" : {
String input = args[1]; String input = args[1];
String output = args[2]; String output = args[2];
TaskCase task = new TaskCase(); TaskCase task = new TaskCase();
try { try {
task.deserialize(input); task.deserialize(input);
ConversionUtil.portToMiniZinc(task, output); ConversionUtil.portToMiniZinc_0(task, output);
} catch (IOException ex) { } catch (IOException ex) {
System.out.println(ex.getMessage()); System.out.println(ex.getMessage());
} }
......
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