# Difference between large-scale optimization and equation-based simulation

Large scale optimization (for example using AMPL) can be used to solve equilibrium systems which have components with fixed mathematical relationships. What is the difference between this and using an equation-based simulation system (like Modelica) to solve an equation-based system?

Of course, most simulations have a time variable, but you can just as well have a time variable in AMPL. Are AMPL models therefore fully analogous to equation-based simulation like MapleSim/Modelica, or is there some fundamental difference between the technologies?

Modelica is for modelling how some continuous variables change over time. Contrary to what you wrote, there's no simple way to model in that in AMPL by "adding a time variable". To put it another way: Modelica lets us model, say, the position of a component as a function of time. This is a function $f(t)$. AMPL lets us model, say, the position, as a fixed continuous value. This is a value $x$. Adding a second variable $t$ still doesn't give you any way to model a function of $t$.