"""
This type stub file was generated by pyright.
"""

from .core import LpSolver, LpSolver_CMD

"""
This type stub file was generated by pyright.
"""
class XPRESS(LpSolver_CMD):
    """The XPRESS LP solver that uses the XPRESS command line tool
    in a subprocess"""
    name = ...
    def __init__(self, mip=..., msg=..., timeLimit=..., gapRel=..., options=..., keepFiles=..., path=..., heurFreq=..., heurStra=..., coverCuts=..., preSolve=..., warmStart=...) -> None:
        """
        Initializes the Xpress solver.

        :param bool mip: if False, assume LP even if integer variables
        :param bool msg: if False, no log is shown
        :param float timeLimit: maximum time for solver (in seconds)
        :param float gapRel: relative gap tolerance for the solver to stop (in fraction)
        :param heurFreq: the frequency at which heuristics are used in the tree search
        :param heurStra: heuristic strategy
        :param coverCuts: the number of rounds of lifted cover inequalities at the top node
        :param preSolve: whether presolving should be performed before the main algorithm
        :param options: Adding more options, e.g. options = ["NODESELECTION=1", "HEURDEPTH=5"]
                        More about Xpress options and control parameters please see
                        https://www.fico.com/fico-xpress-optimization/docs/latest/solver/optimizer/HTML/chapter7.html
        :param bool warmStart: if True, then use current variable values as start
        """
        ...
    
    def defaultPath(self):
        ...
    
    def available(self):
        """True if the solver is available"""
        ...
    
    def actualSolve(self, lp):
        """Solve a well formulated lp problem"""
        ...
    
    @staticmethod
    def readsol(filename, attrfile):
        """Read an XPRESS solution file"""
        ...
    
    def writeslxsol(self, name, *values):
        """
        Write a solution file in SLX format.
        The function can write multiple solutions to the same file, each
        solution must be passed as a list of (name,value) pairs. Solutions
        are written in the order specified and are given names "solutionN"
        where N is the index of the solution in the list.

        :param string name: file name
        :param list values: list of lists of (name,value) pairs
        """
        ...
    
    @staticmethod
    def quote_path(path):
        r"""
        Quotes a path for the Xpress optimizer console, by wrapping it in
        double quotes and escaping the following characters, which would
        otherwise be interpreted by the Tcl shell: \ $ " [
        """
        ...
    


XPRESS_CMD = XPRESS
xpress = ...
class XPRESS_PY(LpSolver):
    """The XPRESS LP solver that uses XPRESS Python API"""
    name = ...
    def __init__(self, mip=..., msg=..., timeLimit=..., gapRel=..., heurFreq=..., heurStra=..., coverCuts=..., preSolve=..., warmStart=..., export=..., options=...) -> None:
        """
        Initializes the Xpress solver.

        :param bool mip: if False, assume LP even if integer variables
        :param bool msg: if False, no log is shown
        :param float timeLimit: maximum time for solver (in seconds)
        :param float gapRel: relative gap tolerance for the solver to stop (in fraction)
        :param heurFreq: the frequency at which heuristics are used in the tree search
        :param heurStra: heuristic strategy
        :param coverCuts: the number of rounds of lifted cover inequalities at the top node
        :param preSolve: whether presolving should be performed before the main algorithm
        :param bool warmStart: if set then use current variable values as warm start
        :param string export: if set then the model will be exported to this file before solving
        :param options: Adding more options. This is a list the elements of which
                        are either (name,value) pairs or strings "name=value".
                        More about Xpress options and control parameters please see
                        https://www.fico.com/fico-xpress-optimization/docs/latest/solver/optimizer/HTML/chapter7.html
        """
        ...
    
    def available(self):
        """True if the solver is available"""
        ...
    
    def callSolver(self, lp, prepare=...):
        """Perform the actual solve from actualSolve() or actualResolve().

        :param prepare:  a function that is called with `lp` as argument
                         and allows final tweaks to `lp.solverModel` before
                         the low level solve is started.
        """
        ...
    
    def findSolutionValues(self, lp):
        ...
    
    def actualSolve(self, lp, prepare=...):
        """Solve a well formulated lp problem"""
        ...
    
    def buildSolverModel(self, lp):
        """
        Takes the pulp lp model and translates it into an xpress model
        """
        ...
    
    def actualResolve(self, lp, prepare=...):
        """Resolve a problem that was previously solved by actualSolve()."""
        ...
    
    def getAttribute(self, lp, which):
        """Get an arbitrary attribute for the model that was previously
        solved using actualSolve()."""
        ...
    


