Born Species
MobsPy deals with meta-species in the products that do not have a match in the meta-reactants in a different way. Firstly, we refer to these species as born species. Since these species have no matching meta-species in the reactans to be used in to construct the product, MobsPy uses their default state (see Initial Conditions). One can also perform a query for non-default characteristics.
[1]:
from mobspy import *
Age, Size = BaseSpecies()
Age.young, Age.old
Size.small, Size.big
Something = Age*Size
Zero >> Something [1]
Zero >> Something.big [1]
S_1 = Simulation(Something)
print(S_1.compile())
Species
Something.big.old,0
Something.big.young,0
Something.small.old,0
Something.small.young,0
Mappings
Something :
Something.big.old
Something.big.young
Something.small.old
Something.small.young
Parameters
volume,1
Reactions
reaction_0,{'re': [], 'pr': [(1, 'Something.big.young')], 'kin': '1'}
reaction_1,{'re': [], 'pr': [(1, 'Something.small.young')], 'kin': '1'}
Compiling model
If one wishes to change this they can use the All operator. With the All operator, all possible states of the meta-species in the product will be used to generate a reaction. Much like the previous case queries can be performed and here they will act as a filter to determine the subset of all states that will be used in the product.
[2]:
from mobspy import *
Age, Size = BaseSpecies()
Age.young, Age.old
Size.small, Size.big
Something = Age*Size
Zero >> All[Something] [1]
Zero >> All[Something.big] [2]
S_1 = Simulation(Something)
print(S_1.compile())
Species
Something.big.old,0
Something.big.young,0
Something.small.old,0
Something.small.young,0
Mappings
Something :
Something.big.old
Something.big.young
Something.small.old
Something.small.young
Parameters
volume,1
Reactions
reaction_0,{'re': [], 'pr': [(1, 'Something.big.old')], 'kin': '1'}
reaction_1,{'re': [], 'pr': [(1, 'Something.big.old')], 'kin': '2'}
reaction_2,{'re': [], 'pr': [(1, 'Something.big.young')], 'kin': '1'}
reaction_3,{'re': [], 'pr': [(1, 'Something.big.young')], 'kin': '2'}
reaction_4,{'re': [], 'pr': [(1, 'Something.small.old')], 'kin': '1'}
reaction_5,{'re': [], 'pr': [(1, 'Something.small.young')], 'kin': '1'}
Compiling model