{"id":33164770,"url":"https://github.com/JuliaSmoothOptimizers/AmplNLReader.jl","last_synced_at":"2025-11-20T17:01:50.372Z","repository":{"id":15978437,"uuid":"18721403","full_name":"JuliaSmoothOptimizers/AmplNLReader.jl","owner":"JuliaSmoothOptimizers","description":"Julia AMPL Models Conforming to NLPModels.jl","archived":false,"fork":false,"pushed_at":"2025-03-01T23:25:14.000Z","size":1143,"stargazers_count":21,"open_issues_count":5,"forks_count":10,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-11-10T00:17:55.770Z","etag":null,"topics":["ampl","julia","julia-language","nlpmodels","optimization"],"latest_commit_sha":null,"homepage":"","language":"Julia","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JuliaSmoothOptimizers.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":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":".zenodo.json"}},"created_at":"2014-04-13T04:23:07.000Z","updated_at":"2025-03-01T23:15:13.000Z","dependencies_parsed_at":"2024-01-13T03:28:07.707Z","dependency_job_id":"4f912575-957c-4a54-8a5e-f5d0892ee1c8","html_url":"https://github.com/JuliaSmoothOptimizers/AmplNLReader.jl","commit_stats":{"total_commits":279,"total_committers":11,"mean_commits":"25.363636363636363","dds":"0.18279569892473113","last_synced_commit":"f47a2f7564c21da7e6c14bc89c244d61fdd387a4"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/JuliaSmoothOptimizers/AmplNLReader.jl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaSmoothOptimizers%2FAmplNLReader.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaSmoothOptimizers%2FAmplNLReader.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaSmoothOptimizers%2FAmplNLReader.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaSmoothOptimizers%2FAmplNLReader.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JuliaSmoothOptimizers","download_url":"https://codeload.github.com/JuliaSmoothOptimizers/AmplNLReader.jl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaSmoothOptimizers%2FAmplNLReader.jl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285475217,"owners_count":27178110,"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","status":"online","status_checked_at":"2025-11-20T02:00:05.334Z","response_time":54,"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":["ampl","julia","julia-language","nlpmodels","optimization"],"created_at":"2025-11-16T00:00:27.952Z","updated_at":"2025-11-20T17:01:50.360Z","avatar_url":"https://github.com/JuliaSmoothOptimizers.png","language":"Julia","funding_links":[],"categories":["Tools and Frameworks"],"sub_categories":["Repositories"],"readme":"# AmplNLReader.jl: A [Julia](http://julialang.org) interface to [AMPL](http://www.ampl.com)\n\n## How to Cite\n\nIf you use AmplNLReader.jl in your work, please cite using the format given in [CITATION.bib](https://github.com/JuliaSmoothOptimizers/AmplNLReader.jl/blob/main/CITATION.bib).\n\n### Stable release [![Github release](https://img.shields.io/github/release/JuliaSmoothOptimizers/AmplNLReader.jl.svg)](https://github.com/JuliaSmoothOptimizers/AmplNLReader.jl/releases/latest)\n\n- Documentation: [![Documentation](https://img.shields.io/badge/docs-stable-blue.svg)](https://JuliaSmoothOptimizers.github.io/AmplNLReader.jl/stable)\n\n### Development version\n\n- Documentation: [![Documentation](https://img.shields.io/badge/docs-latest-blue.svg)](https://JuliaSmoothOptimizers.github.io/AmplNLReader.jl/latest)\n- Tests:\n    - ![CI](https://github.com/JuliaSmoothOptimizers/AmplNLReader.jl/workflows/CI/badge.svg?branch=main) (Linux, macOS, Windows)\n    - [![Build Status](https://api.cirrus-ci.com/github/JuliaSmoothOptimizers/AmplNLReader.jl.svg)](https://cirrus-ci.com/github/JuliaSmoothOptimizers/AmplNLReader.jl) (FreeBSD)\n    - [![codecov](https://codecov.io/gh/JuliaSmoothOptimizers/AmplNLReader.jl/branch/main/graph/badge.svg?token=KwtSr5vCBr)](https://codecov.io/gh/JuliaSmoothOptimizers/AmplNLReader.jl)\n\n## How to Install\n\nAt the Julia prompt,\n\n````JULIA\npkg\u003e add AmplNLReader\n````\n\n## Testing\n\n````JULIA\npkg\u003e test AmplNLReader\n````\n\n## Creating a Model\n\nFor an introduction to the AMPL modeling language, see\n\n* R. Fourer, D. M. Gay, and B. W. Kernighan, [AMPL: A Mathematical Programming Language](http://ampl.com/REFS/amplmod.pdf), Management Science 36, pp. 519-554, 1990.\n* R. Fourer, D. M. Gay, and B. W. Kernighan, [AMPL: A Modeling Language for Mathematical Programming](http://ampl.com/BOOK/download.html), Duxbury Press / Brooks/Cole Publishing Company, 2003.\n* D. Orban, [The Lightning AMPL Tutorial. A Guide for Nonlinear Optimization Users](https://gerad.ca/en/papers/G-2009-66), [GERAD](http://www.gerad.ca) Technical Report G-2009-66, 2009.\n\nSuppose you have an AMPL model represented by the model and data files `mymodel.mod` and `mymodel.dat`. Decode this model as a so-called `nl` file using\n\n    ampl -ogmymodel mymodel.mod mymodel.dat\n\nFor example:\n\n````Julia\njulia\u003e using AmplNLReader\n\njulia\u003e hs33 = AmplModel(\"hs033.nl\")\nMinimization problem hs033.nl\nnvar = 3, ncon = 2 (0 linear)\n\njulia\u003e print(hs33)\nMinimization problem hs033.nl\nnvar = 3, ncon = 2 (0 linear)\nlvar = 1x3 Array{Float64,2}:\n 0.0  0.0  0.0\nuvar = 1x3 Array{Float64,2}:\n Inf  Inf  5.0\nlcon = 1x2 Array{Float64,2}:\n -Inf  4.0\nucon = 1x2 Array{Float64,2}:\n 0.0  Inf\nx0 = 1x3 Array{Float64,2}:\n 0.0  0.0  3.0\ny0 = 1x2 Array{Float64,2}:\n -0.0  -0.0\n````\n\nThere is support for holding multiple models in memory simultaneously. This should be transparent to the user.\n\n## Optimization Problems\n\n`AmplNLReader.jl` currently focuses on continuous problems conforming to [`NLPModels.jl`](https://github.com/JuliaSmoothOptimizers/NLPModels.jl).\n\n`AmplModel` objects support all methods associated to `NLPModel` objects.\nPlease see the [`NLPModels.jl` documentation](https://juliasmoothoptimizers.github.io/NLPModels.jl/latest) for more information.\nThe following table lists extra methods associated to an `AmplModel`.\nSee [Hooking your Solver to AMPL](http://ampl.com/REFS/hooking2.pdf) for background.\n\nMethod                          | Notes\n--------------------------------|--------------------------------\n`write_sol(nlp, msg, x, y)`     | Write primal and dual solutions to file\n\n## Missing Methods\n\n* methods for LPs (sparse cost, sparse constraint matrix)\n* methods to check optimality conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJuliaSmoothOptimizers%2FAmplNLReader.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJuliaSmoothOptimizers%2FAmplNLReader.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJuliaSmoothOptimizers%2FAmplNLReader.jl/lists"}