private void adjustDisplayPathForGallBladder(PathElements pathElements, IQuantity quantity)
      {
         if (quantity.IsNamed(CoreConstants.Observer.FRACTION_EXCRETED_TO_BILE))
            return;

         adjustDisplayPathForContainerObserver(pathElements, quantity);
      }
 private bool isMoleculeConcentrationInConcentrationBasedProject(IQuantity quantity)
 {
     return(quantity.IsAnImplementationOf <IParameter>() &&
            _reactionDimensionRetriever.SelectedDimensionMode == ReactionDimensionMode.ConcentrationBased &&
            quantity.IsNamed(Constants.Parameters.CONCENTRATION) &&
            quantity.ParentContainer.IsAnImplementationOf <IMoleculeAmount>());
 }
Exemplo n.º 3
0
        private void adjustDisplayPathForQuantity(PathElements pathElements, IQuantity quantity)
        {
            if (quantity.HasAncestorNamed(CoreConstants.Organ.GALLBLADDER))
            {
                adjustDisplayPathForGallBladder(pathElements, quantity);
            }

            else if (quantity.HasAncestorNamed(CoreConstants.Organ.LUMEN))
            {
                adjustDisplayPathForLumen(pathElements, quantity);
            }

            else if (quantity.IsNamed(CoreConstants.Observer.PLASMA_UNBOUND))
            {
                adjustDisplayPathForContainerObserver(pathElements, quantity);
            }

            else if (quantity.Name.StartsWith(CoreConstants.Observer.TOTAL_FRACTION_OF_DOSE))
            {
                adjustDisplayPathForTotalFractionOfDose(pathElements, quantity);
            }

            //Container observers directly in a container located under organism
            else if (!pathElements.Contains(PathElementId.BottomCompartment))
            {
                adjustDisplayPathForContainerObserver(pathElements, quantity);
            }

            else if (quantity.IsAnImplementationOf <IObserver>())
            {
                adjustDisplayNameForMoleculeObserver(pathElements, quantity.DowncastTo <IObserver>());
            }
        }
Exemplo n.º 4
0
        private void adjustDisplayPathForQuantity(PathElements pathElements, IQuantity quantity)
        {
            if (quantity.HasAncestorNamed(CoreConstants.Organ.Gallbladder))
            {
                adjustDisplayPathForGallBladder(pathElements, quantity);
            }

            else if (quantity.HasAncestorNamed(CoreConstants.Organ.Lumen))
            {
                adjustDisplayPathForLumen(pathElements, quantity);
            }

            else if (quantity.IsNamed(PLASMA_UNBOUND))
            {
                adjustDisplayPathForContainerObserver(pathElements, quantity);
            }

            else if (!pathElements.Contains(PathElement.BottomCompartment))
            {
                adjustDisplayPathForContainerObserver(pathElements, quantity);
            }

            else if (quantity.IsAnImplementationOf <IObserver>())
            {
                adjustDisplayNameForMoleculeObserver(pathElements, quantity.DowncastTo <IObserver>());
            }
        }
 private bool isMoleculeStartValue(IQuantity changedQuantity, IMoBiBuildConfiguration buildConfiguration)
 {
     return(changedQuantity.IsAnImplementationOf <IMoleculeAmount>() ||
            (changedQuantity.ParentContainer.IsAnImplementationOf <IMoleculeAmount>() && changedQuantity.IsNamed(Constants.Parameters.START_VALUE)));
 }