pyVolutionary 2.2.0__tar.gz → 2.4.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.
Files changed (317) hide show
  1. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/PKG-INFO +151 -27
  2. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/README.md +147 -26
  3. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyproject.toml +4 -2
  4. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/__init__.py +4 -0
  5. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/abstract.py +22 -2
  6. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/african_vulture/african_vulture_optimization.py +5 -1
  7. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/ant_colony/ant_colony_optimization.py +5 -1
  8. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/ant_lion/ant_lion_optimization.py +5 -1
  9. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/aquila/aquila_optimization.py +5 -1
  10. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/archimede/archimede_optimization.py +4 -1
  11. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/bacterial_foraging/bacterial_foraging_optimization.py +4 -1
  12. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/bat/bat_optimization.py +4 -1
  13. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/bee_colony/bee_colony_optimization.py +16 -6
  14. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/biogeography_based/biogeography_based_optimization.py +9 -1
  15. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/brain_storm/brain_storm_optimization.py +9 -2
  16. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/brain_storm/improved_brain_storm_optimization.py +9 -2
  17. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/brown_bear/brown_bear_optimization.py +5 -1
  18. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/camel_caravan/camel_caravan_optimization.py +4 -1
  19. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/camel_caravan/models.py +1 -2
  20. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/cat_swarm/cat_swarm_optimization.py +4 -1
  21. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/chaos_game/chaos_game_optimization.py +5 -1
  22. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/chernobyl_disaster/chernobyl_disaster_optimization.py +5 -1
  23. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/coati/coati_optimization.py +8 -1
  24. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/coral_reef/coral_reef_optimization.py +14 -3
  25. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/coronavirus_herd_immunity/coronavirus_herd_immunity_optimization.py +4 -1
  26. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/coyotes/coyotes_optimization.py +4 -1
  27. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/cuckoo_search/cuckoo_search_optimization.py +8 -1
  28. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/dragonfly/dragonfly_optimization.py +5 -1
  29. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/dwarf_mongoose/dwarf_mongoose_optimization.py +11 -5
  30. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/earthworms/earthworms_optimization.py +8 -1
  31. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/egret_swarm/egret_swarm_optimization.py +4 -1
  32. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/egret_swarm/models.py +0 -2
  33. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/electromagnetic_field/electromagnetic_field_optimization.py +5 -1
  34. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/elephant_herd/elephant_herd_optimization.py +9 -2
  35. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/energy_valley/energy_valley_optimization.py +5 -2
  36. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/enums.py +9 -0
  37. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/firefly_swarm/firefly_swarm_optimization.py +5 -1
  38. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/firehawk/firehawk_optimization.py +8 -1
  39. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/fireworks/fireworks_optimization.py +5 -2
  40. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/fish_school_search/fish_school_search_optimization.py +6 -2
  41. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/fish_school_search/models.py +0 -2
  42. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/flower_pollination_algorithm/flower_pollination_algorithm_optimization.py +5 -1
  43. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/forensic_based_investigation/forensic_based_investigation_optimization.py +5 -1
  44. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/forest_algorithm/forest_optimization_algorithm.py +4 -1
  45. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/fox/fox_optimization.py +5 -1
  46. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/genetic_algorithm/genetic_algorithm_optimization.py +5 -1
  47. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/germinal_center/germinal_center_optimization.py +4 -1
  48. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/giant_trevally/giant_trevally_optimization.py +5 -1
  49. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/giza_pyramid_construction/giza_pyramid_construction_optimization.py +5 -1
  50. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/golden_jackal/golden_jackal_optimization.py +5 -1
  51. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/grasshopper/grasshopper_optimization_algorithm.py +5 -1
  52. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/grey_wolf/grey_wolf_optimization.py +5 -1
  53. pyvolutionary-2.4.0/pyvolutionary/gridsearchcv.py +319 -0
  54. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/harmony_search/harmony_search_optimization.py +5 -1
  55. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/imperialist_competitive/imperialist_competitive_optimization.py +5 -1
  56. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/invasive_weed/invasive_weed_optimization.py +5 -1
  57. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/krill_herd/krill_herd_optimization.py +4 -1
  58. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/levi_jaya_swarm/levy_flight_jaya_swarm_optimization.py +5 -1
  59. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/marine_predators/marine_predators_optimization.py +5 -1
  60. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/models.py +101 -20
  61. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/monarch_butterfly/monarch_butterfly_optimization.py +10 -1
  62. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/moth_flame/moth_flame_optimization.py +5 -1
  63. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/mountain_gazelle/mountain_gazelle_optimization.py +5 -1
  64. pyvolutionary-2.4.0/pyvolutionary/multitask.py +180 -0
  65. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/nuclear_reaction/nuclear_reaction_optimization.py +5 -2
  66. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/osprey/osprey_optimization.py +5 -1
  67. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/particle_swarm/particle_swarm_optimization.py +4 -1
  68. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/pathfinder_algorithm/pathfinder_algorithm_optimization.py +5 -1
  69. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/pelican/pelican_optimization.py +5 -1
  70. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/seagull/seagull_optimization.py +5 -1
  71. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/serval/serval_optimization.py +5 -1
  72. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/siberian_tiger/siberian_tiger_optimization.py +5 -1
  73. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/sine_cosine_algorithm/qle_sine_cosine_algorithm_optimization.py +4 -1
  74. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/sine_cosine_algorithm/sine_cosine_algorithm_optimization.py +5 -1
  75. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/spotted_hyena/spotted_hyena_optimization.py +5 -1
  76. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/success_history_intelligent/success_history_intelligent_optimization.py +5 -1
  77. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/swarm_hill_climbing/swarm_hill_climbing_optimization.py +5 -1
  78. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/tasmanian_devil/tasmanian_devil_optimization.py +5 -1
  79. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/tuna_swarm/tuna_swarm_optimization.py +5 -1
  80. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/virus_colony_search/virus_colony_search_optimization.py +8 -1
  81. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/walrus/walrus_optimization.py +5 -1
  82. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/war_strategy/war_strategy_optimization.py +4 -1
  83. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/water_cycle/water_cycle_optimization.py +5 -1
  84. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/whales/whales_optimization.py +5 -1
  85. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/wildebeest_herd/wildebeest_herd_optimization.py +5 -1
  86. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/wind_driven/wind_driven_optimization.py +5 -1
  87. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/zebra/zebra_optimization.py +5 -1
  88. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_african_vulture_optimization.py +0 -34
  89. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_ant_colony_optimization.py +0 -34
  90. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_ant_lion_optimization.py +0 -27
  91. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_aquila_optimization.py +0 -27
  92. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_archimede_optimization.py +0 -36
  93. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_bacterial_foraging_optimization.py +0 -37
  94. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_bat_optimization.py +0 -34
  95. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_bee_colony_optimization.py +0 -32
  96. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_biogeography_based_optimization.py +0 -33
  97. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_brain_storm_optimization.py +0 -37
  98. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_brown_bear_optimization.py +0 -27
  99. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_camel_caravan_optimization.py +0 -37
  100. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_cat_swarm_optimization.py +0 -49
  101. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_chaos_game_optimization.py +0 -27
  102. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_chernobyl_disaster_optimization.py +0 -27
  103. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_coati_optimization.py +0 -27
  104. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_coral_reef_optimization.py +0 -39
  105. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_coronavirus_herd_immunity_optimization.py +0 -38
  106. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_coyotes_optimization.py +0 -32
  107. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_cuckoo_search_optimization.py +0 -32
  108. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_dragonfly_optimization.py +0 -27
  109. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_dwarf_mongoose_optimization.py +0 -33
  110. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_earthworms_optimization.py +0 -37
  111. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_egret_swarm_optimization.py +0 -27
  112. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_electromagnetic_field_optimization.py +0 -35
  113. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_elephant_herd_optimization.py +0 -34
  114. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_energy_valley_optimization.py +0 -27
  115. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_firefly_swarm_optimization.py +0 -34
  116. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_firehawk_optimization.py +0 -27
  117. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_fireworks_algorithm_optimization.py +0 -36
  118. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_fish_school_search_optimization.py +0 -37
  119. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_flower_pollination_algorithm_optimization.py +0 -33
  120. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_forensic_based_investigation_optimization.py +0 -31
  121. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_forest_algorithm_optimization.py +0 -36
  122. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_fox_optimization.py +0 -33
  123. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_genetic_algorithm_optimization.py +0 -32
  124. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_germinal_center_optimization.py +0 -33
  125. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_giant_trevally_optimization.py +0 -27
  126. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_giza_pyramid_construction_optimization.py +0 -38
  127. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_golden_jackal_optimization.py +0 -27
  128. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_grasshopper_optimization_algorithm.py +0 -33
  129. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_grey_wolf_optimization.py +0 -27
  130. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_harmony_search_optimization.py +0 -33
  131. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_imperialist_competitive_optimization.py +0 -40
  132. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_improved_brain_storm_optimization.py +0 -36
  133. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_invasive_weed_optimization.py +0 -34
  134. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_krill_herd_optimization.py +0 -40
  135. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_levy_flight_jaya_swarm_optimization.py +0 -33
  136. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_marine_predators_optimization.py +0 -27
  137. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_monarch_butterfly_optimization.py +0 -33
  138. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_moth_flame_optimization.py +0 -27
  139. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_mountain_gazelle_optimization.py +0 -27
  140. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_nuclear_reaction_optimization.py +0 -27
  141. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_osprey_optimization.py +0 -26
  142. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_particle_swarm_optimization.py +0 -34
  143. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_pathfinder_algorithm_optimization.py +0 -27
  144. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_pelican_optimization.py +0 -27
  145. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_qle_sine_cosine_algorithm_optimization.py +0 -37
  146. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_seagull_optimization.py +0 -32
  147. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_serval_optimization.py +0 -27
  148. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_siberian_tiger_optimization.py +0 -27
  149. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_sine_cosine_algorithm_optimization.py +0 -27
  150. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_spotted_hyena_optimization.py +0 -33
  151. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_success_history_intelligent_optimization.py +0 -31
  152. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_swarm_hill_climbing_optimization.py +0 -29
  153. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_tasmanian_devil_optimization.py +0 -27
  154. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_tuna_swarm_optimization.py +0 -27
  155. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_virus_colony_search_optimization.py +0 -33
  156. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_walrus_optimization.py +0 -27
  157. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_war_strategy_optimization.py +0 -32
  158. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_water_cycle_optimization.py +0 -33
  159. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_whales_optimization.py +0 -27
  160. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_wildebeest_herd_optimization.py +0 -41
  161. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_wind_driven_optimization.py +0 -36
  162. pyvolutionary-2.2.0/pyvolutionary/tests/algorithms/test_zebra_optimization.py +0 -27
  163. pyvolutionary-2.2.0/pyvolutionary/tests/fixtures.py +0 -21
  164. pyvolutionary-2.2.0/pyvolutionary/tests/test_combinatorial_problem.py +0 -71
  165. pyvolutionary-2.2.0/pyvolutionary/tests/test_constrained_problem.py +0 -84
  166. pyvolutionary-2.2.0/pyvolutionary/tests/test_multiobjective_problem.py +0 -112
  167. pyvolutionary-2.2.0/pyvolutionary/tests/test_optimization_max.py +0 -57
  168. pyvolutionary-2.2.0/pyvolutionary/tests/test_task_bounds.py +0 -9
  169. pyvolutionary-2.2.0/pyvolutionary/tests/test_utils.py +0 -83
  170. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/african_vulture/__init__.py +0 -0
  171. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/african_vulture/models.py +0 -0
  172. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/ant_colony/__init__.py +0 -0
  173. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/ant_colony/models.py +0 -0
  174. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/ant_lion/__init__.py +0 -0
  175. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/ant_lion/models.py +0 -0
  176. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/aquila/__init__.py +0 -0
  177. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/aquila/models.py +0 -0
  178. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/archimede/__init__.py +0 -0
  179. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/archimede/models.py +0 -0
  180. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/bacterial_foraging/__init__.py +0 -0
  181. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/bacterial_foraging/models.py +0 -0
  182. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/bat/__init__.py +0 -0
  183. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/bat/models.py +0 -0
  184. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/bee_colony/__init__.py +0 -0
  185. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/bee_colony/models.py +0 -0
  186. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/biogeography_based/__init__.py +0 -0
  187. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/biogeography_based/models.py +0 -0
  188. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/brain_storm/__init__.py +0 -0
  189. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/brain_storm/models.py +0 -0
  190. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/brown_bear/__init__.py +0 -0
  191. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/brown_bear/models.py +0 -0
  192. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/camel_caravan/__init__.py +0 -0
  193. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/cat_swarm/__init__.py +0 -0
  194. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/cat_swarm/models.py +0 -0
  195. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/chaos_game/__init__.py +0 -0
  196. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/chaos_game/models.py +0 -0
  197. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/chernobyl_disaster/__init__.py +0 -0
  198. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/chernobyl_disaster/models.py +0 -0
  199. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/coati/__init__.py +0 -0
  200. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/coati/models.py +0 -0
  201. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/coral_reef/__init__.py +0 -0
  202. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/coral_reef/models.py +0 -0
  203. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/coronavirus_herd_immunity/__init__.py +0 -0
  204. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/coronavirus_herd_immunity/models.py +0 -0
  205. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/coyotes/__init__.py +0 -0
  206. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/coyotes/models.py +0 -0
  207. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/cuckoo_search/__init__.py +0 -0
  208. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/cuckoo_search/models.py +0 -0
  209. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/dragonfly/__init__.py +0 -0
  210. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/dragonfly/models.py +0 -0
  211. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/dwarf_mongoose/__init__.py +0 -0
  212. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/dwarf_mongoose/models.py +0 -0
  213. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/earthworms/__init__.py +0 -0
  214. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/earthworms/models.py +0 -0
  215. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/egret_swarm/__init__.py +0 -0
  216. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/electromagnetic_field/__init__.py +0 -0
  217. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/electromagnetic_field/models.py +0 -0
  218. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/elephant_herd/__init__.py +0 -0
  219. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/elephant_herd/models.py +0 -0
  220. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/energy_valley/__init__.py +0 -0
  221. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/energy_valley/models.py +0 -0
  222. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/firefly_swarm/__init__.py +0 -0
  223. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/firefly_swarm/models.py +0 -0
  224. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/firehawk/__init__.py +0 -0
  225. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/firehawk/models.py +0 -0
  226. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/fireworks/__init__.py +0 -0
  227. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/fireworks/models.py +0 -0
  228. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/fish_school_search/__init__.py +0 -0
  229. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/flower_pollination_algorithm/__init__.py +0 -0
  230. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/flower_pollination_algorithm/models.py +0 -0
  231. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/forensic_based_investigation/__init__.py +0 -0
  232. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/forensic_based_investigation/models.py +0 -0
  233. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/forest_algorithm/__init__.py +0 -0
  234. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/forest_algorithm/models.py +0 -0
  235. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/fox/__init__.py +0 -0
  236. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/fox/models.py +0 -0
  237. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/genetic_algorithm/__init__.py +0 -0
  238. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/genetic_algorithm/classes.py +0 -0
  239. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/genetic_algorithm/models.py +0 -0
  240. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/germinal_center/__init__.py +0 -0
  241. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/germinal_center/models.py +0 -0
  242. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/giant_trevally/__init__.py +0 -0
  243. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/giant_trevally/models.py +0 -0
  244. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/giza_pyramid_construction/__init__.py +0 -0
  245. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/giza_pyramid_construction/models.py +0 -0
  246. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/golden_jackal/__init__.py +0 -0
  247. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/golden_jackal/models.py +0 -0
  248. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/grasshopper/__init__.py +0 -0
  249. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/grasshopper/models.py +0 -0
  250. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/grey_wolf/__init__.py +0 -0
  251. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/grey_wolf/models.py +0 -0
  252. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/harmony_search/__init__.py +0 -0
  253. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/harmony_search/models.py +0 -0
  254. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/helpers.py +0 -0
  255. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/imperialist_competitive/__init__.py +0 -0
  256. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/imperialist_competitive/classes.py +0 -0
  257. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/imperialist_competitive/models.py +0 -0
  258. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/invasive_weed/__init__.py +0 -0
  259. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/invasive_weed/models.py +0 -0
  260. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/krill_herd/__init__.py +0 -0
  261. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/krill_herd/models.py +0 -0
  262. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/levi_jaya_swarm/__init__.py +0 -0
  263. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/levi_jaya_swarm/models.py +0 -0
  264. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/marine_predators/__init__.py +0 -0
  265. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/marine_predators/models.py +0 -0
  266. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/monarch_butterfly/__init__.py +0 -0
  267. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/monarch_butterfly/models.py +0 -0
  268. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/moth_flame/__init__.py +0 -0
  269. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/moth_flame/models.py +0 -0
  270. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/mountain_gazelle/__init__.py +0 -0
  271. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/mountain_gazelle/models.py +0 -0
  272. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/nuclear_reaction/__init__.py +0 -0
  273. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/nuclear_reaction/models.py +0 -0
  274. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/osprey/__init__.py +0 -0
  275. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/osprey/models.py +0 -0
  276. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/particle_swarm/__init__.py +0 -0
  277. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/particle_swarm/models.py +0 -0
  278. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/pathfinder_algorithm/__init__.py +0 -0
  279. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/pathfinder_algorithm/models.py +0 -0
  280. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/pelican/__init__.py +0 -0
  281. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/pelican/models.py +0 -0
  282. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/seagull/__init__.py +0 -0
  283. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/seagull/models.py +0 -0
  284. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/serval/__init__.py +0 -0
  285. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/serval/models.py +0 -0
  286. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/siberian_tiger/__init__.py +0 -0
  287. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/siberian_tiger/models.py +0 -0
  288. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/sine_cosine_algorithm/__init__.py +0 -0
  289. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/sine_cosine_algorithm/classes.py +0 -0
  290. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/sine_cosine_algorithm/models.py +0 -0
  291. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/spotted_hyena/__init__.py +0 -0
  292. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/spotted_hyena/models.py +0 -0
  293. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/success_history_intelligent/__init__.py +0 -0
  294. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/success_history_intelligent/models.py +0 -0
  295. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/swarm_hill_climbing/__init__.py +0 -0
  296. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/swarm_hill_climbing/models.py +0 -0
  297. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/tasmanian_devil/__init__.py +0 -0
  298. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/tasmanian_devil/models.py +0 -0
  299. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/tuna_swarm/__init__.py +0 -0
  300. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/tuna_swarm/models.py +0 -0
  301. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/utils.py +0 -0
  302. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/virus_colony_search/__init__.py +0 -0
  303. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/virus_colony_search/models.py +0 -0
  304. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/walrus/__init__.py +0 -0
  305. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/walrus/models.py +0 -0
  306. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/war_strategy/__init__.py +0 -0
  307. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/war_strategy/models.py +0 -0
  308. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/water_cycle/__init__.py +0 -0
  309. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/water_cycle/models.py +0 -0
  310. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/whales/__init__.py +0 -0
  311. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/whales/models.py +0 -0
  312. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/wildebeest_herd/__init__.py +0 -0
  313. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/wildebeest_herd/models.py +0 -0
  314. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/wind_driven/__init__.py +0 -0
  315. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/wind_driven/models.py +0 -0
  316. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/zebra/__init__.py +0 -0
  317. {pyvolutionary-2.2.0 → pyvolutionary-2.4.0}/pyvolutionary/zebra/models.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyVolutionary
