Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/05/15 10:19:37 (10 years ago)
Author:
abeham
Message:

#2174:

  • Removed compilation calls from the problem (AfterDeserialization and in cloning constructor) and instead compile instance lazily when accessed
  • Compile support code in ExternalEvaluationProblem lazy
  • Fixed encoding class names in template code files (forgot to add vector)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/SingleObjectiveProgrammableProblem.cs

    r11885 r11900  
    4949      : base(original, cloner) {
    5050      RegisterEvents();
    51       try {
    52         ProblemScript.Compile();
    53       } catch (ProblemDefinitionScriptException e) {
    54         PluginInfrastructure.ErrorHandling.ShowErrorDialog(e);
    55       }
    5651    }
    5752    public override IDeepCloneable Clone(Cloner cloner) { return new SingleObjectiveProgrammableProblem(this, cloner); }
    5853
    59 
    6054    [StorableConstructor]
    6155    private SingleObjectiveProgrammableProblem(bool deserializing) : base(deserializing) { }
    62 
    6356    public SingleObjectiveProgrammableProblem()
    6457      : base() {
    6558      Parameters.Add(new FixedValueParameter<SingleObjectiveProblemDefinitionScript>("ProblemScript", "Defines the problem.", new SingleObjectiveProblemDefinitionScript() { Name = Name }));
    6659      RegisterEvents();
    67 
    68 
    6960    }
    7061
     
    7263    private void AfterDeserialization() {
    7364      RegisterEvents();
    74       try {
    75         ProblemScript.Compile();
    76       } catch (InvalidOperationException) {
    77         //Compilation error
    78       }
    7965    }
    8066
Note: See TracChangeset for help on using the changeset viewer.