Edward,
Try using the gekko function m.sqrt() instead of math.sqrt() for the equation:
l_0==math.sqrt((2*f*k_d*I)/(k_tc+k_p*e*p))
It may also help to eliminate the sqrt as and potential divide-by-zero:
(k_tc+k_p*e*p) * l_0**2== (2*f*k_d*I)
This is an equivalent equation but may be much easier for a solver to find a solution by avoiding undefined evaluations in search of a solution. There are several other equations in the model that may also benefit from rearrangement.
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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/apmonitor/8e975b14-607f-415f-ae22-007be675b125n%40googlegroups.com.