forked from GOCompetition/Evaluation
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.py
More file actions
32 lines (27 loc) · 950 Bytes
/
run.py
File metadata and controls
32 lines (27 loc) · 950 Bytes
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
'''
Arun, please copy or revise this file as you need
Jesse will continue to use test.py and test.sh for further development of the evaluation script
'''
import argparse
import evaluation
import csv
def run():
raw = './examples/case2/case.raw'
rop = './examples/case2/case.rop'
con = './examples/case2/case.con'
inl = './examples/case2/case.inl'
sol1 = './examples/case2/sol1.txt'
sol2 = './examples/case2/sol2.txt'
summary = './summary.csv'
detail = './detail.csv'
try:
(obj, cost, penalty, max_obj_viol, max_nonobj_viol, infeas) = evaluation.run(
raw, rop, con, inl, sol1, sol2, summary, detail)
except:
print("exception in evaluation.run")
raise
else:
"""process obj, cost, penalty, max_obj_viol, max_nonobj_viol, infeas
e.g. add info, e.g. run time or a scenario name, and append to a report file"""
if __name__ == '__main__':
run()