Skip to content

Commit

Permalink
Make linear optimization the new default (JYU-IBA#193)
Browse files Browse the repository at this point in the history
- this should be better than NSGA-II now
- opening the optimization dialog causes a brief flash now for some
  reason, probably related to the order of operations, or maybe the
  choose_optimization_method call
  • Loading branch information
tpitkanen committed Mar 30, 2022
1 parent b1a6524 commit e56fc25
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dialogs/simulation/optimization.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,17 +151,20 @@ def __init__(self, simulation: Simulation, parent):

self.method_radios.addButton(self.nsgaiiRadioButton)
self.method_radios.addButton(self.linearRadioButton)
self.linearRadioButton.setChecked(True)

self.mode_radios = QtWidgets.QButtonGroup(self)
self.mode_radios.buttonToggled[QtWidgets.QAbstractButton, bool].connect(
self.choose_optimization_mode)
self.parametersLayout.addWidget(self.nsgaii_recoil_widget)
self.parametersLayout.addWidget(self.nsgaii_fluence_widget)
self.nsgaii_recoil_widget.hide()
self.nsgaii_fluence_widget.hide()

# TODO: Why does selecting linear_recoil_widget by default cause a
# brief flash when opening the optimization dialog?
self.parametersLayout.addWidget(self.linear_recoil_widget)
self.parametersLayout.addWidget(self.linear_fluence_widget)
self.linear_recoil_widget.hide()
self.linear_fluence_widget.hide()

self.mode_radios.addButton(self.fluenceRadioButton)
Expand Down

0 comments on commit e56fc25

Please sign in to comment.