Search in sources :

Example 11 with VarIniCondition

use of cbit.vcell.math.VarIniCondition in project vcell by virtualcell.

the class XmlReader method getVarIniPoissonExpectedCount.

private VarIniCondition getVarIniPoissonExpectedCount(Element param, MathDescription md) throws XmlParseException, MathException, ExpressionException {
    // retrieve values
    Expression exp = unMangleExpression(param.getText());
    String name = unMangle(param.getAttributeValue(XMLTags.NameAttrTag));
    Variable var = md.getVariable(name);
    if (var == null) {
        throw new MathFormatException("variable " + name + " not defined");
    }
    if (!(var instanceof StochVolVariable)) {
        throw new MathFormatException("variable " + name + " not a Stochastic Volume Variable");
    }
    try {
        VarIniCondition varIni = new VarIniPoissonExpectedCount(var, exp);
        return varIni;
    } catch (Exception e) {
        e.printStackTrace();
    }
    return null;
}
Also used : VarIniCondition(cbit.vcell.math.VarIniCondition) FilamentVariable(cbit.vcell.math.FilamentVariable) OutsideVariable(cbit.vcell.math.OutsideVariable) StochVolVariable(cbit.vcell.math.StochVolVariable) RandomVariable(cbit.vcell.math.RandomVariable) VolumeRandomVariable(cbit.vcell.math.VolumeRandomVariable) VolumeParticleVariable(cbit.vcell.math.VolumeParticleVariable) VolumeRegionVariable(cbit.vcell.math.VolumeRegionVariable) InsideVariable(cbit.vcell.math.InsideVariable) VolVariable(cbit.vcell.math.VolVariable) MembraneRegionVariable(cbit.vcell.math.MembraneRegionVariable) PointVariable(cbit.vcell.math.PointVariable) MembraneRandomVariable(cbit.vcell.math.MembraneRandomVariable) MembraneParticleVariable(cbit.vcell.math.MembraneParticleVariable) ParticleVariable(cbit.vcell.math.ParticleVariable) MemVariable(cbit.vcell.math.MemVariable) FilamentRegionVariable(cbit.vcell.math.FilamentRegionVariable) Variable(cbit.vcell.math.Variable) Expression(cbit.vcell.parser.Expression) MathFormatException(cbit.vcell.math.MathFormatException) VarIniPoissonExpectedCount(cbit.vcell.math.VarIniPoissonExpectedCount) StochVolVariable(cbit.vcell.math.StochVolVariable) GeometryException(cbit.vcell.geometry.GeometryException) MathFormatException(cbit.vcell.math.MathFormatException) MappingException(cbit.vcell.mapping.MappingException) PropertyVetoException(java.beans.PropertyVetoException) ImageException(cbit.image.ImageException) ExpressionBindingException(cbit.vcell.parser.ExpressionBindingException) ModelException(cbit.vcell.model.ModelException) DataConversionException(org.jdom.DataConversionException) ExpressionException(cbit.vcell.parser.ExpressionException) MathException(cbit.vcell.math.MathException)

Aggregations

VarIniCondition (cbit.vcell.math.VarIniCondition)11 Expression (cbit.vcell.parser.Expression)9 ExpressionException (cbit.vcell.parser.ExpressionException)8 JumpProcess (cbit.vcell.math.JumpProcess)7 SubDomain (cbit.vcell.math.SubDomain)7 Action (cbit.vcell.math.Action)5 Function (cbit.vcell.math.Function)5 StochVolVariable (cbit.vcell.math.StochVolVariable)5 VarIniCount (cbit.vcell.math.VarIniCount)5 Variable (cbit.vcell.math.Variable)5 Vector (java.util.Vector)5 Constant (cbit.vcell.math.Constant)4 Equation (cbit.vcell.math.Equation)4 ModelException (cbit.vcell.model.ModelException)4 PropertyVetoException (java.beans.PropertyVetoException)4 MappingException (cbit.vcell.mapping.MappingException)3 CompartmentSubDomain (cbit.vcell.math.CompartmentSubDomain)3 MathException (cbit.vcell.math.MathException)3 MathFormatException (cbit.vcell.math.MathFormatException)3 ImageException (cbit.image.ImageException)2