3
- Version: 2.2.0
3
+ Version: 2.4.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
@@ -13,12 +13,15 @@ Classifier: Programming Language :: Python :: 3
13
13
  Classifier: Programming Language :: Python :: 3.9
14
14
  Classifier: Programming Language :: Python :: 3.10
15
15
  Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
16
17
  Classifier: Topic :: Scientific/Engineering
17
18
  Classifier: Topic :: Software Development
18
19
  Requires-Dist: coverage (>=7.3.2,<8.0.0)
19
20
  Requires-Dist: install (>=1.3.5,<2.0.0)
20
21
  Requires-Dist: matplotlib (>=3.8.1,<4.0.0)
21
22
  Requires-Dist: numpy (>=1.26.1,<2.0.0)
23
+ Requires-Dist: opfunu (>=1.0.1,<2.0.0)
24
+ Requires-Dist: pandas (>=2.2.0,<3.0.0)
22
25
  Requires-Dist: pydantic (>=2.4.2,<3.0.0)
23
26
  Requires-Dist: sphynx (>=0.0.3,<0.0.4)
24
27
  Project-URL: Repository, https://github.com/matteocacciola/pyvolutionary
@@ -90,13 +93,15 @@ continuous and discrete variables. In order to do so, you need to define a `Task
90
93
  `Task` class of the library. The list of variables in the problem must be specified in the constructor of the class
91
94
  inheriting from `Task`. The following table describes the types of variables currently implemented in the library.
92
95
 
93
- | Variable type | Class name | Description | Example |
94
- |-----------------|--------------------------|----------------------------------------------------------------|------------------------------------------------------------------------------------|
95
- | Continuous | `ContinuousVariable` | A continuous variable | `ContinuousVariable(name="x0", lower_bound=-100.0, upper_bound=100.0)` |
96
- | Discrete | `DiscreteVariable` | A discrete variable | `DiscreteVariable(choices=["scale", "auto", 0.01, 0.1, 0.5, 1.0], name="gamma")` |
97
- | Permutation | `PermutationVariable` | A permutation of the specified choices | `PermutationVariable(items=[[60, 200], [180, 200], [80, 180]], name="routes")` |
98
- | Binary | `BinaryVariable` | A type of variable used for problems where the data are binary | `BinaryVariable(name="x", n_vars=10)` |
99
- | Multi-objective | `MultiObjectiveVariable` | A type of variable used for multi-objective problems | `MultiObjectiveVariable(name="x", lower_bounds=(-10, -10), upper_bounds=(10, 10))` |
96
+ | Variable type | Class name | Description | Example |
97
+ |------------------|---------------------------|----------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|
98
+ | Continuous | `ContinuousVariable` | A continuous variable | `ContinuousVariable(name="x0", lower_bound=-100.0, upper_bound=100.0)` |
99
+ | Continuous (set) | `ContinuousMultiVariable` | A set of continuous variables | `ContinuousMultiVariable(name="x0", lower_bounds=[-100.0, -200.0], upper_bounds=[100.0, 50.0])` |
100
+ | Discrete | `DiscreteVariable` | A discrete variable | `DiscreteVariable(choices=["scale", "auto", 0.01, 0.1, 0.5, 1.0], name="gamma")` |
101
+ | Discrete (set) | `DiscreteMultiVariable` | A set of discrete variables | `DiscreteMultiVariable(choices=[[0.1, 10, 100], ["scale", "auto", 0.01, 0.1, 0.5, 1.0]], name="params")` |
102
+ | Permutation | `PermutationVariable` | A permutation of the specified choices | `PermutationVariable(items=[[60, 200], [180, 200], [80, 180]], name="routes")` |
103
+ | Binary | `BinaryVariable` | A type of variable used for problems where the data are binary | `BinaryVariable(name="x", n_vars=10)` |
104
+ | Multi-objective | `MultiObjectiveVariable` | A type of variable used for multi-objective problems | `MultiObjectiveVariable(name="x", lower_bounds=(-10, -10), upper_bounds=(10, 10))` |
100
105
 
101
106
  An example of a custom `Task` class is the following:
102
107
 
@@ -173,7 +178,7 @@ task = Sphere(
173
178
  For example, let us inspect how you can solve the continuous _sphere_ problem with the Particle Swarm Optimization algorithm.
174
179
 
175
180
  ```python
176
- from pyvolutionary import ContinuousVariable, ParticleSwarmOptimization, ParticleSwarmOptimizationConfig, Task
181
+ from pyvolutionary import ContinuousMultiVariable, ParticleSwarmOptimization, ParticleSwarmOptimizationConfig, Task
177
182
 
178
183
  # Define the problem, you can replace the following class with your custom problem to optimize
179
184
  class Sphere(Task):
@@ -185,22 +190,14 @@ class Sphere(Task):
185
190
 
186
191
 
187
192
  # Define the task with the bounds and the configuration of the optimizer
188
- population = 200
189
- dimension = 2
190
- position_min = -100.0
191
- position_max = 100.0
192
- generation = 400
193
- fitness_error = 10e-4
194
193
  task = Sphere(
195
- variables=[ContinuousVariable(
196
- name=f"x{i}", lower_bound=position_min, upper_bound=position_max
197
- ) for i in range(dimension)],
194
+ variables=[ContinuousMultiVariable(name="x", lower_bounds=[-100.0, -100.0], upper_bound=[100.0, 100.0])],
198
195
  )
199
196
 
200
197
  configuration = ParticleSwarmOptimizationConfig(
201
- population_size=population,
202
- fitness_error=fitness_error,
203
- max_cycles=generation,
198
+ population_size=200,
199
+ fitness_error=10e-4,
200
+ max_cycles=400,
204
201
  c1=0.1,
205
202
  c2=0.1,
206
203
  w=[0.35, 1],
@@ -435,7 +432,7 @@ implemented in the library):
435
432
 
