Exception: @error: Solution Not Found

651 views
Skip to first unread message

Niladri Chakraborty

unread,
Jan 17, 2019, 8:31:02 AM1/17/19
to apmo...@googlegroups.com
Hi,

I'm running my gekko code in two system.1 system is a laptop contains Windows 10 8 GB Ram(Let's say system A) with Python 3.6.5 & another system is a server,contains windows server 2016 data center with 32 GB Ram with python 3.7. (Let's say system B).
While I'm trying to run same code in both the system,in system A it was running but showing infeasible solution whereas in system B it's showing  File 

"C:\ProgramData\Anaconda3\lib\site-packages\gekko\gekko.py", line 739, in solve
    raise Exception(apm_error)

Exception:  @error: Solution Not Found

So I would like to know is this error occurring in system B due to infeasible solution or anything else as I need to move my code from system A to B 

Thanks,
Niladri

John Hedengren

unread,
Jan 17, 2019, 8:49:10 AM1/17/19
to apmo...@googlegroups.com

Niladri,


In both cases you are getting the error of an infeasible solution. The difference in this case is that you likely upgraded to the latest version of GEKKO on your system B. You can upgrade your GEKKO on system A with:


pip install gekko --upgrade


We recently released an update that better handles solver errors. If you don't want your code to fail when the solver is unsuccessful then you can wrap it in a try...except block such as:


try:

   m.solve()

except:

   print('Didn't find a solution')


If you are using the remote server then any version of Python or operating system (Windows, Linux, MacOS, ARM / Raspberry Pi) should produce the same solution if you have the same model and data. One difference is if you are switching to a local solve with m = GEKKO(remote=False). The local executables don't have some of the linear solvers because they require a license to use locally. The local IPOPT solver uses the free and open-source linear solver MUMPS (http://mumps.enseeiht.fr) while the remote server uses different (more capable) linear solver options.


Here are a couple questions to look for application differences. This isn't applicable in your case but just in case you think a difference is caused by your model or data:


1. Are you using the same model and data file? You can look in m.path and use differencing software to detect changes in your .apm (model) and .csv (data) files.

2. Are you using the same options? Please confirm remote=False or remote=True for your applications. You can also see the options in the options.json file in your run directory (m.path).

3. Has anything else changed between the two applications?



Best regards,

John Hedengren




From: apmo...@googlegroups.com <apmo...@googlegroups.com> on behalf of Niladri Chakraborty <ch.ni...@gmail.com>
Sent: Thursday, January 17, 2019 4:27 AM
To: apmo...@googlegroups.com
Subject: [APM] Exception: @error: Solution Not Found
 
--
--
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 post to this group, send email to apmo...@googlegroups.com.
Visit this group at https://groups.google.com/group/apmonitor.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages