Search in sources :

Example 21 with SolverTaskDescription

use of cbit.vcell.solver.SolverTaskDescription in project vcell by virtualcell.

the class SimulationTable method getSimulationRep.

public SimulationRep getSimulationRep(ResultSet rset, DatabaseSyntax dbSyntax) throws IllegalArgumentException, SQLException, DataAccessException {
    KeyValue scKey = new KeyValue(rset.getBigDecimal(table.id.toString()));
    String name = rset.getString(table.name.toString());
    BigDecimal branchID = rset.getBigDecimal(table.versionBranchID.toString());
    KeyValue ownerRef = new KeyValue(rset.getBigDecimal(table.ownerRef.toString()));
    String ownerName = rset.getString(UserTable.table.userid.toString());
    User owner = new User(ownerName, ownerRef);
    KeyValue mathKey = new KeyValue(rset.getBigDecimal(table.mathRef.toString()));
    String taskDesc = rset.getString(table.taskDescription.toString());
    SolverTaskDescription solverTaskDescription = null;
    try {
        solverTaskDescription = new SolverTaskDescription(new CommentStringTokenizer(taskDesc));
    } catch (DataAccessException e) {
        System.out.println("SimulationTable:getSimulationRep(): failed to parse solver task description, exception=[" + e.getMessage() + "]::\n[[[" + taskDesc + "]]]\n");
    // e.printStackTrace();
    }
    CommentStringTokenizer mathOverridesTokenizer = getMathOverridesTokenizer(rset, dbSyntax);
    List<Element> mathOverrideElements = MathOverrides.parseOverrideElementsFromVCML(mathOverridesTokenizer);
    return new SimulationRep(scKey, branchID, name, owner, mathKey, solverTaskDescription, mathOverrideElements.toArray(new MathOverrides.Element[0]));
}
Also used : KeyValue(org.vcell.util.document.KeyValue) User(org.vcell.util.document.User) Element(cbit.vcell.solver.MathOverrides.Element) CommentStringTokenizer(org.vcell.util.CommentStringTokenizer) SolverTaskDescription(cbit.vcell.solver.SolverTaskDescription) BigDecimal(java.math.BigDecimal) DataAccessException(org.vcell.util.DataAccessException)

Example 22 with SolverTaskDescription

use of cbit.vcell.solver.SolverTaskDescription in project vcell by virtualcell.

the class DataProcessingInstructionPanel method setSolverTaskDescription.

/**
 * Sets the errorTolerance property (cbit.vcell.solver.ErrorTolerance) value.
 * @param errorTolerance The new value for the property.
 * @exception java.beans.PropertyVetoException The exception description.
 * @see #getErrorTolerance
 */
public void setSolverTaskDescription(SolverTaskDescription newValue) {
    SolverTaskDescription oldValue = solverTaskDescription;
    /* Stop listening for events from the current object */
    if (oldValue != null) {
        oldValue.removePropertyChangeListener(ivjEventHandler);
    }
    solverTaskDescription = newValue;
    /* Listen for events from the new object */
    if (newValue != null) {
        newValue.addPropertyChangeListener(ivjEventHandler);
    }
    solverTaskDescription = newValue;
    firePropertyChange("solverTaskDescription", oldValue, newValue);
    initConnections();
}
Also used : SolverTaskDescription(cbit.vcell.solver.SolverTaskDescription)

Example 23 with SolverTaskDescription

use of cbit.vcell.solver.SolverTaskDescription in project vcell by virtualcell.

the class SolverTaskDescriptionAdvancedPanel method setTornOffSolverTaskDescription.

/**
 * Set the TornOffSolverTaskDescription to a new value.
 * @param newValue cbit.vcell.solver.SolverTaskDescription
 */
