Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
        public void test_InitialAssignment_copyConstructor()
        {
            InitialAssignment o1 = new InitialAssignment(2, 4);

            o1.setSymbol("c");
            assertTrue(o1.getId() == "c");
            InitialAssignment o2 = new InitialAssignment(o1);

            assertTrue(o2.getId() == "c");
            assertTrue(o2.getParentSBMLObject() == o1.getParentSBMLObject());
            o2 = null;
            o1 = null;
        }