436
433
  ```python
437
434
  import numpy as np
438
- from pyvolutionary import Task, ContinuousVariable, AntLionOptimization, AntLionOptimizationConfig
435
+ from pyvolutionary import Task, ContinuousMultiVariable, AntLionOptimization, AntLionOptimizationConfig
439
436
 
440
437
  ## Link: https://onlinelibrary.wiley.com/doi/pdf/10.1002/9781119136507.app2
441
438
  class ConstrainedBenchmark(Task):
@@ -479,12 +476,10 @@ class ConstrainedBenchmark(Task):
479
476
 
480
477
 
481
478
  # Define the task with the bounds and the configuration of the optimizer
479
+ lower_bounds = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
480
+ upper_bounds = [1, 1, 1, 1, 1, 1, 1, 1, 1, 100, 100, 100, 1]
482
481
  task = ConstrainedBenchmark(
483
- variables=(
484
- [ContinuousVariable(name=f"x{i}", lower_bound=0, upper_bound=1) for i in range(9)] + [
485
- ContinuousVariable(name=f"x{i}", lower_bound=0, upper_bound=100) for i in range(9, 12)
486
- ] + [ContinuousVariable(name=f"x12", lower_bound=0, upper_bound=1)]
487
- )
482
+ variables=([ContinuousMultiVariable(name="x", lower_bounds=lower_bounds, upper_bounds=upper_bounds)])
488
483
  )
489
484
 
490
485
  configuration = AntLionOptimizationConfig(population_size=200, fitness_error=10e-4, max_cycles=400)
@@ -522,6 +517,135 @@ Once you created your new classes, you can run the algorithm by calling the `opt
522
517
  ## Utilities
