Example #1
0
	def __init__(self, label = 'another reaction', 
			rate = float(10.0), propensity_scheme = 'classic', 
			propensity_function_maker = None, parent = None, 
			occurrences = [], used = None, produced = None, 
			visible_attributes = ['label', 'propensity_scheme', 
								'rate', 'used', 'produced']):
		self.system = None
		self.rate = rate
		if occurrences is None: self.occurrences = []
		else: self.occurrences = occurrences
		#instances of these are somehow coupled unless a 
		#	used and produced list is passed to init, 
		#	EVEN an empty list will do (used = [] does not!)
		if used is None: self.used = []
		else: self.used = used
		if produced is None: self.produced = []
		else: self.produced = produced
		self.propensity = 1.0
		self.propensity_minimum = 1e-30
		self.propensity_scheme = propensity_scheme
		parameter_space_templates =\
			[lgeo.interface_template_p_space_axis(parent = self, 
							p_sp_bounds = [0.0000001, 1000.0], 
							instance = self, key = 'rate')]
		modular_object.__init__(self, label = label, parent = parent, 
							visible_attributes = visible_attributes, 
			parameter_space_templates = parameter_space_templates)
Example #2
0
	def __init__(self, *args, **kwargs):
		if 'label' not in kwargs.keys(): kwargs['label'] = 'vector'
		self.impose_default('values', [1.0], **kwargs)
		self.brand_new = True
		parameter_space_templates = []
		modular_object.__init__(self, *args, 
			parameter_space_templates =				parameter_space_templates, **kwargs)
Example #3
0
 def __init__(self, *args, **kwargs):
     if "label" not in kwargs.keys():
         kwargs["label"] = "vector"
     self.impose_default("values", [1.0], **kwargs)
     self.brand_new = True
     parameter_space_templates = []
     modular_object.__init__(self, *args, parameter_space_templates=parameter_space_templates, **kwargs)
Example #4
0
	def __init__(self, x, y, z, system):
		self.xposition = x
		self.yposition = y
		self.zposition = z
		self.max_age = 1000
		self.system = system
		modular_object.__init__(self)
		self.initialize()
Example #5
0
	def __init__(self, *args, **kwargs):
		if 'label' not in kwargs.keys(): kwargs['label'] = 'variable'
		self.impose_default('value', 1.0, **kwargs)
		self.brand_new = True
		parameter_space_templates =			[lgeo.interface_template_p_space_axis(instance = self, 
								p_sp_bounds = ['-10e64', '10e64'], 
									parent = self, key = 'value')]
		modular_object.__init__(self, *args, 
			parameter_space_templates =				parameter_space_templates, **kwargs)
Example #6
0
 def __init__(self, *args, **kwargs):
     if "label" not in kwargs.keys():
         kwargs["label"] = "variable"
     self.impose_default("value", 1.0, **kwargs)
     self.brand_new = True
     parameter_space_templates = [
         lgeo.interface_template_p_space_axis(
             instance=self, p_sp_bounds=["-10e64", "10e64"], parent=self, key="value"
         )
     ]
     modular_object.__init__(self, *args, parameter_space_templates=parameter_space_templates, **kwargs)
Example #7
0
	def __init__(self, *args, **kwargs):
		if 'label' not in kwargs.keys(): kwargs['label'] = 'variable'
		self.impose_default('value', 1.0, **kwargs)
		self.brand_new = True
		parameter_space_templates =\
			[lgeo.interface_template_p_space_axis(instance = self, 
								p_sp_bounds = ['-10e64', '10e64'], 
									parent = self, key = 'value')]
		modular_object.__init__(self, *args, 
			parameter_space_templates =\
				parameter_space_templates, **kwargs)
Example #8
0
	def __init__(self, label = 'another species', initial_count = 0, 
						current_count = None, visible_attributes = \
						['label', 'initial_count'], parent = None):
		self.system = None
		self.initial_count = initial_count
		if current_count == None: self.current_count = initial_count
		else: self.current_count = current_count
		self.brand_new = True
		parameter_space_templates =\
			[lgeo.interface_template_p_space_axis(instance = self, 
				key = 'initial_count', p_sp_bounds = [0, 1000000], 
					p_sp_increment = 1, p_sp_continuous = False, 
									parent = self)]
		modular_object.__init__(self, label = label, 
						visible_attributes = visible_attributes, 
			parameter_space_templates = parameter_space_templates)
Example #9
0
 def __init__(self, label = 'another species', initial_count = 0,
      current_count = None, visible_attributes = \
      ['label', 'initial_count'], parent = None):
     self.system = None
     self.initial_count = initial_count
     if current_count == None: self.current_count = initial_count
     else: self.current_count = current_count
     self.brand_new = True
     parameter_space_templates =\
      [lgeo.interface_template_p_space_axis(instance = self,
       key = 'initial_count', p_sp_bounds = [0, 1000000],
        p_sp_increment = 1, p_sp_continuous = False,
            parent = self)]
     modular_object.__init__(
         self,
         label=label,
         visible_attributes=visible_attributes,
         parameter_space_templates=parameter_space_templates)
Example #10
0
 def __init__(self,
              label='another reaction',
              rate=float(10.0),
              propensity_scheme='classic',
              propensity_function_maker=None,
              parent=None,
              occurrences=[],
              used=None,
              produced=None,
              visible_attributes=[
                  'label', 'propensity_scheme', 'rate', 'used', 'produced'
              ]):
     self.system = None
     self.rate = rate
     if occurrences is None: self.occurrences = []
     else: self.occurrences = occurrences
     #instances of these are somehow coupled unless a
     #	used and produced list is passed to init,
     #	EVEN an empty list will do (used = [] does not!)
     if used is None: self.used = []
     else: self.used = used
     if produced is None: self.produced = []
     else: self.produced = produced
     self.propensity = 1.0
     self.propensity_minimum = 1e-30
     self.propensity_scheme = propensity_scheme
     parameter_space_templates =\
      [lgeo.interface_template_p_space_axis(parent = self,
          p_sp_bounds = [0.0000001, 1000.0],
          instance = self, key = 'rate')]
     modular_object.__init__(
         self,
         label=label,
         parent=parent,
         visible_attributes=visible_attributes,
         parameter_space_templates=parameter_space_templates)
Example #11
0
	def __init__(self, *args, **kwargs):
		if 'label' not in kwargs.keys(): kwargs['label'] = 'function'
		self.impose_default('func_statement', '', **kwargs)
		self.brand_new = True
		modular_object.__init__(self, *args, **kwargs)
Example #12
0
 def __init__(self, *args, **kwargs):
     if 'label' not in kwargs.keys(): kwargs['label'] = 'function'
     self.impose_default('func_statement', '', **kwargs)
     self.brand_new = True
     modular_object.__init__(self, *args, **kwargs)