{"id":15057650,"url":"https://github.com/xhub/reshop.jl","last_synced_at":"2026-01-03T01:08:26.497Z","repository":{"id":61799373,"uuid":"165658515","full_name":"xhub/ReSHOP.jl","owner":"xhub","description":"ReSHOP bindings for Julia","archived":false,"fork":false,"pushed_at":"2022-05-05T19:18:42.000Z","size":195,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-20T21:46:13.558Z","etag":null,"topics":["gams","julia","optimization","solver"],"latest_commit_sha":null,"homepage":null,"language":"Julia","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/xhub.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-14T12:34:38.000Z","updated_at":"2022-02-22T13:49:59.000Z","dependencies_parsed_at":"2022-10-21T11:30:42.809Z","dependency_job_id":null,"html_url":"https://github.com/xhub/ReSHOP.jl","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xhub%2FReSHOP.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xhub%2FReSHOP.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xhub%2FReSHOP.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xhub%2FReSHOP.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xhub","download_url":"https://codeload.github.com/xhub/ReSHOP.jl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243761936,"owners_count":20343970,"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":["gams","julia","optimization","solver"],"created_at":"2024-09-24T22:09:45.920Z","updated_at":"2026-01-03T01:08:26.428Z","avatar_url":"https://github.com/xhub.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CI](https://github.com/xhub/ReSHOP.jl/actions/workflows/CI.yml/badge.svg)](https://github.com/xhub/ReSHOP.jl/actions/workflows/CI.yml)\n[![codecov](https://codecov.io/gh/xhub/ReSHOP.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/xhub/ReSHOP.jl)\n\n\n# ReSHOP\n\nThis package enables the use of the ReSHOP reformulation solver for JuMP models.\nReSHOP stands for **Re**formulation **S**olver for **H**ierrachical **O**ptimization **P**roblems.\n\nIt is mostly a reformulation engine, that it performs model transformations to bring a model into a form amenable to computation.\nThis includes models with Optimal Value functions, bilevel, MPEC, and Equilibrium (Nash Games) problems.\nThis class of mathematical programs falls into the [Extended Mathematical Programming](https://en.wikipedia.org/wiki/Extended_Mathematical_Programming)\numbrella. See also this [GAMS documentation page](https://www.gams.com/latest/docs/UG_EMP.html), and the [EMP.jl](https://github.com/xhub/EMP.jl) Julia package,\nas presented in this [video presentation](https://www.youtube.com/watch?v=u7vASGAJYlY) from the JuMP-dev 2018 workshop.\n\nOne side-effect of implementing those model transformations is that ReSHOP has a full-fledged model representation.\nThis implies that it is capable of acting as a full MOI backend, with direct model capabilities.\n\n## Design\n\nReSHOP aims at being efficient in the model transformation. In particular, most of the work is done in memory,\nas opposed to writing down the model to a file.\n\nThe following figure illustrate the design and workflow of ReSHOP:\n\n![ReSHOP architecture](./reshop_architecture.svg)\n\nThe shaded blocks are the functionalities on the roadmap or work in progress.\n\nNote that the link for GAMS is done in memory, without writing a file to be parsed by the `gams` executable.\nThis is also planned for the JuMP export. \n\n## Installing\n\nThis package requires a valid GAMS install, with the `gams` executable in the system path,\nthat is the `gams` command be executed in a shell or `cmd.exe` session.\nThe user can refer to the GAMS installation instructions.\n\n\n## Usage\n\nAs of now, there are the following options:\n- the GAMS solver is specified via the `solver` keyword.\n\nThe function `ReSHOP.setsolverlog` switches the display of the GAMS solver log on the standard output.\n\nThis solver can be used in the *direct model* way. It is mostly done, some functions are not implemented, but those are mostly for display purposes.\nTesting is unfortunately not as easy with this kind of solver.\n\nOption passing to GAMS (for solver.opt files) is a work in progress.\n\n## Updating\n\n### Updating ReSHOP.jl\n\nThe package depends on the libreshop library binary. A JLL package for Julia 1.3 and above is in the works.\nFor now, the libreshop does not get updated with the julia files. After the update, the command `] build ReSHOP`\nneeds to be run to also update the library.\n\n### Updating GAMS\n\nReSHOP needs to bootstrap GAMS via a file. The latter is automatically generated the first time the solver is run.\nIf the GAMS distribution/license is changed, one needs to run `ReSHOP.reshop_init_gams_solverdata(true)` to update\nthe GAMS bootstrap file.\n\n## Limitations\n\n- Some GAMS solver seem to misbehave during test, but not when used in some simple cases.\nThis may be due to some global variable or other kind of memory issue.\nPlease report such bugs.\n\n## Acknowledgements\nThe MBP codepath package is heavily based on AmplNLWriter.jl\n\n*Note: This package is developed independently of the GAMS corporation*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxhub%2Freshop.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxhub%2Freshop.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxhub%2Freshop.jl/lists"}