523
518
  **pyVolutionary** provides a set of utilities to facilitate the use of the library.
524
519
 
520
+ ### GridSearchCV Hyper-parameter tuning
521
+ **pyVolutionary** provides a `GridSearchCV` class to perform hyperparameter tuning of a model. The class is similar to
522
+ the one provided by [scikit-learn](https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.GridSearchCV.html),
523
+ but it uses the algorithms implemented in the library to perform the search. The class can be used as follows:
524
+
525
+ ```python
526
+ from opfunu.cec_based.cec2017 import F52017
527
+
528
+ from pyvolutionary import ContinuousMultiVariable, Task, BiogeographyBasedOptimization, GridSearchCV
529
+
530
+ f1 = F52017(30, f_bias=0)
531
+
532
+
533
+ class Problem(Task):
534
+ # Link: https://en.wikipedia.org/wiki/Test_functions_for_optimization
535
+ def objective_function(self, solution):
536
+ return f1.evaluate(solution)
537
+
538
+
539
+ # Define the task with the bounds and the configuration of the optimizer
540
+ task = Problem(
541
+ variables=[ContinuousMultiVariable(name="x", lower_bounds=f1.lb, upper_bounds=f1.ub)],
542
+ )
543
+
544
+ params_bbo_grid = {
545
+ "max_cycles": [10, 20, 30, 40],
546
+ "population_size": [50, 100, 150],
547
+ "n_elites": [3, 4, 5, 6],
548
+ "p_m": [0.01, 0.02, 0.05]
549
+ }
550
+
551
+
552
+ model = BiogeographyBasedOptimization()
553
+ tuner = GridSearchCV(model, params_bbo_grid)
554
+
555
+ tuner.execute(task=task)
556
+
557
+ print(f"Best row {tuner.best_row}")
558
+ print(f"Best score {tuner.best_score}")
559
+ print(f"Best parameters {tuner.best_parameters}")
560
+
561
+ best_result = tuner.resolve()
562
+ print(f"Best solution after tuning {best_result.best_solution}")
563
+
564
+ tuner.export_results("csv")
565
+ tuner.export_results("dataframe")
566
+ tuner.export_results("json")
567
+ ```
568
+
569
+ ### Multitasking
570
+ **pyVolutionary** provides a `Multitask` class to perform multitasking optimization. The class can become very precious
571
+ when you need to optimize multiple tasks with multiple algorithms in parallel. In case, for instance, of multiple tasks
572
+ with the same algorithm, you can use the `Multitask` class to run the optimization in parallel. Furthermore, the
573
+ `Multitask` class can be used to run multiple tasks with different algorithms in parallel. Here is an example of how
574
+ to use the `Multitask` class:
575
+
576
+ ```python
577
+ from opfunu.cec_based.cec2017 import F52017, F102017, F292017
578
+
579
+ from pyvolutionary import (
580
+ ContinuousMultiVariable,
581
+ Task,
582
+ NuclearReactionOptimization,
583
+ Multitask,
584
+ NuclearReactionOptimizationConfig,
585
+ MountainGazelleOptimization,
586
+ MountainGazelleOptimizationConfig,
587
+ GrasshopperOptimization,
588
+ GrasshopperOptimizationConfig,
589
+ GizaPyramidConstructionOptimization,
590
+ GizaPyramidConstructionOptimizationConfig,
591
+ )
592
+
593
+ f1 = F52017(30, f_bias=0)
594
+ f2 = F102017(30, f_bias=0)
595
+ f3 = F292017(30, f_bias=0)
596
+
597
+
598
+ class Problem1(Task):
599
+ def objective_function(self, solution):
600
+ return f1.evaluate(solution)
601
+
602
+
603
+ class Problem2(Task):
604
+ def objective_function(self, solution):
605
+ return f3.evaluate(solution)
606
+
607
+
608
+ class Problem3(Task):
609
+ def objective_function(self, solution):
610
+ return f1.evaluate(solution)
611
+
612
+
613
+ task1 = Problem1(
614
+ variables=[ContinuousMultiVariable(name="x", lower_bounds=f1.lb, upper_bounds=f1.ub)],
615
+ )
616
+ task2 = Problem2(
617
+ variables=[ContinuousMultiVariable(name="x", lower_bounds=f2.lb, upper_bounds=f2.ub)],
618
+ )
619
+ task3 = Problem3(
620
+ variables=[ContinuousMultiVariable(name="x", lower_bounds=f3.lb, upper_bounds=f3.ub)],
621
+ )
622
+
623
+ model1 = NuclearReactionOptimization(
624
+ config=NuclearReactionOptimizationConfig(max_cycles=10000, population_size=50)
625
+ )
626
+ model2 = MountainGazelleOptimization(
627
+ config=MountainGazelleOptimizationConfig(max_cycles=10000, population_size=50)
628
+ )
629
+ model3 = GrasshopperOptimization(
630
+ config=GrasshopperOptimizationConfig(max_cycles=10000, population_size=50, c_min=0.00004, c_max=2.0,)
631
+ )
632
+ model4 = GizaPyramidConstructionOptimization(
633
+ config=GizaPyramidConstructionOptimizationConfig(
634
+ max_cycles=10000, population_size=50, theta=14, friction=[1, 10], prob_substitution=0.5,
635
+ )
636
+ )
637
+
638
+ multitask = Multitask(
639
+ algorithms=(model1, model2, model3, model4), tasks=(task1, task2, task3), modes=("thread", ), n_workers=4
640
+ )
641
+
642
+ multitask.execute(n_trials=2, n_jobs=2, debug=True)
643
+
644
+ multitask.export_results("csv")
645
+ multitask.export_results("dataframe")
646
+ multitask.export_results("json")
647
+ ```
648
+
525
649
  ### Agent characteristics
526
650
  The characteristics of an agent can be extracted by using two functions:
527
651
  - `agent_trend`: it returns the trend of the agent at each iteration
