user specified path

This commit is contained in:
Shuzo Katayama 2021-06-22 12:39:09 -04:00
parent 522ca181f9
commit 62ac9e570c
5 changed files with 16 additions and 2 deletions

2
.idea/misc.xml generated
View File

@ -7,7 +7,7 @@
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_13" project-jdk-name="13" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_13" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

1
PSB2_path.txt Normal file
View File

@ -0,0 +1 @@
/Volumes/Samsung_T5/Evolutionary Computing/PSB2/datasets

View File

@ -6,8 +6,8 @@
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/resources" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/dev-resources" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/dev-resources" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
@ -23,6 +23,7 @@
<orderEntry type="library" name="Leiningen: com.google.javascript/closure-compiler-unshaded:v20170910" level="project" />
<orderEntry type="library" name="Leiningen: com.google.jsinterop/jsinterop-annotations:1.0.0" level="project" />
<orderEntry type="library" name="Leiningen: com.google.protobuf/protobuf-java:3.0.2" level="project" />
<orderEntry type="library" name="Leiningen: net.clojars.schneau/psb2:1.0.0" level="project" />
<orderEntry type="library" name="Leiningen: nrepl:0.6.0" level="project" />
<orderEntry type="library" name="Leiningen: org.clojure/clojure:1.10.0" level="project" />
<orderEntry type="library" name="Leiningen: org.clojure/clojurescript:1.9.946" level="project" />

View File

@ -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

View File

@ -0,0 +1,3 @@
(ns propeller.problems.PSB2-Problems
(:require [psb2.core :as psb2]))