Dear Aziz,
You’ll need to translate your model to the APMonitor modeling language or else use an optimizer such as MATLAB’s fmincon or . Below are basic tutorials that I’d recommend:
http://apmonitor.com/che263/index.php/Main/PythonOptimization (Python Optimization - Programming Course)
http://apmonitor.com/che263/index.php/Main/MatlabOptimization (MATLAB Optimization - Programming Course)
http://apmonitor.com/me575/index.php/Main/TwoBarTruss (Two Bar Truss Optimization – Optimization Course)
Please go through these exercises and reproduce the results as a first step. You’ll also need to define your design variables and equations for your curvy hydrograph as detailed in Chapter 1 (introduction chapter) of the optimization course:
http://apmonitor.com/me575/index.php/Main/BookChapters
Are you trying to optimize flow release from an upstream reservoir?
Best regards,
John Hedengren
--
--
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.
For more options, visit https://groups.google.com/d/optout.
--
- To unsubscribe, send email to apmonitor+unsubscribe@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+unsubscribe@googlegroups.com.
Aziz,
Could you insert the following lines of code?:
try:
from APMonitor.apm import *
except:
# Automatically install APMonitor
import pip
pip.main(['install','APMonitor'])
from APMonitor.apm import *
It appears that APMonitor may not be “pip” installed yet or there was a problem with the installation.

If this doesn’t work, please obtain the file (apm.py) and put it in your run directory. The file apm.py is available from http://apmonitor.com/wiki/uploads/Main/apm_python_v0.7.6.zip or https://github.com/APMonitor/apm_python/blob/master/apm.py If you use the apm.py file, you’ll just need to change the import line to:
from apm import *
I’ve CC’d the APMonitor pip administrator (Trent) in case there are further problems with the pip install.
Best regards,
John Hedengren
From: apmo...@googlegroups.com [mailto:apmo...@googlegroups.com]
On Behalf Of Aziz Hassan
Sent: Thursday, April 27, 2017 5:09 AM
To: apmonitor <apmo...@googlegroups.com>
Subject: [APM] Re: Optimization Hydrograph
--
--
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.
Aziz,
Below is a link to a tutorial on using Excel solver:
http://apmonitor.com/che263/index.php/Main/ExcelSolver
Excel uses the GRG2 (Generalized Reduced Gradient -2) method by default. There are equivalent Python and MATLAB tutorials as well:
http://apmonitor.com/che263/index.php/Main/PythonOptimization
http://apmonitor.com/che263/index.php/Main/MatlabOptimization
that use fmincon (MATLAB), Scipy.optimize.minimize (Python), or APMonitor.
Best regards,
John Hedengren
From: apmo...@googlegroups.com [mailto:apmo...@googlegroups.com]
On Behalf Of Aziz Hassan
Sent: Thursday, May 11, 2017 9:20 AM
To: apmonitor <apmo...@googlegroups.com>
Subject: [APM] Re: Optimization Hydrograph
Hi Professor,
--
--
- To unsubscribe, send email to apmonitor+unsubscribe@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+unsubscribe@googlegroups.com.