Hello,
I've run Eva2 to evaluate a function I've written in Ruby. Then I used Eva2:s ExternalRuntimeProblem module. Have you written such a thing for Opt4j?
Dear Björn,
such a feature is currently not integrated in Opt4J. But is very simple to implement it:
Use the DoubleCreator as Creator.
Use the DoubleCopyDecoder as Decoder
So, you have to write your own Evaluator<DoubleString> that executes the external program (see java.lang.Runtime and the exec method) and read the result. And also a ProblemModule where you configure the Creator, Decoder, and Evaluator, as well as the N Annotation to set the length of the created DoubleString.
Best Regards,
Martin
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you for the reply. Sounds pretty easy. I have limited experience with Java though, would you be interested with a contribution if I manage to add such a feature? Or will you add it your self one day?
Regards
Björn
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I've run Eva2 to evaluate a function I've written in Ruby. Then I used Eva2:s ExternalRuntimeProblem module. Have you written such a thing for Opt4j?
link: http://www.ra.cs.uni-tuebingen.de/software/EvA2/EvA2Doc/EvA2Doc_node14.html
Regards
Björn Bergqvist
Dear Björn,
such a feature is currently not integrated in Opt4J. But is very simple to implement it:
Use the DoubleCreator as Creator.
Use the DoubleCopyDecoder as Decoder
So, you have to write your own Evaluator<DoubleString> that executes the external program (see java.lang.Runtime and the exec method) and read the result. And also a ProblemModule where you configure the Creator, Decoder, and Evaluator, as well as the N Annotation to set the length of the created DoubleString.
Best Regards,
Martin
Thank you for the reply. Sounds pretty easy. I have limited experience with Java though, would you be interested with a contribution if I manage to add such a feature? Or will you add it your self one day?
Regards
Björn
Dear Björn,
I quickly programmed that now, i looks as .
Just have to download this and put it in a "plugins" folder that is in the same directory as the opt4j-2.1.jar.
The source files are . You see that its very simple.
Best Regards,
Martin
: http://lukasiewycz.users.sourceforge.net/files/external/screenshot/screenshot.png
: http://lukasiewycz.users.sourceforge.net/files/external/opt4j.external-2.1.jar
: http://lukasiewycz.users.sourceforge.net/files/external/sources/
Works very good straight away. Thanks.
Björn