Commit 2de2eb5b authored by Bowen Wu's avatar Bowen Wu
Browse files

Change scheduling

parent 5922bbc0
......@@ -57,7 +57,7 @@ class OptFuzzer(object):
"mut_method" : "",
"mps" : load_mps_dict(s),
}
heapq.heappush(self.queue, ((-0.5, self.next_id), mutant))
heapq.heappush(self.queue, ((-1, self.next_id), mutant))
self.next_id += 1
# self.queue.put_nowait(mutant)
print("Seeds initialized")
......@@ -66,6 +66,7 @@ class OptFuzzer(object):
# parent = self.queue.get()
parent_ent = heapq.heappop(self.queue)
parent = parent_ent[1]
# print(parent_ent[0])
mps = deepcopy(parent["mps"])
idx = 0
......@@ -248,6 +249,7 @@ def main():
grb = GurobiSolver()
ts = str(time.time())
print("Timestamp = ", ts)
save_path = os.path.join(args.save_path, ts)
checkpoint_freq = args.ckpt_freq
checkpoint_path = os.path.join(args.ckpt_path, ts)
......
......@@ -22,7 +22,7 @@ status_text = {
TIME_LIMIT_EXCEEDED : "time limit exceeded",
}
MAX_TIME_LIMIT = 20
MAX_TIME_LIMIT = 5
class Solver(object):
def __init__(self, verbose = False, timeout = True) -> None:
......
......@@ -21,7 +21,7 @@ def replay(path):
if grb_sol["status"] == OPTIMAL:
print(", Obj Val = ", grb_sol["obj_val"], "\n")
cbc_solution(mps)
# cbc_solution(mps)
def cbc_solution(mps):
......@@ -33,4 +33,4 @@ def cbc_solution(mps):
if __name__ == "__main__":
assert len(sys.argv) >= 2, "Number of arguments must be larger than 2"
replay(sys.argv[1])
\ No newline at end of file
replay(sys.argv[1])
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