Coder Social home page Coder Social logo

glpkmathproginterface.jl's Introduction

GLPKMathProgInterface.jl

Build Status GLPKMathProgInterface GLPKMathProgInterface

Interface between the GLPK.jl wrapper and MathProgBase.jl. With this package, you can use the GLPK solver in MathProgBase.jl

The linear programming solver accepts the following optional keywords:

  • method: accepts :Simplex (default), :Exact, :InteriorPoint
  • presolve: accepts false (default) or true. If set to true, status reporting will always report :Undefined in case of presolver failure (i.e. also for infeasible problems).

Example:

using MathProgBase
using GLPKMathProgInterface
sol = linprog([-1,0], [2 1], '<', 1.5, GLPKSolverLP(method=:Exact, presolve=true))

Additionally, all low-level parameters which can be passed to the GLPK problem objects, such as msg_lev, tol_bnd etc., can also be passed as keyword arguments, for finer control. Refer to the GLPK.jl documentation for more details on the available parameters. Invalid option names will be ignored with a warning (note that the set of valid options is different for the :Simplex and :InteriorPoint methods). This is a low-level feature, therefore options with invalid arguments may cause the solver to crash.

For example, to get a more verbose output in the above case, write:

sol = linprog([-1,0], [2 1], '<', 1.5, GLPKSolverLP(method=:Exact, presolve=true, msg_lev=GLPK.MSG_ON)

The mixed integer programming solver accepts the following optional keywords:

  • presolve: accepts false (default) or true. If set to true, status reporting will always report :Undefined in case of presolver failure (i.e. also for infeasible problems). If set to false, presolving will be performed via the simplex method. Example:
using MathProgBase
using GLPKMathProgInterface
sol = mixintprog(-[5,3,3], [1 8 2], '<', 9, :Int, 0, 1, GLPKSolverMIP(presolve=true))

Additionally, as in the case of linear programming solver (see above), all low-level parameters which can be passed to the GLPK problem objects can also be passed as keyword arguments to the GLPKSolverMIP constructor for finer control. The constructor accepts arguments both for the MIP solver and the LP simplex solver (which may be used by the MIP solver internally), so any field of an IntoptParam or of a SimplexParam can be passed; in case of common options (e.g. msg_lev) the parameters are set for both solvers. The only exceptions are the callback pointers cb_func and cb_info, which can not be passed in this way, since the callback interface is only accessible via MathProgBase. As in the LP case, invalid options are ignored with a warning. This is a low level feature, and passing invalid parameter arguments may crash the solver.

glpkmathproginterface.jl's People

Contributors

blegat avatar carlobaldassi avatar czlee avatar iainnz avatar joaquimg avatar joehuchette avatar mlubin avatar sburer avatar yeesian avatar yuyichao 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.