I am trying to solve systems of multiple non-linear equations similar to this one:
As you can see by the graph, there are two solutions to the system. Through much trial-and-error and different methods (fsolve, etc.) to accomplish this, I stumbled upon GEKKO, and thus the following:
from gekko import GEKKO
m = GEKKO()
x,y = [m.Var(1) for i in range(2)]
m.Equations([0.2618 == 0.2094 + x*(1-(1/y))**(1/y),\
0.9200 == 1-math.e**((-((.5236-.2094)/x)**y))])
m.solve(disp=False)
print(x.value,y.value)
This code successfully solves the system, however it outputs the incorrect solution. I can't figure out quite how to get the other one (which is the one I need). Any GEKKO experts that can help? Thanks!
I've tried multiple different methods of solving non-linear systems (fsolve, Sympy nsolve, etc) and consistently ran into a division-by-zero error that I was unable to work around. Other methods of solving systems gave no solution. I cannot find the proper documentation for GEKKO to figure out how to get the other solution.