/** * Returns the number of {@link Compartment}s of this {@link Model}. * * @return the number of {@link Compartment}s of this {@link Model}. */ public int getCompartmentCount() { return isSetListOfCompartments() ? listOfCompartments.size() : 0; }
@Override public boolean check(ValidationContext ctx, Model m) { if (m.isSetListOfCompartments() || m.isListOfCompartmentsEmpty()) { return new UnknownAttributeValidationFunction<TreeNodeWithChangeSupport>().check(ctx, m.getListOfCompartments()); } return true; } };
@Override public boolean check(ValidationContext ctx, Model m) { if (m.isSetListOfCompartments() || m.isListOfCompartmentsEmpty()) { return new UnknownElementValidationFunction<TreeNodeWithChangeSupport>().check(ctx, m.getListOfCompartments()); } return true; } };
@Override public boolean check(ValidationContext ctx, InitialAssignment ia) { Model m = ia.getModel(); if (ia.isSetSymbol() && m != null) { String s = ia.getSymbol(); Compartment c = m.isSetListOfCompartments() ? m.getCompartment(s) : null; if (c != null && c.getSpatialDimensions() == 0) { ValidationConstraint.logError(ctx, CORE_20806, ia, ia.getVariable()); return false; } } return true; } };
if (model.isSetListOfCompartments()) { for (Compartment c : model.getListOfCompartments()) { if ((model.getLevel()==1) || !(c.isConstant())) {
if (model.isSetListOfCompartments()) { for (int i = 0; i < model.getCompartmentCount(); i++) { Compartment compartment = model.getCompartment(i);
boolean checkL2 = (m.isSetListOfCompartments() && m.getCompartment(symbol) != null) || (m.isSetListOfSpecies() && m.getSpecies(symbol) != null) || (m.isSetListOfParameters() && m.getParameter(symbol) != null);
setListOfSpeciesTypes(model.getListOfSpeciesTypes().clone()); if (model.isSetListOfCompartments()) { setListOfCompartments(model.getListOfCompartments().clone());