简体   繁体   中英

Are there Linear Programming libraries with the Simplex algorithm for Clojure?

The Stigler Diet problem is a Linear Programming problem. It takes a list of foods and their nutritional values and solves for an optimized selection and quantities that meet objectives and constraints. Are there clojure libraries for Linear Programming - Simplex Algorithm, other than levand/prolin to work this?

Actually there is a clojure library: prolin uses the Simplex implementation provided by Apache Commons Math . It's probably the most idiomatic api in clojure for linear programming. Current version in github uses org.apache.commons.math3 v3.2, however according to this JIRA entry the simplex implementation has significantly been improved in v3.3, so it may be worth upgrading (see prolin issue #1 ).

Also of interest is the Java Constraint Programming API ( JSR 331 ). There's a clojure project using that API . Although its name hints towards constraint programming (CP), this blog post talks about using it for accessing linear programming (LP) solvers such as GLPK, lp_solve, gurobi, etc.

The java JaCoP constraint programming library implements among others the Simplex algorithm. For Clojure, there's the CloCoP clojure wrapper over JaCoP.

Clojure's core.logic also has options for constraint programming .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM