aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2015-04-27 21:33:40 +0200
committerKarel Kočí <cynerd@email.cz>2015-04-27 21:33:40 +0200
commit1a898f0d9ed617026ad50d6bc61fdee919326e9e (patch)
tree2a00d69b213239072731bad9e3b8eeabb637f3d0 /scripts
parente89081c8ae3ba5cc42a7f387b267f02ea5a4e8f1 (diff)
downloadlinux-conf-perf-1a898f0d9ed617026ad50d6bc61fdee919326e9e.tar.gz
linux-conf-perf-1a898f0d9ed617026ad50d6bc61fdee919326e9e.tar.bz2
linux-conf-perf-1a898f0d9ed617026ad50d6bc61fdee919326e9e.zip
Add output_confs generation to solution apply
Diffstat (limited to 'scripts')
-rw-r--r--scripts/solution.py9
1 files changed, 9 insertions, 0 deletions
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