public SimulationSettingsControl(MetroWindow containingWindow, SimulationSettings settings, FMTesterConfiguration configuration, ExecutionInstance instance, ExecutionEnvironment environment)
        {            
            InitializeComponent();
            this.containingWindow = containingWindow;
            this.ModelSimulationSettings = settings;
            this.configuration = configuration;
            this.instance = instance;
            this.environment = environment;
            
            if (settings != null)
            {
                ModelSimulationTimeNumUpDown.Value = settings.ModelSimulationTime as double?;
                DesiredValueReachedNumUpDown.Value = settings.StableStartTime as double?;
                SmoothnessStartDifferenceNumUpDown.Value = settings.SmoothnessStartDifference as double?;
                ResponsivenessCloseNumUpDown.Value = settings.ResponsivenessClose as double?;

                DesiredValueNameTextBox.Text = settings.DesiredVariable.Name;
                DesiredValueFromNumUpDown.Value = Decimal.ToDouble(settings.DesiredVariable.FromValue) as double?;
                DesiredValueToNumUpDown.Value = Decimal.ToDouble(settings.DesiredVariable.ToValue) as double?;

                ActualValueNameTextBox.Text = settings.ActualVariable.Name;
                ActualValueFromNumUpDown.Value = Decimal.ToDouble(settings.ActualVariable.FromValue) as double?;
                ActualValueToNumUpDown.Value = Decimal.ToDouble(settings.ActualVariable.ToValue) as double?;

                DisturbanceValueNameTextBox.Text = settings.DisturbanceVariable.Name;
                DisturbanceValueToNumUpDown.Value = Decimal.ToDouble(settings.DisturbanceVariable.ToValue) as double?;
            }
        }
 public AllowedOscillationFaultModel(ExecutionEnvironment executionEngine, FaultModelConfiguration configuration, string scriptsPath)
 {
     setupDone = false;
     this.scriptsPath = scriptsPath;
     this.ExecutionEngine = executionEngine;
     this.FaultModelConfiguration = (AllowedOscillationFaultModelConfiguration)configuration;
     this.SearchSpaceExplorationWorker = new SearchSpaceExplorationWorker();
     this.TestRunWorker = new TestRunWorker();
 }
 public StepFaultModel(ExecutionEnvironment executionEngine, FaultModelConfiguration configuration, string scriptsPath)
 {
     setupDone = false;
     this.scriptsPath = scriptsPath;
     this.ExecutionEngine = executionEngine;
     this.FaultModelConfiguration = (StepFaultModelConfiguration)configuration;
     this.RandomExplorationWorker = new RandomExplorationWorker();
     this.WorstCaseWorker = new WorstCaseScenarioWorker();
     this.TestRunWorker = new TestRunWorker();
 }
 public ControllerComparisonFaultModel(ExecutionEnvironment executionEngine, string scriptsPath)
 {
     setupDone = false;
     this.scriptsPath = scriptsPath;
     this.ExecutionEngine = executionEngine;
     this.FaultModelConfiguration = new ControllerComparisonFaultModelConfiguration();
     this.RandomExplorationWorker = new RandomExplorationWorker();
     this.WorstCaseWorker = new WorstCaseScenarioWorker();
     this.TestRunWorker = new TestRunWorker();
 }
        public SimulationSettingsWindow(SimulationSettings settings, FMTesterConfiguration configuration, ExecutionInstance instance, ExecutionEnvironment environment)
        {
            InitializeComponent();
            this.EnableDWMDropShadow = true;
            this.ShowMinButton = false;
            this.ShowMaxRestoreButton = false;

            simulationControl = new SimulationSettingsControl(this, settings, configuration, instance, environment);
            this.Container.Children.Add(simulationControl);
        }
        public SimulationWorker(ExecutionInstance instance, ExecutionEnvironment environment, SimulationSettings settings, FMTesterConfiguration configuration)
            : base()
        {
            this.configuration = configuration;
            this.scriptsPath = configuration.ScriptsPath;
            this.instance = instance;
            this.environment = environment;
            this.settings = settings;

            this.DoWork += simulationWorker_DoWork;
        }