{"id":17368055,"url":"https://github.com/juliuste/parse-gurobi-solution","last_synced_at":"2025-10-31T07:31:24.730Z","repository":{"id":32768623,"uuid":"142067362","full_name":"juliuste/parse-gurobi-solution","owner":"juliuste","description":"Parse .sol solution files generated by the Gurobi solver.","archived":false,"fork":false,"pushed_at":"2020-05-25T04:12:40.000Z","size":14,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-25T16:25:33.239Z","etag":null,"topics":["library"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/juliuste.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":"2018-07-23T20:44:45.000Z","updated_at":"2022-05-25T23:25:42.000Z","dependencies_parsed_at":"2022-08-25T20:40:48.340Z","dependency_job_id":null,"html_url":"https://github.com/juliuste/parse-gurobi-solution","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/juliuste%2Fparse-gurobi-solution","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juliuste%2Fparse-gurobi-solution/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juliuste%2Fparse-gurobi-solution/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juliuste%2Fparse-gurobi-solution/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/juliuste","download_url":"https://codeload.github.com/juliuste/parse-gurobi-solution/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239139709,"owners_count":19588246,"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":["library"],"created_at":"2024-10-15T23:41:39.308Z","updated_at":"2025-10-31T07:31:19.450Z","avatar_url":"https://github.com/juliuste.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# parse-gurobi-solution\n\nParse [.sol solution files](https://www.gurobi.com/documentation/8.0/refman/sol_format.html) generated by the [Gurobi](https://www.gurobi.com/) solver.\n\n[![npm version](https://img.shields.io/npm/v/parse-gurobi-solution.svg)](https://www.npmjs.com/package/parse-gurobi-solution)\n[![Build Status](https://travis-ci.org/juliuste/parse-gurobi-solution.svg?branch=master)](https://travis-ci.org/juliuste/parse-gurobi-solution)\n[![Greenkeeper badge](https://badges.greenkeeper.io/juliuste/parse-gurobi-solution.svg)](https://greenkeeper.io/)\n[![dependency status](https://img.shields.io/david/juliuste/parse-gurobi-solution.svg)](https://david-dm.org/juliuste/parse-gurobi-solution)\n[![license](https://img.shields.io/github/license/juliuste/parse-gurobi-solution.svg?style=flat)](license)\n[![chat on gitter](https://badges.gitter.im/juliuste.svg)](https://gitter.im/juliuste)\n\n## Installation\n\n```shell\nnpm install parse-gurobi-solution\n```\n\n## Usage\n\nThe method exposed by this module takes a single `fileStream` parameter, which is a stream of your `.sol` solution file and returns a [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/promise) that will resolve in an object with your variable names as keys.\n\n```javascript\nconst fs = require('fs')\nconst parseGurobiSolution = require('parse-gurobi-solution')\n\nconst fileStream = fs.createReadStream('./solution.sol')\nconst solution = parseGurobiSolution(fileStream).then(console.log) // Promise\n```\n\nThe following solution file example:\n\n```\n# Objective value = 3.6700000000001825e+02\na0 1\na1 2.128473937036380e-7\nb0 3.1268\nb1 2\nxcoord 10\nycoord 0\nlat 2.91256\n```\n\nwould give you a `solution` object that looks as follows:\n\n```js\n{\n    a0: 1,\n    a1: 2.12847393703638e-7,\n    b0: 3.1268,\n    b1: 2,\n    xcoord: 10,\n    ycoord: 0,\n    lat: 2.91256\n}\n```\n\n## Contributing\n\nIf you found a bug or want to propose a feature, feel free to visit [the issues page](https://github.com/juliuste/parse-gurobi-solution/issues).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuliuste%2Fparse-gurobi-solution","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuliuste%2Fparse-gurobi-solution","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuliuste%2Fparse-gurobi-solution/lists"}