No feasible solution when solving MINLP

108 views
Skip to first unread message

Chaoda

unread,
Aug 24, 2019, 12:37:59 AM8/24/19
to apmonitor
Hi all,

I am making my first attempt at GEKKO to solve a simple MINLP.
I got the "@error: Solution Not Found" return from the solve,
however the following value is at least a feasible solution as far as I know.

t0 = np.array([8.0])
xi = np.array([1,1,1,0,0,0])
xj = np.array([0,0,0,1,1,1])

Checking the file "infeasibilities.txt", it shows the possible infeasible equations are those constraints on 0-1 variables,
but it is definitely not the case.

The python code is attached. Very appreciate if anyone could help me out.

Chaoda


Emission15-gekko-clear.py

John Hedengren

unread,
Aug 24, 2019, 12:57:22 AM8/24/19
to apmonitor

Chaoda,


One thing that works is to initialize with a different solver (IPOPT or BPOPT) and then solve with APOPT to obtain the MINLP solution.


#Set global options
m.options.SOLVER = 2 # BPOPT NLP SOLVER
m.solve(disp=True)
m.options.SOLVER = 1 # APOPT MINLP SOLVER
m.solve(disp=True)

I also had to comment out "dt = dt[dt!=0]" that was giving both a warning and an error for the Intermediate definition without an = sign.


Best regards,

John Hedengren​



From: apmo...@googlegroups.com <apmo...@googlegroups.com> on behalf of Chaoda <xiec...@gmail.com>
Sent: Friday, August 23, 2019 9:26 PM
To: apmonitor
Subject: [APM] No feasible solution when solving MINLP
 
--
--
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/9a941c87-10e7-4269-bf9b-8eb588a8add0%40googlegroups.com.
Emission15-gekko-clear.py

Chaoda

unread,
Aug 30, 2019, 6:54:01 AM8/30/19
to apmonitor
John,

Your help is always invaluable. Thank you so much. But is it possible to share a little more hints on the background of this? Why we have to initially solve it by BPOBT? Does this serial format force APOBT search within the solution of BPOBT?

Best,
Chaoda
- To unsubscribe, send email to apmo...@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 apmo...@googlegroups.com.

John Hedengren

unread,
Aug 30, 2019, 7:16:47 AM8/30/19
to APM Google Groups
Chaoda,

IPOPT and BPOPT are interior point solvers. More info on the interior point method is here:


I find that Interior Point methods do better with initialization where the guess value may be far from the optimal solution. Once a non-integer solution is found with the Interior Point, Nonlinear Programming (NLP) solvers IPOPT or BPOPT, then I switch to the active set method of APOPT. It is also an NLP solver but can also do branch and bound to find an integer solution. More information on the branch and bound method is here:


Best regards,
John Hedengren

- 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/b781de66-b204-4074-b713-afe82bef3d70%40googlegroups.com.


--
Best regards,

John Hedengren
APMonitor Optimization Suite
Reply all
Reply to author
Forward
0 new messages