private void ImportInitialAssignment(InitialAssignment initialAssignment, Model model) { var symbol = initialAssignment.getSymbol(); if (IsParameter(symbol)) { var parameter = GetParameter(symbol); SetPSV(initialAssignment.getMath(), parameter, String.Empty); return; } if (IsContainerSizeParameter(symbol)) { var sizeParameter = GetContainerSizeParameter(symbol); SetPSV(initialAssignment.getMath(), sizeParameter, symbol); return; } if (IsSpeciesAssignment(symbol)) { DoSpeciesAssignment(symbol, initialAssignment.getMath(), isInitialAssignment: true); } CheckSpeciesReferences(initialAssignment.getId(), symbol, model); }
public void test_InitialAssignment_setMath1() { ASTNode math = libsbml.parseFormula("2 * k"); int i = E.setMath(math); assertTrue(i == libsbml.LIBSBML_OPERATION_SUCCESS); assertTrue(E.getMath() != math); assertEquals(true, E.isSetMath()); i = E.setMath(null); assertTrue(i == libsbml.LIBSBML_OPERATION_SUCCESS); assertTrue(E.getMath() == null); assertEquals(false, E.isSetMath()); math = null; }
public void test_InitialAssignment_create() { assertTrue(IA.getTypeCode() == libsbml.SBML_INITIAL_ASSIGNMENT); assertTrue(IA.getMetaId() == ""); assertTrue(IA.getNotes() == null); assertTrue(IA.getAnnotation() == null); assertTrue(IA.getSymbol() == ""); assertTrue(IA.getMath() == null); }