问题
I took a class on "Intelligent Decision Making" (which was mostly an Problem Optimization class). In the class we learned about AMPL and how to extend the solvers. I haven't heard much about it lately, nor have I seen job listings for it.
My question is: Is AMPL still in use anymore? If so what is it being used for?
Yes, I do understand that AMPL can be replaced with Matlab, however AMPL is free and Matlab isn't even close.
回答1:
A matlab toolbox called YALMIP allows you to do formulation within Matlab. This in turn makes it very easy to integrate with other pre-processing or post-processing requirements.
I was an AMPL user previously however after finding YALMIP I no longer use AMPL much. As this saves me time in writing code to prepare the data that feeds into AMPL and to process the output.
回答2:
You are very confused.
AMPL and Matlab are two entirely different things, they may intersect in some application domains, but they are intended for solving entirely different types of problems.
AMPL is a language to describe optimization problems. It does not do anything by itself: it only provides means for a user to interact with a solver. The solvers can be for linear programming (CPLEX), nonlinear programming (Ipopt), or other, more esoteric varieties.
Matlab is a language for technical computing: linear algebra, differential equations, statistics, and -sure- some optimization - Matlab's optimization capabilities dwarf next to AMPL.
AMPL provides exact first and second derivatives via automatic differentiation, this is a key feature that only GAMS can measure up to, you may not know how important and difficult that is, but -believe me- it is.
Nobody would offer a job for an "AMPL coder" because there is not such a thing. The job is offered to a person who knows what optimization is and what tools are at the forefront. Likewise, nobody offers a job for a "Matlab coder", they offer the job to an engineer who KNOWS Matlab.
Finally, AMPL is not free. You can use for free the student version ONLY for learning purposes. Such version restricts you to 100 variables and constraints (I presume you know what this means). If you want a full-fledged AMPL, you need to pay for the license AND the licenses of the solvers, each one of them! Ipopt is open source, but Cplex is quite expensive.
Yes, AMPL is still used and very much so. I use it of computing optimal spacecraft trajectories and, believe me, nothing comes even close. I love Matlab, but using Matlab for serious optimization is like using a spoon to open a can of food - you may be successful, but there will be blood and tears.
AMPL and Matlab have one thing in common: they both were created by brilliant scientist (Moler->Matlab, Gay->AMPL) at the forefront of their fields.
回答3:
While GAMS and AMPL are domain-specific languages, I nowadays would prefer optimisation libraries within general-purpose languages.
You get state of the art programming language features, editors, debuggers, large support base, easy integration with other libraries (e.g. to IO or visualise data) and easy embedding of the specific optimisation model within larger models.
Pyomo (for Python) and Jump (for Julia) are possibly the two best known, fast and feature-complete implementations to write optimisation problems, including non linear ones.
来源:https://stackoverflow.com/questions/1685003/does-anyone-use-ampl-anymore