def __call__(self, task, stm_queue = None, solver_id = None): parse = cargo.curry(parse_scip, task.opb.N, task.opb.objective is not None) return \ borg.solver_io.RunningSolver( parse, self._command, self._root(), task.path, stm_queue = stm_queue, solver_id = solver_id, )
def __call__(self, task, stm_queue = None, solver_id = None): parse = cargo.curry(parse_opbdp, task.opb.N, task.opb.objective is not None) nl_flag = ["-n"] if task.nonlinear else [] return \ borg.solver_io.RunningSolver( parse, ["{root}/opbdp-1.1.3/opbdp", "-s", "-v1"] + nl_flag + ["{task}"], task.path, stm_queue = stm_queue, solver_id = solver_id, )
def build_minion_pb_solver(task, stm_queue = None, solver_id = None): input_path = task.support_paths.get("minion") if input_path is None: (fd, input_path) = tempfile.mkstemp(suffix = ".minion") task.support_paths["minion"] = input_path with os.fdopen(fd, "w") as input_file: write_minion_from_pb(task.opb, input_file) logger.info("wrote minion input file to %s", input_path) return \ borg.solver_io.RunningSolver( cargo.curry(parse_minion, task.opb), ["{root}/minion-0.12/bin/minion", "-noresume", "{task}"], input_path, stm_queue = stm_queue, solver_id = solver_id, )