@@ -64,13 +64,15 @@ continuous and discrete variables. In order to do so, you need to define a `Task
64
64
  `Task` class of the library. The list of variables in the problem must be specified in the constructor of the class
65
65
  inheriting from `Task`. The following table describes the types of variables currently implemented in the library.
66
66
 
67
- | Variable type | Class name | Description | Example |
68
- |-----------------|--------------------------|----------------------------------------------------------------|------------------------------------------------------------------------------------|
69
- | Continuous | `ContinuousVariable` | A continuous variable | `ContinuousVariable(name="x0", lower_bound=-100.0, upper_bound=100.0)` |
70
- | Discrete | `DiscreteVariable` | A discrete variable | `DiscreteVariable(choices=["scale", "auto", 0.01, 0.1, 0.5, 1.0], name="gamma")` |
71
- | Permutation | `PermutationVariable` | A permutation of the specified choices | `PermutationVariable(items=[[60, 200], [180, 200], [80, 180]], name="routes")` |
72
- | Binary | `BinaryVariable` | A type of variable used for problems where the data are binary | `BinaryVariable(name="x", n_vars=10)` |
73
- | Multi-objective | `MultiObjectiveVariable` | A type of variable used for multi-objective problems | `MultiObjectiveVariable(name="x", lower_bounds=(-10, -10), upper_bounds=(10, 10))` |
67
+ | Variable type | Class name | Description | Example |
68
+ |------------------|---------------------------|----------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|
69
+ | Continuous | `ContinuousVariable` | A continuous variable | `ContinuousVariable(name="x0", lower_bound=-100.0, upper_bound=100.0)` |
70
+ | Continuous (set) | `ContinuousMultiVariable` | A set of continuous variables | `ContinuousMultiVariable(name="x0", lower_bounds=[-100.0, -200.0], upper_bounds=[100.0, 50.0])` |
71
+ | Discrete | `DiscreteVariable` | A discrete variable | `DiscreteVariable(choices=["scale", "auto", 0.01, 0.1, 0.5, 1.0], name="gamma")` |
72
+ | Discrete (set) | `DiscreteMultiVariable` | A set of discrete variables | `DiscreteMultiVariable(choices=[[0.1, 10, 100], ["scale", "auto", 0.01, 0.1, 0.5, 1.0]], name="params")` |
73
+ | Permutation | `PermutationVariable` | A permutation of the specified choices | `PermutationVariable(items=[[60, 200], [180, 200], [80, 180]], name="routes")` |
74
+ | Binary | `BinaryVariable` | A type of variable used for problems where the data are binary | `BinaryVariable(name="x", n_vars=10)` |
75
+ | Multi-objective | `MultiObjectiveVariable` | A type of variable used for multi-objective problems | `MultiObjectiveVariable(name="x", lower_bounds=(-10, -10), upper_bounds=(10, 10))` |
74
76
 
75
77
  An example of a custom `Task` class is the following:
76
78
 
@@ -147,7 +149,7 @@ task = Sphere(
147
149
  For example, let us inspect how you can solve the continuous _sphere_ problem with the Particle Swarm Optimization algorithm.
148
150
 
149
151
  ```python
150
- from pyvolutionary import ContinuousVariable, ParticleSwarmOptimization, ParticleSwarmOptimizationConfig, Task
152
+ from pyvolutionary import ContinuousMultiVariable, ParticleSwarmOptimization, ParticleSwarmOptimizationConfig, Task
151
153
 
152
154
  # Define the problem, you can replace the following class with your custom problem to optimize
153
155
  class Sphere(Task):
@@ -159,22 +161,14 @@ class Sphere(Task):
159
161
 
160
162
 
161
163
  # Define the task with the bounds and the configuration of the optimizer
162
- population = 200
163
- dimension = 2
164
- position_min = -100.0
165
- position_max = 100.0
166
- generation = 400
167
- fitness_error = 10e-4
168
164
  task = Sphere(
169
- variables=[ContinuousVariable(
170
- name=f"x{i}", lower_bound=position_min, upper_bound=position_max
171
- ) for i in range(dimension)],
165
+ variables=[ContinuousMultiVariable(name="x", lower_bounds=[-100.0, -100.0], upper_bound=[100.0, 100.0])],
172
166
  )
173
167
 
174
168
  configuration = ParticleSwarmOptimizationConfig(
175
- population_size=population,
176
- fitness_error=fitness_error,
177
- max_cycles=generation,
169
+ population_size=200,
170
+ fitness_error=10e-4,
171
+ max_cycles=400,
178
172
  c1=0.1,
179
173
  c2=0.1,
180
174
  w=[0.35, 1],
@@ -409,7 +403,7 @@ implemented in the library):
409
403
 
410
404
  ```python
411
405
  import numpy as np
412
- from pyvolutionary import Task, ContinuousVariable, AntLionOptimization, AntLionOptimizationConfig
406
+ from pyvolutionary import Task, ContinuousMultiVariable, AntLionOptimization, AntLionOptimizationConfig
413
407
 
414
408
  ## Link: https://onlinelibrary.wiley.com/doi/pdf/10.1002/9781119136507.app2
415
409
  class ConstrainedBenchmark(Task):
@@ -453,12 +447,10 @@ class ConstrainedBenchmark(Task):
453
447
 
454
448
 
455
449
  # Define the task with the bounds and the configuration of the optimizer
450
+ lower_bounds = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
451
+ upper_bounds = [1, 1, 1, 1, 1, 1, 1, 1, 1, 100, 100, 100, 1]
456
452
  task = ConstrainedBenchmark(
457
- variables=(
458
- [ContinuousVariable(name=f"x{i}", lower_bound=0, upper_bound=1) for i in range(9)] + [
459
- ContinuousVariable(name=f"x{i}", lower_bound=0, upper_bound=100) for i in range(9, 12)
460
- ] + [ContinuousVariable(name=f"x12", lower_bound=0, upper_bound=1)]
461
- )
453
+ variables=([ContinuousMultiVariable(name="x", lower_bounds=lower_bounds, upper_bounds=upper_bounds)])
462
454
  )
463
455
 
464
456
  configuration = AntLionOptimizationConfig(population_size=200, fitness_error=10e-4, max_cycles=400)
@@ -496,6 +488,135 @@ Once you created your new classes, you can run the algorithm by calling the `opt
496
488
  ## Utilities
497
489
  **pyVolutionary** provides a set of utilities to facilitate the use of the library.
498
490
 
