Search in sources :

Example 16 with FastInvariant

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

the class Xmlproducer method getXML.

/**
 * This method returns a XML representation of a FastSystemImplicit object.
 * Creation date: (3/2/2001 4:05:28 PM)
 * @return Element
 * @param param cbit.vcell.math.FastSystemImplicit
 */
private Element getXML(FastSystem param) {
    Element fastsystem = new Element(XMLTags.FastSystemTag);
    // Add Fast Invariant subelements
    Element fastinvariant;
    Enumeration<FastInvariant> enum_fi = param.getFastInvariants();
    while (enum_fi.hasMoreElements()) {
        fastinvariant = new Element(XMLTags.FastInvariantTag);
        FastInvariant fi = enum_fi.nextElement();
        fastinvariant.addContent(mangleExpression(fi.getFunction()));
        fastsystem.addContent(fastinvariant);
    }
    // Add FastRate subelements
    Element fastrate;
    Enumeration<FastRate> enum_fr = param.getFastRates();
    while (enum_fr.hasMoreElements()) {
        FastRate fr = (FastRate) enum_fr.nextElement();
        fastrate = new Element(XMLTags.FastRateTag);
        fastrate.addContent(mangleExpression(fr.getFunction()));
        fastsystem.addContent(fastrate);
    }
    return fastsystem;
}
Also used : Element(org.jdom.Element) FastRate(cbit.vcell.math.FastRate) FastInvariant(cbit.vcell.math.FastInvariant)

Example 17 with FastInvariant

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

the class ITextWriter method writeFastSystem.

protected void writeFastSystem(Section container, FastSystem fs) throws DocumentException {
    Table eqTable = getTable(2, 100, 1, 2, 2);
    eqTable.addCell(createCell(VCML.FastSystem, getBold(DEF_HEADER_FONT_SIZE), 2, 1, Element.ALIGN_CENTER, true));
    eqTable.endHeaders();
    Enumeration<FastInvariant> enum_fi = fs.getFastInvariants();
    while (enum_fi.hasMoreElements()) {
        FastInvariant fi = enum_fi.nextElement();
        eqTable.addCell(createCell(VCML.FastInvariant, getFont()));
        eqTable.addCell(createCell(fi.getFunction().infix(), getFont()));
    }
    Enumeration<FastRate> enum_fr = fs.getFastRates();
    while (enum_fr.hasMoreElements()) {
        FastRate fr = enum_fr.nextElement();
        eqTable.addCell(createCell(VCML.FastRate, getFont()));
        eqTable.addCell(createCell(fr.getFunction().infix(), getFont()));
    }
    container.add(eqTable);
}
Also used : Table(com.lowagie.text.Table) FastRate(cbit.vcell.math.FastRate) FastInvariant(cbit.vcell.math.FastInvariant)

Aggregations

FastInvariant (cbit.vcell.math.FastInvariant)17 FastRate (cbit.vcell.math.FastRate)13 Variable (cbit.vcell.math.Variable)13 Expression (cbit.vcell.parser.Expression)13 MemVariable (cbit.vcell.math.MemVariable)11 VolVariable (cbit.vcell.math.VolVariable)11 MathException (cbit.vcell.math.MathException)9 ReservedVariable (cbit.vcell.math.ReservedVariable)9 FastSystem (cbit.vcell.math.FastSystem)7 CompartmentSubDomain (cbit.vcell.math.CompartmentSubDomain)5 Constant (cbit.vcell.math.Constant)5 Equation (cbit.vcell.math.Equation)5 SubDomain (cbit.vcell.math.SubDomain)5 RationalExp (cbit.vcell.matrix.RationalExp)5 Function (cbit.vcell.math.Function)4 JumpCondition (cbit.vcell.math.JumpCondition)4 MembraneSubDomain (cbit.vcell.math.MembraneSubDomain)4 OdeEquation (cbit.vcell.math.OdeEquation)4 PdeEquation (cbit.vcell.math.PdeEquation)4 MathDescription (cbit.vcell.math.MathDescription)3