{"id":16320310,"url":"https://github.com/hellonico/zebra","last_synced_at":"2025-06-11T09:03:55.533Z","repository":{"id":66707118,"uuid":"154777509","full_name":"hellonico/zebra","owner":"hellonico","description":"Google's ortools with Clojure","archived":false,"fork":false,"pushed_at":"2018-10-31T07:39:26.000Z","size":13202,"stargazers_count":16,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-01T19:02:43.788Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hellonico.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":"2018-10-26T04:31:07.000Z","updated_at":"2024-04-11T01:51:03.000Z","dependencies_parsed_at":"2023-03-09T01:30:30.160Z","dependency_job_id":null,"html_url":"https://github.com/hellonico/zebra","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellonico%2Fzebra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellonico%2Fzebra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellonico%2Fzebra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellonico%2Fzebra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hellonico","download_url":"https://codeload.github.com/hellonico/zebra/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244246528,"owners_count":20422458,"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":[],"created_at":"2024-10-10T22:43:56.090Z","updated_at":"2025-03-22T21:32:11.068Z","avatar_url":"https://github.com/hellonico.png","language":"Clojure","readme":"# zebra\n\n# requirements\n\n- jvm \u003e9\n- leiningen\n\n# tested on \n\n- windows64\n- macosx\n- debian (x64)\n- manjaro (x64)\n\n# run the tests\n\n```\nlein test\n```\n\n# examples\n\n## basic solver\n\n```clojure\n(let [solver (new-mpsolver \"myprogram\" \"GLOP_LINEAR_PROGRAMMING\")\n        x (.makeNumVar solver 0.0 1.0 \"x\")\n        y (.makeNumVar solver 0.0 2.0 \"y\")\n        objective (.objective solver)]\n    (.setMaximization objective)\n    (.solve solver)\n    (is (= 1.0 (.solutionValue x)))\n    (is (= 2.0 (.solutionValue y))))\n```\n\n## simple linear problem\n\n![](doc/feasible_region.png)\n\n```clojure\n(let [solver (new-mpsolver \"myprogram\" \"GLOP_LINEAR_PROGRAMMING\")\n    x (.makeNumVar solver 0.0 infinity \"x\")\n    y (.makeNumVar solver 0.0 infinity \"y\")\n    objective (.objective solver)]\n  (doto objective\n      (.setCoefficient x 3)\n      (.setCoefficient y 4)\n      (.setMaximization))\n\n  (doto\n      (.makeConstraint solver -infinity 14.0) ; x + 2y \u003c= 14\n      (.setCoefficient x 1)\n      (.setCoefficient y 2))\n  (doto\n      (.makeConstraint solver 0.0 infinity) ; 3x - y \u003e= 0\n      (.setCoefficient x 3)\n      (.setCoefficient y -1))\n  (doto\n      (.makeConstraint solver -infinity 2.0) ; x - y \u003c= 2\n      (.setCoefficient x 1)\n      (.setCoefficient y -1))\n\n  (.solve solver)\n\n  (is (=== (.solutionValue x) 6))\n  (is (=== (.solutionValue y) 4))\n  (is (=== (.value (.objective solver)) 34)))\n```\n\nA Clojure library designed to work with or-tools from google.\nhttps://github.com/google/or-tools\n\n\n\nCopyright © 2018 hellonico\n\nDistributed under the Eclipse Public License either version 1.0 or (at\nyour option) any later version.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhellonico%2Fzebra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhellonico%2Fzebra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhellonico%2Fzebra/lists"}