Пример #1
0
factory = GenomFactory(chambers_limit=5)
genom_factory = lambda: factory.generate
forams = create_forams(1, initial_energy=5)

insolation_meter = StaticInsolation
size = lambda: 50

reproduction_minimum = lambda: 50
movement_energy = lambda: 0.5
growth_minimum = lambda: 30
energy_need = lambda: 0.2
algae_limit = lambda: 20
algae_growth_probability = lambda: 0.3
newborn_limit = lambda:6
reproduction_probability = lambda: 0.5
growth_probability = lambda: 0.5
growth_cost_factor = lambda: 0.8
capacity_factor = lambda: 1.1
initial_algae_probability = lambda: 0.2
environment = environment_factory(regeneration_factor=0.1, clazz=Environment3d)
stop_condition = lambda: StepLimitStopCondition(500)
stats = lambda: MultipleStatistics([CsvStatistics(), PsiStatistics()])
cell_capacity = lambda: 1


address_provider = address.SequenceAddressProvider
request_dispatcher = create_dispatcher()
neighbour_matcher = Neighbour3dMatcher
ns_hostname = lambda: "127.0.0.1"
pyro_daemon = Pyro4.Daemon()
daemon = lambda: pyro_daemon
Пример #2
0
from pyage_forams.solutions.insolation_meter import DynamicInsolation
from pyage_forams.solutions.statistics import SimpleStatistics, PsiStatistics, CsvStatistics, MultipleStatistics


factory = GenomFactory(chambers_limit=5)
genom_factory = lambda: factory.generate
forams = create_forams(8, initial_energy=5)
agents = create_agent
insolation_meter = lambda: DynamicInsolation([(20, 10, 0.2), (10, 20, 0.4)])
size = lambda: (10, 15, 20)

reproduction_minimum = lambda: 10
movement_energy = lambda: 0.25
growth_minimum = lambda: 10
energy_need = lambda: 0.2
algae_limit = lambda: 20
algae_growth_probability = lambda: 0.3
newborn_limit = lambda: 9
reproduction_probability = lambda: 0.8
growth_probability = lambda: 0.8
growth_cost_factor = lambda: 0.5
capacity_factor = lambda: 1.1
initial_algae_probability = lambda: 0.3
cell_capacity = lambda: 2

environment = environment_factory(regeneration_factor=0.1, clazz=Environment3d)

stop_condition = lambda: StepLimitStopCondition(90)

address_provider = address.SequenceAddressProvider
stats = lambda: MultipleStatistics([CsvStatistics(), PsiStatistics()])