-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrlfap.py
More file actions
52 lines (43 loc) · 1.35 KB
/
rlfap.py
File metadata and controls
52 lines (43 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#! /usr/bin/env python
import os
import sys
def graph(cmd, nb, outputFile):
nameFiles = ["03","04","05","06","07","10","11","12","13"]
for f in nameFiles:
path = "celar_bk/FullRLFAP/GRAPH/graph" + f
fileBegin = "echo f:\t" + path + " >> " + outputFile
dom = path + "/dom.txt "
dom = dom + path + "/varm.txt "
dom = dom + path + "/ctrm.txt "
cmdIn = cmd + dom + " >> " + outputFile
os.system(fileBegin)
print fileBegin
for i in range(int(nb)):
print i
os.system(cmdIn)
def celar(cmd, nb, outputFile):
nameFiles = ["01", "02","03","04","05","06","07","08", "09","11"]
for f in nameFiles:
path = "celar_bk/CELAR/scen" + f
fileBegin = "echo f:\t" + path + " >> " + outputFile
dom = path + "/DOMt.TXT "
dom = dom + path + "/VARt.TXT "
dom = dom + path + "/CTRt.TXT s "
cmdIn = cmd + dom + " >> " + outputFile
os.system(fileBegin)
print fileBegin
for i in range(int(nb)):
print i
os.system(cmdIn)
def delegator():
args = sys.argv
cmd = args[1]
nb = args[2]
outputFile = args[3]
#print nb
#print outputFile
cmd = "./" + cmd + " "
celar(cmd, nb,outputFile)
graph(cmd, nb,outputFile)
if __name__ == '__main__':
delegator()