Name | anmetal JSON |
Version |
0.1.1
JSON |
| download |
home_page | None |
Summary | Another Numeric optimization and Metaheuristics Library |
upload_time | 2024-12-02 18:06:24 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.7 |
license | MIT License Copyright (c) 2017 Erick Francisco Merino Menares Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
metaheuristic
optimization
|
VCS |
 |
bugtrack_url |
|
requirements |
numpy
matplotlib
pytest
pytest-cov
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Another Numeric optimization and Metaheuristics Library
A library to do your metaheuristics and numeric combinatorial stuff.
To install use:
```bash
pip install anmetal
```
See `/test` folder for examples of use.
## Content
### Numeric optimization
Iterative optimization functions (one solution)
* Euler method
* Newton method
### Metaheuristics
#### Real input (Population-based)
* Artificial Bee Colony (ABC)
* Ant Colony Optimization (ACO)
* Artificial Fish Swarm Algorithm (AFSA)
* Bat Algorithm
* Blackhole Algorithm
* Cuckoo Search
* Firefly Algorithm
* Harmony Search (HS)
* Particle Swarm Optimization (PSO)
* Particle Swarm Optimization with Leap
* Greedy
* Greedy with Leap
#### Categorical input
* Genetic Algorithm
* Genetic Algorithm with Leap
### Problems and gold-standard functions
#### NP-hard problems
* Real problems
* Partition problem
* Subset problem
* Categorical problems
* Knapsack
* Sudoku (without initial matrix, just random)
#### Non linear functions
* One input (1-D)
* F1 (https://doi.org/10.1007/s00521-017-3088-3)
* F3 (https://doi.org/10.1007/s00521-017-3088-3)
* Two inputs (2-D)
* Camelback (https://doi.org/10.1007/s00521-017-3088-3)
* Goldsteinprice (https://doi.org/10.1007/s00521-017-3088-3)
* Pshubert1 (https://doi.org/10.1007/s00521-017-3088-3)
* Pshubert2 (https://doi.org/10.1007/s00521-017-3088-3)
* Shubert (https://doi.org/10.1007/s00521-017-3088-3)
* Quartic (https://doi.org/10.1007/s00521-017-3088-3)
* N inputs (N-D)
* Brown1 (https://doi.org/10.1007/s00521-017-3088-3)
* Brown3 (https://doi.org/10.1007/s00521-017-3088-3)
* F10n (https://doi.org/10.1007/s00521-017-3088-3)
* F15n (https://doi.org/10.1007/s00521-017-3088-3)
* Sphere (https://doi.org/10.1007/s00521-018-3512-3)
* Rosenbrock (https://doi.org/10.1007/s00521-018-3512-3)
* Griewank (https://doi.org/10.1007/s00521-018-3512-3)
* Rastrigrin (https://doi.org/10.1007/s00521-018-3512-3)
* Sumsquares (https://doi.org/10.1007/s00521-018-3512-3)
* Michalewicz (https://doi.org/10.1007/s00521-018-3512-3)
* Quartic (https://doi.org/10.1007/s00521-018-3512-3)
* Schwefel (https://doi.org/10.1007/s00521-018-3512-3)
* Penalty (https://doi.org/10.1007/s00521-018-3512-3)
### Additional Features
#### Binarization functions
* sShape1
* sShape2
* sShape3
* sShape4
* vShape1
* vShape2
* vShape3
* vShape4
* erf
#### Binarization strategies
* standard
* complement
* static_probability
* elitist
## Example Usage
See the `/test` folder for complete examples. Here's a quick overview of running different metaheuristics:
```python
# Example with Partition Problem
from anmetal.problems.nphard_real import Partition_Real
from anmetal.population.PSO.PSOMH_Real import PSOMH_Real
# Create problem instance
problem = Partition_Real(seed=0, num_dims=200)
# Create and run metaheuristic
mh = PSOMH_Real(problem.min_x, problem.max_x, problem.ndim, False,
problem.objective_function, problem.repair_function,
problem.preprocess_function)
# Run optimization
fitness, solution = mh.run(verbose=True, iterations=100, population=30,
omega=0.8, phi_g=1, phi_p=0.5, seed=115)
```
## Algorithm Parameters
Each metaheuristic has its own set of parameters. Here are some common ones:
* **Common Parameters**
* `iterations`: Number of iterations
* `population`: Population size
* `seed`: Random seed for reproducibility
* `verbose`: Whether to print progress
* **Algorithm-Specific Parameters**
* ABC: `limit`
* ACO: `evaporation_rate`, `alpha`, `beta`
* BAT: `fmin`, `fmax`, `A`, `r0`
* CUCKOO: `pa`
* FIREFLY: `alpha`, `beta0`, `gamma`
* GA: `mutation_rate`, `crossover_rate`
* HS: `hmcr`, `par`, `bw`
* PSO: `omega`, `phi_g`, `phi_p`
For detailed parameter descriptions and recommended values, see the respective algorithm implementations in the source code.
Raw data
{
"_id": null,
"home_page": null,
"name": "anmetal",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "Erick Merino <erickfmm@gmail.com>",
"keywords": "metaheuristic, optimization",
"author": null,
"author_email": "Erick Merino <erickfmm@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/0b/25/83af05f2d2133dae0490b3b17c41fa81f22806d1fd8da0a9fbae2a4a781c/anmetal-0.1.1.tar.gz",
"platform": null,
"description": "# Another Numeric optimization and Metaheuristics Library\n\nA library to do your metaheuristics and numeric combinatorial stuff.\n\nTo install use:\n\n```bash\npip install anmetal\n```\n\nSee `/test` folder for examples of use.\n\n## Content\n\n### Numeric optimization\nIterative optimization functions (one solution)\n* Euler method\n* Newton method\n\n### Metaheuristics\n\n#### Real input (Population-based)\n* Artificial Bee Colony (ABC)\n* Ant Colony Optimization (ACO)\n* Artificial Fish Swarm Algorithm (AFSA)\n* Bat Algorithm\n* Blackhole Algorithm\n* Cuckoo Search\n* Firefly Algorithm\n* Harmony Search (HS)\n* Particle Swarm Optimization (PSO)\n* Particle Swarm Optimization with Leap\n* Greedy\n* Greedy with Leap\n\n#### Categorical input\n* Genetic Algorithm\n* Genetic Algorithm with Leap\n\n### Problems and gold-standard functions\n\n#### NP-hard problems\n\n* Real problems\n * Partition problem\n * Subset problem\n\n* Categorical problems\n * Knapsack\n * Sudoku (without initial matrix, just random)\n\n#### Non linear functions\n\n* One input (1-D)\n * F1 (https://doi.org/10.1007/s00521-017-3088-3)\n * F3 (https://doi.org/10.1007/s00521-017-3088-3)\n\n* Two inputs (2-D)\n * Camelback (https://doi.org/10.1007/s00521-017-3088-3)\n * Goldsteinprice (https://doi.org/10.1007/s00521-017-3088-3)\n * Pshubert1 (https://doi.org/10.1007/s00521-017-3088-3)\n * Pshubert2 (https://doi.org/10.1007/s00521-017-3088-3)\n * Shubert (https://doi.org/10.1007/s00521-017-3088-3)\n * Quartic (https://doi.org/10.1007/s00521-017-3088-3)\n\n* N inputs (N-D)\n * Brown1 (https://doi.org/10.1007/s00521-017-3088-3)\n * Brown3 (https://doi.org/10.1007/s00521-017-3088-3)\n * F10n (https://doi.org/10.1007/s00521-017-3088-3)\n * F15n (https://doi.org/10.1007/s00521-017-3088-3)\n * Sphere (https://doi.org/10.1007/s00521-018-3512-3)\n * Rosenbrock (https://doi.org/10.1007/s00521-018-3512-3)\n * Griewank (https://doi.org/10.1007/s00521-018-3512-3)\n * Rastrigrin (https://doi.org/10.1007/s00521-018-3512-3)\n * Sumsquares (https://doi.org/10.1007/s00521-018-3512-3)\n * Michalewicz (https://doi.org/10.1007/s00521-018-3512-3)\n * Quartic (https://doi.org/10.1007/s00521-018-3512-3)\n * Schwefel (https://doi.org/10.1007/s00521-018-3512-3)\n * Penalty (https://doi.org/10.1007/s00521-018-3512-3)\n\n### Additional Features\n\n#### Binarization functions\n* sShape1\n* sShape2\n* sShape3\n* sShape4\n* vShape1\n* vShape2\n* vShape3\n* vShape4\n* erf\n\n#### Binarization strategies\n* standard\n* complement\n* static_probability\n* elitist\n\n## Example Usage\n\nSee the `/test` folder for complete examples. Here's a quick overview of running different metaheuristics:\n\n```python\n# Example with Partition Problem\nfrom anmetal.problems.nphard_real import Partition_Real\nfrom anmetal.population.PSO.PSOMH_Real import PSOMH_Real\n\n# Create problem instance\nproblem = Partition_Real(seed=0, num_dims=200)\n\n# Create and run metaheuristic\nmh = PSOMH_Real(problem.min_x, problem.max_x, problem.ndim, False,\n problem.objective_function, problem.repair_function,\n problem.preprocess_function)\n\n# Run optimization\nfitness, solution = mh.run(verbose=True, iterations=100, population=30,\n omega=0.8, phi_g=1, phi_p=0.5, seed=115)\n```\n\n## Algorithm Parameters\n\nEach metaheuristic has its own set of parameters. Here are some common ones:\n\n* **Common Parameters**\n * `iterations`: Number of iterations\n * `population`: Population size\n * `seed`: Random seed for reproducibility\n * `verbose`: Whether to print progress\n\n* **Algorithm-Specific Parameters**\n * ABC: `limit`\n * ACO: `evaporation_rate`, `alpha`, `beta`\n * BAT: `fmin`, `fmax`, `A`, `r0`\n * CUCKOO: `pa`\n * FIREFLY: `alpha`, `beta0`, `gamma`\n * GA: `mutation_rate`, `crossover_rate`\n * HS: `hmcr`, `par`, `bw`\n * PSO: `omega`, `phi_g`, `phi_p`\n\nFor detailed parameter descriptions and recommended values, see the respective algorithm implementations in the source code.\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2017 Erick Francisco Merino Menares Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
"summary": "Another Numeric optimization and Metaheuristics Library",
"version": "0.1.1",
"project_urls": {
"Bug Tracker": "https://github.com/erickfmm/ANMetaL/issues",
"Homepage": "https://github.com/erickfmm/ANMetaL"
},
"split_keywords": [
"metaheuristic",
" optimization"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "eeda724ee1e2115001053bf5a5163b9f7629fc2d094a1ffa2c8737aa96afa350",
"md5": "7c81da8dbdf46f49f7fd06938f5fbf34",
"sha256": "29e59d840e0f4b8a76e28faf837d826f9b6334a380742ee4e100bbb47cf2f571"
},
"downloads": -1,
"filename": "anmetal-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7c81da8dbdf46f49f7fd06938f5fbf34",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 41459,
"upload_time": "2024-12-02T18:06:22",
"upload_time_iso_8601": "2024-12-02T18:06:22.993328Z",
"url": "https://files.pythonhosted.org/packages/ee/da/724ee1e2115001053bf5a5163b9f7629fc2d094a1ffa2c8737aa96afa350/anmetal-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0b2583af05f2d2133dae0490b3b17c41fa81f22806d1fd8da0a9fbae2a4a781c",
"md5": "ef598a33af33e1c9610ba6763a6c4562",
"sha256": "17bf38108307c47e73f01f3bef679ecc6e402c436cbb6c276e3b6e52ebc0805e"
},
"downloads": -1,
"filename": "anmetal-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "ef598a33af33e1c9610ba6763a6c4562",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 26494,
"upload_time": "2024-12-02T18:06:24",
"upload_time_iso_8601": "2024-12-02T18:06:24.320072Z",
"url": "https://files.pythonhosted.org/packages/0b/25/83af05f2d2133dae0490b3b17c41fa81f22806d1fd8da0a9fbae2a4a781c/anmetal-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-02 18:06:24",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "erickfmm",
"github_project": "ANMetaL",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "numpy",
"specs": []
},
{
"name": "matplotlib",
"specs": []
},
{
"name": "pytest",
"specs": []
},
{
"name": "pytest-cov",
"specs": []
}
],
"lcname": "anmetal"
}