Commit 672e75d1 authored by danfis's avatar danfis

bin/op-mutex: Added more options.

parent 2e39582b
...@@ -28,17 +28,20 @@ ...@@ -28,17 +28,20 @@
#include "plan/op_mgroup.h" #include "plan/op_mgroup.h"
#include "plan/op_mutex_pair.h" #include "plan/op_mutex_pair.h"
#include "plan/op_mutex_infer.h" #include "plan/op_mutex_infer.h"
#include "plan/hm.h"
static struct { static struct {
const char *domain_pddl; const char *domain_pddl;
const char *problem_pddl; const char *problem_pddl;
int max_mem; int max_mem;
int max_time; int max_time;
int disable_reduce;
} opt = { } opt = {
NULL, /* domain_pddl */ NULL, /* domain_pddl */
NULL, /* problem_pddl */ NULL, /* problem_pddl */
-1, /* max_mem */ -1, /* max_mem */
1800, /* max_time: 30 min */ 1800, /* max_time: 30 min */
0, /* .disable_reduce */
}; };
static pthread_t th_time_watchdog; static pthread_t th_time_watchdog;
...@@ -102,6 +105,8 @@ static int options(int argc, char *argv[]) ...@@ -102,6 +105,8 @@ static int options(int argc, char *argv[])
"Maximal memory (peak memory) in MB. (default: unlimited)"); "Maximal memory (peak memory) in MB. (default: unlimited)");
optsAddDesc("max-time", 0x0, OPTS_INT, &opt.max_time, NULL, optsAddDesc("max-time", 0x0, OPTS_INT, &opt.max_time, NULL,
"Time limit in seconds. (default: 30 min)"); "Time limit in seconds. (default: 30 min)");
optsAddDesc("disable-reduce", 0x0, OPTS_NONE, &opt.disable_reduce, NULL,
"Disables initial pruning of the planning task.");
if (opts(&argc, argv) != 0){ if (opts(&argc, argv) != 0){
return -1; return -1;
...@@ -192,12 +197,17 @@ static int opMutexes(plan_strips_t *strips, bor_err_t *err) ...@@ -192,12 +197,17 @@ static int opMutexes(plan_strips_t *strips, bor_err_t *err)
"fam", "fam",
"op-fact", "op-fact",
"m-M", "m-M",
"single-fact-proj" "irreversible-fact"
}; };
plan_op_mutex_pairs_t op_mutex_m[num]; plan_op_mutex_pairs_t op_mutex_m[num];
if (reduce(strips, &mutex, err) != 0) if (opt.disable_reduce){
BOR_TRACE_RET(err, -1); planMutexPairsInitStrips(&mutex, strips);
planH2ReachabilityOnlyMutex(&mutex, strips);
}else{
if (reduce(strips, &mutex, err) != 0)
BOR_TRACE_RET(err, -1);
}
BOR_INFO2(err, "Computing symmetries:"); BOR_INFO2(err, "Computing symmetries:");
planSymInitPDG(&sym, strips); planSymInitPDG(&sym, strips);
......
Markdown is supported
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