From 62ac9e570c73f270f82ec2fd4ec9765f8e30bdad Mon Sep 17 00:00:00 2001 From: Shuzo Katayama Date: Tue, 22 Jun 2021 12:39:09 -0400 Subject: [PATCH] user specified path --- .idea/misc.xml | 2 +- PSB2_path.txt | 1 + propeller.iml | 3 ++- src/propeller/core.cljc | 9 +++++++++ src/propeller/problems/PSB2_Problems.cljc | 3 +++ 5 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 PSB2_path.txt create mode 100644 src/propeller/problems/PSB2_Problems.cljc diff --git a/.idea/misc.xml b/.idea/misc.xml index 19c1bc7..bce9de7 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -7,7 +7,7 @@ - + \ No newline at end of file diff --git a/PSB2_path.txt b/PSB2_path.txt new file mode 100644 index 0000000..b449bfb --- /dev/null +++ b/PSB2_path.txt @@ -0,0 +1 @@ +/Volumes/Samsung_T5/Evolutionary Computing/PSB2/datasets \ No newline at end of file diff --git a/propeller.iml b/propeller.iml index f3f76e0..f97fb0d 100644 --- a/propeller.iml +++ b/propeller.iml @@ -6,8 +6,8 @@ - + @@ -23,6 +23,7 @@ + diff --git a/src/propeller/core.cljc b/src/propeller/core.cljc index d24adb8..2a500f2 100755 --- a/src/propeller/core.cljc +++ b/src/propeller/core.cljc @@ -12,11 +12,20 @@ (defn -main "Runs propel-gp, giving it a map of arguments." [& args] + ;; Exception for when no args were passed (when (empty? args) (println "You must specify a problem to run.") (println "Try, for example:") (println " lein run software.smallest") (System/exit 1)) + + ;; Setting the path for PSB2 + (when (= (first args) "PSB2-set-path") + (spit "PSB2_path.txt" (second args)) + (println (str "Set path to PSB2 as " (second args))) + (System/exit 1)) + + ;; Creates regular problems (require (symbol (str "propeller.problems." (first args)))) (gp/gp (update-in diff --git a/src/propeller/problems/PSB2_Problems.cljc b/src/propeller/problems/PSB2_Problems.cljc new file mode 100644 index 0000000..9f7b273 --- /dev/null +++ b/src/propeller/problems/PSB2_Problems.cljc @@ -0,0 +1,3 @@ +(ns propeller.problems.PSB2-Problems + (:require [psb2.core :as psb2])) +