use of cbit.vcell.modelopt.ParameterEstimationTask in project vcell by virtualcell.
the class ParameterEstimationPanel method analysisTaskComboBox_ActionPerformed.
private void analysisTaskComboBox_ActionPerformed() {
ParameterEstimationTask selectedItem = (ParameterEstimationTask) getAnalysisTaskComboBox().getSelectedItem();
setParameterEstimationTask(selectedItem);
setSelectedObjects(new Object[] { selectedItem });
}
use of cbit.vcell.modelopt.ParameterEstimationTask in project vcell by virtualcell.
the class ParameterEstimationPanel method onSelectedObjectsChange.
@Override
protected void onSelectedObjectsChange(Object[] selectedObjects) {
if (selectedObjects == null || selectedObjects.length != 1 || !(selectedObjects[0] instanceof ParameterEstimationTask)) {
return;
}
ParameterEstimationTask parameterEstimationTask = (ParameterEstimationTask) selectedObjects[0];
setParameterEstimationTask(parameterEstimationTask);
}
use of cbit.vcell.modelopt.ParameterEstimationTask in project vcell by virtualcell.
the class BioModelEditor method setRightBottomPanelOnSelection.
@Override
protected void setRightBottomPanelOnSelection(Object[] selections) {
if (selections == null) {
return;
}
JComponent bottomComponent = rightBottomEmptyPanel;
int destComponentIndex = DocumentEditorTabID.object_properties.ordinal();
boolean bShowInDatabaseProperties = false;
boolean bShowPathway = false;
if (selections.length == 1) {
Object singleSelection = selections[0];
if (singleSelection instanceof ReactionStep) {
bottomComponent = getReactionPropertiesPanel();
} else if (singleSelection instanceof ReactionRule) {
bottomComponent = getReactionRulePropertiesPanel();
} else if (singleSelection instanceof SpeciesContext) {
bottomComponent = getSpeciesPropertiesPanel();
} else if (singleSelection instanceof MolecularType) {
bottomComponent = getMolecularTypePropertiesPanel();
} else if (singleSelection instanceof RbmObservable) {
bottomComponent = getObservablePropertiesPanel();
} else if (singleSelection instanceof Structure) {
bottomComponent = getStructurePropertiesPanel();
getStructurePropertiesPanel().setModel(bioModel.getModel());
} else if (singleSelection instanceof Parameter) {
bottomComponent = getParameterPropertiesPanel();
} else if (singleSelection instanceof SimulationContext) {
bottomComponent = getApplicationPropertiesPanel();
} else if (singleSelection instanceof ParameterEstimationTask) {
bottomComponent = parameterEstimationTaskPropertiesPanel;
} else if (singleSelection instanceof Product || singleSelection instanceof Reactant) {
bottomComponent = getReactionParticipantPropertiesPanel();
} else if (singleSelection instanceof BioModelInfo) {
bShowInDatabaseProperties = true;
bottomComponent = bioModelMetaDataPanel;
} else if (singleSelection instanceof MathModelInfo) {
bShowInDatabaseProperties = true;
bottomComponent = mathModelMetaDataPanel;
} else if (singleSelection instanceof GeometryInfo) {
bShowInDatabaseProperties = true;
bottomComponent = geometryMetaDataPanel;
} else if (singleSelection instanceof SpeciesContextSpec) {
bottomComponent = getSpeciesContextSpecPanel();
} else if (singleSelection instanceof ReactionSpec) {
bottomComponent = getKineticsTypeTemplatePanel();
} else if (singleSelection instanceof ReactionRuleSpec) {
//
bottomComponent = getReactionRuleSpecPropertiesPanel();
} else if (singleSelection instanceof BioModelsNetModelInfo) {
bShowInDatabaseProperties = true;
bottomComponent = getBioModelsNetPropertiesPanel();
} else if (singleSelection instanceof Simulation) {
bottomComponent = getSimulationSummaryPanel();
} else if (singleSelection instanceof DataSymbol) {
bottomComponent = getDataSymbolsSpecPanel();
} else if (singleSelection instanceof BioEvent) {
bottomComponent = getEventPanel();
} else if (singleSelection instanceof SpatialObject) {
bottomComponent = getSpatialObjectPropertyPanel();
} else if (singleSelection instanceof SpatialProcess) {
bottomComponent = getSpatialProcessPropertyPanel();
} else if (singleSelection instanceof BioPaxObject) {
bottomComponent = bioPaxObjectPropertiesPanel;
} else if (singleSelection instanceof BioModel || singleSelection instanceof VCMetaData) {
bottomComponent = bioModelEditorAnnotationPanel;
} else if (singleSelection instanceof PathwayData) {
bShowPathway = true;
bottomComponent = getBioModelEditorPathwayPanel();
} else if (singleSelection instanceof Model) {
} else if (singleSelection instanceof RuleParticipantSignature) {
bottomComponent = getReactionRuleParticipantSignaturePropertiesPanel();
} else if (singleSelection instanceof CSGObject) {
bottomComponent = csgObjectPropertiesPanel;
csgObjectPropertiesPanel.setSimulationContext(getSelectedSimulationContext());
} else if (singleSelection instanceof DocumentEditorTreeFolderNode) {
DocumentEditorTreeFolderClass folderClass = ((DocumentEditorTreeFolderNode) singleSelection).getFolderClass();
if ((folderClass == DocumentEditorTreeFolderClass.REACTIONS_NODE) && !(singleSelection instanceof ReactionRule)) {
bottomComponent = getReactionPropertiesPanel();
} else if ((folderClass == DocumentEditorTreeFolderClass.REACTIONS_NODE) && (singleSelection instanceof ReactionRule)) {
bottomComponent = getReactionRulePropertiesPanel();
} else if (folderClass == DocumentEditorTreeFolderClass.STRUCTURES_NODE) {
bottomComponent = getStructurePropertiesPanel();
} else if (folderClass == DocumentEditorTreeFolderClass.SPECIES_NODE) {
bottomComponent = getSpeciesPropertiesPanel();
} else if (folderClass == DocumentEditorTreeFolderClass.MOLECULAR_TYPES_NODE) {
bottomComponent = getMolecularTypePropertiesPanel();
} else if (folderClass == DocumentEditorTreeFolderClass.OBSERVABLES_NODE) {
bottomComponent = getObservablePropertiesPanel();
} else if (folderClass == DocumentEditorTreeFolderClass.APPLICATIONS_NODE) {
bottomComponent = getApplicationsPropertiesPanel();
getApplicationsPropertiesPanel().setBioModel(bioModel);
} else if (folderClass == DocumentEditorTreeFolderClass.PARAMETER_ESTIMATION_NODE) {
bottomComponent = parameterEstimationTaskPropertiesPanel;
}
}
}
if (bShowPathway) {
for (destComponentIndex = 0; destComponentIndex < rightBottomTabbedPane.getTabCount(); destComponentIndex++) {
if (rightBottomTabbedPane.getComponentAt(destComponentIndex) == bottomComponent) {
break;
}
}
String tabTitle = "Pathway Preview";
if (rightBottomTabbedPane.getTabCount() == destComponentIndex) {
rightBottomTabbedPane.addTab(tabTitle, new TabCloseIcon(), bottomComponent);
}
} else if (bShowInDatabaseProperties) {
for (destComponentIndex = 0; destComponentIndex < rightBottomTabbedPane.getTabCount(); destComponentIndex++) {
Component c = rightBottomTabbedPane.getComponentAt(destComponentIndex);
if (c == bioModelMetaDataPanel || c == mathModelMetaDataPanel || c == geometryMetaDataPanel || c == getBioModelsNetPropertiesPanel()) {
break;
}
}
if (rightBottomTabbedPane.getTabCount() == destComponentIndex) {
rightBottomTabbedPane.addTab(DATABASE_PROPERTIES_TAB_TITLE, new TabCloseIcon(), bottomComponent);
}
}
if (rightBottomTabbedPane.getComponentAt(destComponentIndex) != bottomComponent) {
bottomComponent.setBorder(GuiConstants.TAB_PANEL_BORDER);
rightBottomTabbedPane.setComponentAt(destComponentIndex, bottomComponent);
rightSplitPane.repaint();
}
if (rightBottomTabbedPane.getSelectedComponent() != bottomComponent) {
rightBottomTabbedPane.setSelectedComponent(bottomComponent);
}
}
use of cbit.vcell.modelopt.ParameterEstimationTask in project vcell by virtualcell.
the class ParameterEstimationRunTaskPanel method setParameterEstimationTask.
/**
* Sets the parameterEstimationTask property (cbit.vcell.modelopt.ParameterEstimationTask) value.
* @param newValue The new value for the property.
* @see #getParameterEstimationTask
*/
public void setParameterEstimationTask(ParameterEstimationTask newValue) {
ParameterEstimationTask oldValue = parameterEstimationTask;
parameterEstimationTask = newValue;
/* Stop listening for events from the current object */
optSolverCallbacks.removePropertyChangeListener(eventHandler);
optSolverCallbacks = new CopasiOptSolverCallbacks();
optSolverCallbacks.addPropertyChangeListener(eventHandler);
if (oldValue != null) {
oldValue.removePropertyChangeListener(eventHandler);
}
/* Listen for events from the new object */
if (newValue != null) {
newValue.addPropertyChangeListener(eventHandler);
}
getOptimizeResultsTextPane().setText(this.getSolverMessageText());
// set table data
if (parameterEstimationTask != null && parameterEstimationTask.getOptimizationSolverSpec() != null) {
if (parameterEstimationTask.getOptimizationSolverSpec().getCopasiOptimizationMethod() != null) {
optimizationMethodComboBox.setSelectedItem(parameterEstimationTask.getOptimizationSolverSpec().getCopasiOptimizationMethod().getType());
optimizationMethodParameterTableModel.setCopasiOptimizationMethod(parameterEstimationTask.getOptimizationSolverSpec().getCopasiOptimizationMethod());
}
numberOfRunComboBox.setSelectedItem(parameterEstimationTask.getOptimizationSolverSpec().getNumOfRuns() + "");
}
// set result table data
if (parameterEstimationTask != null && parameterEstimationTask.getOptimizationResultSet() != null && parameterEstimationTask.getOptimizationResultSet().getOptSolverResultSet() != null && parameterEstimationTask.getOptimizationResultSet().getOptSolverResultSet().getBestEstimates() != null && parameterEstimationTask.getOptimizationResultSet().getOptSolverResultSet().getBestEstimates().length > 0) {
optimizationResultSet_This();
}
}
use of cbit.vcell.modelopt.ParameterEstimationTask in project vcell by virtualcell.
the class ParameterMappingTableModel method setParameterEstimationTask.
/**
* Sets the parameterEstimationTask property (cbit.vcell.modelopt.ParameterEstimationTask) value.
* @param parameterEstimationTask The new value for the property.
* @see #getParameterEstimationTask
*/
public void setParameterEstimationTask(ParameterEstimationTask newValue) {
if (fieldParameterEstimationTask == newValue) {
return;
}
ParameterEstimationTask oldValue = fieldParameterEstimationTask;
if (oldValue != null) {
oldValue.removePropertyChangeListener(this);
oldValue.getModelOptimizationSpec().removePropertyChangeListener(this);
ParameterMappingSpec[] oldPMS = oldValue.getModelOptimizationSpec().getParameterMappingSpecs();
for (int i = 0; oldPMS != null && i < oldPMS.length; i++) {
oldPMS[i].removePropertyChangeListener(this);
}
}
fieldParameterEstimationTask = newValue;
if (newValue != null) {
newValue.addPropertyChangeListener(this);
newValue.getModelOptimizationSpec().addPropertyChangeListener(this);
ParameterMappingSpec[] newPMS = newValue.getModelOptimizationSpec().getParameterMappingSpecs();
for (int i = 0; newPMS != null && i < newPMS.length; i++) {
newPMS[i].addPropertyChangeListener(this);
}
}
refreshData();
}
Aggregations