Example #1
0
        //CONSTRUCTOR
        public RadicalVM(Design design, RadicalComponent component)
        {
            this.Component = component;
            this.Design    = design;

            //Warn user that system can't handle multiple objectives
            this.opendialog = false;
            if (this.Design.Objectives.Count > 1)
            {
                this.OpenDialog = true;
            }

            this.Constraints = new List <ConstVM>();

            this.ObjectiveEvolution = new ChartValues <double>();
            this.ObjectiveEvolution.Add(this.Design.Objectives[0]);
            this.ConstraintsEvolution = new ChartValues <ChartValues <double> >();
            foreach (Constraint c in this.Design.Constraints)
            {
                ChartValues <double> cv = new ChartValues <double>();
                cv.Add(c.CurrentValue);
                this.ConstraintsEvolution.Add(cv);
            }
            this.NumVarEvolution = new List <List <double> >();
            foreach (IVariable v in this.Design.ActiveVariables)
            {
                List <double> list_var = new List <double>();
                list_var.Add(v.CurrentValue);
                this.NumVarEvolution.Add(list_var);
            }

            this.TimeEvolution = new List <TimeSpan>();
            this.TimeEvolution.Add(new TimeSpan(0, 0, -10)); //make first timespan negative because no time has passed, this will not be returned in csv file

            this.Graphs = new Dictionary <string, List <GraphVM> >();
            this.Graphs.Add("Main", new List <GraphVM>());
            this.Graphs.Add("Constraints", new List <GraphVM>());
            SetUpGraphs();

            this.NumVars   = new List <VarVM> {
            };
            this.GeoVars   = new List <List <VarVM> > {
            };
            this.GroupVars = new List <GroupVarVM> {
            };
            SortVariables();

            this.OptRunning           = false;
            this.OptRunning           = false;
            this._advancedOptions     = false;
            this._disablingNotAllowed = false;

            this.OriginalObjectiveValue = this.Design.Objectives.ElementAt(0);
            this.SmallestObjectiveValue = this.Design.Objectives.ElementAt(0);
        }
Example #2
0
 public RadicalVM(RadicalComponent component)
 {
     this.Component = component;
 }