pyVolutionary 2.4.1__tar.gz → 2.5.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/PKG-INFO +12 -12
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/README.md +8 -1
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyproject.toml +14 -9
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/__init__.py +5 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/abstract.py +3 -2
- pyvolutionary-2.5.0/pyvolutionary/ficks_law/__init__.py +2 -0
- pyvolutionary-2.5.0/pyvolutionary/ficks_law/ficks_law_optimization.py +131 -0
- pyvolutionary-2.5.0/pyvolutionary/ficks_law/models.py +61 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/grey_wolf/grey_wolf_optimization.py +2 -2
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/helpers.py +80 -1
- pyvolutionary-2.5.0/pyvolutionary/henry_gas_solubility/__init__.py +2 -0
- pyvolutionary-2.5.0/pyvolutionary/henry_gas_solubility/henry_gas_solubility_optimization.py +80 -0
- pyvolutionary-2.5.0/pyvolutionary/henry_gas_solubility/models.py +21 -0
- pyvolutionary-2.5.0/pyvolutionary/hunger_games_search/__init__.py +2 -0
- pyvolutionary-2.5.0/pyvolutionary/hunger_games_search/hunger_games_search_optimization.py +89 -0
- pyvolutionary-2.5.0/pyvolutionary/hunger_games_search/models.py +29 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/models.py +1 -1
- pyvolutionary-2.5.0/pyvolutionary/multi_verse/__init__.py +2 -0
- pyvolutionary-2.5.0/pyvolutionary/multi_verse/models.py +29 -0
- pyvolutionary-2.5.0/pyvolutionary/multi_verse/multi_verse_optimization.py +55 -0
- pyvolutionary-2.5.0/pyvolutionary/runge_kutta/__init__.py +2 -0
- pyvolutionary-2.5.0/pyvolutionary/runge_kutta/models.py +8 -0
- pyvolutionary-2.5.0/pyvolutionary/runge_kutta/runge_kutta_optimization.py +124 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/utils.py +1 -60
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/african_vulture/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/african_vulture/african_vulture_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/african_vulture/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/ant_colony/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/ant_colony/ant_colony_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/ant_colony/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/ant_lion/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/ant_lion/ant_lion_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/ant_lion/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/aquila/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/aquila/aquila_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/aquila/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/archimede/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/archimede/archimede_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/archimede/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/bacterial_foraging/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/bacterial_foraging/bacterial_foraging_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/bacterial_foraging/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/bat/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/bat/bat_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/bat/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/battle_royale/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/battle_royale/battle_royale_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/battle_royale/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/bee_colony/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/bee_colony/bee_colony_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/bee_colony/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/biogeography_based/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/biogeography_based/biogeography_based_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/biogeography_based/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/brain_storm/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/brain_storm/brain_storm_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/brain_storm/improved_brain_storm_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/brain_storm/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/brown_bear/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/brown_bear/brown_bear_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/brown_bear/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/camel_caravan/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/camel_caravan/camel_caravan_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/camel_caravan/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/cat_swarm/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/cat_swarm/cat_swarm_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/cat_swarm/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/chaos_game/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/chaos_game/chaos_game_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/chaos_game/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/chernobyl_disaster/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/chernobyl_disaster/chernobyl_disaster_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/chernobyl_disaster/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/coati/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/coati/coati_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/coati/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/coral_reef/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/coral_reef/coral_reef_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/coral_reef/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/coronavirus_herd_immunity/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/coronavirus_herd_immunity/coronavirus_herd_immunity_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/coronavirus_herd_immunity/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/coyotes/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/coyotes/coyotes_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/coyotes/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/cuckoo_search/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/cuckoo_search/cuckoo_search_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/cuckoo_search/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/dragonfly/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/dragonfly/dragonfly_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/dragonfly/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/dwarf_mongoose/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/dwarf_mongoose/dwarf_mongoose_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/dwarf_mongoose/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/earthworms/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/earthworms/earthworms_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/earthworms/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/egret_swarm/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/egret_swarm/egret_swarm_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/egret_swarm/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/electromagnetic_field/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/electromagnetic_field/electromagnetic_field_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/electromagnetic_field/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/elephant_herd/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/elephant_herd/elephant_herd_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/elephant_herd/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/energy_valley/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/energy_valley/energy_valley_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/energy_valley/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/enums.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/firefly_swarm/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/firefly_swarm/firefly_swarm_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/firefly_swarm/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/firehawk/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/firehawk/firehawk_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/firehawk/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/fireworks/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/fireworks/fireworks_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/fireworks/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/fish_school_search/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/fish_school_search/fish_school_search_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/fish_school_search/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/flower_pollination_algorithm/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/flower_pollination_algorithm/flower_pollination_algorithm_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/flower_pollination_algorithm/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/forensic_based_investigation/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/forensic_based_investigation/forensic_based_investigation_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/forensic_based_investigation/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/forest_algorithm/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/forest_algorithm/forest_optimization_algorithm.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/forest_algorithm/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/fox/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/fox/fox_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/fox/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/gaining_sharing_knowledge_algorithm/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/gaining_sharing_knowledge_algorithm/gaining_sharing_knowledge_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/gaining_sharing_knowledge_algorithm/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/genetic_algorithm/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/genetic_algorithm/classes.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/genetic_algorithm/genetic_algorithm_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/genetic_algorithm/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/germinal_center/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/germinal_center/germinal_center_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/germinal_center/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/giant_trevally/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/giant_trevally/giant_trevally_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/giant_trevally/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/giza_pyramid_construction/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/giza_pyramid_construction/giza_pyramid_construction_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/giza_pyramid_construction/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/golden_jackal/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/golden_jackal/golden_jackal_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/golden_jackal/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/grasshopper/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/grasshopper/grasshopper_optimization_algorithm.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/grasshopper/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/grey_wolf/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/grey_wolf/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/gridsearchcv.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/harmony_search/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/harmony_search/harmony_search_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/harmony_search/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/heap_based/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/heap_based/heap_based_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/heap_based/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/imperialist_competitive/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/imperialist_competitive/classes.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/imperialist_competitive/imperialist_competitive_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/imperialist_competitive/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/invasive_weed/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/invasive_weed/invasive_weed_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/invasive_weed/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/krill_herd/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/krill_herd/krill_herd_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/krill_herd/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/levi_jaya_swarm/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/levi_jaya_swarm/levy_flight_jaya_swarm_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/levi_jaya_swarm/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/marine_predators/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/marine_predators/marine_predators_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/marine_predators/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/monarch_butterfly/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/monarch_butterfly/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/monarch_butterfly/monarch_butterfly_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/moth_flame/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/moth_flame/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/moth_flame/moth_flame_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/mountain_gazelle/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/mountain_gazelle/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/mountain_gazelle/mountain_gazelle_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/multitask.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/nuclear_reaction/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/nuclear_reaction/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/nuclear_reaction/nuclear_reaction_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/osprey/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/osprey/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/osprey/osprey_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/particle_swarm/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/particle_swarm/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/particle_swarm/particle_swarm_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/pathfinder_algorithm/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/pathfinder_algorithm/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/pathfinder_algorithm/pathfinder_algorithm_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/pelican/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/pelican/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/pelican/pelican_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/salp_swarm/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/salp_swarm/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/salp_swarm/salp_swarm_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/seagull/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/seagull/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/seagull/seagull_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/serval/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/serval/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/serval/serval_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/siberian_tiger/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/siberian_tiger/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/siberian_tiger/siberian_tiger_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/sine_cosine_algorithm/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/sine_cosine_algorithm/classes.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/sine_cosine_algorithm/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/sine_cosine_algorithm/qle_sine_cosine_algorithm_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/sine_cosine_algorithm/sine_cosine_algorithm_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/spotted_hyena/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/spotted_hyena/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/spotted_hyena/spotted_hyena_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/success_history_intelligent/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/success_history_intelligent/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/success_history_intelligent/success_history_intelligent_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/swarm_hill_climbing/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/swarm_hill_climbing/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/swarm_hill_climbing/swarm_hill_climbing_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/tasmanian_devil/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/tasmanian_devil/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/tasmanian_devil/tasmanian_devil_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/tuna_swarm/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/tuna_swarm/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/tuna_swarm/tuna_swarm_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/virus_colony_search/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/virus_colony_search/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/virus_colony_search/virus_colony_search_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/walrus/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/walrus/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/walrus/walrus_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/war_strategy/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/war_strategy/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/war_strategy/war_strategy_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/water_cycle/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/water_cycle/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/water_cycle/water_cycle_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/whales/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/whales/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/whales/whales_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/wildebeest_herd/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/wildebeest_herd/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/wildebeest_herd/wildebeest_herd_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/wind_driven/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/wind_driven/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/wind_driven/wind_driven_optimization.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/zebra/__init__.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/zebra/models.py +0 -0
- {pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/zebra/zebra_optimization.py +0 -0
|
@@ -1,30 +1,23 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pyVolutionary
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.5.0
|
|
4
4
|
Summary: pyVolutionary is a package collecting metaheuristic algorithms, available for free usage and able to solve a wide range of optimization problems.
|
|
5
5
|
Home-page: https://github.com/matteocacciola/pyvolutionary
|
|
6
6
|
License: MIT
|
|
7
7
|
Author: Matteo Cacciola
|
|
8
8
|
Author-email: matteo.cacciola@gmail.com
|
|
9
|
-
Requires-Python: >=3.
|
|
9
|
+
Requires-Python: >=3.10
|
|
10
10
|
Classifier: Development Status :: 5 - Production/Stable
|
|
11
11
|
Classifier: License :: OSI Approved :: MIT License
|
|
12
12
|
Classifier: Programming Language :: Python :: 3
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
14
13
|
Classifier: Programming Language :: Python :: 3.10
|
|
15
14
|
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
17
15
|
Classifier: Topic :: Scientific/Engineering
|
|
18
16
|
Classifier: Topic :: Software Development
|
|
19
|
-
Requires-Dist:
|
|
20
|
-
Requires-Dist: install (>=1.3.5,<2.0.0)
|
|
21
|
-
Requires-Dist: matplotlib (>=3.8.1,<4.0.0)
|
|
22
|
-
Requires-Dist: numpy (>=1.26.1,<2.0.0)
|
|
23
|
-
Requires-Dist: opfunu (>=1.0.1,<2.0.0)
|
|
17
|
+
Requires-Dist: numpy (>=2.1.1,<3.0.0)
|
|
24
18
|
Requires-Dist: pandas (>=2.2.0,<3.0.0)
|
|
25
|
-
Requires-Dist: pydantic (>=2.
|
|
19
|
+
Requires-Dist: pydantic (>=2.9.0,<3.0.0)
|
|
26
20
|
Requires-Dist: scipy (>=1.12.0,<2.0.0)
|
|
27
|
-
Requires-Dist: sphynx (>=0.0.3,<0.0.4)
|
|
28
21
|
Project-URL: Repository, https://github.com/matteocacciola/pyvolutionary
|
|
29
22
|
Description-Content-Type: text/markdown
|
|
30
23
|
|
|
@@ -40,11 +33,13 @@ Description-Content-Type: text/markdown
|
|
|
40
33
|

|
|
41
34
|

|
|
42
35
|
[](https://pypi.python.org/pypi/pyvolutionary)
|
|
43
|
-
|
|
36
|
+

|
|
44
37
|

|
|
45
38
|

|
|
46
39
|

|
|
47
40
|
[](https://pepy.tech/project/pyvolutionary)
|
|
41
|
+
[](https://pepy.tech/project/pyvolutionary)
|
|
42
|
+
[](https://pepy.tech/project/pyvolutionary)
|
|
48
43
|

|
|
49
44
|

|
|
50
45
|
[](http://isitmaintained.com/project/matteocacciola/pyvolutionary "Average time to resolve an issue")
|
|
@@ -712,6 +707,7 @@ The following algorithms are currently implemented in **pyVolutionary**:
|
|
|
712
707
|
| Electromagnetic Field Optimization | `ElectromagneticFieldOptimization` | 2016 | [paper](https://doi.org/10.1016/j.swevo.2015.07.002) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/efo.py) |
|
|
713
708
|
| Elephant Herd Optimization | `ElephantHerdOptimization` | 2015 | [paper](https://ieeexplore.ieee.org/document/7383528) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/eho.py) |
|
|
714
709
|
| Energy Valley Optimization | `EnergyValleyOptimization` | 2023 | [paper](https://www.nature.com/articles/s41598-022-27344-y) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/evo.py) |
|
|
710
|
+
| Fick's Law Optimization | `FicksLawOptimization` | 2023 | [paper](https://www.mathworks.com/matlabcentral/fileexchange/121033-fick-s-law-algorithm-fla) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/flao.py) |
|
|
715
711
|
| Firefly Swarm Optimization | `FireflySwarmOptimization` | 2009 | [paper](https://doi.org/10.1504/IJBIC.2010.032124) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/fso.py) |
|
|
716
712
|
| Fire Hawk Optimization | `FireHawkOptimization` | 2022 | [paper](https://link.springer.com/article/10.1007/s10462-022-10173-w) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/fho.py) |
|
|
717
713
|
| Fireworks Optimization | `FireworksOptimization` | 2010 | [paper](https://doi.org/10.1504/IJBIC.2010.037285) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/fwa.py) |
|
|
@@ -730,6 +726,8 @@ The following algorithms are currently implemented in **pyVolutionary**:
|
|
|
730
726
|
| Grey Wolf Optimization | `GreyWolfOptimization` | 2014 | [paper](https://doi.org/10.1016/j.advengsoft.2013.12.007) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/gwo.py) |
|
|
731
727
|
| Harmony Search Optimization | `HarmonySearchOptimization` | 2001 | [paper](https://doi.org/10.1177/003754970107600201) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/hso.py) |
|
|
732
728
|
| Heap Based Optimization | `HeapBasedOptimization` | 2020 | [paper](https://www.sciencedirect.com/science/article/abs/pii/S0957417420305261#!) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/hbo.py) |
|
|
729
|
+
| Henry Gas Solubility Optimization | `HenryGasSolubilityOptimization` | 2019 | [paper](https://www.sciencedirect.com/science/article/abs/pii/S0167739X19306557) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/hgsop.py) |
|
|
730
|
+
| Hunger Games Search Optimization | `HungerGamesSearchOptimization` | 2021 | [paper](https://aliasgharheidari.com/HGS.html) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/hgso.py) |
|
|
733
731
|
| Imperialist Competitive Optimization | `ImperialistCompetitiveOptimization` | 2013 | [paper](https://doi.org/10.1109/ICCKE.2013.6687751) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/ico.py) |
|
|
734
732
|
| Invasive Weed Optimization | `InvasiveWeedOptimization` | 2006 | [paper](https://doi.org/10.1016/j.ecoinf.2006.07.003) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/iwo.py) |
|
|
735
733
|
| Krill Herd Optimization | `KrillHerdOptimization` | 2012 | [paper](https://doi.org/10.1016/j.cnsns.2012.05.010) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/kho.py) |
|
|
@@ -738,11 +736,13 @@ The following algorithms are currently implemented in **pyVolutionary**:
|
|
|
738
736
|
| Monarch Butterfly Optimization | `MonarchButterflyOptimization` | 2019 | [paper](https://link.springer.com/article/10.1007/s00521-015-1923-y) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/mbo.py) |
|
|
739
737
|
| Moth-Flame Optimization | `MothFlameOptimization` | 2015 | [paper](https://doi.org/10.1016/j.knosys.2015.07.006) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/mfo.py) |
|
|
740
738
|
| Mountain Gazelle Optimization | `MountainGazelleOptimization` | 2022 | [paper](https://doi.org/10.1016/j.advengsoft.2022.103282) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/mgo.py) |
|
|
739
|
+
| Multi-verse Optimization | `MultiverseOptimization` | 2016 | [paper](https://dx.doi.org/10.1007/s00521-015-1870-7) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/mvo.py) |
|
|
741
740
|
| Nuclear Reaction Optimization | `NuclearReactionOptimization` | 2019 | [paper](https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=8720256) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/nro.py) |
|
|
742
741
|
| Osprey Optimization | `OspreyOptimization` | 2023 | [paper](https://www.frontiersin.org/articles/10.3389/fmech.2022.1126450/full) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/ooa.py) |
|
|
743
742
|
| Particle Swarm Optimization | `ParticleSwarmOptimization` | 1995 | [paper](https://ieeexplore.ieee.org/document/488968) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/pso.py) |
|
|
744
743
|
| Pathfinder Algorithm Optimization | `PathfinderAlgorithmOptimization` | 2019 | [paper](https://doi.org/10.1016/j.asoc.2019.03.012) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/pfao.py) |
|
|
745
744
|
| Pelican Optimization | `PelicanOptimization` | 2022 | [paper](https://www.mdpi.com/1424-8220/22/3/855) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/poa.py) |
|
|
745
|
+
| Runge Kutta Optimization | `RungeKuttaOptimization` | 2021 | [paper](https://doi.org/10.1016/j.eswa.2021.115079) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/rko.py) |
|
|
746
746
|
| Salp Swarm Optimization | `SalpSwarmOptimization` | 2017 | [paper](https://doi.org/10.1016/j.advengsoft.2017.07.002) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/sso.py) |
|
|
747
747
|
| Seagull Optimization | `SeagullOptimization` | 2019 | [paper](https://doi.org/10.1016/j.knosys.2018.11.024) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/so.py) |
|
|
748
748
|
| Serval Optimization | `ServalOptimization` | 2022 | [paper](https://www.mdpi.com/2313-7673/7/4/204) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/servo.py) |
|
|
@@ -10,11 +10,13 @@
|
|
|
10
10
|

|
|
11
11
|

|
|
12
12
|
[](https://pypi.python.org/pypi/pyvolutionary)
|
|
13
|
-
|
|
13
|
+

|
|
14
14
|

|
|
15
15
|

|
|
16
16
|

|
|
17
17
|
[](https://pepy.tech/project/pyvolutionary)
|
|
18
|
+
[](https://pepy.tech/project/pyvolutionary)
|
|
19
|
+
[](https://pepy.tech/project/pyvolutionary)
|
|
18
20
|

|
|
19
21
|

|
|
20
22
|
[](http://isitmaintained.com/project/matteocacciola/pyvolutionary "Average time to resolve an issue")
|
|
@@ -682,6 +684,7 @@ The following algorithms are currently implemented in **pyVolutionary**:
|
|
|
682
684
|
| Electromagnetic Field Optimization | `ElectromagneticFieldOptimization` | 2016 | [paper](https://doi.org/10.1016/j.swevo.2015.07.002) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/efo.py) |
|
|
683
685
|
| Elephant Herd Optimization | `ElephantHerdOptimization` | 2015 | [paper](https://ieeexplore.ieee.org/document/7383528) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/eho.py) |
|
|
684
686
|
| Energy Valley Optimization | `EnergyValleyOptimization` | 2023 | [paper](https://www.nature.com/articles/s41598-022-27344-y) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/evo.py) |
|
|
687
|
+
| Fick's Law Optimization | `FicksLawOptimization` | 2023 | [paper](https://www.mathworks.com/matlabcentral/fileexchange/121033-fick-s-law-algorithm-fla) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/flao.py) |
|
|
685
688
|
| Firefly Swarm Optimization | `FireflySwarmOptimization` | 2009 | [paper](https://doi.org/10.1504/IJBIC.2010.032124) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/fso.py) |
|
|
686
689
|
| Fire Hawk Optimization | `FireHawkOptimization` | 2022 | [paper](https://link.springer.com/article/10.1007/s10462-022-10173-w) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/fho.py) |
|
|
687
690
|
| Fireworks Optimization | `FireworksOptimization` | 2010 | [paper](https://doi.org/10.1504/IJBIC.2010.037285) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/fwa.py) |
|
|
@@ -700,6 +703,8 @@ The following algorithms are currently implemented in **pyVolutionary**:
|
|
|
700
703
|
| Grey Wolf Optimization | `GreyWolfOptimization` | 2014 | [paper](https://doi.org/10.1016/j.advengsoft.2013.12.007) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/gwo.py) |
|
|
701
704
|
| Harmony Search Optimization | `HarmonySearchOptimization` | 2001 | [paper](https://doi.org/10.1177/003754970107600201) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/hso.py) |
|
|
702
705
|
| Heap Based Optimization | `HeapBasedOptimization` | 2020 | [paper](https://www.sciencedirect.com/science/article/abs/pii/S0957417420305261#!) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/hbo.py) |
|
|
706
|
+
| Henry Gas Solubility Optimization | `HenryGasSolubilityOptimization` | 2019 | [paper](https://www.sciencedirect.com/science/article/abs/pii/S0167739X19306557) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/hgsop.py) |
|
|
707
|
+
| Hunger Games Search Optimization | `HungerGamesSearchOptimization` | 2021 | [paper](https://aliasgharheidari.com/HGS.html) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/hgso.py) |
|
|
703
708
|
| Imperialist Competitive Optimization | `ImperialistCompetitiveOptimization` | 2013 | [paper](https://doi.org/10.1109/ICCKE.2013.6687751) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/ico.py) |
|
|
704
709
|
| Invasive Weed Optimization | `InvasiveWeedOptimization` | 2006 | [paper](https://doi.org/10.1016/j.ecoinf.2006.07.003) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/iwo.py) |
|
|
705
710
|
| Krill Herd Optimization | `KrillHerdOptimization` | 2012 | [paper](https://doi.org/10.1016/j.cnsns.2012.05.010) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/kho.py) |
|
|
@@ -708,11 +713,13 @@ The following algorithms are currently implemented in **pyVolutionary**:
|
|
|
708
713
|
| Monarch Butterfly Optimization | `MonarchButterflyOptimization` | 2019 | [paper](https://link.springer.com/article/10.1007/s00521-015-1923-y) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/mbo.py) |
|
|
709
714
|
| Moth-Flame Optimization | `MothFlameOptimization` | 2015 | [paper](https://doi.org/10.1016/j.knosys.2015.07.006) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/mfo.py) |
|
|
710
715
|
| Mountain Gazelle Optimization | `MountainGazelleOptimization` | 2022 | [paper](https://doi.org/10.1016/j.advengsoft.2022.103282) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/mgo.py) |
|
|
716
|
+
| Multi-verse Optimization | `MultiverseOptimization` | 2016 | [paper](https://dx.doi.org/10.1007/s00521-015-1870-7) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/mvo.py) |
|
|
711
717
|
| Nuclear Reaction Optimization | `NuclearReactionOptimization` | 2019 | [paper](https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=8720256) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/nro.py) |
|
|
712
718
|
| Osprey Optimization | `OspreyOptimization` | 2023 | [paper](https://www.frontiersin.org/articles/10.3389/fmech.2022.1126450/full) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/ooa.py) |
|
|
713
719
|
| Particle Swarm Optimization | `ParticleSwarmOptimization` | 1995 | [paper](https://ieeexplore.ieee.org/document/488968) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/pso.py) |
|
|
714
720
|
| Pathfinder Algorithm Optimization | `PathfinderAlgorithmOptimization` | 2019 | [paper](https://doi.org/10.1016/j.asoc.2019.03.012) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/pfao.py) |
|
|
715
721
|
| Pelican Optimization | `PelicanOptimization` | 2022 | [paper](https://www.mdpi.com/1424-8220/22/3/855) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/poa.py) |
|
|
722
|
+
| Runge Kutta Optimization | `RungeKuttaOptimization` | 2021 | [paper](https://doi.org/10.1016/j.eswa.2021.115079) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/rko.py) |
|
|
716
723
|
| Salp Swarm Optimization | `SalpSwarmOptimization` | 2017 | [paper](https://doi.org/10.1016/j.advengsoft.2017.07.002) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/sso.py) |
|
|
717
724
|
| Seagull Optimization | `SeagullOptimization` | 2019 | [paper](https://doi.org/10.1016/j.knosys.2018.11.024) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/so.py) |
|
|
718
725
|
| Serval Optimization | `ServalOptimization` | 2022 | [paper](https://www.mdpi.com/2313-7673/7/4/204) | [example](https://github.com/matteocacciola/pyvolutionary/tree/master/demos/servo.py) |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "pyVolutionary"
|
|
3
|
-
version = "2.
|
|
3
|
+
version = "2.5.0"
|
|
4
4
|
description = "pyVolutionary is a package collecting metaheuristic algorithms, available for free usage and able to solve a wide range of optimization problems."
|
|
5
5
|
authors = ["Matteo Cacciola <matteo.cacciola@gmail.com>"]
|
|
6
6
|
license = "MIT"
|
|
@@ -15,19 +15,15 @@ classifiers = [
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
[tool.poetry.dependencies]
|
|
18
|
-
python = ">=3.
|
|
19
|
-
pydantic = "^2.
|
|
20
|
-
numpy = "^1.
|
|
21
|
-
install = "^1.3.5"
|
|
22
|
-
coverage = "^7.3.2"
|
|
23
|
-
matplotlib = "^3.8.1"
|
|
24
|
-
sphynx = "^0.0.3"
|
|
18
|
+
python = ">=3.10"
|
|
19
|
+
pydantic = "^2.9.0"
|
|
20
|
+
numpy = "^2.1.1"
|
|
25
21
|
pandas = "^2.2.0"
|
|
26
|
-
opfunu = "^1.0.1"
|
|
27
22
|
scipy = "^1.12.0"
|
|
28
23
|
|
|
29
24
|
|
|
30
25
|
[tool.poetry.group.test.dependencies]
|
|
26
|
+
coverage = "^7.3.2"
|
|
31
27
|
pytest = "^7.4.3"
|
|
32
28
|
requests-mock = "^1.11.0"
|
|
33
29
|
|
|
@@ -40,6 +36,15 @@ sphinx = "^7.2.6"
|
|
|
40
36
|
sphinx-rtd-theme = "^1.3.0"
|
|
41
37
|
myst-parser = "^2.0.0"
|
|
42
38
|
|
|
39
|
+
|
|
40
|
+
[tool.poetry.group.demo.dependencies]
|
|
41
|
+
matplotlib = "^3.7.5"
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
[tool.poetry.group.examples.dependencies]
|
|
45
|
+
opfunu = "^1.0.1"
|
|
46
|
+
|
|
47
|
+
|
|
43
48
|
[build-system]
|
|
44
49
|
requires = ["poetry-core"]
|
|
45
50
|
build-backend = "poetry.core.masonry.api"
|
|
@@ -26,6 +26,7 @@ from .egret_swarm import *
|
|
|
26
26
|
from .electromagnetic_field import *
|
|
27
27
|
from .elephant_herd import *
|
|
28
28
|
from .energy_valley import *
|
|
29
|
+
from .ficks_law import *
|
|
29
30
|
from .firefly_swarm import *
|
|
30
31
|
from .fireworks import *
|
|
31
32
|
from .fish_school_search import *
|
|
@@ -44,6 +45,8 @@ from .grasshopper import *
|
|
|
44
45
|
from .grey_wolf import *
|
|
45
46
|
from .harmony_search import *
|
|
46
47
|
from .heap_based import *
|
|
48
|
+
from .henry_gas_solubility import *
|
|
49
|
+
from .hunger_games_search import *
|
|
47
50
|
from .imperialist_competitive import *
|
|
48
51
|
from .invasive_weed import *
|
|
49
52
|
from .krill_herd import *
|
|
@@ -52,11 +55,13 @@ from .marine_predators import *
|
|
|
52
55
|
from .monarch_butterfly import *
|
|
53
56
|
from .moth_flame import *
|
|
54
57
|
from .mountain_gazelle import *
|
|
58
|
+
from .multi_verse import *
|
|
55
59
|
from .nuclear_reaction import *
|
|
56
60
|
from .osprey import *
|
|
57
61
|
from .particle_swarm import *
|
|
58
62
|
from .pathfinder_algorithm import *
|
|
59
63
|
from .pelican import *
|
|
64
|
+
from .runge_kutta import *
|
|
60
65
|
from .salp_swarm import *
|
|
61
66
|
from .seagull import *
|
|
62
67
|
from .serval import *
|
|
@@ -221,12 +221,13 @@ class OptimizationAbstract(ABC, Generic[T]):
|
|
|
221
221
|
self._task = task
|
|
222
222
|
|
|
223
223
|
self.before_initialization()
|
|
224
|
-
self._init_population()
|
|
225
|
-
self.after_initialization()
|
|
226
224
|
|
|
225
|
+
self._init_population()
|
|
227
226
|
evolution.append(Population(agents=self._population, task_type=task.minmax))
|
|
228
227
|
(self._best_agent, ), (self._worst_agent, ) = special_agents(self._population, n_best=1, n_worst=1)
|
|
229
228
|
|
|
229
|
+
self.after_initialization()
|
|
230
|
+
|
|
230
231
|
errors: list[float] = []
|
|
231
232
|
while True:
|
|
232
233
|
self.optimization_step()
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
from typing import Any
|
|
2
|
+
import numpy as np
|
|
3
|
+
|
|
4
|
+
from ..helpers import (
|
|
5
|
+
best_agent,
|
|
6
|
+
parse_obj_doc, # type: ignore
|
|
7
|
+
)
|
|
8
|
+
from ..abstract import OptimizationAbstract
|
|
9
|
+
from .models import Molecule, FicksLawOptimizationConfig
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class FicksLawOptimization(OptimizationAbstract):
|
|
13
|
+
"""
|
|
14
|
+
Implementation of the Fick's Law Optimization algorithm.
|
|
15
|
+
|
|
16
|
+
Args:
|
|
17
|
+
config (FicksLawOptimizationConfig): an instance of FicksLawOptimizationConfig class.
|
|
18
|
+
{parse_obj_doc(FicksLawOptimizationConfig)}
|
|
19
|
+
|
|
20
|
+
Bibliography
|
|
21
|
+
----------
|
|
22
|
+
[1] Hashim, F. A., Mostafa, R. R., Hussien, A. G., Mirjalili, S., & Sallam, K. M. (2023). Fick’s Law Algorithm: A
|
|
23
|
+
physical law-based algorithm for numerical optimization. Knowledge-Based Systems, 260, 110146.
|
|
24
|
+
|
|
25
|
+
Side Notes
|
|
26
|
+
----------
|
|
27
|
+
Despite the complexity of the algorithm, the performances are not so good, since the agents can potentially be stuck
|
|
28
|
+
in local minima. The algorithm is not recommended for complex optimization problems.
|
|
29
|
+
"""
|
|
30
|
+
def __init__(self, config: FicksLawOptimizationConfig | None = None, debug: bool | None = False):
|
|
31
|
+
super().__init__(config, debug)
|
|
32
|
+
self.__n1: int = 0
|
|
33
|
+
self.__n2: int = 0
|
|
34
|
+
self.__pop1: list[Molecule] = []
|
|
35
|
+
self.__pop2: list[Molecule] = []
|
|
36
|
+
self.__best1: Molecule | None = None
|
|
37
|
+
self.__best2: Molecule | None = None
|
|
38
|
+
self.__fsss: float = 0.0
|
|
39
|
+
|
|
40
|
+
def set_config_parameters(self, parameters: dict[str, Any]):
|
|
41
|
+
self._config = FicksLawOptimizationConfig(**parameters)
|
|
42
|
+
|
|
43
|
+
def after_initialization(self):
|
|
44
|
+
self.__n1 = int(np.round(self._config.population_size / 2))
|
|
45
|
+
self.__n2 = self._config.population_size - self.__n1
|
|
46
|
+
self.__pop1 = self._population[:self.__n1].copy()
|
|
47
|
+
self.__pop2 = self._population[self.__n1:].copy()
|
|
48
|
+
self.__best1 = best_agent(self.__pop1)
|
|
49
|
+
self.__best2 = best_agent(self.__pop2)
|
|
50
|
+
self.__fsss = min(self.__best1.cost, self.__best2.cost)
|
|
51
|
+
|
|
52
|
+
def optimization_step(self):
|
|
53
|
+
def non_equilibrium_operator_1(molecule: Molecule, xm_factor: int, best_pos: np.ndarray) -> Molecule:
|
|
54
|
+
pos = np.array(molecule.position)
|
|
55
|
+
dfg = np.random.randint(1, 3)
|
|
56
|
+
jj = -DD * xm_factor * (xm2 - xm1) / np.linalg.norm(best_pos - pos + self.EPS)
|
|
57
|
+
return Molecule(**self._init_agent(
|
|
58
|
+
best_pos + dfg * dof * np.random.random(n_dims) * (jj * best_pos - pos)
|
|
59
|
+
).model_dump())
|
|
60
|
+
|
|
61
|
+
def non_equilibrium_operator_2(molecule: Molecule, best_pos: np.ndarray) -> Molecule:
|
|
62
|
+
pos = np.array(molecule.position)
|
|
63
|
+
tt = pos + dof * (np.random.random(n_dims) * bandwidth + lb)
|
|
64
|
+
pp = np.random.random(n_dims)
|
|
65
|
+
return Molecule(**self._init_agent(np.where(pp < 0.8, best_pos, np.where(pp >= 0.9, pos, tt))).model_dump())
|
|
66
|
+
|
|
67
|
+
def equilibrium_operator(
|
|
68
|
+
molecule: Molecule, best_pos: np.ndarray, best_cost: float, xm_: np.ndarray
|
|
69
|
+
) -> Molecule:
|
|
70
|
+
pos = np.array(molecule.position)
|
|
71
|
+
dfg = np.random.randint(1, 3)
|
|
72
|
+
tttt = np.linalg.norm(best_pos - pos)
|
|
73
|
+
jj = 0 if tttt == 0 else -DD * (best_pos - xm_) / tttt
|
|
74
|
+
drf = np.exp(-jj / tf)
|
|
75
|
+
ms = np.exp(-best_cost / molecule.cost + self.EPS)
|
|
76
|
+
qeo = dfg * drf * np.random.random(n_dims)
|
|
77
|
+
return Molecule(**self._init_agent(best_pos + qeo * pos + qeo * (ms * best_pos - pos)).model_dump())
|
|
78
|
+
|
|
79
|
+
def steady_state_operator(molecule: Molecule, best_pos: np.ndarray, xm_: np.ndarray) -> Molecule:
|
|
80
|
+
pos = np.array(molecule.position)
|
|
81
|
+
dfg = np.random.randint(1, 3)
|
|
82
|
+
tttt = np.linalg.norm(best_pos - pos)
|
|
83
|
+
jj = 0 if tttt == 0 else -DD * (xm - xm_) / tttt
|
|
84
|
+
drf = np.exp(-jj / tf)
|
|
85
|
+
ms = np.exp(-fsss / molecule.cost + self.EPS)
|
|
86
|
+
qg = dfg * drf * np.random.random(n_dims)
|
|
87
|
+
return Molecule(**self._init_agent(g_best + qg * pos + qg * (ms * best_pos - pos)).model_dump())
|
|
88
|
+
|
|
89
|
+
C1, C2, C3, C4, C5 = self._config.C1, self._config.C2, self._config.C3, self._config.C4, self._config.C5
|
|
90
|
+
DD = self._config.DD
|
|
91
|
+
|
|
92
|
+
n1, n2, fsss = self.__n1, self.__n2, self.__fsss
|
|
93
|
+
g_best = np.array(self._best_agent.position)
|
|
94
|
+
pop1, pop2, best1, best2 = self.__pop1, self.__pop2, self.__best1, self.__best2
|
|
95
|
+
best1_pos, best2_pos = np.array(best1.position), np.array(best2.position)
|
|
96
|
+
|
|
97
|
+
epoch, epochs = self._current_cycle, self._config.max_cycles
|
|
98
|
+
n_dims = self._task.space_dimension
|
|
99
|
+
lb, ub = self._task.get_bounds()
|
|
100
|
+
bandwidth = self._task.bandwidth()
|
|
101
|
+
|
|
102
|
+
xm1 = np.mean(np.array([agent.position for agent in self.__pop1]), axis=0)
|
|
103
|
+
xm2 = np.mean(np.array([agent.position for agent in self.__pop2]), axis=0)
|
|
104
|
+
xm = np.mean(np.array([agent.position for agent in self._population]), axis=0)
|
|
105
|
+
tf = np.sinh((epoch + 1) / epochs) ** C1
|
|
106
|
+
if tf < 0.9:
|
|
107
|
+
dof = np.exp(-(C2 * tf - np.random.random())) ** C2
|
|
108
|
+
tdo = C5 * tf - np.random.random()
|
|
109
|
+
if tdo < np.random.random():
|
|
110
|
+
m1n, m2n = C3 * n1, C4 * n1
|
|
111
|
+
nt12 = int(np.round((m2n - m1n) * np.random.random() + m1n))
|
|
112
|
+
pop_new = [non_equilibrium_operator_1(molecule, 1, best2_pos) for molecule in pop1[:nt12]] + (
|
|
113
|
+
[non_equilibrium_operator_2(molecule, best1_pos) for molecule in pop1[nt12:n1]]
|
|
114
|
+
) + [self._init_agent(best2_pos + dof * (np.random.random(n_dims) * bandwidth + lb)) for _ in range(n2)]
|
|
115
|
+
else:
|
|
116
|
+
m1n, m2n = 0.1 * n2, 0.2 * n2
|
|
117
|
+
nt12 = int(np.round((m2n - m1n) * np.random.random() + m1n))
|
|
118
|
+
pop_new = [non_equilibrium_operator_1(molecule, -1, best1_pos) for molecule in pop2[:nt12]] + (
|
|
119
|
+
[non_equilibrium_operator_2(molecule, best2_pos) for molecule in pop2[nt12:n2]]
|
|
120
|
+
) + [self._init_agent(best1_pos + dof * (np.random.random(n_dims) * bandwidth + lb)) for _ in range(n1)]
|
|
121
|
+
elif tf <= 1: # Equilibrium operator (EO)
|
|
122
|
+
pop_new = [equilibrium_operator(molecule, best1_pos, best1.cost, xm1) for molecule in pop1[:n1]] + (
|
|
123
|
+
[equilibrium_operator(molecule, best2_pos, best2.cost, xm2) for molecule in pop2[:n2]]
|
|
124
|
+
)
|
|
125
|
+
else: # Steady state operator (SSO)
|
|
126
|
+
pop_new = [steady_state_operator(molecule, best1_pos, xm1) for molecule in pop1[:n1]] + (
|
|
127
|
+
[steady_state_operator(molecule, g_best, xm2) for molecule in pop2[:n2]]
|
|
128
|
+
)
|
|
129
|
+
|
|
130
|
+
self._greedy_select_population(pop_new)
|
|
131
|
+
self.after_initialization()
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
from pydantic import field_validator
|
|
2
|
+
|
|
3
|
+
from ..models import Agent, BaseOptimizationConfig
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class Molecule(Agent):
|
|
7
|
+
pass
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class FicksLawOptimizationConfig(BaseOptimizationConfig):
|
|
11
|
+
"""
|
|
12
|
+
Configuration class of the Fick's Law Optimization algorithm.
|
|
13
|
+
+ C1 (float): (-100., 100.), factor C1.\n
|
|
14
|
+
+ C2 (float): (-100., 100.), factor C2.\n
|
|
15
|
+
+ C3 (float): (-100., 100.), factor C3.\n
|
|
16
|
+
+ C4 (float): (-100., 100.), factor C4.\n
|
|
17
|
+
+ C5 (float): (-100., 100.), factor C5.\n
|
|
18
|
+
+ DD (float): (-100., 100.), factor D in the paper.
|
|
19
|
+
"""
|
|
20
|
+
C1: float
|
|
21
|
+
C2: float
|
|
22
|
+
C3: float
|
|
23
|
+
C4: float
|
|
24
|
+
C5: float
|
|
25
|
+
DD: float
|
|
26
|
+
|
|
27
|
+
@field_validator("C1")
|
|
28
|
+
def correct_C1(cls, v):
|
|
29
|
+
if not -100 < v < 100:
|
|
30
|
+
raise ValueError(f"\"C1\" must be a float in (-100., 100.). Got {v}")
|
|
31
|
+
return v
|
|
32
|
+
|
|
33
|
+
@field_validator("C2")
|
|
34
|
+
def correct_C2(cls, v):
|
|
35
|
+
if not -100 < v < 100:
|
|
36
|
+
raise ValueError(f"\"C2\" must be a float in (-100., 100.). Got {v}")
|
|
37
|
+
return v
|
|
38
|
+
|
|
39
|
+
@field_validator("C3")
|
|
40
|
+
def correct_C3(cls, v):
|
|
41
|
+
if not -100 < v < 100:
|
|
42
|
+
raise ValueError(f"\"C3\" must be a float in (-100., 100.). Got {v}")
|
|
43
|
+
return v
|
|
44
|
+
|
|
45
|
+
@field_validator("C4")
|
|
46
|
+
def correct_C4(cls, v):
|
|
47
|
+
if not -100 < v < 100:
|
|
48
|
+
raise ValueError(f"\"C4\" must be a float in (-100., 100.). Got {v}")
|
|
49
|
+
return v
|
|
50
|
+
|
|
51
|
+
@field_validator("C5")
|
|
52
|
+
def correct_C5(cls, v):
|
|
53
|
+
if not -100 < v < 100:
|
|
54
|
+
raise ValueError(f"\"C5\" must be a float in (-100., 100.). Got {v}")
|
|
55
|
+
return v
|
|
56
|
+
|
|
57
|
+
@field_validator("DD")
|
|
58
|
+
def correct_DD(cls, v):
|
|
59
|
+
if not -100 < v < 100:
|
|
60
|
+
raise ValueError(f"\"DD\" must be a float in (-100., 100.). Got {v}")
|
|
61
|
+
return v
|
{pyvolutionary-2.4.1 → pyvolutionary-2.5.0}/pyvolutionary/grey_wolf/grey_wolf_optimization.py
RENAMED
|
@@ -38,6 +38,8 @@ class GreyWolfOptimization(OptimizationAbstract):
|
|
|
38
38
|
def optimization_step(self):
|
|
39
39
|
def evolve(wolf: GreyWolf) -> GreyWolf:
|
|
40
40
|
pos = np.array(wolf.position)
|
|
41
|
+
a1, a2, a3 = (a * (2 * np.random.random(3) - 1)).tolist()
|
|
42
|
+
c1, c2, c3 = (2 * np.random.random(3)).tolist()
|
|
41
43
|
x1 = np.array(self.__alpha_wolf.position) - a1 * np.abs(c1 * np.array(self.__alpha_wolf.position) - pos)
|
|
42
44
|
x2 = np.array(self.__beta_wolf.position) - a2 * np.abs(c2 * np.array(self.__beta_wolf.position) - pos)
|
|
43
45
|
x3 = np.array(self.__gamma_wolf.position) - a3 * np.abs(c3 * np.array(self.__gamma_wolf.position) - pos)
|
|
@@ -46,8 +48,6 @@ class GreyWolfOptimization(OptimizationAbstract):
|
|
|
46
48
|
|
|
47
49
|
# linearly decreased from 2 to 0
|
|
48
50
|
a = 2 * (1 - self._current_cycle / self._config.max_cycles)
|
|
49
|
-
a1, a2, a3 = (a * (2 * np.random.random(3) - 1)).tolist()
|
|
50
|
-
c1, c2, c3 = (2 * np.random.random(3)).tolist()
|
|
51
51
|
|
|
52
52
|
# updating each population member with the help of best three members
|
|
53
53
|
self._population = [evolve(wolf) for wolf in self._population]
|
|
@@ -86,15 +86,32 @@ def calculate_fitness(value: float, task_type: TaskType) -> float:
|
|
|
86
86
|
def sort_by_cost(population: list[T], task_type: TaskType | None = TaskType.MIN) -> list[T]:
|
|
87
87
|
"""
|
|
88
88
|
Sort the population by the cost value of each agent (the lower the cost, the best the agent). The sorting is done
|
|
89
|
-
in-place. If
|
|
89
|
+
in-place. If task_type is 'max', the sorting is done in descending order (the higher the cost, the worst the agent).
|
|
90
90
|
:param population: the population
|
|
91
91
|
:param task_type: the type of task (minimization or maximization)
|
|
92
|
+
:return: the sorted population
|
|
93
|
+
:rtype: list[Agent]
|
|
92
94
|
"""
|
|
93
95
|
pop_new = population.copy()
|
|
94
96
|
pop_new.sort(key=lambda agent: agent.cost, reverse=(task_type == TaskType.MAX))
|
|
95
97
|
return pop_new
|
|
96
98
|
|
|
97
99
|
|
|
100
|
+
def sort_by_cost_indexes(population: list[T], task_type: TaskType | None = TaskType.MIN) -> list[int]:
|
|
101
|
+
"""
|
|
102
|
+
Sort the population by the cost value of each agent (the lower the cost, the best the agent). The sorting is done
|
|
103
|
+
in-place. If task_type is 'max', the sorting is done in descending order (the higher the cost, the worst the agent).
|
|
104
|
+
:param population: the population
|
|
105
|
+
:param task_type: the type of task (minimization or maximization)
|
|
106
|
+
:return: the indexes of the sorted population
|
|
107
|
+
:rtype: list[int]
|
|
108
|
+
"""
|
|
109
|
+
result = np.argsort([agent.cost for agent in population], axis=0)
|
|
110
|
+
if task_type == TaskType.MAX:
|
|
111
|
+
result = result[::-1]
|
|
112
|
+
return result.tolist()
|
|
113
|
+
|
|
114
|
+
|
|
98
115
|
def sort_and_trim(population: list[T], population_size: int) -> list[T]:
|
|
99
116
|
"""
|
|
100
117
|
Sort the population according to the cost in ascending order and trim the population to the population size if
|
|
@@ -119,6 +136,17 @@ def best_agent(population: list[T], task_type: TaskType | None = TaskType.MIN) -
|
|
|
119
136
|
return b_agent
|
|
120
137
|
|
|
121
138
|
|
|
139
|
+
def best_agent_index(population: list[T], task_type: TaskType | None = TaskType.MIN) -> int:
|
|
140
|
+
"""
|
|
141
|
+
Get the index of the best agent of the population based on its cost value (the lower the cost, the best the agent).
|
|
142
|
+
:param population: the population
|
|
143
|
+
:param task_type: the type of task (minimization or maximization)
|
|
144
|
+
:return: the index of the best agent
|
|
145
|
+
:rtype: int
|
|
146
|
+
"""
|
|
147
|
+
return best_agents_indexes(population, 1, task_type)[0]
|
|
148
|
+
|
|
149
|
+
|
|
122
150
|
def worst_agent(population: list[T], task_type: TaskType | None = TaskType.MIN) -> T:
|
|
123
151
|
"""
|
|
124
152
|
Get the worst agent of the population based on its cost value (the higher the cost, the worst the agent).
|
|
@@ -131,6 +159,17 @@ def worst_agent(population: list[T], task_type: TaskType | None = TaskType.MIN)
|
|
|
131
159
|
return w_agent
|
|
132
160
|
|
|
133
161
|
|
|
162
|
+
def worst_agent_index(population: list[T], task_type: TaskType | None = TaskType.MIN) -> int:
|
|
163
|
+
"""
|
|
164
|
+
Get the index of the worst agent of the population based on its cost value (the lower the cost, the best the agent).
|
|
165
|
+
:param population: the population
|
|
166
|
+
:param task_type: the type of task (minimization or maximization)
|
|
167
|
+
:return: the index of the worst agent
|
|
168
|
+
:rtype: int
|
|
169
|
+
"""
|
|
170
|
+
return worst_agents_indexes(population, 1, task_type)[0]
|
|
171
|
+
|
|
172
|
+
|
|
134
173
|
def best_agents(population: list[T], n_best: int | None = 3, task_type: TaskType | None = TaskType.MIN) -> list[T]:
|
|
135
174
|
"""
|
|
136
175
|
Get the best agents of the population based on their cost value (the lower the cost, the best the agent).
|
|
@@ -143,6 +182,21 @@ def best_agents(population: list[T], n_best: int | None = 3, task_type: TaskType
|
|
|
143
182
|
return sort_by_cost(population, task_type=task_type)[:n_best]
|
|
144
183
|
|
|
145
184
|
|
|
185
|
+
def best_agents_indexes(
|
|
186
|
+
population: list[T], n_best: int | None = 3, task_type: TaskType | None = TaskType.MIN
|
|
187
|
+
) -> list[int]:
|
|
188
|
+
"""
|
|
189
|
+
Get the indexes of the best agents of the population based on their cost value (the lower the cost, the best the
|
|
190
|
+
agent).
|
|
191
|
+
:param population: the population
|
|
192
|
+
:param n_best: the number of best agents to return
|
|
193
|
+
:param task_type: the type of task (minimization or maximization)
|
|
194
|
+
:return: the indexes of the best agents
|
|
195
|
+
:rtype: list[int]
|
|
196
|
+
"""
|
|
197
|
+
return sort_by_cost_indexes(population, task_type=task_type)[:n_best]
|
|
198
|
+
|
|
199
|
+
|
|
146
200
|
def worst_agents(population: list[T], n_worst: int | None = 3, task_type: TaskType | None = TaskType.MIN) -> list[T]:
|
|
147
201
|
"""
|
|
148
202
|
Get the worst agents of the population based on their cost value (the higher the cost, the worst the agent).
|
|
@@ -155,6 +209,19 @@ def worst_agents(population: list[T], n_worst: int | None = 3, task_type: TaskTy
|
|
|
155
209
|
return sort_by_cost(population, task_type=task_type)[len(population)-n_worst:]
|
|
156
210
|
|
|
157
211
|
|
|
212
|
+
def worst_agents_indexes(population: list[T], n_worst: int | None = 3, task_type: TaskType | None = TaskType.MIN) -> list[int]:
|
|
213
|
+
"""
|
|
214
|
+
Get the indexes of the worst agents of the population based on their cost value (the higher the cost, the worst the
|
|
215
|
+
agent).
|
|
216
|
+
:param population: the population
|
|
217
|
+
:param n_worst: the number of worst agents to return
|
|
218
|
+
:param task_type: the type of task (minimization or maximization)
|
|
219
|
+
:return: the indexes of the worst agents
|
|
220
|
+
:rtype: list[int]
|
|
221
|
+
"""
|
|
222
|
+
return sort_by_cost_indexes(population, task_type=task_type)[len(population)-n_worst:]
|
|
223
|
+
|
|
224
|
+
|
|
158
225
|
def special_agents(
|
|
159
226
|
population: list[T],
|
|
160
227
|
n_best: int | None = None,
|
|
@@ -296,3 +363,15 @@ def get_pool_results(executors: list[parallel.Future]) -> list:
|
|
|
296
363
|
|
|
297
364
|
def find_centers(pop_groups: list[list[T]]) -> list[T]:
|
|
298
365
|
return [best_agent(pop_group).model_copy() for pop_group in pop_groups]
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
def runge_kutta(xb: np.ndarray, xw: np.ndarray, delta_x: np.ndarray) -> np.ndarray:
|
|
369
|
+
dim = len(xb)
|
|
370
|
+
C = np.random.randint(1, 3) * (1 - np.random.random())
|
|
371
|
+
r1 = np.random.random(dim)
|
|
372
|
+
r2 = np.random.random(dim)
|
|
373
|
+
K1 = 0.5 * (np.random.random() * xw - C * xb)
|
|
374
|
+
K2 = 0.5 * (np.random.random() * (xw + r2 * K1 * delta_x / 2) - (C * xb + r1 * K1 * delta_x / 2))
|
|
375
|
+
K3 = 0.5 * (np.random.random() * (xw + r2 * K2 * delta_x / 2) - (C * xb + r1 * K2 * delta_x / 2))
|
|
376
|
+
K4 = 0.5 * (np.random.random() * (xw + r2 * K3 * delta_x) - (C * xb + r1 * K3 * delta_x))
|
|
377
|
+
return (K1 + 2 * K2 + 2 * K3 + K4) / 6
|