Name | EcoSim JSON |
Version |
0.0.1
JSON |
| download |
home_page | https://github.com/FlacSy/EcoSim |
Summary | A library for ecological systems modeling and simulations |
upload_time | 2024-05-30 11:33:47 |
maintainer | None |
docs_url | None |
author | FlacSy |
requires_python | None |
license | None |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# EcoSim
EcoSim - это библиотека для проведения симуляций экосистем с учетом множества факторов.
## Установка
Установка производится через pip:
```bash
pip install ecosim
```
Для установки последней версии из репозитория:
```bash
pip install git+https://github.com/FlacSy/EcoSim
```
## Быстрый старт
### Импорт и использование библиотеки
```python
from ecosim import Climate, AnimalPopulation, PlantDistribution, Ecosystem, PredatorPreyPopulation, plot_simulation
def main():
# Создание объектов, описывающих климат, популяцию животных, распределение растений и взаимодействие хищник-жертва
climate = Climate(initial_temperature=15.0, temperature_variability=1.0, initial_precipitation=100.0, precipitation_variability=10.0)
animal_population = AnimalPopulation(initial_population=100, birth_rate=0.1, death_rate=0.05, migration_rate=0.01)
plant_distribution = PlantDistribution(initial_distribution=1000, spread_rate=50, competition_factor=0.01)
predator_prey_population = PredatorPreyPopulation(prey_population=500, predator_population=50, prey_birth_rate=0.2, predator_birth_rate=0.1, predation_rate=0.01, predator_death_rate=0.05)
# Создание экосистемы с учетом заданных параметров
ecosystem = Ecosystem(climate, animal_population, plant_distribution, predator_prey_population)
# Подготовка данных для симуляции
data = {
'Temperature': [],
'Precipitation': [],
'Animal Population': [],
'Plant Distribution': [],
'Prey Population': [],
'Predator Population': []
}
# Симуляция на протяжении 50 лет
for year in range(50):
ecosystem.simulate_year()
# Запись данных о состоянии экосистемы
data['Temperature'].append(climate.temperature)
data['Precipitation'].append(climate.precipitation)
data['Animal Population'].append(animal_population.population)
data['Plant Distribution'].append(plant_distribution.distribution)
data['Prey Population'].append(predator_prey_population.prey_population)
data['Predator Population'].append(predator_prey_population.predator_population)
# Визуализация результатов симуляции
plot_simulation(data, 'Ecosystem Simulation Over 50 Years').show()
if __name__ == '__main__':
main()
```
## Лицензия
EcoSim распространяется под [MIT License](LICENSE). Подробности доступны в файле LICENSE.
Raw data
{
"_id": null,
"home_page": "https://github.com/FlacSy/EcoSim",
"name": "EcoSim",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "FlacSy",
"author_email": "flacsy.tw@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/d1/32/2c23058510ba8ef4714487773aedde4cf5e804bc209e9459b4b2ab4d6940/EcoSim-0.0.1.tar.gz",
"platform": null,
"description": "# EcoSim\r\n\r\nEcoSim - \u044d\u0442\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0441\u0438\u043c\u0443\u043b\u044f\u0446\u0438\u0439 \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0444\u0430\u043a\u0442\u043e\u0440\u043e\u0432.\r\n\r\n## \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430\r\n\r\n\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 pip:\r\n\r\n```bash\r\npip install ecosim\r\n```\r\n\r\n\u0414\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f:\r\n\r\n```bash\r\npip install git+https://github.com/FlacSy/EcoSim\r\n```\r\n\r\n## \u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u0442\u0430\u0440\u0442\r\n\r\n### \u0418\u043c\u043f\u043e\u0440\u0442 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438\r\n\r\n```python\r\nfrom ecosim import Climate, AnimalPopulation, PlantDistribution, Ecosystem, PredatorPreyPopulation, plot_simulation\r\n\r\ndef main():\r\n # \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0438\u0445 \u043a\u043b\u0438\u043c\u0430\u0442, \u043f\u043e\u043f\u0443\u043b\u044f\u0446\u0438\u044e \u0436\u0438\u0432\u043e\u0442\u043d\u044b\u0445, \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0440\u0430\u0441\u0442\u0435\u043d\u0438\u0439 \u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0445\u0438\u0449\u043d\u0438\u043a-\u0436\u0435\u0440\u0442\u0432\u0430\r\n climate = Climate(initial_temperature=15.0, temperature_variability=1.0, initial_precipitation=100.0, precipitation_variability=10.0)\r\n animal_population = AnimalPopulation(initial_population=100, birth_rate=0.1, death_rate=0.05, migration_rate=0.01)\r\n plant_distribution = PlantDistribution(initial_distribution=1000, spread_rate=50, competition_factor=0.01)\r\n predator_prey_population = PredatorPreyPopulation(prey_population=500, predator_population=50, prey_birth_rate=0.2, predator_birth_rate=0.1, predation_rate=0.01, predator_death_rate=0.05)\r\n\r\n # \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432\r\n ecosystem = Ecosystem(climate, animal_population, plant_distribution, predator_prey_population)\r\n\r\n # \u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0441\u0438\u043c\u0443\u043b\u044f\u0446\u0438\u0438\r\n data = {\r\n 'Temperature': [],\r\n 'Precipitation': [],\r\n 'Animal Population': [],\r\n 'Plant Distribution': [],\r\n 'Prey Population': [],\r\n 'Predator Population': []\r\n }\r\n\r\n # \u0421\u0438\u043c\u0443\u043b\u044f\u0446\u0438\u044f \u043d\u0430 \u043f\u0440\u043e\u0442\u044f\u0436\u0435\u043d\u0438\u0438 50 \u043b\u0435\u0442\r\n for year in range(50):\r\n ecosystem.simulate_year()\r\n # \u0417\u0430\u043f\u0438\u0441\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u044b\r\n data['Temperature'].append(climate.temperature)\r\n data['Precipitation'].append(climate.precipitation)\r\n data['Animal Population'].append(animal_population.population)\r\n data['Plant Distribution'].append(plant_distribution.distribution)\r\n data['Prey Population'].append(predator_prey_population.prey_population)\r\n data['Predator Population'].append(predator_prey_population.predator_population)\r\n \r\n # \u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0441\u0438\u043c\u0443\u043b\u044f\u0446\u0438\u0438\r\n plot_simulation(data, 'Ecosystem Simulation Over 50 Years').show()\r\n\r\nif __name__ == '__main__':\r\n main()\r\n\r\n```\r\n\r\n## \u041b\u0438\u0446\u0435\u043d\u0437\u0438\u044f\r\n\r\nEcoSim \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0434 [MIT License](LICENSE). \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0432 \u0444\u0430\u0439\u043b\u0435 LICENSE.\r\n",
"bugtrack_url": null,
"license": null,
"summary": "A library for ecological systems modeling and simulations",
"version": "0.0.1",
"project_urls": {
"Homepage": "https://github.com/FlacSy/EcoSim"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d1322c23058510ba8ef4714487773aedde4cf5e804bc209e9459b4b2ab4d6940",
"md5": "3d6004c8fecd5fd93f94b1e5b750d9c5",
"sha256": "44cdb5c048ad965befe867e6d5d79114d8c64c644c047402f2e5e7bd789a3895"
},
"downloads": -1,
"filename": "EcoSim-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "3d6004c8fecd5fd93f94b1e5b750d9c5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4316,
"upload_time": "2024-05-30T11:33:47",
"upload_time_iso_8601": "2024-05-30T11:33:47.914639Z",
"url": "https://files.pythonhosted.org/packages/d1/32/2c23058510ba8ef4714487773aedde4cf5e804bc209e9459b4b2ab4d6940/EcoSim-0.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-30 11:33:47",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "FlacSy",
"github_project": "EcoSim",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "ecosim"
}