예제 #1
0
        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);
        }
예제 #2
0
        public void test_InitialAssignment_setSymbol2()
        {
            string id = "e1";
            int    i  = E.setSymbol(id);

            assertTrue(i == libsbml.LIBSBML_OPERATION_SUCCESS);
            assertTrue((id == E.getSymbol()));
            assertEquals(true, E.isSetSymbol());
            i = E.setSymbol("");
            assertTrue(i == libsbml.LIBSBML_OPERATION_SUCCESS);
            assertEquals(false, E.isSetSymbol());
        }
예제 #3
0
 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);
 }