GithubHelp home page GithubHelp logo

ipopt.jl's Introduction

Ipopt.jl

Build Status Coverage Status

Ipopt.jl is a Julia interface to the Ipopt nonlinear solver.

Installation

The package is registered in METADATA.jl and so can be installed with Pkg.add.

julia> import Pkg; Pkg.add("Ipopt")

In addition to installing the Ipopt.jl package, this will also download and install the Ipopt binaries. (You do not need to install Ipopt separately.) If you require a custom build of Ipopt, see the instructions below.

Custom Installation

To install custom built Ipopt binaries set the environmental variables JULIA_IPOPT_LIBRARY_PATH and JULIA_IPOPT_EXECUTABLE_PATH, and call import Pkg; Pkg.build("Ipopt"). For instance, if the libraries are installed in /opt/lib and the executable is in /opt/bin just call

ENV["JULIA_IPOPT_LIBRARY_PATH"] = "/opt/lib"
ENV["JULIA_IPOPT_EXECUTABLE_PATH"] = "/opt/bin"
import Pkg; Pkg.build("Ipopt")

If you do not want BinaryProvider to download the default binaries on install set JULIA_IPOPT_LIBRARY_PATH and JULIA_IPOPT_EXECUTABLE_PATH before calling import Pkg; Pkg.add("Ipopt").

To switch back to the default binaries clear JULIA_IPOPT_LIBRARY_PATH and JULIA_IPOPT_EXECUTABLE_PATH, and call import Pkg; Pkg.build("Ipopt").

JuMP and MathOptInterface

Ipopt implements the solver-independent MathOptInterface interface, and so can be used within modeling software like JuMP. The solver object is called Ipopt.Optimizer. All options listed in the Ipopt documentation may be passed directly. For example, you can suppress output by saying Ipopt.Optimizer(print_level=0). If you wish to pass an option specifically for the restoration phase, instead of using the prefix resto., use the prefix resto_. For example Ipopt.Optimizer(resto_max_iter=0).

You can use Ipopt with JuMP as follows:

using JuMP, Ipopt
model = Model(with_optimizer(Ipopt.Optimizer, max_cpu_time=60.0))

C Interface Wrapper

Full documentation for the Ipopt C wrapper is available here. Use of the nonlinear MathOptInterface interface is recommended over the low-level C interface because it permits one to easily switch between solvers.

ipopt.jl's People

Contributors

mlubin avatar iainnz avatar blegat avatar tkelman avatar rschwarz avatar odow avatar mewilhel avatar akshay326 avatar dpo avatar timholy avatar joehuchette avatar chkwon avatar staticfloat avatar juan-pablo-vielma avatar abelsiqueira avatar abhijithch avatar ccoffrin avatar juliatagbot avatar tkoolen avatar behemoth-s avatar ranjanan avatar

Watchers

James Cloos 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.