491
+ ### GridSearchCV Hyper-parameter tuning
492
+ **pyVolutionary** provides a `GridSearchCV` class to perform hyperparameter tuning of a model. The class is similar to
493
+ the one provided by [scikit-learn](https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.GridSearchCV.html),
494
+ but it uses the algorithms implemented in the library to perform the search. The class can be used as follows:
495
+
496
+ ```python
497
+ from opfunu.cec_based.cec2017 import F52017
498
+
499
+ from pyvolutionary import ContinuousMultiVariable, Task, BiogeographyBasedOptimization, GridSearchCV
500
+
501
+ f1 = F52017(30, f_bias=0)
502
+
503
+
504
+ class Problem(Task):
505
+ # Link: https://en.wikipedia.org/wiki/Test_functions_for_optimization
506
+ def objective_function(self, solution):
507
+ return f1.evaluate(solution)
508
+
509
+
510
+ # Define the task with the bounds and the configuration of the optimizer
511
+ task = Problem(
512
+ variables=[ContinuousMultiVariable(name="x", lower_bounds=f1.lb, upper_bounds=f1.ub)],
513
+ )
514
+
515
+ params_bbo_grid = {
516
+ "max_cycles": [10, 20, 30, 40],
517
+ "population_size": [50, 100, 150],
518
+ "n_elites": [3, 4, 5, 6],
519
+ "p_m": [0.01, 0.02, 0.05]
520
+ }
521
+
522
+
523
+ model = BiogeographyBasedOptimization()
524
+ tuner = GridSearchCV(model, params_bbo_grid)
525
+
526
+ tuner.execute(task=task)
527
+
528
+ print(f"Best row {tuner.best_row}")
529
+ print(f"Best score {tuner.best_score}")
530
+ print(f"Best parameters {tuner.best_parameters}")
531
+
532
+ best_result = tuner.resolve()
533
+ print(f"Best solution after tuning {best_result.best_solution}")
534
+
535
+ tuner.export_results("csv")
536
+ tuner.export_results("dataframe")
537
+ tuner.export_results("json")
538
+ ```
539
+
540
+ ### Multitasking
541
+ **pyVolutionary** provides a `Multitask` class to perform multitasking optimization. The class can become very precious
542
+ when you need to optimize multiple tasks with multiple algorithms in parallel. In case, for instance, of multiple tasks
543
+ with the same algorithm, you can use the `Multitask` class to run the optimization in parallel. Furthermore, the
544
+ `Multitask` class can be used to run multiple tasks with different algorithms in parallel. Here is an example of how
545
+ to use the `Multitask` class:
546
+
547
+ ```python
548
+ from opfunu.cec_based.cec2017 import F52017, F102017, F292017
549
+
550
+ from pyvolutionary import (
551
+ ContinuousMultiVariable,
552
+ Task,
553
+ NuclearReactionOptimization,
554
+ Multitask,
555
+ NuclearReactionOptimizationConfig,
556
+ MountainGazelleOptimization,
557
+ MountainGazelleOptimizationConfig,
558
+ GrasshopperOptimization,
559
+ GrasshopperOptimizationConfig,
560
+ GizaPyramidConstructionOptimization,
561
+ GizaPyramidConstructionOptimizationConfig,
562
+ )
563
+
564
+ f1 = F52017(30, f_bias=0)
565
+ f2 = F102017(30, f_bias=0)
566
+ f3 = F292017(30, f_bias=0)
567
+
568
+
569
+ class Problem1(Task):
570
+ def objective_function(self, solution):
571
+ return f1.evaluate(solution)
572
+
573
+
574
+ class Problem2(Task):
575
+ def objective_function(self, solution):
576
+ return f3.evaluate(solution)
577
+
578
+
579
+ class Problem3(Task):
580
+ def objective_function(self, solution):
581
+ return f1.evaluate(solution)
582
+
583
+
584
+ task1 = Problem1(
585
+ variables=[ContinuousMultiVariable(name="x", lower_bounds=f1.lb, upper_bounds=f1.ub)],
586
+ )
587
+ task2 = Problem2(
588
+ variables=[ContinuousMultiVariable(name="x", lower_bounds=f2.lb, upper_bounds=f2.ub)],
589
+ )
590
+ task3 = Problem3(
591
+ variables=[ContinuousMultiVariable(name="x", lower_bounds=f3.lb, upper_bounds=f3.ub)],
592
+ )
593
+
594
+ model1 = NuclearReactionOptimization(
595
+ config=NuclearReactionOptimizationConfig(max_cycles=10000, population_size=50)
596
+ )
597
+ model2 = MountainGazelleOptimization(
598
+ config=MountainGazelleOptimizationConfig(max_cycles=10000, population_size=50)
599
+ )
600
+ model3 = GrasshopperOptimization(
601
+ config=GrasshopperOptimizationConfig(max_cycles=10000, population_size=50, c_min=0.00004, c_max=2.0,)
602
+ )
603
+ model4 = GizaPyramidConstructionOptimization(
604
+ config=GizaPyramidConstructionOptimizationConfig(
605
+ max_cycles=10000, population_size=50, theta=14, friction=[1, 10], prob_substitution=0.5,
606
+ )
607
+ )
608
+
609
+ multitask = Multitask(
610
+ algorithms=(model1, model2, model3, model4), tasks=(task1, task2, task3), modes=("thread", ), n_workers=4
611
+ )
612
+
613
+ multitask.execute(n_trials=2, n_jobs=2, debug=True)
614
+
615
+ multitask.export_results("csv")
616
+ multitask.export_results("dataframe")
617
+ multitask.export_results("json")
618
+ ```
619
+
499
620
  ### Agent characteristics
500
621
  The characteristics of an agent can be extracted by using two functions:
501
622
  - `agent_trend`: it returns the trend of the agent at each iteration
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "pyVolutionary"
3
- version = "2.2.0"
3
+ version = "2.4.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"
@@ -8,7 +8,7 @@ readme = "README.md"
8
8
  repository = "https://github.com/matteocacciola/pyvolutionary"
9
9
  classifiers = [
10
10
  "Development Status :: 5 - Production/Stable",
11
- "Programming Language :: Python :: 3.9",
11
+ "Programming Language :: Python :: 3.10",
12
12
  "Topic :: Scientific/Engineering",
13
13
  "Topic :: Software Development"
14
14
  ]
@@ -22,6 +22,8 @@ install = "^1.3.5"
22
22
  coverage = "^7.3.2"
23
23
  matplotlib = "^3.8.1"
24
24
  sphynx = "^0.0.3"
25
+ pandas = "^2.2.0"
26
+ opfunu = "^1.0.1"
25
27
 
26
28
 
27
29
  [tool.poetry.group.test.dependencies]
@@ -71,14 +71,18 @@ from .whales import *
71
71
  from .wildebeest_herd import *
72
72
  from .wind_driven import *
73
73
  from .zebra import *
74
+ from .gridsearchcv import GridSearchCV
74
75
  from .enums import TaskType