/* WARNING: THIS METHOD WILL BE REGENERATED. */
private void setTornOffSolverTaskDescription(SolverTaskDescription newValue) {
    if (ivjTornOffSolverTaskDescription != newValue) {
        try {
            SolverTaskDescription oldValue = getTornOffSolverTaskDescription();
            /* Stop listening for events from the current object */
            if (ivjTornOffSolverTaskDescription != null) {
                ivjTornOffSolverTaskDescription.removePropertyChangeListener(ivjEventHandler);
            }
            ivjTornOffSolverTaskDescription = newValue;
            /* Listen for events from the new object */
            if (ivjTornOffSolverTaskDescription != null) {
                ivjTornOffSolverTaskDescription.addPropertyChangeListener(ivjEventHandler);
            }
            connPtoP1SetSource();
            connEtoM13(ivjTornOffSolverTaskDescription);
            connEtoC6(ivjTornOffSolverTaskDescription);
            getTimeStepPanel().setSolverTaskDescription(ivjTornOffSolverTaskDescription);
            getErrorTolerancePanel().setSolverTaskDescription(ivjTornOffSolverTaskDescription);
            getStochSimOptionsPanel().setSolverTaskDescription(ivjTornOffSolverTaskDescription);
            getNFSimSimulationOptionsPanel().setSolverTaskDescription(ivjTornOffSolverTaskDescription);
            getSmoldynSimulationOptionsPanel().setSolverTaskDescription(ivjTornOffSolverTaskDescription);
            getOutputOptionsPanel().setSolverTaskDescription(ivjTornOffSolverTaskDescription, unitInfo);
            getSundialsPdeSolverOptionsPanel().setSolverTaskDescription(ivjTornOffSolverTaskDescription);
            stopAtSpatiallyUniformPanel.setSolverTaskDescription(ivjTornOffSolverTaskDescription);
            dataProcessingInstructionPanel.setSolverTaskDescription(ivjTornOffSolverTaskDescription);
            getTimeBoundsPanel().setTimeBounds(getTornOffSolverTaskDescription().getTimeBounds());
            getChomboTimeBoundsPanel().setSolverTaskDescription(getTornOffSolverTaskDescription());
            getChomboDeveloperToolsPanel().setSolverTaskDescription(getTornOffSolverTaskDescription());
            movingBoundarySolverOptionsPanel.setSolverTaskDescription(getTornOffSolverTaskDescription());
            updateSensitivityAnalysisComboBox();
            firePropertyChange("solverTaskDescription", oldValue, newValue);
        // user code begin {1}
        // user code end
        } catch (java.lang.Throwable ivjExc) {
            // user code begin {2}
            // user code end
            handleException(ivjExc);
        }
    }
    ;
// user code begin {3}
// user code end
}
Also used : SolverTaskDescription(cbit.vcell.solver.SolverTaskDescription)

Example 24 with SolverTaskDescription

use of cbit.vcell.solver.SolverTaskDescription in project vcell by virtualcell.

the class SolverTaskDescriptionAdvancedPanel method setSolverTaskDescription.

/**
 * Sets the solverTaskDescription property (cbit.vcell.solver.SolverTaskDescription) value.
 * @param solverTaskDescription The new value for the property.
 * @exception java.beans.PropertyVetoException The exception description.
 * @see #getSolverTaskDescription
 */
public void setSolverTaskDescription(SolverTaskDescription solverTaskDescription) throws java.beans.PropertyVetoException {
    SolverTaskDescription oldValue = fieldSolverTaskDescription;
    fireVetoableChange("solverTaskDescription", oldValue, solverTaskDescription);
    fieldSolverTaskDescription = solverTaskDescription;
    firePropertyChange("solverTaskDescription", oldValue, solverTaskDescription);
}
Also used : SolverTaskDescription(cbit.vcell.solver.SolverTaskDescription)

Example 25 with SolverTaskDescription

use of cbit.vcell.solver.SolverTaskDescription in project vcell by virtualcell.

the class StochSimOptionsPanel method setSolverTaskDescription.

public final void setSolverTaskDescription(SolverTaskDescription newValue) {
    SolverTaskDescription oldValue = solverTaskDescription;
    /* Stop listening for events from the current object */
    if (oldValue != null) {
        oldValue.removePropertyChangeListener(ivjEventHandler);
    }
    solverTaskDescription = newValue;
    /* Listen for events from the new object */
    if (newValue != null) {
        newValue.addPropertyChangeListener(ivjEventHandler);
    }
    solverTaskDescription = newValue;
    firePropertyChange("solverTaskDescription", oldValue, newValue);
    initConnections();
}
Also used : SolverTaskDescription(cbit.vcell.solver.SolverTaskDescription)

Aggregations

SolverTaskDescription (cbit.vcell.solver.SolverTaskDescription)39 DefaultOutputTimeSpec (cbit.vcell.solver.DefaultOutputTimeSpec)13 Simulation (cbit.vcell.solver.Simulation)12 UniformOutputTimeSpec (cbit.vcell.solver.UniformOutputTimeSpec)10 ExpressionException (cbit.vcell.parser.ExpressionException)7 OutputTimeSpec (cbit.vcell.solver.OutputTimeSpec)7 SolverDescription (cbit.vcell.solver.SolverDescription)7 TimeBounds (cbit.vcell.solver.TimeBounds)7 ArrayList (java.util.ArrayList)6 MathException (cbit.vcell.math.MathException)5 ExplicitOutputTimeSpec (cbit.vcell.solver.ExplicitOutputTimeSpec)5 Constant (cbit.vcell.math.Constant)4 SubDomain (cbit.vcell.math.SubDomain)4 Expression (cbit.vcell.parser.Expression)4 NonspatialStochSimOptions (cbit.vcell.solver.NonspatialStochSimOptions)4 SimulationSymbolTable (cbit.vcell.solver.SimulationSymbolTable)4 SolverException (cbit.vcell.solver.SolverException)4 IOException (java.io.IOException)4 BioModel (cbit.vcell.biomodel.BioModel)3 Geometry (cbit.vcell.geometry.Geometry)3