Restraints
MobsPy has some restraints for modeling regarding the characteristics combinations. In this model, we will discuss them.
[4]:
from mobspy import *
try:
# Here we define two base Species
A, C = BaseSpecies(2)
# We them add two characteristics to characteristics to each of them
A.aaa, A.bbb
C.aaa, C.ccc
# And add them to the simulation object
MySim = Simulation(A | C)
MySim.compile()
except SystemExit:
pass
ERROR: A characteristic must be unique for each species
Repetition in: C, A
Characteristics: {'aaa', 'ccc'}, {'aaa', 'bbb'}
MobsPy does not allow for the same characteristic to be added to two different meta-species to allow for the proper query structure. Characteristics can only be shared through inheritance. This model does not compile because both A and C have the characteristic ‘aaa’ added to them.
[ ]: