def __init__(self, **kwds): # # Call base class constructor # kwds['type'] = 'xpress' ILMLicensedSystemCallSolver.__init__(self, **kwds) self.is_mip = kwds.pop('is_mip', False) # # Define valid problem formats and associated results formats # self._valid_problem_formats = [ProblemFormat.cpxlp, ProblemFormat.mps] self._valid_result_formats = {} self._valid_result_formats[ProblemFormat.cpxlp] = [ResultsFormat.soln] self._valid_result_formats[ProblemFormat.mps] = [ResultsFormat.soln] self.set_problem_format(ProblemFormat.cpxlp) # # Cache the problem type - LP or MIP. Xpress needs to know this # on the command-line, and it matters when reading the solution file. # # Note: Undefined capabilities default to 'None' self._capabilities = Options() self._capabilities.linear = True self._capabilities.quadratic_objective = True self._capabilities.quadratic_constraint = True self._capabilities.integer = True self._capabilities.sos1 = True self._capabilities.sos2 = True
def __init__(self, **kwds): # # Call base class constructor # kwds['type'] = 'cplex' ILMLicensedSystemCallSolver.__init__(self, **kwds) # NOTE: eventually both of the following attributes should be migrated to a common base class. # is the current solve warm-started? a transient data member to communicate state information # across the _presolve, _apply_solver, and _postsolve methods. self._warm_start_solve = False # related to the above, the temporary name of the MST warm-start file (if any). self._warm_start_file_name = None # # Define valid problem formats and associated results formats # self._valid_problem_formats = [ProblemFormat.cpxlp, ProblemFormat.mps] self._valid_result_formats = {} self._valid_result_formats[ProblemFormat.cpxlp] = [ResultsFormat.soln] self._valid_result_formats[ProblemFormat.mps] = [ResultsFormat.soln] self.set_problem_format(ProblemFormat.cpxlp) # Note: Undefined capabilities default to 'None' self._capabilities = Options() self._capabilities.linear = True self._capabilities.quadratic_objective = True self._capabilities.quadratic_constraint = True self._capabilities.integer = True self._capabilities.sos1 = True self._capabilities.sos2 = True
def __init__(self, **kwds): logger.warning( "The shell interface for Xpress is broken for recent versions "\ "of Xpress. Please use xpress_direct or xpress_persistent, "\ "which require the Xpress Python API. Python bindings "\ "for recent versions of Xpress can be installed via `pip`: "\ "<https://pypi.org/project/xpress/>.") # # Call base class constructor # kwds['type'] = 'xpress' ILMLicensedSystemCallSolver.__init__(self, **kwds) self.is_mip = kwds.pop('is_mip', False) # # Define valid problem formats and associated results formats # self._valid_problem_formats = [ProblemFormat.cpxlp, ProblemFormat.mps] self._valid_result_formats = {} self._valid_result_formats[ProblemFormat.cpxlp] = [ResultsFormat.soln] self._valid_result_formats[ProblemFormat.mps] = [ResultsFormat.soln] self.set_problem_format(ProblemFormat.cpxlp) # # Cache the problem type - LP or MIP. Xpress needs to know this # on the command-line, and it matters when reading the solution file. # # Note: Undefined capabilities default to 'None' self._capabilities = Bunch() self._capabilities.linear = True self._capabilities.quadratic_objective = True self._capabilities.quadratic_constraint = True self._capabilities.integer = True self._capabilities.sos1 = True self._capabilities.sos2 = True