1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Text;
|
---|
5 | using System.Threading.Tasks;
|
---|
6 | using HeuristicLab.Common;
|
---|
7 | using HeuristicLab.Core;
|
---|
8 | using HeuristicLab.Data;
|
---|
9 | using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
|
---|
10 | using HeuristicLab.Problems.DataAnalysis.Interfaces;
|
---|
11 |
|
---|
12 | namespace HeuristicLab.Problems.DataAnalysis {
|
---|
13 | [StorableClass]
|
---|
14 | public class IntervalItem : NamedItem, IInterval {
|
---|
15 | public IntervalItem() : base() {
|
---|
16 | Name = "Constraint";
|
---|
17 | Variable.SetValue("");
|
---|
18 | Formulation.SetValue("");
|
---|
19 | }
|
---|
20 |
|
---|
21 | public IntervalItem(string name, string variable, string formulation) {
|
---|
22 | Name = name;
|
---|
23 | Variable.SetValue(variable);
|
---|
24 | Formulation.SetValue(formulation);
|
---|
25 | }
|
---|
26 |
|
---|
27 | [StorableConstructor]
|
---|
28 | protected IntervalItem(bool deserializing) : base(deserializing) { }
|
---|
29 | protected IntervalItem(IntervalItem original, Cloner cloner)
|
---|
30 | : base(original, cloner) {
|
---|
31 | variable = original.variable;
|
---|
32 | formulation = original.formulation;
|
---|
33 | name = original.name;
|
---|
34 | }
|
---|
35 |
|
---|
36 | protected IStringConvertibleValue variable = new StringValue();
|
---|
37 |
|
---|
38 | public IStringConvertibleValue Variable {
|
---|
39 | get { return variable; }
|
---|
40 | }
|
---|
41 |
|
---|
42 | protected IStringConvertibleValue formulation = new StringValue();
|
---|
43 | public IStringConvertibleValue Formulation {
|
---|
44 | get { return formulation; }
|
---|
45 | }
|
---|
46 |
|
---|
47 | public override IDeepCloneable Clone(Cloner cloner) {
|
---|
48 | return new IntervalItem(this, cloner);
|
---|
49 | }
|
---|
50 |
|
---|
51 |
|
---|
52 | }
|
---|
53 | }
|
---|