2

Which characteristics the main commercial Algebraic Modeling Languages (AML), like GAMS or AMPL, have, that open source AMLs, like Pyomo or JuMP, do not yet have (aside obviously the user base and availability of established models) ?

Antonello
  • 6,092
  • 3
  • 31
  • 56

1 Answers1

1

One characteristic feature of AMPL that modeling libraries written in general-purpose languages often lack is a clear separation between declarative model and data. Some systems such as Pyomo try to emulate it with various degree of success often limited by the language they are written in.

For example, the AMPL objective

minimize OBJ: sum{j in J} c[j] * y[j];

can be written in Pyomo as

def obj_expression(model):
    return summation(model.c, model.y)

model.OBJ = Objective(rule=obj_expression)

GNU MathProg which is based on a subset of AMPL is an open-source AML that doesn't have such limitation.

vitaut
  • 49,672
  • 25
  • 199
  • 336
  • 1
    JuMP does not have a concept of a declarative model not because of any limitations of Julia (which affords much more flexibility with syntax than Python does), but because of our design decision to keep JuMP's internal representation of the problem as close as possible to the solver's internal representation. This allows us to make efficient in-memory modifications to models in a loop, for example, which AMPL does not support. There are certainly trade-offs either way. – mlubin Feb 05 '17 at 23:03