use of cbit.vcell.opt.CopasiOptimizationMethod.CopasiOptimizationMethodType in project vcell by virtualcell.
the class ParameterEstimationRunTaskPanel method showCopasiMethodHelp.
public void showCopasiMethodHelp() {
CopasiOptimizationMethodType methodType = ((CopasiOptimizationMethodType) optimizationMethodComboBox.getSelectedItem());
getCopasiOptimizationHelpPanel().refreshSolverInfo(methodType);
JOptionPane helpPane = new JOptionPane(copasiHelpPanel, JOptionPane.INFORMATION_MESSAGE);
JDialog dialog = helpPane.createDialog(this, "Copasi Methods Help Information");
dialog.setResizable(true);
dialog.setVisible(true);
}
use of cbit.vcell.opt.CopasiOptimizationMethod.CopasiOptimizationMethodType in project vcell by virtualcell.
the class CopasiOptimizationMethodsHelpPanel method getHyperLinkLabels.
private void getHyperLinkLabels() {
CopasiOptimizationMethodType[] methods = CopasiOptimizationMethodType.values();
methodLabels = new HyperLinkLabel[methods.length];
for (int i = 0; i < methods.length; i++) {
methodLabels[i] = new HyperLinkLabel(methods[i].getDisplayName(), eventHandler, 0);
}
}
use of cbit.vcell.opt.CopasiOptimizationMethod.CopasiOptimizationMethodType in project vcell by virtualcell.
the class ParameterEstimationRunTaskPanel method optimizationMethodComboBox_ActionPerformed.
/**
* Comment
*/
private void optimizationMethodComboBox_ActionPerformed() {
CopasiOptimizationMethodType methodType = (CopasiOptimizationMethodType) getOptimizationMethodComboBox().getSelectedItem();
CopasiOptimizationMethod com = new CopasiOptimizationMethod(methodType);
if (parameterEstimationTask != null && parameterEstimationTask.getOptimizationSolverSpec() != null) {
if (parameterEstimationTask.getOptimizationSolverSpec().getCopasiOptimizationMethod() == null || !parameterEstimationTask.getOptimizationSolverSpec().getCopasiOptimizationMethod().getType().getDisplayName().equals(methodType.getDisplayName())) {
parameterEstimationTask.getOptimizationSolverSpec().setCopasiOptimizationMethod(com);
}
}
optimizationMethodParameterTableModel.setCopasiOptimizationMethod(com);
if (methodType.isStochasticMethod()) {
numberOfRunComboBox.setVisible(true);
numberOfRunLabel.setVisible(true);
} else {
numberOfRunComboBox.setVisible(false);
numberOfRunLabel.setVisible(false);
}
}
use of cbit.vcell.opt.CopasiOptimizationMethod.CopasiOptimizationMethodType in project vcell by virtualcell.
the class ParameterEstimationRunTaskPanel method initialize.
private void initialize() {
setLayout(new GridBagLayout());
GridBagConstraints gbc = new GridBagConstraints();
gbc.gridx = 0;
gbc.gridy = 0;
gbc.fill = GridBagConstraints.BOTH;
gbc.weighty = 1.0;
gbc.insets = new java.awt.Insets(4, 4, 4, 4);
add(getSolverPanel(), gbc);
gbc = new GridBagConstraints();
gbc.gridx = 1;
gbc.gridy = 0;
gbc.fill = GridBagConstraints.BOTH;
gbc.weightx = 1.0;
gbc.weighty = 1.0;
gbc.insets = new Insets(4, 4, 4, 4);
add(getSolutionPanel(), gbc);
JPanel panel = new JPanel(new BorderLayout());
copasiLinkLabel.setFont(new Font("Tahoma", Font.PLAIN, 12));
panel.add(copasiLinkLabel, BorderLayout.CENTER);
gbc = new GridBagConstraints();
gbc.gridx = 0;
gbc.gridy = 1;
gbc.fill = GridBagConstraints.BOTH;
gbc.gridwidth = 2;
gbc.anchor = GridBagConstraints.LINE_END;
gbc.insets = new Insets(0, 8, 4, 0);
add(panel, gbc);
DefaultComboBoxModel model = new DefaultComboBoxModel();
for (CopasiOptimizationMethodType com : CopasiOptimizationMethodType.values()) {
model.addElement(com);
}
getOptimizationMethodComboBox().setModel(model);
getOptimizationMethodComboBox().addActionListener(eventHandler);
getOptimizationMethodComboBox().setSelectedItem(CopasiOptimizationMethodType.EvolutionaryProgram);
getOptimizationMethodComboBox().setRenderer(new DefaultListCellRenderer() {
@Override
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
if (value instanceof CopasiOptimizationMethodType) {
setText(((CopasiOptimizationMethodType) value).getDisplayName());
}
return this;
}
});
getNumberOfRunComboBox().addActionListener(eventHandler);
getSolveButton().addActionListener(eventHandler);
helpButton.addActionListener(eventHandler);
getPlotButton().addActionListener(eventHandler);
getSaveSolutionAsNewSimButton().addActionListener(eventHandler);
}
Aggregations