Commit ad38e1c4 authored by Sulfyderz's avatar Sulfyderz
Browse files

[Error Update]:Correcting the perfom method from ilp_iv the system call of...

[Error Update]:Correcting the perfom method from ilp_iv the system call of which was slower than the rest.
parent 06ece375
......@@ -4,6 +4,7 @@ from scipy.cluster import hierarchy as hac
import matplotlib.pyplot as plt
from scipy import stats
import logging
import time
import os
from s4d.clustering.hac_utils import *
......@@ -27,10 +28,14 @@ class ILP_IV:
f = open(filename, 'w')
self._ilp_write(f)
f.close()
cmd = 'glpsol --lp {} -o {} &> {}'.format(
filename, filename + '.out', filename + '.err')
cmd = 'glpsol --lp {} -o {} &> {}'.format(filename, filename + '.out', filename + '.err')
#print(cmd)
if os.path.exists(filename + '.out'):
os.remove(filename + '.out')
os.system(cmd)
time.sleep(1)
while not os.path.exists(filename + '.out'):
time.sleep(1)
f = open(filename + '.out', 'r')
cluster_dict = self._ilp_read(f)
f.close()
......
Supports Markdown
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