Git Product home page Git Product logo

cutest.jl's Introduction

CUTEst.jl: Julia's CUTEst Interface

This package provides an interface to CUTEst, a repository of constrained and unconstrained nonlinear programming problems for testing and comparing optimization algorithms, derived from the abstract model on NLPModels.

Stable release Github release DOI

  • Documentation: Documentation
  • Package Evaluator: CUTEst.jl CUTEst.jl
  • Chat: Gitter

Development version

  • Documentation: Documentation
  • Tests: Build Status Coverage Status

Installing

This package will install CUTEst binaries for your platform automatically. The gfortran compiler is still required to compile decoded SIF problems. No other Fortran compiler is supported.

The following command installs the CUTEst binaries and Julia interface:

pkg> add CUTEst

If you already have a collection of SIF problems that you wish to use, you can simply set the MASTSIF environment variable to point to their location. If not, the command

julia> fetch_sif_problems()

will download the most recent version of the standard SIF collection and set MASTSIF appropriately. Subsequent calls to the same function will pull any updates to the SIF problems.

Usage

After installing, you can create instances of NLPModels models, with the name CUTEstModel:

using CUTEst

nlp = CUTEstModel("BYRDSPHR");
print(nlp);

This model accepts the same functions as the other NLPModels, for instance

fx = obj(nlp, nlp.meta.x0)
gx = grad(nlp, nlp.meta.x0)
Hx = hess(nlp, nlp.meta.x0)

Run multiple models in parallel

First, decode each of the problems in serial.

function decodemodel(name)
    finalize(CUTEstModel(name))
end

probs = ["AKIVA", "ALLINITU", "ARGLINA", "ARGLINB", "ARGLINC","ARGTRIGLS", "ARWHEAD"]
broadcast(decodemodel, probs)

Then, call functions handling models in parallel. It is important to pass decode=false to CUTEstModel.

addprocs(2)
@everywhere using CUTEst
@everywhere function evalmodel(name)
   nlp = CUTEstModel(name; decode=false)
   retval = obj(nlp, nlp.meta.x0)
   finalize(nlp)
   retval
end

fvals = pmap(evalmodel, probs)

Related Packages

  • NLPModels.jl provides an AbstractModel from which CUTEst.jl derives, and other models deriving from it, such as MathProgNLPModel, which uses MathProgBase.jl, SimpleNLPModel, for user created functions, ADNLPModel with automatic differentiation, and SlackModel, which creates an equality constrained model with bounds on the variables from a given AbstractModel.
  • AmplNLReader.jl provides an interface to AMPL models based on NLPModels.jl.
  • OptimizationProblems.jl provides a collection of optimization problems in JuMP.jl syntax.

GPLv3

cutest.jl's People

Contributors

abelsiqueira avatar dpo avatar timholy avatar anriseth avatar abhisheknishantpuresoftware avatar juliatagbot avatar github-actions[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.