Skip to content

Commit

Permalink
Refactor code, leave only Core
Browse files Browse the repository at this point in the history
Turn off breakage until split if finalized


Re-enable breakage tests


Fix Project.toml


Improve tests and coverage


Update README and LICENSE


Improve API tests


Small correction and test hess_op


WIP
  • Loading branch information
abelsiqueira committed Mar 14, 2021
1 parent d9071b0 commit d622258
Show file tree
Hide file tree
Showing 77 changed files with 812 additions and 6,047 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/breakage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: false
matrix:
pkg: [AmplNLReader, CUTEst, CaNNOLeS, NLPModelsIpopt, NLPModelsJuMP, QuadraticModels, SolverTools]
pkg: [NLPModelsModifiers, NLPModelsTest, AmplNLReader, CaNNOLeS, CUTEst, NLPModelsJuMP, QuadraticModels, SolverTools]
pkgversion: ["master", "stable"]
steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2015-2019: Dominique Orban and Abel Soares Siqueira
Copyright (c) 2015-2021: Dominique Orban and Abel Soares Siqueira

NLPModels.jl is licensed under the [MPL version 2.0](https://www.mozilla.org/MPL/2.0/).

Expand Down
9 changes: 6 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,18 @@ version = "0.13.2"

[deps]
FastClosures = "9aa1b823-49e4-5ca5-8b0f-3971ec8bab6a"
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
LinearOperators = "5c8ed15e-5a4c-59e4-a42b-c7e8811fb125"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[compat]
FastClosures = "0.2.1, 0.3.0"
ForwardDiff = "0.9.0, 0.10.0"
LinearOperators = "1.1.0"
julia = "^1.3.0"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test"]
19 changes: 6 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@

This package provides general guidelines to represent optimization problems in Julia and a standardized API to evaluate the functions and their derivatives.
The main objective is to be able to rely on that API when designing optimization solvers in Julia.

## How to Cite

If you use NLPModels.jl in your work, please cite using the format given in [CITATION.bib](https://github.com/JuliaSmoothOptimizers/NLPModels.jl/blob/master/CITATION.bib).

[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.2558627.svg)](https://doi.org/10.5281/zenodo.2558627)
[![GitHub release](https://img.shields.io/github/release/JuliaSmoothOptimizers/NLPModels.jl.svg)](https://github.com/JuliaSmoothOptimizers/NLPModels.jl/releases/latest)
[![](https://img.shields.io/badge/docs-stable-3f51b5.svg)](https://JuliaSmoothOptimizers.github.io/NLPModels.jl/stable)
[![](https://img.shields.io/badge/docs-latest-3f51b5.svg)](https://JuliaSmoothOptimizers.github.io/NLPModels.jl/latest)
[![](https://img.shields.io/badge/docs-latest-3f51b5.svg)](https://JuliaSmoothOptimizers.github.io/NLPModels.jl/dev)
[![codecov](https://codecov.io/gh/JuliaSmoothOptimizers/NLPModels.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/JuliaSmoothOptimizers/NLPModels.jl)

![CI](https://github.com/JuliaSmoothOptimizers/NLPModels.jl/workflows/CI/badge.svg?branch=master)
Expand All @@ -24,26 +23,20 @@ Such instances are composed of
* other data specific to the provenance of the problem.

See the
[documentation](https://JuliaSmoothOptimizers.github.io/NLPModels.jl/latest) for
details on the models, a tutorial and the API.
[documentation](https://JuliaSmoothOptimizers.github.io/NLPModels.jl/dev) for
details on the models and the API.

## Installation

```julia
pkg> add NLPModels
```

## External models
## Models

In addition to the models available in this package, there are some external models
for specific needs:
This package provides no models, although it allows the definition of manually written models.

- [AmplNLReader.jl](https://github.com/JuliaSmoothOptimizers/AmplNLReader.jl): Interface
for [AMPL](http://www.ampl.com/);
- [CUTEst.jl](https://github.com/JuliaSmoothOptimizers/CUTEst.jl): Interface for CUTEst
problems;
- [NLPModelsJuMP.jl](https://github.com/JuliaSmoothOptimizers/NLPModelsJuMP.jl):
Converts MathOptInterface/JuMP models to and from NLPModels.
Check the list of packages that define models in [this page of the docs](https://JuliaSmoothOptimizers.github.io/NLPModels.jl/dev/models)

## Main Methods

Expand Down
39 changes: 28 additions & 11 deletions src/NLPModels.jl
Original file line number Diff line number Diff line change
@@ -1,19 +1,36 @@
module NLPModels

using LinearAlgebra, LinearOperators, Printf, SparseArrays, FastClosures
# stdlib
using LinearAlgebra, Printf, SparseArrays
# external
using FastClosures
# JSO
using LinearOperators

include("core/core.jl")
export AbstractNLPModel, AbstractNLSModel

include("autodiff_model.jl")
include("autodiff_nlsmodel.jl")
include("feasibility_form_nls.jl")
include("feasibility_residual.jl")
include("lls_model.jl")
include("qn_model.jl")
include("slack_model.jl")
# For documentation purpose
const OBJECTIVE_HESSIAN = raw"""
```math
σ ∇²f(x),
```
with `σ = obj_weight`
"""
const LAGRANGIAN_HESSIAN = raw"""
```math
∇²L(x,y) = σ ∇²f(x) + \sum_i yᵢ ∇²cᵢ(x),
```
with `σ = obj_weight`
"""

include("model-interaction.jl")
# Base type for an optimization model.
abstract type AbstractNLPModel end

include("dercheck.jl")
abstract type AbstractNLSModel <: AbstractNLPModel end

for f in ["utils", "api", "counters", "meta", "show", "tools", ]
include("nlp/$f.jl")
include("nls/$f.jl")
end

end # module
251 changes: 0 additions & 251 deletions src/autodiff_model.jl

This file was deleted.

Loading

0 comments on commit d622258

Please sign in to comment.