public MetaPopulationModel(String name,ArrayList<DemographicModel> demographicModelList,Parameter populationProportions){
  super(name);
  this.populationProportions=populationProportions;
  if (populationProportions != null) {
    addVariable(populationProportions);
    populationProportions.addBounds(new Parameter.DefaultBounds(1.0,0.0,populationProportions.getDimension()));
    populationCount=populationProportions.getDimension() + 1;
    for (int i=1; i < populationCount; i++) {
      demographicModelList.add(demographicModelList.get(0));
    }
    demographicModels=demographicModelList.toArray(new DemographicModel[0]);
    addModel(demographicModels[0]);
  }
 else {
    populationCount=demographicModelList.size();
    demographicModels=demographicModelList.toArray(new DemographicModel[0]);
    for (int i=0; i < populationCount; i++) {
      addModel(demographicModels[i]);
    }
  }
  addStatistic(populationSizesStatistic);
}

public MetaPopulationModel ( String name , ArrayList < DemographicModel > demographicModelList , Parameter populationProportions ) { super ( name ) ; this . populationProportions = populationProportions ; if ( populationProportions != null ) { addVariable ( populationProportions ) ; populationProportions . addBounds ( new Parameter . DefaultBounds ( 1.0 , 0.0 , populationProportions . getDimension ( ) ) ) ; populationCount = populationProportions . getDimension ( ) + 1 ; for ( int i = 1 ; i < populationCount ; i ++ ) { demographicModelList . add ( demographicModelList . get ( 0 ) ) ; } demographicModels = demographicModelList . toArray ( new DemographicModel [ 0 ] ) ; addModel ( demographicModels [ 0 ] ) ; } else { populationCount = demographicModelList . size ( ) ; demographicModels = demographicModelList . toArray ( new DemographicModel [ 0 ] ) ; for ( int i = 0 ; i < populationCount ; i ++ ) { addModel ( demographicModels [ i ] ) ; } } addStatistic ( populationSizesStatistic ) ; }
construct demographic model with default settings
