I think I'm running into the same problem as this stack overflow.
Unreachable server working with GEKKO. What is going on?
Yesterday I was able to solve my Gekko model and today I'm not even able to solve the examples from the Apmonitor site. Solving takes forever and I get the following error:
ImportError: No solution or server unreachable.
Show errors with m.solve(disp=True).
Try local solve with m=GEKKO(remote=False).
I tried solving it locally as was suggested in the stack overflow post I mentioned above:
m = GEKKO(remote=False)
However, I then got the following error:
Error: 'results.json' not found. Check above for additional error details
Traceback (most recent call last):
and
FileNotFoundError: [Errno 2] No such file or directory: '/var/folders/mr/kgzm2xln40dcc10zkq06drhc0000gn/T/tmpzqxlyw7_gk_model0/options.json'
Is the server down and can anyone help me solving it locally?
Edit, code add:
from gekko import GEKKO
m = GEKKO(remote=False) # create GEKKO model
y = m.Var(value=2) # define new variable, initial value=2
m.Equation(y**2==1) # define new equation
m.options.SOLVER=1 # change solver (1=APOPT,3=IPOPT)
m.solve(disp=True)
print('y: ' + str(y.value)) # print variable value