B _ @sZddlZddlZddlZddlTddlTddlTedZe ddGddde Z dS)N)*z pyomo.neosZ_neosz$Interface for solvers hosted on NEOSc@s(eZdZdZddZddZddZdS) NEOSRemoteSolverz'A wrapper class for NEOS Remote SolverscKsJd|d<tj|f|tjg|_i|_tjg|jtj<tj|_tj|_ dS)NZneostype) SystemCallSolver__init__Z ProblemFormatnlZ_valid_problem_formatsZ_valid_result_formatsZ ResultsFormatZsolZ_problem_formatZ_results_format)selfkwdsr ;/tmp/pip-unpacked-wheel-d4p3hk07/pyomo/neos/plugins/NEOS.pyrs zNEOSRemoteSolver.__init__cCs|jdkrtjjjdd|_|jdkr@tjjjdd|_|j|_|jr|jdk rbt d|jf|jdk r~t d|jf|j gk rt d|j ftj j d|jdd S) zb Create the local *.sol and *.log files, which will be populated by NEOS. Nz .neos.log)suffixz .neos.solzSolver log file: '%s'zSolver solution file: '%s'zSolver problem files: %s)cmdZlog_fileenv) Z _log_filepyutilibZservicesZTempfileManagerZcreate_tempfileZ _soln_fileZ _results_fileZ _keepfilesloggerinfoZ_problem_filesmiscZBunch)r executableZ problem_filesr r r create_command_line#s       z$NEOSRemoteSolver.create_command_linecCsdS)NTr )rr r r _default_executable<sz$NEOSRemoteSolver._default_executableN)__name__ __module__ __qualname____doc__rrrr r r r rs r) loggingZ pyutilib.miscrZpyutilib.servicesZpyomo.opt.baseZpyomo.opt.resultsZpyomo.opt.solver getLoggerrZ SolverFactoryregisterrrr r r r  s