{"id":20609759,"url":"https://github.com/rwehresmann/opt_alg_framework","last_synced_at":"2026-06-06T15:31:15.640Z","repository":{"id":56886959,"uuid":"60821393","full_name":"rwehresmann/opt_alg_framework","owner":"rwehresmann","description":"Ruby framework to work with optimization algorithms.","archived":false,"fork":false,"pushed_at":"2016-09-13T23:58:31.000Z","size":41,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-22T03:34:04.931Z","etag":null,"topics":["np-complete","optimization-algorithms","ruby","scheduling"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/rwehresmann.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-06-10T03:12:17.000Z","updated_at":"2017-03-10T12:20:03.000Z","dependencies_parsed_at":"2022-08-21T00:50:37.132Z","dependency_job_id":null,"html_url":"https://github.com/rwehresmann/opt_alg_framework","commit_stats":null,"previous_names":["rodrigo-ehresmann/opt_alg_framework"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwehresmann%2Fopt_alg_framework","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwehresmann%2Fopt_alg_framework/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwehresmann%2Fopt_alg_framework/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwehresmann%2Fopt_alg_framework/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rwehresmann","download_url":"https://codeload.github.com/rwehresmann/opt_alg_framework/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242257340,"owners_count":20098138,"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","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":["np-complete","optimization-algorithms","ruby","scheduling"],"created_at":"2024-11-16T10:14:23.153Z","updated_at":"2026-06-06T15:31:15.606Z","avatar_url":"https://github.com/rwehresmann.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# opt-alg-framework (Optimization Algorithm Framework)\n\n**opt-alg-framework** is a framework to work with and build optimization algorithm. The basic idea is: you will have a codificated problem with a method to calculate its fitness, an algorithm to improve this fitness and operators used with the algorithm to build new solutions.\n\nWhat is already implemented:\n\n  * Problems:\n    * Flow Shop Permutation\n\n  * Algorithms:\n    * Local Searches:\n      * Hill-Climbing\n      * Simulated Annealing\n      * Tabu Search\n\n  * Operators\n    * Crossover:\n      * Two Point Crossover (permutational)\n    * Selector:\n      * Tournament Selection\n    * Tweak:\n      * Random Swap\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'opt_alg_framework'\n```\n\nAnd then execute:\n\n    $ bundle install\n\nOr install it yourself as:\n\n    $ gem install opt_alg_framework\n\n## Usage\n\nExample: Read two instances of FSP problem (about the instances format, read README in *problem* directory!) and get its best results with SimulatedAnnealing algorithm, using RandomSwap operator.\n\n```ruby\noperator = Operator::Tweak::RandomSwap.new\nproblem = Problem::FSP.new\nproblem.load_schedule(\"path to instance file\")\nalgorithm = Algorithm::LocalSearch::SimulatedAnnealing.new max_iterations: 10,\n                                                           cooling_rate: 0.009,\n                                                           problem: problem,\n                                                           tweak_operator: operator\n\nputs algorithm.start # It will return a hash with the best solution found and its fitness\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` or, alternatively, `bundle console` for an interactive prompt that will allow you to experiment.\n\n## Contributing\n\n**This gem can deal with a lot of stuff, and everything must be simple to use (a.k.a *generic*). Before start to code, take a look in the README inside the folder of what you want to code (algorithms, problems, etc), some tips of what your class should have are there. Sugestions are welcome too! (;** \n\n1. Fork it ( https://github.com/[my-github-username]/opt_alg_framework/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frwehresmann%2Fopt_alg_framework","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frwehresmann%2Fopt_alg_framework","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frwehresmann%2Fopt_alg_framework/lists"}