Hi!
I’m able to run a GAMS/NEOS process through the NEOS button “RUN NEOS”,
I would like to run this process through python api, but for obious reasons I cannot actually press the “RUN NEOS” button from python. I’m running a very basic code in python, something like this:
workdir = os.path.dirname(os.getcwd())
ws = GamsWorkspace(workdir)
job = ws.add_job_from_file('filename')
job.run()
I’ve tried to change the solver to kestrel:
option solver = kestrel
SOLVE prop MINIMIZING ZFO USING MINLP;
But I get this error:
Connecting to: https://neos-server.org:3333
Traceback (most recent call last):
File "C:\GAMS\35\gmske_nx.py", line 1049, in <module>
kestrel.connectServer()
File "C:\GAMS\35\gmske_nx.py", line 539, in connectServer
reply = self.neos.ping()
File "C:\GAMS\35\GMSPython\lib\xmlrpc\client.py", line 1109, in __call__
return self.__send(self.__name, args)
File "C:\GAMS\35\GMSPython\lib\xmlrpc\client.py", line 1450, in __request
response = self.__transport.request(
File "C:\GAMS\35\GMSPython\lib\xmlrpc\client.py", line 1153, in request
return self.single_request(host, handler, request_body, verbose)
File "C:\GAMS\35\GMSPython\lib\xmlrpc\client.py", line 1165, in single_request
http_conn = self.send_request(host, handler, request_body, verbose)
File "C:\GAMS\35\GMSPython\lib\xmlrpc\client.py", line 1278, in send_request
self.send_content(connection, request_body)
File "C:\GAMS\35\GMSPython\lib\xmlrpc\client.py", line 1308, in send_content
connection.endheaders(request_body)
File "C:\GAMS\35\GMSPython\lib\http\client.py", line 1250, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "C:\GAMS\35\GMSPython\lib\http\client.py", line 1010, in _send_output
self.send(msg)
File "C:\GAMS\35\GMSPython\lib\http\client.py", line 950, in send
self.connect()
File "C:\GAMS\35\GMSPython\lib\http\client.py", line 1424, in connect
self.sock = self._context.wrap_socket(self.sock,
File "C:\GAMS\35\GMSPython\lib\ssl.py", line 500, in wrap_socket
return self.sslsocket_class._create(
File "C:\GAMS\35\GMSPython\lib\ssl.py", line 1040, in _create
self.do_handshake()
File "C:\GAMS\35\GMSPython\lib\ssl.py", line 1309, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1125)
ERR: Solver rc 1
How can I run the process with the normal green play button, but running in NEOS?