{"id":20791473,"url":"https://github.com/jcavat/scalinea","last_synced_at":"2026-06-04T14:31:14.376Z","repository":{"id":66871108,"uuid":"96118998","full_name":"jcavat/scalinea","owner":"jcavat","description":"Linear Programming Modeler for Scala","archived":false,"fork":false,"pushed_at":"2020-09-02T10:13:52.000Z","size":157,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-18T10:45:05.368Z","etag":null,"topics":["linear","linear-programming-modeler","programming","quadratic","scala","solver"],"latest_commit_sha":null,"homepage":null,"language":"Scala","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/jcavat.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":"2017-07-03T14:22:49.000Z","updated_at":"2024-08-23T06:49:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"9663d571-0187-4cd3-b9b8-d0f836c76e81","html_url":"https://github.com/jcavat/scalinea","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/jcavat%2Fscalinea","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcavat%2Fscalinea/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcavat%2Fscalinea/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcavat%2Fscalinea/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jcavat","download_url":"https://codeload.github.com/jcavat/scalinea/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243136235,"owners_count":20241988,"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":["linear","linear-programming-modeler","programming","quadratic","scala","solver"],"created_at":"2024-11-17T15:44:58.707Z","updated_at":"2025-12-24T14:26:00.490Z","avatar_url":"https://github.com/jcavat.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Scalinea\n[![Build Status](https://travis-ci.com/jcavat/scalinea.svg?branch=master)](https://travis-ci.com/jcavat/scalinea)\n[![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)\n\n## Summary\n\nThis project provides a mathematical programming modeling library. It aims to provide a DSL for the creation \nof linear and quadratic optimization model. Solution will be solve with CBC, lp_solve, glpk and Gurobi.\n\n## Current version\n\n- Basic DSL to create a model\n- Solution provided by CBC-Coin Or and Gurobi\n\nThis current version is usable but is subject to change\n\n## Example\n\n```scala\nval a = IVar(\"a\")\nval b = IVar(\"b\")\nval c = IVar(\"c\")\n\nval system = {\n  dsl.System.define.constraints(\n    500*a + 1200*b + 1500*c \u003c= 10000,\n    a \u003c= b\n  ).maximize(\n    10.0*a + 20.0*b\n  ).build\n}\n\nval solver: Solver = CbcLpSolver // or GurobiSolver\nsolver.solve(system) match {\n  case Success(sol: Solution, _) =\u003e {\n    println(\"Optimal: \" + sol.isOptimal )\n    for( v \u003c- Seq(a,b,c) ) {\n      println( s\"${v.symbol}: ${sol(v)}\" )\n    }\n  }\n  case _ =\u003e println(\"oups\")\n}\n```\n\n## News\n\nDSL for binary variables is now possible\n\n```scala\n  val system = {\n    dsl.System.define.constraints(\n      x `imply` z,\n      z `iif` w,\n      z \u0026 w,\n      x | y `imply` exactlyOneOf(z1, z2 | z3, z1 \u0026 z2, z4 `iif` z5)\n      ...\n\n    ).maximize(\n      ...\n    ).build\n```\n\n## Next step\n\n- add new solvers (glpk, lp_solve, Cplex)\n- improve existing solver solution parsing with explicit status (Unboundable, Unfeasible, ...)\n- add more tests and more examples\n- create documentation\n- publish the first beta release :)\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcavat%2Fscalinea","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjcavat%2Fscalinea","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcavat%2Fscalinea/lists"}