Example #1
0
    protected override void ThreadFunction()
    {
        //TestProblem p = new TestProblem ();
        //Type t = typeof(TestProblem);
        //Debug.Log (t.AssemblyQualifiedName);
        try
        {
            Debug.Log("ECJ job started");
            FileInputStream input = new FileInputStream(new File("erc.params"));
            state = Evolve.initialize(new ParameterDatabase(
            input), 0);
            state.setup(state, null);

            // Make sure problem has the model in so when it gets cloned it can be used.
            ((UnityProblem)state.evaluator.p_problem).model = unityModel;

            state.run(EvolutionState.C_STARTED_FRESH);
            Debug.Log("ECJ job finished. " + state);
        } catch (Exception e)
        {
            Debug.Log ("ERROR in ecjJob: " + e.ToString ());
            throw e;
        }
    }