use of dr.evomodel.coalescent.demographicmodel.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);
}
Aggregations