4
$\begingroup$

I have found so many tools that can solve optimization problems (wikipedia also has one page "List of optimization software"), I want to know which workflow is the best or $\color{blue}{\text{the most practical}}$? Any preference?

Minor

  • Qaekwy is a powerful and flexible constraint-based modelling and optimization framework designed to tackle complex problem-solving scenarios.

Miscelleous

  • Wolfram Mathematica built-in close-source functions. See this guide.
  • MiniZinc IDE Try it online. model file name example: model.mzn
  • Google OR-Tools
  • LINGO
  • Bonmin (free, open-source) and Knitro (commercial) are the best suited solvers to solve problems with black box functions with derivatives and integer (and possibly continuous) variables.

Abbreviations

Abbreviations
Linear programming (LP)
Quadratic programming (QP)
Second-order cone programming (SOCP)
Semidefinite programming (SDP)
Geometric programming (GP)
Nonlinear programming (NLP)
Nonlinear SDP (NLSDP)
Exponential cone programming (ECP)
Mixed-integer LP (MIQP)
Mixed-integer QP (MIQP)
Mixed-integer SOCP (MISOCP)

DSL(Domain Specific Language)

Programming Language

  • Python
  • MATLAB
  • Wolfram Language
  • Julia

  • Java
  • C++
  • ...

model file in different format

  • AMPL syntax (example). File Format: AMPL model files typically use .mod for model definitions and .dat for data files. The solution or command files often use the .run extension.

  • GAMS syntax (example). File Format: GAMS uses .gms for its model files.

  • MOSEL syntax (example). File Format: MOSEL models are usually saved with the .mos file extension.

  • MPS syntax (example). File Format: MPS (Mathematical Programming System) is a file format for representing linear programming (LP) and mixed-integer programming (MIP) models. The standard file extension for MPS files is .mps.

  • NL File Format: The NL file format is used by the AMPL solver library. It represents nonlinear program structures. The file extension for NL files is .nl. The NL file format is a binary format used by the AMPL solver library to represent nonlinear programming problems. If you need to work with NL files directly, you would typically use a specialized tool or library capable of reading and writing this format, such as the AMPL Solver Library (ASL)

  • OSIL syntax (example). File Format: OSIL (Optimization Services Instance Language) is an XML-based file format for representing optimization problems. The file extension for OSIL files is .osil.

  • ZIMPL syntax (example). File Format: ZIMPL (Zuse Institute Mathematical Programming Language) is a modeling language used to generate LP and MIP models that can be read by a variety of solvers. ZIMPL models typically use the .zpl extension.

  • SDPA syntax (example). File Format: SDPA (Semidefinite Program Algorithm) files are used for semidefinite programming. They typically have the .dat-s extension for data files, with corresponding .sdpa for problem description files.

Glue?

Python-based

  • cvxpy

  • gurobipy

  • Pyomo is a Python-based open-source software package that supports a diverse set of optimization capabilities for formulating, solving, and analyzing optimization models.

  • PuLp is a free open source software written in Python. It is used to describe optimisation problems as mathematical models.

  • PyVRP is an open-source, state-of-the-art vehicle routing problem (VRP) solver.

  • GEKKO is a Python package for machine learning and optimization of mixed-integer and differential algebraic equations.

MATLAB-based

  • 👍 YALMIP, a tool that can use different optimization solver with MATLAB DSL
  • CVX: a Matlab-based convex modeling framework
  • SDPT3 is a Matlab package for solving convex optimization problems involving linear equations and inequalities, second-order cone constraints, and semidefinite constraints (linear matrix inequalities).

Julia-based

  • JuMP is a domain-specific modeling language for mathematical optimization embedded in Julia.

Cpp-based

  • The GLPK (GNU Linear Programming Kit) package is intended for solving large-scale linear programming (LP), mixed integer programming (MIP), and other related problems. It is a set of routines written in ANSI C and organized in the form of a callable library.

$\cdots$

Solver

  • Gurobi Optimizer
  • SeDuMi, a great piece of software for optimization over symmetric cones.
  • IBM CPLEX
  • XPRESS
  • SCIP, is currently one of the fastest non-commercial solvers for mixed integer programming (MIP) and mixed integer nonlinear programming (MINLP).
  • CBC
  • FMINCON
  • FICO-Xpress
  • mosek
  • BMIBNB, support Global nonconvex programming, YALMIP built-in solver
  • Timefold is the open source AI solver to optimize operations and scheduling in Java, Python or Kotlin.
  • ...

Nonlinear optimization specific?

  • Knitro
  • SNOPT
  • IPOPT is an open source software package for large-scale nonlinear optimization.

SAT solver (specific)?

  • the Kissat SAT solver is a condensed and improved reimplementation of CaDiCaL in C.
  • The goal of CaDiCaL is to provide a clean and efficient state-of-the-art CDCL solver, which is also easy to understand and change.

Cloud Platform

  • NEOS Solvers, a free internet-based service for solving numerical optimization problems.
$\endgroup$
2
  • $\begingroup$ In the Glue section you can add Pyomo, PuLp, JuMP, in the solvers you can add CPLEX, XPRESS, SCIP, CBC, IPOPT, .... $\endgroup$
    – Kuifje
    Commented Feb 22 at 8:03
  • $\begingroup$ I'm voting to close as opinion-based. More specifics on the optimization problem you are trying to solve and the format of the input data might enable a tailored recommendation, but as it stands, this question is better suited to an open forum site than SE's Q&A format. $\endgroup$
    – Max
    Commented Mar 17 at 16:06

3 Answers 3

5
$\begingroup$

The strategy is very dependent on the nature of the optimization problem. Step 1 is creating the mathematical model. If it is an unconstrained optimization problem (including non-linear ones) then equation-solving tools would be a better idea. If it is a more classical optimization model with lots of constraints then the second decision point is the size of the instance. If it is a very small toy problem (less than 200 variables) even Excel Solver can be used. If it is larger, then the third decision point comes. Here, you need to check if it is a very standard optimization problem or not. If it is, then you can prefer Google OR Tools. It has many generic solvers specific to special types of problems (like VRP, scheduling, etc.). Of course your problem & data structure should be fitting GORT standards. If your problem is very unique with lots of custom stuff, data manipulation, etc, then I prefer a more strong programming language (Python, C++, etc.) and a stronger solver (Gurobi, CPLEX, SCIP, etc.).

$\endgroup$
0
1
$\begingroup$

Here is my workflow, maybe not the best:

For simple optmization tasks, I'd like to use Mathematica Minimize/NMinimize or Maximize/NMaximize function, use it as a downstream of some previous Mathematica calculations. So convenient.

For special types of problems (like VRP, scheduling, 2-SAT, etc.), I'd like to use Google OR-Tools module/submodule ortools.sat.python.

In Python language, I'd like to use cvxpy, gurobipy.

In MATLAB language, I'd like to use Optmization Toolbox, CVX, YALMIP

For one new machine, I'd like to submit jobs(AMPL syntax: .mod file, etc.) to NEOS Solvers.

$\endgroup$
1
$\begingroup$

As was mentioned in the rest of the answers, there is no right framework. It depends greatly on the problem you are trying to solve, your skills, etc. Said that if I need to solve a big problem and/or the solution is part of a bigger app, I prefer using Julia with packages like JuMP and Metaheuristics and coding some heuristics by myself. If the problem is small, Excel/Libre Office are good tools, with the additional value that spreadsheets are a common language in the business world.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.