{"id":19167730,"url":"https://github.com/thomasweise/aitoa-code","last_synced_at":"2025-07-04T17:08:04.621Z","repository":{"id":90947908,"uuid":"148885785","full_name":"thomasWeise/aitoa-code","owner":"thomasWeise","description":"The source code examples for the book \"An Introduction to Optimization Algorithms\"","archived":false,"fork":false,"pushed_at":"2020-12-26T04:29:31.000Z","size":1619,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-19T23:31:53.985Z","etag":null,"topics":["evolutionary-algorithm","java","job-shop-scheduling-problem","local-search","metaheuristics","optimization-algorithms"],"latest_commit_sha":null,"homepage":"http://thomasweise.github.io/aitoa/index.html","language":"Java","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/thomasWeise.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-15T08:53:35.000Z","updated_at":"2024-11-08T16:47:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"072cf543-2dbb-47ea-91ee-911f898a6fcf","html_url":"https://github.com/thomasWeise/aitoa-code","commit_stats":null,"previous_names":[],"tags_count":75,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasWeise%2Faitoa-code","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasWeise%2Faitoa-code/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasWeise%2Faitoa-code/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasWeise%2Faitoa-code/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thomasWeise","download_url":"https://codeload.github.com/thomasWeise/aitoa-code/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252889237,"owners_count":21820141,"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","java","job-shop-scheduling-problem","local-search","metaheuristics","optimization-algorithms"],"created_at":"2024-11-09T09:39:02.663Z","updated_at":"2025-05-07T13:42:33.958Z","avatar_url":"https://github.com/thomasWeise.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Example Codes from the Book \u0026ldquo;An Introduction to Optimization Algorithms\u0026rdquo;\n\n[\u003cimg alt=\"Travis CI Build Status\" src=\"https://img.shields.io/travis/thomasWeise/aitoa-code/master.svg\" height=\"20\"/\u003e](https://travis-ci.org/thomasWeise/aitoa-code/)\n[\u003cimg alt=\"drone.io Build Status\" src=\"https://cloud.drone.io/api/badges/thomasWeise/aitoa-code/status.svg\" height=\"20\"\u003e](https://cloud.drone.io/thomasWeise/aitoa-code)\n[![Release](https://jitpack.io/v/thomasWeise/aitoa-code.svg)](https://jitpack.io/#thomasWeise/aitoa-code)\n[![Maintainability](https://api.codeclimate.com/v1/badges/23609bc004b2864cf14d/maintainability)](https://codeclimate.com/github/thomasWeise/aitoa-code/maintainability)\n\n## 1. Introduction\n\nIn this repository, we provide example source codes for the book \"[An Introduction to Optimization Algorithms](http://github.com/thomasWeise/aitoa)\".\nWith the book, we try to develop a readable and accessible introduction in optimization, optimization algorithms, and, in particular, metaheuristics.\nThe code is designed as a versatile and general implementation of these algorithms in Java and provides one example application: the Job Shop Scheduling Problem ([JSSP](http://en.wikipedia.org/wiki/Job_shop_scheduling)).\n\nThe [book](http://thomasweise.github.io/aitoa/index.html) is available in the following formats:\n\n1. [aitoa.pdf](http://thomasweise.github.io/aitoa/aitoa.pdf), in the [PDF](http://thomasweise.github.io/aitoa/aitoa.pdf) format for reading on the computer and/or printing (but please don't print this, save paper),\n2. [aitoa.html](http://thomasweise.github.io/aitoa/aitoa.html), in the [HTML5](http://thomasweise.github.io/aitoa/aitoa.html) format for reading in the browser on any device,\n3. [aitoa.epub](http://thomasweise.github.io/aitoa/aitoa.epub), in the [EPUB3](http://thomasweise.github.io/aitoa/aitoa.epub) format for reading on mobile phones or other hand-held devices, and\n4. [aitoa.azw3](http://thomasweise.github.io/aitoa/aitoa.azw3), in the [AZW3](http://thomasweise.github.io/aitoa/aitoa.azw3) format for reading on Kindle and similar devices.\n\n## 2. How to Use\n\n### 2.1. Installation\n\nThe source code is provided at [GitHub](http://github.com/thomasWeise/aitoa-code) as a [Maven](http://en.wikipedia.org/wiki/Apache_Maven) project for [Java 1.8](http://en.wikipedia.org/wiki/Java_version_history#Java_SE_8) along with settings for the [Eclipse](http://www.eclipse.org/) developer environment.\nI therefore recommend using Eclipse for exploring and playing around with it.\nOnce you have checked-out the code and imported it as existing project in Eclipse, you need to right-click the project, choose \"Maven\" and then \"Update Project\".\nThis will automatically download the required dependencies (currently, only [Junit 4.12](http://junit.org/junit4/)) and set up the folder structure properly.\n\nYou can also use this package as a `jar` library directly, which will allow you to use all the implemented algorithms and API directly in your project.\nThen, it may make sense to remember that this is rather an educational package, not necessarily designed for efficiency.\nAnyway, if your software project uses Maven as well, then you can even directly link these sources as dependency.\nTherefore, you need to do the following.\n\nFirst, you need to add the following repository, which is a repository that can kind of dynamically mirror repositories at GitHub:\n\n```xml\n\u003crepositories\u003e\n  \u003crepository\u003e\n    \u003cid\u003ejitpack.io\u003c/id\u003e\n    \u003curl\u003ehttps://jitpack.io\u003c/url\u003e\n  \u003c/repository\u003e\n\u003c/repositories\u003e\n```\n\nThan you can add the dependency on our `aitoa-code` repository into your `dependencies` section.\nHere, `0.8.79` is the current version of `aitoa-code`.\nNotice that you may have more dependencies in your `dependencies` section, say on `junit`, but here I just put the one for `aitoa-code` as example.\n\n```xml\n\u003cdependencies\u003e\n  \u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.thomasWeise\u003c/groupId\u003e\n    \u003cartifactId\u003eaitoa-code\u003c/artifactId\u003e\n    \u003cversion\u003e0.8.79\u003c/version\u003e\n  \u003c/dependency\u003e\n\u003c/dependencies\u003e\n```\n\nFinally, in order to include all required external `jar`s into your `jar` upon compilation, you may want to add the following plugin into your `\u003cbuild\u003e\u003cplugins\u003e` section:\nIn the snippet below, you must then replace `${project.mainClass}` with the main class that should run when your `jar` is executed.\nThis should result in a so-called \"fat\" `jar`, which includes the dependencies.\nIn other words, you do not need to have our `jar` in the classpath anymore but can ship your code as one single `jar`.\n\n```xml\n\u003cplugin\u003e\n  \u003cgroupId\u003eorg.apache.maven.plugins\u003c/groupId\u003e\n  \u003cartifactId\u003emaven-shade-plugin\u003c/artifactId\u003e\n  \u003cversion\u003e3.2.0\u003c/version\u003e\n  \u003cexecutions\u003e\n    \u003cexecution\u003e\n      \u003cphase\u003epackage\u003c/phase\u003e\n      \u003cgoals\u003e\n        \u003cgoal\u003eshade\u003c/goal\u003e\n      \u003c/goals\u003e\n      \u003cconfiguration\u003e\n        \u003ccreateSourcesJar\u003etrue\u003c/createSourcesJar\u003e\n        \u003cshadeTestJar\u003etrue\u003c/shadeTestJar\u003e\n        \u003cminimizeJar\u003efalse\u003c/minimizeJar\u003e\n        \u003cshadedArtifactAttached\u003etrue\u003c/shadedArtifactAttached\u003e\n        \u003ccreateDependencyReducedPom\u003efalse\u003c/createDependencyReducedPom\u003e\n\n        \u003cshadedClassifierName\u003efull\u003c/shadedClassifierName\u003e\n\n        \u003cfilters\u003e\n          \u003cfilter\u003e\n            \u003cartifact\u003e*:*\u003c/artifact\u003e\n            \u003cexcludes\u003e\n              \u003cexclude\u003eMETA-INF/*.SF\u003c/exclude\u003e\n              \u003cexclude\u003eMETA-INF/*.DSA\u003c/exclude\u003e\n              \u003cexclude\u003eMETA-INF/*.RSA\u003c/exclude\u003e\n            \u003c/excludes\u003e\n          \u003c/filter\u003e\n        \u003c/filters\u003e\n\n        \u003ctransformers\u003e\n          \u003ctransformer\n            implementation=\"org.apache.maven.plugins.shade.resource.ManifestResourceTransformer\"\u003e\n            \u003cmainClass\u003e${project.mainClass}\u003c/mainClass\u003e\n          \u003c/transformer\u003e\n          \u003ctransformer\n            implementation=\"org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer\" /\u003e\n          \u003ctransformer\n            implementation=\"org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer\" /\u003e\n          \u003ctransformer\n            implementation=\"org.apache.maven.plugins.shade.resource.PluginXmlResourceTransformer\" /\u003e\n          \u003ctransformer\n            implementation=\"org.apache.maven.plugins.shade.resource.ServicesResourceTransformer\" /\u003e\n        \u003c/transformers\u003e\n      \u003c/configuration\u003e\n    \u003c/execution\u003e\n  \u003c/executions\u003e\n\u003c/plugin\u003e\n```\n\n### 2.2. Running Experiments\n\nHow to run experiments with this code is discussed and shown in the book \"[An Introduction to Optimization Algorithms](http://github.com/thomasWeise/aitoa)\".\nBasically, an objective function, a search and a solution space as well as a mapping in between them, and search operators can be composed and provided to a black-box optimization algorithm.\nThey are encapsulated in a `IBlackBoxProcess` instance which can automatically remember the best solution and create comprehensive log files during an experiment run.\nWe also provide tools to then read the log files and create result summaries (see package `aitoa.utils.logs`).\n\nA description of the format of the data generated by the experimenter is provided [here](DATAFORMAT.md).\n\n## 3. License\n\nThe copyright holder of this package is Prof. Dr. Thomas Weise (see Contact).\nThe package is licensed under the MIT License.\n\n## 4. Contact\n\nIf you have any questions or suggestions, please contact\n[Prof. Dr. Thomas Weise](http://iao.hfuu.edu.cn/team/director) of the\n[Institute of Applied Optimization](http://iao.hfuu.edu.cn/) at\n[Hefei University](http://www.hfuu.edu.cn) in\nHefei, Anhui, China via\nemail to [tweise@hfuu.edu.cn](mailto:tweise@hfuu.edu.cn) with CC to [tweise@ustc.edu.cn](mailto:tweise@ustc.edu.cn).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasweise%2Faitoa-code","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthomasweise%2Faitoa-code","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasweise%2Faitoa-code/lists"}