{"id":20082440,"url":"https://github.com/emoflon/emoflon-ilp","last_synced_at":"2026-06-01T01:32:07.173Z","repository":{"id":75632881,"uuid":"559847744","full_name":"eMoflon/emoflon-ilp","owner":"eMoflon","description":"Eclipse plug-in for ILP solvers.","archived":false,"fork":false,"pushed_at":"2026-05-29T08:58:18.000Z","size":5462,"stargazers_count":1,"open_issues_count":9,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-05-29T10:24:29.815Z","etag":null,"topics":["eclipse","eclipse-plugin","ilp","integer-linear-programming","java"],"latest_commit_sha":null,"homepage":"https://emoflon.org","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eMoflon.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-10-31T08:14:07.000Z","updated_at":"2026-05-29T08:58:20.000Z","dependencies_parsed_at":"2023-11-08T12:42:07.932Z","dependency_job_id":"8d6d16af-47cd-4eed-8649-d69fd3a06c5d","html_url":"https://github.com/eMoflon/emoflon-ilp","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/eMoflon/emoflon-ilp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eMoflon%2Femoflon-ilp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eMoflon%2Femoflon-ilp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eMoflon%2Femoflon-ilp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eMoflon%2Femoflon-ilp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eMoflon","download_url":"https://codeload.github.com/eMoflon/emoflon-ilp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eMoflon%2Femoflon-ilp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33756575,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-31T02:00:06.040Z","response_time":95,"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":["eclipse","eclipse-plugin","ilp","integer-linear-programming","java"],"created_at":"2024-11-13T15:43:23.936Z","updated_at":"2026-06-01T01:32:07.168Z","avatar_url":"https://github.com/eMoflon.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eMoflon-ILP\n\nThe goal of this plug-in is to simplify the use of different ILP solvers in Eclipse projects.\nTherefore, the plug-in provides an interface to specify the ILP problem only once instead of having to do different implementations for each solver individually.\nSwitching between solvers is done by changing one parameter in the solver configuration.\n\n\n## How to install the plug-in\n\n* Install at least one of the supported ILP solvers:\n    * Install [Gurobi](https://www.gurobi.com/) in version `13.0.2` and activate a license for your computer.\n    * Install [GLPK](https://www.gnu.org/software/glpk/) (free and open-source) in the newest version (`4.65`) and add it to your path.\n      * For Windows-based systems, follow these steps to install GLPK:\n        * Download [winglpk](https://sourceforge.net/projects/winglpk/files/winglpk/GLPK-4.65/).\n        * Extract the archive, e.g., to `C:\\Program Files\\GLPK\\glpk-4.65`.\n        * Add `C:\\Program Files\\GLPK\\glpk-4.65\\w64` to the system-wide environment variable `path`.\n        * Restart your Eclipse IDE.\n    * Install [CPLEX](https://www.ibm.com/analytics/cplex-optimizer) in version `22.1.2` and activate a license for your computer (if necessary).\n \n- Build + install the project to the local `.m2/` folder:  \n  `$ mvn clean install`\n\n\n## How to build the plugin\n\n* Install at least one of the supported ILP solvers:\n    * Install [Gurobi](https://www.gurobi.com/) in version `13.0.2` and activate a license for your computer.\n    * Install [GLPK](https://www.gnu.org/software/glpk/) (free and open-source) in the newest version (`4.65`) and add it to your path.\n      * For Windows-based systems, follow these steps to install GLPK:\n        * Download [winglpk](https://sourceforge.net/projects/winglpk/files/winglpk/GLPK-4.65/).\n        * Extract the archive, e.g., to `C:\\Program Files\\GLPK\\glpk-4.65`.\n        * Add `C:\\Program Files\\GLPK\\glpk-4.65\\w64` to the system-wide environment variable `path`.\n        * Restart your Eclipse IDE.\n    * Install [CPLEX](https://www.ibm.com/analytics/cplex-optimizer) in version `22.1.2` and activate a license for your computer (if necessary).\n \n- Build the project + feature + update site:  \n  `$ mvn clean package`\n\n\n## How to run tests\n\nRemember: Depending on the solver a license is necessary (e.g., for Gurobi).\n\n- Run all tests:  \n  `$ mvn clean verify`\n- Run a specific test class (e.g., [GlpkTest.java](org.emoflon.ilp.tests/src/org/emoflon/ilp/tests/GlpkTest.java)):  \n  `$ mvn -Dtest=GlpkTest -DfailIfNoTests=false verify`\n\nBefore running tests with the CPLEX solver, it might be necessary to add the following Run Configuration to the VM Arguments (Eclipse: right click on the project -\u003e `Run as` -\u003e `Run Configurations` -\u003e `Arguments` tab), replace with the appropriate path, for example:  \n`-Djava.library.path=/opt/ibm/ILOG/CPLEX_Studio2212/cplex/bin/x86-64_linux`\n\n\n## How to use the plugin\n\nWhen using the plugin within the Eclipse IDE, the following environment variables may be necessary for your runtime configuration:\n```\n# Linux/macOS\nGRB_LICENSE_FILE=/home/mkratz/gurobi.lic\nGUROBI_HOME=/opt/gurobi1302/linux64/\nLD_LIBRARY_PATH=/opt/gurobi1302/linux64/lib/:/opt/ibm/ILOG/CPLEX_Studio2212/cplex/bin/x86-64_linux/\nPATH=/opt/gurobi1302/linux64/bin/:/opt/ibm/ILOG/CPLEX_Studio2212/cplex/bin/x86-64_linux/:$PATH\n\n# Windows\nGRB_LICENSE_FILE=C:\\Users\\mkratz\\gurobi.lic\nGUROBI_HOME=C:\\gurobi1302\\win64\nLD_LIBRARY_PATH=C:\\gurobi1302\\win64\\lib;C:\\Program Files\\IBM\\ILOG\\CPLEX_Studio2212\\cplex\\bin\\x64_win64\\\nPATH=C:\\gurobi1302\\win64\\bin;C:\\Program Files\\IBM\\ILOG\\CPLEX_Studio2212\\cplex\\bin\\x64_win64\\\n```\n\n\n## Example Problem\n\n### Knapsack Problem\n\nThis example can be found in the test class [SolverTest.java](org.emoflon.ilp.tests/src/org/emoflon/ilp/tests/SolverTest.java).\n\nThere is a set of items, which all have a weight and a value.\nThe goal is to determine a collection of items, for which the profit is maximized but the capacity constraint is satisfied.\n\n```\n// Amount of items\nint I = 6;\n// Profit\nint[] p = { 10, 13, 18, 32, 7, 15 };\n// Weight\nint[] w = { 11, 15, 20, 35, 10, 33 };\n// Capacity\nint c = 47;\n\n// Create variables:\n// 0 -\u003e item i not put in knapsack\n// 1 -\u003e item i put in knapsack\nList\u003cBinaryVariable\u003e x_i = new ArrayList\u003c\u003e();\nfor (int i = 0; i \u003c I; i++) {\n\tx_i.add(new BinaryVariable(\"x_\" + i));\n}\n\n// Objective: maximize the total price of selected items\n// maximize SUM(p_i * x_i)\nProblem problem = new Problem();\nproblem.setType(ObjectiveType.MAX);\n\nLinearFunction lin = new LinearFunction();\nfor (int i = 0; i \u003c I; i++) {\n\tlin.addTerm(x_i.get(i), p[i]);\n}\n\n// Constraint: Total weight must be equal or less than the capacity\n// SUM(w_i * x_i) \u003c= c\nLinearConstraint c1 = new LinearConstraint(Operator.LESS_OR_EQUAL, c);\nfor (int i = 0; i \u003c I; i++) {\n\tc1.addTerm(x_i.get(i), w[i]);\n}\n\n// Model\nproblem.setObjective(lin);\nproblem.add(c1);\n\n// Optimize\nSolverConfig config = new SolverConfig(SolverType.GLPK, false, 0.0, true, 42, false, 0.0, false, 0, 0, true, false, false, null);\nSolver solver = (new SolverHelper(config)).getSolver();\nsolver.buildILPProblem(problem);\nSolverOutput out = solver.solve();\n// Prints the result of the objective\nSystem.out.println(out.toString());\n// Sets the values for the Variables\nsolver.updateValuesFromSolution();\n\n// Do something, e.g. print\n\nsolver.terminate();\n```\n\n## Repository/Project structure\n\n| **Name**                        | **Description**                                                        |\n| ------------------------------- | ---------------------------------------------------------------------- |\n| `org.emoflon.ilp`               | Contains the implementation of the plug-in.                            |\n| `org.emoflon.ilp.feature`       | Contains the information for the feature to export.                    |\n| `org.emoflon.ilp.updatesite`    | Contains the update site configuration (to include the feature above). |\n| `org.emoflon.ilp.dependencies`  | Contains all necessary dependencies (JARs of each solver).             |\n| `org.emoflon.ilp.tests`         | Contains all tests and test-related content.                           |\n| `ci.yml`                        | GitHub Actions configuration to build and test the plug-in.            |\n| `pom.xml`                       | Maven configuration file that contains the parent group/project.       |\n\n\n## License\n\nThis project is licensed under the GNU General Public License v3.0 - see the [LICENSE](LICENSE) file for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femoflon%2Femoflon-ilp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femoflon%2Femoflon-ilp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femoflon%2Femoflon-ilp/lists"}