atomica.system

Define internal system constants and functions

Functions

atomica_path([subdir, trailingsep]) Returns paths relative to the Atomica parent module

Classes

FrameworkSettings Define system level keywords

Exceptions

NotFoundError Error for when an item was not found
class atomica.system.FrameworkSettings[source]

Define system level keywords

This class stores sets of keywords such as the keys for different variable types, or the supported quantity types (e.g., ‘probability’, ‘number’)

DEFAULT_POP_TYPE = 'default'
DEFAULT_SYMBOL_INAPPLICABLE = 'N.A.'
KEY_CHARACTERISTIC = 'charac'
KEY_COMPARTMENT = 'comp'
KEY_INTERACTION = 'interpop'
KEY_PARAMETER = 'par'
KEY_POPULATION = 'pop'
KEY_TRANSFER = 'transfer'
KEY_TRANSITION = 'link'
QUANTITY_TYPE_DURATION = 'duration'
QUANTITY_TYPE_FRACTION = 'fraction'
QUANTITY_TYPE_NUMBER = 'number'
QUANTITY_TYPE_PROBABILITY = 'probability'
QUANTITY_TYPE_PROPORTION = 'proportion'
RESERVED_KEYWORDS = ['t', 'flow', 'all', 'dt', 'total', 'max', 'min', 'exp', 'floor', 'SRC_POP_AVG', 'TGT_POP_AVG', 'SRC_POP_SUM', 'TGT_POP_SUM', 'pi', 'cos', 'sin', 'sqrt', 'ln', 'rand', 'randn']
RESERVED_SYMBOLS = {'"', "'", '*', '+', ',', '-', '/', ':', ';'}
STANDARD_UNITS = ['probability', 'duration', 'number', 'fraction', 'proportion']
exception atomica.system.NotFoundError[source]

Error for when an item was not found

This error gets thrown if a user-specified input was not found. For example, if the user queries a Population for a non-existent variable.

atomica.system.atomica_path(subdir=None, trailingsep=True)[source]

Returns paths relative to the Atomica parent module

This function by default returns the directory containing the Atomica source files. It can also return paths relative to this directory using the optional additional arguments

Parameters:
  • subdir – Append an additional path list to Atomica path
  • trailingsep – If True, a trailing separator will be included so that the returned path can have a file name string added to it easily
Returns:

Absolute path string