-
Notifications
You must be signed in to change notification settings - Fork 21
Description
In order to get #include "PTI.h" to run in tutorial 7 I needed to create a new project named TuneFiringRates. In the project's CMakeLists.txt I added each .cpp file in tools/pti to "# Targets add_executable".
For example, on my computer (Ubuntu 21.10) this was:
# Targets
add_executable(TuneFiringRates
src/main_TuneFiringRates.cpp
/comp_neuro/Software/CARLsim6-feat-ca3net/tools/pti/PTI.cpp
/comp_neuro/Software/CARLsim6-feat-ca3net/tools/pti/ParameterInstances.cpp
/comp_neuro/Software/CARLsim6-feat-ca3net/tools/pti/Logger.cpp
/comp_neuro/Software/CARLsim6-feat-ca3net/tools/pti/Util.cpp
)
I followed the instructions in tutorial 7 and it compiled TuneFiringRates successfully. Without adding the .cpp files to CMakeLists.txt it did not compile due to errors. Because CARLsim6 uses cmake the instructions in tutorial 7 should be updated to explain how to compile projects with PTI when cmake is used.
A change in CARLsim6 tutorial 7 documentation compared to recent versions is that it directs users to use a class named "CommandProblem" but this class is not present in the current ECJ official release (version 27). This class is however present in the latest ECJ Github code (link). Therefore, users will need to download the Github code and compile the class from the .java file. Compilation instructions are here. I was able to compile it with the makefile build instructions. Another issue is that even the latest Github code is not set to compile that class by default. Users need to update ECJ's Makefile by adding "ec/app/command/*.java " to the "SRCS =" section. Then compiling ECJ will include generation of the CommandProblem class. A note is that I did both "make" and "make jar" but maybe just "make jar" is sufficient to have the class usable.
Once this class is available users also need to set "eval.problem.command" equal to the compiled CARLsim file (TuneFiringRates) in this case. The tutorial instructions describe this as "./.build/TuneFiringRates" but typically the current CARLsim creates "/.build/projects/TuneFiringRates/TuneFiringRates" as a compiled file for a project. This can be further explained and updated in the tutorial for clarification. Once these step have been taken I have successfully run the tutorial simulation to completion from what I understand. Curiously, in my results every of the 1000 evaluations had the same fitness score but at least the simulation completed processing.