{"id":17099852,"url":"https://github.com/cpmech/goga","last_synced_at":"2025-03-22T18:33:15.613Z","repository":{"id":35109758,"uuid":"39291367","full_name":"cpmech/goga","owner":"cpmech","description":"Go evolutionary algorithm is a computer library for developing evolutionary and genetic algorithms to solve optimisation problems with (or not) many constraints and many objectives. Also, a goal is to handle mixed-type representations (reals and integers).","archived":false,"fork":false,"pushed_at":"2021-01-18T12:09:18.000Z","size":23037,"stargazers_count":43,"open_issues_count":0,"forks_count":9,"subscribers_count":10,"default_branch":"main","last_synced_at":"2024-10-15T15:11:34.880Z","etag":null,"topics":["evolutionary-algorithm","evolutionary-algorithms","evolutionary-computation","genetic-algorithm","hacktoberfest","hacktoberfest2019","optimisation","optimization","optimizer"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cpmech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-18T08:04:22.000Z","updated_at":"2024-09-23T03:26:31.000Z","dependencies_parsed_at":"2022-08-18T02:15:35.321Z","dependency_job_id":null,"html_url":"https://github.com/cpmech/goga","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpmech%2Fgoga","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpmech%2Fgoga/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpmech%2Fgoga/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpmech%2Fgoga/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cpmech","download_url":"https://codeload.github.com/cpmech/goga/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221832247,"owners_count":16888203,"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":["evolutionary-algorithm","evolutionary-algorithms","evolutionary-computation","genetic-algorithm","hacktoberfest","hacktoberfest2019","optimisation","optimization","optimizer"],"created_at":"2024-10-14T15:11:35.258Z","updated_at":"2024-10-28T13:31:29.015Z","avatar_url":"https://github.com/cpmech.png","language":"Go","readme":"# Goga \u0026ndash; Go Evolutionary/Genetic Algorithm\n\nGoga is a computer library for developing evolutionary algorithms based on the _differential\nevolution_ and/or _genetic algorithm_ concepts. The goal of these algorithms is to solve\noptimisation problems with (or not) many constraints and many objectives. Also, problems with\nmixed-type representations with real numbers and integers are considered by Goga.\n\n[See the documentation](https://godoc.org/github.com/cpmech/goga) for more details (e.g. how to call\nfunctions and use structures).\n\n[![GoDoc](https://godoc.org/github.com/cpmech/goga?status.svg)](https://godoc.org/github.com/cpmech/goga)\n\nThe core algorithms in Goga are well explained in my paper entitled `Parallel evolutionary algorithm for constrained single and multi objective optimisation` which was rejected (due to silly reasons such as `too long`) from _IEEE Transactions on Evolutionary Computation_ but accepted in _Applied Soft Computing_.\n\nThe original version for IEEE contains all the equations and is nicely formatted. You can get them freely from here:\n\n1. [Part I: Methods, single and two-objective test cases](doc/goga-ieee-part1.pdf)\n2. [Part II: Multi/many-objective test cases and applications](doc/goga-ieee-part2.pdf)\n\nThe shorter and slightly improved (published) version is also freely availabe from here:\n\n3. [Summary of GOGA Algorithms](doc/goga.pdf); see also [1, 2]\n\n## Examples\n\n[Check out more examples here](https://github.com/cpmech/goga/blob/master/examples/README.md)\n\n\u003cdiv id=\"container\"\u003e\n\u003cp\u003e\u003cimg src=\"examples/simple/figs/cross-in-tray.png\" width=\"450\"\u003e\u003c/p\u003e\nOutput of cross-in-tray.go\n\u003c/div\u003e\n\n```go\n// objective function\nfunc fcn(f, g, h, x []float64, y []int, cpu int) {\n\tf[0] = -0.0001 * Pow(Abs(Sin(x[0])*Sin(x[1])*Exp(Abs(100-Sqrt(Pow(x[0], 2)+Pow(x[1], 2))/Pi)))+1, 0.1)\n}\n\n// main function\nfunc main() {\n\n\t// problem definition\n\tnf := 1 // number of objective functions\n\tng := 0 // number of inequality constraints\n\tnh := 0 // number of equality constraints\n\n\t// the solver (optimiser)\n\tvar opt goga.Optimiser\n\topt.Default()                    // must call this to set default constants\n\topt.FltMin = []float64{-10, -10} // must set minimum\n\topt.FltMax = []float64{+10, +10} // must set maximum\n\topt.Nsol = 80\n\topt.Nsamples = 100\n\n\t// initialise the solver\n\topt.Init(goga.GenTrialSolutions, nil, fcn, nf, ng, nh)\n\n\t// solve problem\n\topt.RunMany(\"\", \"\", false)\n\n\t// stat\n\topt.PrintStatF(0)\n}\n```\n\n## Installation\n\n1 Install dependencies:\n\nGoga depends on the [Gosl Go Scientific Library](https://github.com/cpmech/gosl), therefore, please\ninstall Gosl first.\n\n2 Install Goga:\n\n```\ngo get github.com/cpmech/goga\n```\n\n## Documentation\n\nHere, we call _user-defined_ types as _structures_. These are simply Go `types` defined as `struct`.\nSome may think of these _structures_ as _classes_. Goga has several global functions as well and\ntries to avoid complicated constructions.\n\nAn allocated structure is called here an **object** and functions attached to this object are called\n**methods**. The variable holding the pointer to an object is always named **o** in Goga (e.g.\nlike `self` or `this`).\n\nSome objects need to be initialised before usage. In this case, functions named `Init` have to be\ncalled (e.g. like `constructors`).\n\n## Bibliography\n\nGoga is included in the following works:\n\n1. Pedroso DM, Bonyadi MR, Gallagher M (2017) Parallel evolutionary algorithm for single and multi-objective optimisation: differential evolution and constraints handling, Applied Soft Computing http://dx.doi.org/10.1016/j.asoc.2017.09.006\n2. Pedroso DM (2017) FORM reliability analysis using a parallel evolutionary algorithm, Structural Safety 65:84-99 http://dx.doi.org/10.1016/j.strusafe.2017.01.001\n\n## Authors and license\n\nSee the AUTHORS file.\n\nUnless otherwise noted, the Goga source files are distributed under the BSD-style license found in the LICENSE file.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcpmech%2Fgoga","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcpmech%2Fgoga","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcpmech%2Fgoga/lists"}