def test_num_animals_and_add_population(self, input_map, ini_pop,
                                         add_carns):
     """"""
     s = BioSim(input_map, ini_pop, seed=1)
     assert s.num_animals_per_species['Herbivore'] > 0
     assert s.num_animals_per_species['Carnivore'] > 0
     prev_carns = s.num_animals_per_species['Carnivore']
     s.add_population(add_carns)
     assert s.num_animals_per_species['Carnivore'] > prev_carns
Ejemplo n.º 2
0
                 seed=123456,
                 total_years=2000,
                 img_base='Raw_Images',
                 cmax_animals={
                     'Herbivore': 100,
                     'Carnivore': 100
                 })

    sim.set_animal_parameters("Herbivore", {"zeta": 3.2, "xi": 1.8})
    sim.set_animal_parameters(
        "Carnivore",
        {
            "a_half": 70,
            "phi_age": 0.5,
            "omega": 0.3,
            "F": 65,
            "DeltaPhiMax": 9.0,
        },
    )
    sim.set_landscape_parameters("J", {"f_max": 700})

    sim.simulate(num_years=50, vis_years=1, img_years=10)

    sim.add_population(population=ini_carns)
    sim.simulate(num_years=1800, vis_years=1, img_years=10)
    sim.make_movie()

    plt.savefig("check_sim.pdf")

    # input("Press ENTER")