def add_exp():
    for task in suites.build_suite(BENCHMARKS_DIR, SUITE):
        run = exp.add_run()
        # Create symbolic links and aliases. This is optional. We
        # could also use absolute paths in add_command().
        run.add_resource('domain', task.domain_file, symlink=True)
        run.add_resource('problem', task.problem_file, symlink=True)
        # We could also use exp.add_resource().
        run.add_command(
            'run-planner',
            [planner_name, '--domain-file', '{domain}', '--instance-file',  '{problem}',  '--json-output-file', 'features.json', '--no-extract-sat'],
            time_limit=1800,
            memory_limit=4096, soft_stdout_limit=None, hard_stdout_limit=None)
        # AbsoluteReport needs the following properties:
        # 'domain', 'problem', 'algorithm', 'coverage'.
        run.set_property('domain', task.domain)
        run.set_property('problem', task.problem)
        run.set_property('algorithm', "features")
        run.set_property('domain_file', task.domain_file)
        run.set_property('problem_file', task.problem_file)
        # Every run has to have a unique id in the form of a list.
        # The algorithm name is only really needed when there are
        # multiple algorithms.
        run.set_property('id', [config_name, task.domain, task.problem])
Пример #2
0
MEMORY_LIMIT = 16384

ATTRIBUTES = ['atoms', 'grounding_time', 'parsing_time', 'total_time']

# Create a new experiment.
exp = Experiment(environment=ENV)

# Add custom parser for Power Lifted.
exp.add_parser('parser.py')

NEW_GROUNDER_CONFIGS = [Configuration('new-grounder', [])]
FD_CONFIGS = [Configuration('fd-grounder', [])]

# Create one run for each instance and each configuration
for config in NEW_GROUNDER_CONFIGS:
    for task in suites.build_suite(BENCHMARKS_DIR, SUITE):
        run = exp.add_run()
        run.add_resource('domain', task.domain_file, symlink=True)
        run.add_resource('problem', task.problem_file, symlink=True)
        run.add_command(
            'run-search',
            [RUN_SCRIPT_DIR + '/ground.py', '-i', task.problem_file],
            time_limit=TIME_LIMIT,
            memory_limit=MEMORY_LIMIT)
        run.set_property('domain', task.domain)
        run.set_property('problem', task.problem)
        run.set_property('algorithm', config.name)
        run.set_property('id', [config.name, task.domain, task.problem])
for config in FD_CONFIGS:
    for task in suites.build_suite(BENCHMARKS_DIR, SUITE):
        run = exp.add_run()
Пример #3
0
 def _get_tasks(self):
     tasks = []
     for benchmarks_dir, suite in self._suites.items():
         tasks.extend(suites.build_suite(benchmarks_dir, suite))
     return tasks
Пример #4
0
 def _problems(self):
     tasks = []
     for benchmark_dir, suite in self.suites.items():
         tasks.extend(suites.build_suite(benchmark_dir, suite))
     return tasks
Пример #5
0
 def _problems(self):
     tasks = []
     for benchmark_dir, suite in self.suites.items():
         tasks.extend(suites.build_suite(benchmark_dir, suite))
     return tasks