Sara,
You can often improve the simulation time by using IMODE=7 (Sequential solution) instead of IMODE=4 (Simultaneous solution). Here are some examples on solving with Gekko:
Solve Differential Equations with GEKKO (apmonitor.com)
I also recommend that you set disp=False to avoid the extra time for printing to the console when you solve with m.solve(disp=False). Gekko uses APMonitor as the solution engine. It is a newer interface to facilitate easier model construction and visualization of results. There are side-by-side comparisons of code for Python and Matlab in Gekko and APMonitor here: Formulation Strategies (apmonitor.com). Because they both use the same engine, there is typically little difference in performance. You can run without an internet connection in Gekko by using remote=False when you declare your model (m=GEKKO(remote=False)) or you can set up your own server in Windows or Linux: APMonitor Server for Windows and APMonitor Server for Linux. The easiest route to solve locally is to use Gekko either in Python GEKKO Optimization Suite — GEKKO 0.2.8 documentation or Matlab Call Python from MATLAB (apmonitor.com).
John Hedengren | Associate Professor
Department of Chemical Engineering | Brigham Young University
330 Engineering Building | Provo, UT 84602 | john.he...@byu.edu
BYU PRISM Group: apm.byu.edu
Machine Learning with GEKKO: machinelearning.byu.edu
--
--
APMonitor user's group e-mail list.
- To post a message, send email to apmo...@googlegroups.com
- To unsubscribe, send email to
apmonitor+...@googlegroups.com
- Visit this group at http://groups.google.com/group/apmonitor
---
You received this message because you are subscribed to the Google Groups "apmonitor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
apmonitor+...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/apmonitor/fecc0138-e5fe-40f8-a69d-37973ee7b850n%40googlegroups.com.