Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/15/13 15:50:53 (12 years ago)
Author:
fschoepp
Message:

#1888:

  • Model: OptimizationScenario may be a tree of algorithms (and problems)
  • Model: Renamed InputParameters to ProblemParameters (as they are the parameters of a problem)
  • Model: Added JobExecutionDetails which contain Repetitions + Group (resource to use)
  • ScenarioParser parses the new XML scenario files
  • Website + Model: You are now able to add/remove rows from a table (no JavaScript involved yet)
  • Website + Controller: Added repetitions (enables batch jobs) and group (resource to use) to OaaS which will be used by the controller to schedule the job
  • Website: Updated templates to use new model structure
  • Website + Scenarios: Added the new algorithm Benchmark Algorithm
  • Controller: Added a singleton to make the (Azure/Mockup)-DAL exchangeable
  • Controller: Added mockup classes for DAL + IScenarioManager
  • Website/Result Page: Line Diagrams will be added via JavaScript, crawling their data using AJAX
  • Website: Most configuration parameters can be set in the ServiceDefinition directly
  • Added a mockup for the Membership classes: These can be used if no network connection is available or if other parts of the app shall be tested
  • Scenarios: Updated TSP mappings to new xsd
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/OaaS/HeuristicLab.Services.Optimization.Controller/Interfaces/Model/ControllerModel.cs

    r9062 r9166  
    4545    public string[] RowNames { get; set; }
    4646
     47    public void CopyRow(int index) {
     48      var newData = new double[Value.Length + 1][];
     49      var copyRow = new double[Value[index].Length];
     50      for (var i = 0; i < copyRow.Length; i++) {
     51        copyRow[i] = Value[index][i];
     52      }
     53      for (var i = 0; i < newData.Length; i++) {
     54        if (i < index) {
     55          newData[i] = Value[i];
     56        }
     57        else if (i == index) {
     58          newData[i] = copyRow;
     59        }
     60        else if (i > index) {
     61          newData[i] = Value[i - 1];
     62        }
     63      }
     64      Value = newData;
     65    }
     66
     67    public void DeleteRow(int index) {
     68      if (Value.Length == 1)
     69        return;
     70
     71      var newData = new double[Value.Length - 1][];
     72      for (var i = 0; i < Value.Length; i++) {
     73        if (i < index) {
     74          newData[i] = Value[i];
     75        }
     76        else if (i > index) {
     77          newData[i - 1] = Value[i];
     78        }
     79      }
     80      Value = newData;
     81    }
     82
    4783    public override bool TrySetFromString(string input) {
    4884      var splitted = input.Split(':');
     
    6197        return false;
    6298      // very, very buggy
    63       if (i >= Value.Length || j >= Value[0].Length ) {
     99      /*if (i >= Value.Length || j >= Value[0].Length ) {
    64100        double[][] valueArr = new double[i >= Value.GetLength(0) ? i : Value.GetLength(0)][];       
    65101        for (int k = 0; k < Value.Length; k++) {
     
    70106        }
    71107        Value = valueArr;
    72       }
     108      }*/
    73109
    74110      Value[i][j] = value;
     
    186222
    187223  [DataContract]
    188   public class InputParameters {
     224  public class ProblemParameters {
    189225    private IList<Parameter> items = new List<Parameter>();
    190226
     
    226262
    227263  [DataContract]
     264  public class Problem {
     265    public Problem() { Parameters = new ProblemParameters(); }
     266
     267    [DataMember]
     268    public ProblemParameters Parameters { get; set; }
     269
     270    [DataMember]
     271    public string Class { get; set; }
     272  }
     273
     274  [DataContract]
     275  public class Algorithm {
     276    public Algorithm() { Parameters = new AlgorithmParameters(); }
     277
     278    [DataMember]
     279    public AlgorithmParameters Parameters { get; set; }
     280
     281    [DataMember]
     282    public Problem Problem{ get; set; }
     283
     284    [DataMember]
     285    public IList<Algorithm> ChildAlgorithms { get; set; }
     286
     287    [DataMember]
     288    public string Class { get; set; }
     289
     290    [DataMember]
     291    public string Mapper { get; set; }
     292  }
     293
     294  [DataContract]
    228295  public class OptimizationScenario {
    229296    [DataMember]
     297    public string Id { get; set; }
     298   
     299    [DataMember]
     300    public IList<Algorithm> Algorithm { get; set; }
     301
     302    public Algorithm FirstAlgorithm { get { return Algorithm.FirstOrDefault(); } } 
     303  }
     304
     305  [DataContract]
     306  public class Experiment {
     307    [DataMember]
     308    public IList<OptimizationScenario> Scenarios { get; set; }
     309
     310    public Experiment() {
     311      Scenarios = new List<OptimizationScenario>();
     312    }
     313  }
     314
     315  [DataContract]
     316  public enum JobState {
     317    [EnumMember]
     318    Waiting,
     319    [EnumMember]
     320    Calculating,
     321    [EnumMember]
     322    Aborted,
     323    [EnumMember]
     324    Failed,
     325    [EnumMember]
     326    Finished
     327  }
     328
     329  [DataContract]
     330  public class JobExecutionDetails {
     331    [DataMember]
     332    public int Repititions { get; set; }
     333
     334    [DataMember]
     335    public string JobTitle { get; set; }
     336
     337    [DataMember]
     338    public string Group { get; set; }
     339  }
     340
     341  [DataContract]
     342  public class Job {
     343    [DataMember]
     344    public string Id { get; set; }
     345
     346    [DataMember]
     347    public JobState State { get; set; }
     348
     349    [DataMember]
    230350    public string Name { get; set; }
    231351
    232352    [DataMember]
    233     public string ProblemType { get; set; }
    234 
    235     [DataMember]
    236     public string AlgorithmType { get; set; }
    237 
    238     [DataMember]
    239     public string MapperType { get; set; }
    240 
    241     private InputParameters inputParams = new InputParameters();
    242 
    243     [DataMember]
    244     public InputParameters InputParameters {
    245       get { return inputParams; }
    246       set { inputParams = value; }
    247     }
    248 
    249 
    250     private AlgorithmParameters algorithmParameters = new AlgorithmParameters();
    251 
    252     [DataMember]
    253     public AlgorithmParameters AlgorithmParameters {
    254       get { return algorithmParameters; }
    255       set { algorithmParameters = value; }
    256     }
    257   }
    258 
    259   [DataContract]
    260   public enum JobState {
    261     [EnumMember]
    262     Waiting,
    263     [EnumMember]
    264     Calculating,
    265     [EnumMember]
    266     Aborted,
    267     [EnumMember]
    268     Failed,
    269     [EnumMember]
    270     Finished
    271   }
    272 
    273   [DataContract]
    274   public class Job {
     353    public string Resource { get; set; }
     354
     355    [DataMember]
     356    public DateTime DateCreated { get; set; }
     357  }
     358
     359  [DataContract]
     360  public class Run {
    275361    [DataMember]
    276362    public string Id { get; set; }
    277363
    278364    [DataMember]
    279     public JobState State { get; set; }
    280 
    281     [DataMember]
    282365    public string Name { get; set; }
    283366
    284367    [DataMember]
    285     public string Resource { get; set; }
    286 
    287     [DataMember]
    288     public DateTime DateCreated { get; set; }
    289   }
    290 
    291   [DataContract]
    292   public class Run {
    293     [DataMember]
    294     public string Id { get; set; }
    295 
    296     [DataMember]
    297     public string Name { get; set; }
    298 
    299     [DataMember]
    300368    public IList<Parameter> Results { get; set; }
    301369  }
Note: See TracChangeset for help on using the changeset viewer.