Free cookie consent management tool by TermsFeed Policy Generator

Changeset 2422 for trunk/sources


Ignore:
Timestamp:
10/08/09 16:25:57 (15 years ago)
Author:
gkronber
Message:

Fixed bugs in CEDMA cockpit:

  • Runs were started for target variables that are turned off
  • Runs were started for deterministic algorithms with the same setting (when using time series settings)

#676 Cockpit for the CEDMA Server to control algorithm settings

Location:
trunk/sources/HeuristicLab.CEDMA.Server/3.3
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.CEDMA.Server/3.3/DispatcherView.Designer.cs

    r2378 r2422  
    3030      this.splitContainer = new System.Windows.Forms.SplitContainer();
    3131      this.learningTaskGroupBox = new System.Windows.Forms.GroupBox();
     32      this.setAlgorithmDefault = new System.Windows.Forms.Button();
    3233      this.autoregressiveLabel = new System.Windows.Forms.Label();
    3334      this.classificationRadioButton = new System.Windows.Forms.RadioButton();
     
    5152      this.testLabel = new System.Windows.Forms.Label();
    5253      this.setAllButton = new System.Windows.Forms.Button();
    53       this.setAlgorithmDefault = new System.Windows.Forms.Button();
    5454      this.splitContainer.Panel1.SuspendLayout();
    5555      this.splitContainer.Panel2.SuspendLayout();
     
    149149      this.learningTaskGroupBox.Text = "Learning task";
    150150      //
     151      // setAlgorithmDefault
     152      //
     153      this.setAlgorithmDefault.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
     154      this.setAlgorithmDefault.Location = new System.Drawing.Point(6, 292);
     155      this.setAlgorithmDefault.Name = "setAlgorithmDefault";
     156      this.setAlgorithmDefault.Size = new System.Drawing.Size(96, 23);
     157      this.setAlgorithmDefault.TabIndex = 36;
     158      this.setAlgorithmDefault.Text = "Use as default";
     159      this.setAlgorithmDefault.UseVisualStyleBackColor = true;
     160      this.setAlgorithmDefault.Click += new System.EventHandler(this.setAlgorithmDefault_Click);
     161      //
    151162      // autoregressiveLabel
    152163      //
     
    369380      this.setAllButton.UseVisualStyleBackColor = true;
    370381      this.setAllButton.Click += new System.EventHandler(this.setAllButton_Click);
    371       //
    372       // setAlgorithmDefault
    373       //
    374       this.setAlgorithmDefault.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
    375       this.setAlgorithmDefault.Location = new System.Drawing.Point(6, 292);
    376       this.setAlgorithmDefault.Name = "setAlgorithmDefault";
    377       this.setAlgorithmDefault.Size = new System.Drawing.Size(96, 23);
    378       this.setAlgorithmDefault.TabIndex = 36;
    379       this.setAlgorithmDefault.Text = "Use as default";
    380       this.setAlgorithmDefault.UseVisualStyleBackColor = true;
    381       this.setAlgorithmDefault.Click += new System.EventHandler(this.setAlgorithmDefault_Click);
    382382      //
    383383      // DispatcherView
  • trunk/sources/HeuristicLab.CEDMA.Server/3.3/GridExecuter.cs

    r2391 r2422  
    101101              try {
    102102                IEngine finishedEngine = jobManager.EndExecuteEngine(finishedResult);
    103                 SetResults(finishedEngine.GlobalScope, finishedAlgorithm.Engine.GlobalScope);
    104                 StoreResults(finishedAlgorithm);
     103                 SetResults(finishedEngine.GlobalScope, finishedAlgorithm.Engine.GlobalScope);
     104                 StoreResults(finishedAlgorithm);
    105105              }
    106106              catch (Exception badEx) {
  • trunk/sources/HeuristicLab.CEDMA.Server/3.3/ProblemSpecification.cs

    r2392 r2422  
    108108      LearningTask = original.LearningTask;
    109109      TargetVariable = original.TargetVariable;
     110      MinTimeOffset = original.MinTimeOffset;
     111      MaxTimeOffset = original.MaxTimeOffset;
     112      AutoRegressive = original.AutoRegressive;
    110113      TrainingSamplesStart = original.TrainingSamplesStart;
    111114      TrainingSamplesEnd = original.TrainingSamplesEnd;
     
    153156        LearningTask.GetHashCode() |
    154157        TargetVariable.GetHashCode() |
     158        MinTimeOffset.GetHashCode() |
     159        MaxTimeOffset.GetHashCode() |
     160        AutoRegressive.GetHashCode() |
    155161        TrainingSamplesStart.GetHashCode() |
    156162        TrainingSamplesEnd.GetHashCode() |
  • trunk/sources/HeuristicLab.CEDMA.Server/3.3/SimpleDispatcher.cs

    r2391 r2422  
    122122    public HeuristicLab.Modeling.IAlgorithm GetNextJob() {
    123123      lock (locker) {
    124         if (activeVariables.Count > 0) {
    125           string[] targetVariables = activeVariables.Keys.ToArray();
     124        if (activeVariables.Where(x => x.Value == true).Count() > 0) {
     125          string[] targetVariables = (from pair in activeVariables
     126                                      where pair.Value == true
     127                                      select pair.Key).ToArray();
    126128          string targetVariable = SelectTargetVariable(targetVariables);
    127129          HeuristicLab.Modeling.IAlgorithm selectedAlgorithm = SelectAndConfigureAlgorithm(targetVariable);
     
    145147      if (selectedAlgorithm != null) {
    146148        // create a clone of the algorithm template before setting the parameters
    147         selectedAlgorithm = (HeuristicLab.Modeling.IAlgorithm)selectedAlgorithm.Clone(); 
     149        selectedAlgorithm = (HeuristicLab.Modeling.IAlgorithm)selectedAlgorithm.Clone();
    148150        SetProblemParameters(selectedAlgorithm, problemSpecifications[targetVariable]);
    149151        if (!(selectedAlgorithm is IStochasticAlgorithm))
     
    188190        timeSeriesAlgo.MinTimeOffset = spec.MinTimeOffset;
    189191        timeSeriesAlgo.MaxTimeOffset = spec.MaxTimeOffset;
    190         timeSeriesAlgo.TrainingSamplesStart = spec.TrainingSamplesStart - spec.MinTimeOffset +1 ; // first possible index is 1 because of differential symbol
     192        timeSeriesAlgo.TrainingSamplesStart = spec.TrainingSamplesStart - spec.MinTimeOffset + 1; // first possible index is 1 because of differential symbol
    191193        if (spec.AutoRegressive) {
    192194          allowedFeatures.Add(spec.Dataset.GetVariableIndex(spec.TargetVariable));
     
    224226    public void EnableAlgorithm(string targetVariable, HeuristicLab.Modeling.IAlgorithm algo) {
    225227      if (!algorithms.ContainsKey(targetVariable)) algorithms.Add(targetVariable, new List<HeuristicLab.Modeling.IAlgorithm>());
    226       if(!algorithms[targetVariable].Contains(algo))
    227       algorithms[targetVariable].Add(algo);
     228      if (!algorithms[targetVariable].Contains(algo))
     229        algorithms[targetVariable].Add(algo);
    228230    }
    229231
Note: See TracChangeset for help on using the changeset viewer.