diff --git a/Tunny/Solver/Algorithm.cs b/Tunny/Solver/Algorithm.cs index 91aeaadc..d4a3f741 100644 --- a/Tunny/Solver/Algorithm.cs +++ b/Tunny/Solver/Algorithm.cs @@ -465,7 +465,12 @@ private bool CheckOptimizeComplete(OptimizationHandlingInfo optInfo, int trialNu int nTrials = optInfo.NTrials; double timeout = optInfo.Timeout; dynamic study = optInfo.Study; - bool studyStopFlag = study._stop_flag; + bool studyStopFlag = false; + if (optInfo.HumanSliderInput == null && optInfo.Preferential == null) + { + studyStopFlag = study._stop_flag; + } + bool isOptimizeCompleted = false; if (trialNum >= nTrials) diff --git a/Tunny/UI/OptimizationWindow.cs b/Tunny/UI/OptimizationWindow.cs index 0784bcca..8125517d 100644 --- a/Tunny/UI/OptimizationWindow.cs +++ b/Tunny/UI/OptimizationWindow.cs @@ -133,6 +133,27 @@ private void SetUIValues() { TLog.MethodStart(); TLog.Info("Set UI values"); + + // Study Name GroupBox + studyNameTextBox.Text = _settings.StudyName; + continueStudyCheckBox.Checked = _settings.Optimize.ContinueStudy; + existingStudyComboBox.Enabled = continueStudyCheckBox.Checked; + studyNameTextBox.Enabled = !continueStudyCheckBox.Checked; + copyStudyCheckBox.Enabled = _settings.Optimize.CopyStudy; + inMemoryCheckBox.Checked = _settings.Storage.Type == StorageType.InMemory; + UpdateStudyComboBox(); + ShowRealtimeResultCheckBox.Checked = _settings.Optimize.ShowRealtimeResult; + + outputModelNumTextBox.Text = _settings.Result.OutputNumberString; + visualizeTypeComboBox.SelectedIndex = _settings.Result.SelectVisualizeType; + visualizeClusterNumUpDown.Value = _settings.Result.NumberOfClusters; + InitializeSamplerSettings(); + + runGarbageCollectionComboBox.SelectedIndex = (int)_settings.Optimize.GcAfterTrial; + miscLogComboBox.SelectedIndex = (int)_settings.LogLevel; + ignoreDuplicateSamplingCheckBox.Checked = _settings.Optimize.IgnoreDuplicateSampling; + disableRhinoViewportCheckBox.Checked = _settings.Optimize.DisableViewportDrawing; + HumanInTheLoopType type = _component.GhInOut.Objectives.HumanInTheLoopType; if (type != HumanInTheLoopType.None) { @@ -140,6 +161,8 @@ private void SetUIValues() Text = "Tunny (Human in the Loop mode)"; samplerComboBox.SelectedIndex = (int)SamplerType.GP; // GP samplerComboBox.Enabled = false; + inMemoryCheckBox.Checked = false; + inMemoryCheckBox.Enabled = false; nTrialText.Text = "Number of batches"; nTrialNumUpDown.Value = type == HumanInTheLoopType.Preferential ? 6 : 4; timeoutNumUpDown.Value = 0; @@ -157,24 +180,6 @@ private void SetUIValues() timeoutNumUpDown.Value = (decimal)_settings.Optimize.Timeout; } - // Study Name GroupBox - studyNameTextBox.Text = _settings.StudyName; - continueStudyCheckBox.Checked = _settings.Optimize.ContinueStudy; - existingStudyComboBox.Enabled = continueStudyCheckBox.Checked; - studyNameTextBox.Enabled = !continueStudyCheckBox.Checked; - copyStudyCheckBox.Enabled = _settings.Optimize.CopyStudy; - UpdateStudyComboBox(); - ShowRealtimeResultCheckBox.Checked = _settings.Optimize.ShowRealtimeResult; - - outputModelNumTextBox.Text = _settings.Result.OutputNumberString; - visualizeTypeComboBox.SelectedIndex = _settings.Result.SelectVisualizeType; - visualizeClusterNumUpDown.Value = _settings.Result.NumberOfClusters; - InitializeSamplerSettings(); - - runGarbageCollectionComboBox.SelectedIndex = (int)_settings.Optimize.GcAfterTrial; - miscLogComboBox.SelectedIndex = (int)_settings.LogLevel; - ignoreDuplicateSamplingCheckBox.Checked = _settings.Optimize.IgnoreDuplicateSampling; - disableRhinoViewportCheckBox.Checked = _settings.Optimize.DisableViewportDrawing; } private void GetUIValues()