From 1a898f0d9ed617026ad50d6bc61fdee919326e9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Mon, 27 Apr 2015 21:33:40 +0200 Subject: Add output_confs generation to solution apply --- scripts/solution.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'scripts') diff --git a/scripts/solution.py b/scripts/solution.py index 3fddb6b..b3bec30 100644 --- a/scripts/solution.py +++ b/scripts/solution.py @@ -78,6 +78,15 @@ def apply(): solut = f.readline().split() solut.remove('0') # Remove 0 at the end + # Write solution to output_confs file + with open(sf(conf.output_confs), 'a') as f: + iteration = 0 + with open(sf(conf.iteration_file)) as f: + iteration = int(f.readline) + f.write(str(iteration) + ':') + for txt in solut: + f.write(txt + ' ') + f.write('\n') # Write negotation solution to solver_file -- cgit v1.2.3