{"id":17111649,"url":"https://github.com/jbytecode/pso","last_synced_at":"2025-08-16T02:09:28.638Z","repository":{"id":92232003,"uuid":"242492221","full_name":"jbytecode/pso","owner":"jbytecode","description":"Particle Swarm Optimization in Dart","archived":false,"fork":false,"pushed_at":"2024-06-21T19:02:28.000Z","size":30,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T17:48:59.613Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jbytecode.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-23T09:50:06.000Z","updated_at":"2024-06-21T19:02:31.000Z","dependencies_parsed_at":"2025-02-15T10:26:50.726Z","dependency_job_id":null,"html_url":"https://github.com/jbytecode/pso","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jbytecode/pso","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbytecode%2Fpso","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbytecode%2Fpso/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbytecode%2Fpso/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbytecode%2Fpso/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jbytecode","download_url":"https://codeload.github.com/jbytecode/pso/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbytecode%2Fpso/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270657715,"owners_count":24623465,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-16T02:00:11.002Z","response_time":91,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T16:56:33.583Z","updated_at":"2025-08-16T02:09:28.616Z","avatar_url":"https://github.com/jbytecode.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Dart CI](https://github.com/jbytecode/pso/workflows/Dart%20CI/badge.svg)\n\nA Library for Particle Swarm Optimization\n\n\n## Usage\n\nA simple usage example:\n\n```dart\nimport 'dart:math' as _math;\nimport 'package:pso/pso.dart';\n\ndouble f(List\u003cdouble\u003e x){\n  double s = 0.0;\n  s = _math.pow(x[0] - 3.14159265, 2.0) + _math.pow(x[1] - 2.71828, 2.0);\n  return -s;\n}\n\nvoid main() {\n  List\u003cdouble\u003e mins = [-10, -10];\n  List\u003cdouble\u003e maxs = [10, 10];\n\n  PSO pso = PSO(f, 100, mins, maxs);\n  pso.iterateN(500);\n\n  Particle result = pso.findGBest();\n  print(result);\n}\n```\n\n## Details\n* The objective function is always in the form of\n\n```dart\ndouble f(List\u003cdouble\u003e x){\n  \n}\n```\n\n* The optimization is always a maximation. If the objective\nfunction of the problem is a minimization, the returned value of the \nobjective function can be multiplied by -1.0.\n\n* The default parameters of the classical Particle Swarm Optimization \nare set to w = 0.5, c1 = 1.0, and c2 = 1.0. These optimization parameters can be customized \nin the \n\n```dart\nvoid iterateWithParameters(double w, double c1, double c2) \n```\n\nor\n\n```dart\nvoid iterateNWithParameters(int n, double w, double c1, double c2) \n```\n\n\nin the class *PSO*.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjbytecode%2Fpso","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjbytecode%2Fpso","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjbytecode%2Fpso/lists"}