When troubleshooting Gekko outputs, how do I access the infeasibilities.txt
file? I'm using
m = GEKKO(remote=False)
so I don't know what to use for the server
and app
parameters in apm_get(server,app,'infeasibilities.txt')
function.
Asked
Active
Viewed 191 times
1 Answers
0
If you are solving with remote=True
on the public server then you can retrieve the file from the server.
from gekko.apm import get_file
print(m._server)
print(m._model_name)
f = get_file(m._server,m._model_name,'infeasibilities.txt')
f = f.decode().replace('\r','')
with open('infeasibilities.txt', 'w') as fl:
fl.write(str(f))
If you are solving with remote=False
then there is no need to get the file from the server. It will be available in the run folder m.path
or viewable with m.open_folder()
. There are more details on How to retrieve the 'infeasibilities.txt' from the gekko

John Hedengren
- 12,068
- 1
- 21
- 25