Free cookie consent management tool by TermsFeed Policy Generator

source: branches/OaaS/HeuristicLab.Services.Optimization.Controller/Model/ControllerModel.cs @ 8418

Last change on this file since 8418 was 8384, checked in by fschoepp, 12 years ago

#1888:

  • Created a project which contains the back-end controller for the Optimization WebSite
  • Added a WCF-back-end-controller which generates all available optimization problems (currently in-memory solution: PlaceholderControllerService.cs)
  • Created a WebRole using ASP.NET MVC 3 for the Optimization Web Site
  • WebSite authenticates users with the HeuristicLab.Authentication membership provider and database
  • WebSite crawls and displays all available optimization scenarios by using the WCF-back-end controller (test with: http://localhost:.../optimization)
File size: 1.8 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Runtime.Serialization;
6
7namespace HeuristicLab.Services.Optimization.ControllerService.Model {
8  [DataContract]
9  public enum ParameterType {
10    [EnumMember]
11    Decimal,
12    [EnumMember]
13    Integer,
14    [EnumMember]
15    Boolean,
16    [EnumMember]
17    Type,
18    [EnumMember]
19    DecimalMatrix,
20    [EnumMember]
21    DecimalVector,
22    [EnumMember]
23    Percent
24  }
25
26  [DataContract]
27  public abstract class Value {   
28  }
29
30  [DataContract]
31  public class DecimalValue : Value {
32    [DataMember]
33    public double Value { get; set; }
34  }
35
36  [DataContract]
37  public class BoolValue : Value {
38    [DataMember]
39    public bool Value { get; set; }
40  }
41
42  [DataContract]
43  [KnownType(typeof(BoolValue))]
44  [KnownType(typeof(DecimalValue))]
45  public class Parameter {
46    [DataMember]
47    public string Name { get; set; }
48   
49    // some kind of value type
50    [DataMember]
51    public ParameterType Type { get; set; }
52   
53    [DataMember]
54    public Value Value { get; set; }
55
56    /*
57    //[DataMember]
58    public object[] Choices { get; set; }*/
59  }
60
61  [DataContract]
62  public class OptimizationScenario {
63    [DataMember]
64    public string Name { get; set; }
65
66    private IList<Parameter> inputParameters = new List<Parameter>();
67
68    [DataMember]
69    public IList<Parameter> InputParameters {
70      get { return inputParameters; }
71      set { inputParameters = value; }
72    }
73
74    private IList<Parameter> algorithmParameters = new List<Parameter>();
75
76    [DataMember]
77    public IList<Parameter> AlgorithmParameters {
78      get { return algorithmParameters; }
79      set { algorithmParameters = value; }
80    }
81  }
82}
Note: See TracBrowser for help on using the repository browser.