Menu

External Runtime Problem

bjornthe
2009-11-09
2013-02-08
  • bjornthe

    bjornthe - 2009-11-09

    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

     
  • Martin Lukasiewycz

    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

     
  • bjornthe

    bjornthe - 2009-11-12

    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

     
  • bjornthe

    bjornthe - 2009-11-13

    Works very good straight away. Thanks.

    Björn

     

Log in to post a comment.