示例#1
0
def solve_with_minisat():
    """
    Calls minisat with the specified formula, the number of variables
    and the number of clauses.
    Returns the output filename of the minisat computation.
    """
    logging.debug('Solving with %s' % MINISAT)
    if tools.command_available([MINISAT, INPUT, OUTPUT]):
        process = subprocess.Popen([MINISAT, INPUT, OUTPUT],
                                    stderr=subprocess.PIPE,
                                    stdout=subprocess.PIPE)
        process.wait()
    else:
        logging.error('Minisat could not be found.'
            'Please make sure the executable "%s" available on the path '
            '(e.g. /usr/bin).' % MINISAT)
        sys.exit(1)
    tools.remove(INPUT)
示例#2
0
def validator_available():
    return tools.command_available(["validate", "-h"])
示例#3
0
def minisat_available():
    return tools.command_available([MINISAT, '--help'])
示例#4
0
文件: pddl_planner.py 项目: Gin93/111
def validator_available():
    return tools.command_available(['./validate', '-h'])
def validator_available():
    return tools.command_available(['validate', '-h'])
示例#6
0
def minisat_available():
    return tools.command_available([MINISAT, '--help'])
示例#7
0
文件: ptg.py 项目: siposl/PDDLtoGraph
def validator_available():
    """
    unmodified pyperplan function
    """
    return tools.command_available(['validate', '-h'])