76
+ from .multitask import Multitask
75
77
  from .models import (
76
78
  OptimizationResult,
77
79
  Population,
78
80
  Agent,
79
81
  Task,
80
82
  ContinuousVariable,
83
+ ContinuousMultiVariable,
81
84
  DiscreteVariable,
85
+ DiscreteMultiVariable,
82
86
  PermutationVariable,
83
87
  MultiObjectiveVariable,
84
88
  BinaryVariable,
@@ -21,7 +21,7 @@ class OptimizationAbstract(ABC, Generic[T]):
21
21
  """
22
22
  EPS: Final[float] = np.finfo(float).eps
23
23
 
24
- def __init__(self, config: BaseOptimizationConfig, debug: bool | None = False):
24
+ def __init__(self, config: BaseOptimizationConfig | None = None, debug: bool | None = False):
25
25
  """
26
26
  The constructor of the class.
27
27
  :param config: The configuration of the optimization algorithm.
@@ -41,12 +41,29 @@ class OptimizationAbstract(ABC, Generic[T]):
41
41
  def optimization_step(self):
42
42
  pass
43
43
 
44
+ @abstractmethod
45
+ def set_config_parameters(self, parameters: dict[str, Any]):
46
+ pass
47
+
44
48
  def before_initialization(self):
45
49
  pass
46
50
 
47
51
  def after_initialization(self):
48
52
  pass
49
53
 
54
+ @property
55
+ def configuration(self) -> BaseOptimizationConfig | None:
56
+ """
57
+ This property returns the configuration of the optimization algorithm.
58
+ :return: the configuration
59
+ :rtype: BaseOptimizationConfig
60
+ """
61
+ return self._config
62
+
63
+ @property
64
+ def name(self):
65
+ return self.__class__.__name__
66
+
50
67
  def _fcn(self, x: list[float] | np.ndarray) -> float | list[float]:
51
68
  """
52
69
  This method evaluates the objective function.
@@ -184,6 +201,9 @@ class OptimizationAbstract(ABC, Generic[T]):
184
201
  :return: the result of the optimization
185
202
  :rtype: OptimizationResult
186
203
  """
204
+ if not self._config:
205
+ raise ValueError("Invalid configuration")
206
+
187
207
  np.random.seed(task.seed)
188
208
  evolution: list[Population] = []
189
209
 
@@ -196,7 +216,7 @@ class OptimizationAbstract(ABC, Generic[T]):
196
216
  try:
197
217
  self._mode = ModeSolver(mode)
198
218
  except ValueError:
199
- raise ValueError("Invalid mode. Possible values are 'serial', 'thread' and 'process'")
219
+ raise ValueError("Invalid mode. Possible values are \"serial\", \"thread\" and \"process\"")
200
220
 
201
221
  self._task = task
202
222
  self.before_initialization()
@@ -1,3 +1,4 @@
1
+ from typing import Any
1
2
  import numpy as np
2
3
 
3
4
  from ..helpers import (
@@ -23,9 +24,12 @@ class AfricanVultureOptimization(OptimizationAbstract):
23
24
  nature-inspired metaheuristic algorithm for global optimization problems. Computers & Industrial Engineering,
24
25
  158, 107408.
25
26
  """
26
- def __init__(self, config: AfricanVultureOptimizationConfig, debug: bool | None = False):
27
+ def __init__(self, config: AfricanVultureOptimizationConfig | None = None, debug: bool | None = False):
27
28
  super().__init__(config, debug)
28
29
 
30
+ def set_config_parameters(self, parameters: dict[str, Any]):
31
+ self._config = AfricanVultureOptimizationConfig(**parameters)
32
+
29
33
  def optimization_step(self):
30
34
  def exploration_position_phase1(rand_pos: np.ndarray, position: np.ndarray) -> np.ndarray:
31
35
  best_x1 = np.array(best_list[0].position)
@@ -1,3 +1,4 @@
1
+ from typing import Any
1
2
  import numpy as np
2
3
 
3
4
  from ..helpers import (
@@ -22,9 +23,12 @@ class AntColonyOptimization(OptimizationAbstract):
22
23
  européenne sur la vie artificielle, Paris, France, Elsevier Publishing, 134-142, 1991.
23
24
  [2] M. Dorigo, Optimization, Learning and Natural Algorithms, PhD thesis, Politecnico di Milano, Italy, 1992.
24
25
  """
25
- def __init__(self, config: AntColonyOptimizationConfig, debug: bool | None = False):
26
+ def __init__(self, config: AntColonyOptimizationConfig | None = None, debug: bool | None = False):
26
27
  super().__init__(config, debug)
27
28
 
29
+ def set_config_parameters(self, parameters: dict[str, Any]):
30
+ self._config = AntColonyOptimizationConfig(**parameters)
31
+
28
32
  def optimization_step(self):
29
33
  def compute_sigma(ant: Ant) -> float:
30
34
  M = np.repeat(np.array(ant.position).reshape((1, -1)), pop_size, axis=0)
@@ -1,3 +1,4 @@
1
+ from typing import Any
1
2
  import numpy as np
2
3
 
3
4
  from ..helpers import (
@@ -20,9 +21,12 @@ class AntLionOptimization(OptimizationAbstract):
20
21
  ----------
21
22
  [1] Mirjalili, S., 2015. The ant lion optimizer. Advances in engineering software, 83, pp.80-98.
22
23
  """
23
- def __init__(self, config: AntLionOptimizationConfig, debug: bool | None = False):
24
+ def __init__(self, config: AntLionOptimizationConfig | None = None, debug: bool | None = False):
24
25
  super().__init__(config, debug)
25
26
 
27
+ def set_config_parameters(self, parameters: dict[str, Any]):
28
+ self._config = AntLionOptimizationConfig(**parameters)
29
+
26
30
  def optimization_step(self):
27
31
  def get_i_ratio() -> float:
28
32
  # I is the ratio in Equations (2.10) and (2.11)
@@ -1,3 +1,4 @@
1
+ from typing import Any
1
2
  import numpy as np
2
3
 
3
4
  from ..helpers import (
@@ -22,9 +23,12 @@ class AquilaOptimization(OptimizationAbstract):
22
23
  Aquila optimizer: a novel meta-heuristic optimization algorithm. Computers & Industrial Engineering, 157,
23
24
  p.107250.
24
25
  """
25
- def __init__(self, config: AquilaOptimizationConfig, debug: bool | None = False):
26
+ def __init__(self, config: AquilaOptimizationConfig | None = None, debug: bool | None = False):
26
27
  super().__init__(config, debug)
27
28
 
29
+ def set_config_parameters(self, parameters: dict[str, Any]):
30
+ self._config = AquilaOptimizationConfig(**parameters)
31
+
28
32
  def optimization_step(self):
29
33
  def move(idx: int, aquila: Aquila) -> Aquila:
30
34
  pos = np.array(aquila.position)
@@ -20,9 +20,12 @@ class ArchimedeOptimization(OptimizationAbstract):
20
20
  algorithm: a new metaheuristic algorithm for solving optimization problems. Applied Intelligence, 51(3),
21
21
  pp.1531-1551.
22
22
  """
23
- def __init__(self, config: ArchimedeOptimizationConfig, debug: bool | None = False):
23
+ def __init__(self, config: ArchimedeOptimizationConfig | None = None, debug: bool | None = False):
24
24
  super().__init__(config, debug)
25
25
 
26
+ def set_config_parameters(self, parameters: dict[str, Any]):
27
+ self._config = ArchimedeOptimizationConfig(**parameters)
28
+
26
29
  def _init_agent(
27
30
  self,
28
31
  position: list[Any] | np.ndarray | None = None,