email address not recognised in XML-RPC interface to Neos Server

157 Views Asked by At

I am using the XML-RPC submission API to the Neos Server (optimization, AMPL, MILP, Cplex) and am receiving an error message to say that "CPLEX will not run unless you provide a valid email address."

Am I misinterpreting what I should do with the provided python template found on the Neos site[here] and here?

The relevant snippet of the Neos-provided .py file that I edited is below

import sys
import xmlrpclib
import time

NEOS_HOST="www.neos-server.org"
NEOS_PORT=3332
CONTACT_EMAIL = '[email protected]'
INTERFACE = 'XML-RPC'
neos=xmlrpclib.Server("http://%s:%d" % (NEOS_HOST, NEOS_PORT))
...
(jobNumber, password) = neos.submitJob(xml, CONTACT_EMAIL, INTERFACE)
sys.stdout.write("JobNumber = %d \n" % jobNumber)

Besides the email error, my code works. I know because sometimes other solvers will return a result (it seems some solvers - though not CPLEX - don't require an email address)

An unrelated question For folks who are using this Neos server interface, what are the alternatives to using regex to parse the returned output file?

Thanks!

1

There are 1 best solutions below

0
dcl04 On

The Neos server team responded :

Add your email address into the xml that you are submitting. In your xml, add a line

<email> [email protected] </email> 

along with the fields like

<model></model>
<data></data>

etc