Search in sources :

Example 1 with ExponentialLogisticModel

use of dr.evomodel.coalescent.ExponentialLogisticModel in project beast-mcmc by beast-dev.

the class ExponentialLogisticModelParser method parseXMLObject.

public Object parseXMLObject(XMLObject xo) throws XMLParseException {
    Units.Type units = XMLUnits.Utils.getUnitsAttr(xo);
    XMLObject cxo = xo.getChild(POPULATION_SIZE);
    Parameter N0Param = (Parameter) cxo.getChild(Parameter.class);
    cxo = xo.getChild(LOGISTIC_GROWTH_RATE);
    Parameter logGrowthParam = (Parameter) cxo.getChild(Parameter.class);
    cxo = xo.getChild(LOGISTIC_SHAPE);
    Parameter shapeParam = (Parameter) cxo.getChild(Parameter.class);
    cxo = xo.getChild(EXPONENTIAL_GROWTH_RATE);
    Parameter expGrowthParam = (Parameter) cxo.getChild(Parameter.class);
    cxo = xo.getChild(TRANSITION_TIME);
    Parameter timeParam = (Parameter) cxo.getChild(Parameter.class);
    double alpha = xo.getDoubleAttribute(ALPHA);
    return new ExponentialLogisticModel(N0Param, logGrowthParam, shapeParam, expGrowthParam, timeParam, alpha, units);
}
Also used : ExponentialLogisticModel(dr.evomodel.coalescent.ExponentialLogisticModel) Parameter(dr.inference.model.Parameter) Units(dr.evolution.util.Units) XMLUnits(dr.evoxml.util.XMLUnits)

Aggregations

Units (dr.evolution.util.Units)1 ExponentialLogisticModel (dr.evomodel.coalescent.ExponentialLogisticModel)1 XMLUnits (dr.evoxml.util.XMLUnits)1 Parameter (dr.inference.model.Parameter)1