From 61cbfdb15cb2c5403970596632a2416508bc14f8 Mon Sep 17 00:00:00 2001 From: Jonathan Berthias Date: Thu, 14 May 2026 16:24:17 +0200 Subject: [PATCH 1/3] Annotate several Model methods in the stubs --- src/pyscipopt/scip.pyi | 541 ++++++++++++++++++++--------------------- 1 file changed, 261 insertions(+), 280 deletions(-) diff --git a/src/pyscipopt/scip.pyi b/src/pyscipopt/scip.pyi index 2fbc976f4..d033aed0a 100644 --- a/src/pyscipopt/scip.pyi +++ b/src/pyscipopt/scip.pyi @@ -1,3 +1,4 @@ +from collections.abc import Iterable, Sequence from typing import ClassVar, Union, overload import numpy as np @@ -572,338 +573,316 @@ class Model: data: Incomplete def __init__( self, - problemName: Incomplete = ..., - defaultPlugins: Incomplete = ..., - sourceModel: Incomplete = ..., - origcopy: Incomplete = ..., - globalcopy: Incomplete = ..., - enablepricing: Incomplete = ..., - createscip: Incomplete = ..., - threadsafe: Incomplete = ..., + problemName: str = "model", + defaultPlugins: bool = True, + sourceModel: Model | None = None, + origcopy: bool = False, + globalcopy: bool = True, + enablepricing: bool = True, + createscip: bool = True, + threadsafe: bool = False, ) -> None: ... def _createConsGenNonlinear(self, cons: Incomplete) -> Incomplete: ... def _createConsLinear(self, lincons: Incomplete) -> Incomplete: ... def _createConsNonlinear(self, cons: Incomplete) -> Incomplete: ... def _createConsQuadratic(self, quadcons: Incomplete) -> Incomplete: ... def _getStageNames(self) -> Incomplete: ... - def activateBenders( - self, benders: Incomplete, nsubproblems: Incomplete - ) -> Incomplete: ... - def addBendersSubproblem( - self, benders: Incomplete, subproblem: Incomplete - ) -> Incomplete: ... + def activateBenders(self, benders: Benders, nsubproblems: int) -> None: ... + def addBendersSubproblem(self, benders: Benders, subproblem: Model) -> None: ... def addCoefKnapsack( - self, cons: Incomplete, var: Incomplete, weight: Incomplete - ) -> Incomplete: ... - def addCoefLinear( - self, cons: Incomplete, var: Incomplete, value: Incomplete - ) -> Incomplete: ... + self, cons: Constraint, var: Variable, weight: float + ) -> None: ... + def addCoefLinear(self, cons: Constraint, var: Variable, value: float) -> None: ... def addCons( self, cons: Incomplete, - name: Incomplete = ..., - initial: Incomplete = ..., - separate: Incomplete = ..., - enforce: Incomplete = ..., - check: Incomplete = ..., - propagate: Incomplete = ..., - local: Incomplete = ..., - modifiable: Incomplete = ..., - dynamic: Incomplete = ..., - removable: Incomplete = ..., - stickingatnode: Incomplete = ..., - ) -> Incomplete: ... + name: str = "", + initial: bool = True, + separate: bool = True, + enforce: bool = True, + check: bool = True, + propagate: bool = True, + local: bool = False, + modifiable: bool = False, + dynamic: bool = False, + removable: bool = False, + stickingatnode: bool = False, + ) -> Constraint: ... def addConsAnd( self, - vars: Incomplete, - resvar: Incomplete, - name: Incomplete = ..., - initial: Incomplete = ..., - separate: Incomplete = ..., - enforce: Incomplete = ..., - check: Incomplete = ..., - propagate: Incomplete = ..., - local: Incomplete = ..., - modifiable: Incomplete = ..., - dynamic: Incomplete = ..., - removable: Incomplete = ..., - stickingatnode: Incomplete = ..., - ) -> Incomplete: ... + vars: Sequence[Variable], + resvar: Variable, + name: str = "", + initial: bool = True, + separate: bool = True, + enforce: bool = True, + check: bool = True, + propagate: bool = True, + local: bool = False, + modifiable: bool = False, + dynamic: bool = False, + removable: bool = False, + stickingatnode: bool = False, + ) -> Constraint: ... def addConsCardinality( self, - consvars: Incomplete, - cardval: Incomplete, - indvars: Incomplete = ..., - weights: Incomplete = ..., - name: Incomplete = ..., - initial: Incomplete = ..., - separate: Incomplete = ..., - enforce: Incomplete = ..., - check: Incomplete = ..., - propagate: Incomplete = ..., - local: Incomplete = ..., - dynamic: Incomplete = ..., - removable: Incomplete = ..., - stickingatnode: Incomplete = ..., - ) -> Incomplete: ... - def addConsCoeff( - self, cons: Incomplete, var: Incomplete, coeff: Incomplete - ) -> Incomplete: ... + consvars: Sequence[Variable], + cardval: int, + indvars: Sequence[Variable] | None = None, + weights: Sequence[float] | None = None, + name: str = "", + initial: bool = True, + separate: bool = True, + enforce: bool = True, + check: bool = True, + propagate: bool = True, + local: bool = False, + dynamic: bool = False, + removable: bool = False, + stickingatnode: bool = False, + ) -> Constraint: ... + def addConsCoeff(self, cons: Constraint, var: Variable, coeff: float) -> None: ... def addConsDisjunction( self, - conss: Incomplete, - name: Incomplete = ..., - initial: Incomplete = ..., - relaxcons: Incomplete = ..., - enforce: Incomplete = ..., - check: Incomplete = ..., - local: Incomplete = ..., - modifiable: Incomplete = ..., - dynamic: Incomplete = ..., - ) -> Incomplete: ... + conss: Iterable[Incomplete], + name: str = "", + initial: bool = True, + relaxcons: Constraint | None = None, + enforce: bool = True, + check: bool = True, + local: bool = False, + modifiable: bool = False, + dynamic: bool = False, + ) -> Constraint: ... def addConsElemDisjunction( - self, disj_cons: Incomplete, cons: Incomplete - ) -> Incomplete: ... + self, disj_cons: Constraint, cons: Constraint + ) -> Constraint: ... def addConsIndicator( self, cons: Incomplete, - binvar: Incomplete = ..., - activeone: Incomplete = ..., - name: Incomplete = ..., - initial: Incomplete = ..., - separate: Incomplete = ..., - enforce: Incomplete = ..., - check: Incomplete = ..., - propagate: Incomplete = ..., - local: Incomplete = ..., - dynamic: Incomplete = ..., - removable: Incomplete = ..., - stickingatnode: Incomplete = ..., - ) -> Incomplete: ... + binvar: Variable | None = None, + activeone: bool = True, + name: str = "", + initial: bool = True, + separate: bool = True, + enforce: bool = True, + check: bool = True, + propagate: bool = True, + local: bool = False, + dynamic: bool = False, + removable: bool = False, + stickingatnode: bool = False, + ) -> Constraint: ... def addConsKnapsack( self, - vars: Incomplete, - weights: Incomplete, - capacity: Incomplete, - name: Incomplete = ..., - initial: Incomplete = ..., - separate: Incomplete = ..., - enforce: Incomplete = ..., - check: Incomplete = ..., - modifiable: Incomplete = ..., - propagate: Incomplete = ..., - local: Incomplete = ..., - dynamic: Incomplete = ..., - removable: Incomplete = ..., - stickingatnode: Incomplete = ..., - ) -> Incomplete: ... + vars: Sequence[Variable], + weights: Sequence[int], + capacity: int, + name: str = "", + initial: bool = True, + separate: bool = True, + enforce: bool = True, + check: bool = True, + modifiable: bool = False, + propagate: bool = True, + local: bool = False, + dynamic: bool = False, + removable: bool = False, + stickingatnode: bool = False, + ) -> Constraint: ... def addConsLocal( self, - cons: Incomplete, - validnode: Incomplete = ..., - name: Incomplete = ..., - initial: Incomplete = ..., - separate: Incomplete = ..., - enforce: Incomplete = ..., - check: Incomplete = ..., - propagate: Incomplete = ..., - local: Incomplete = ..., - dynamic: Incomplete = ..., - removable: Incomplete = ..., - stickingatnode: Incomplete = ..., - ) -> Incomplete: ... + cons: Constraint, + validnode: Node | None = None, + name: str = "", + initial: bool = True, + separate: bool = True, + enforce: bool = True, + check: bool = True, + propagate: bool = True, + local: bool = True, + dynamic: bool = False, + removable: bool = True, + stickingatnode: bool = True, + ) -> None: ... def addConsNode( self, - node: Incomplete, - cons: Incomplete, - validnode: Incomplete = ..., - name: Incomplete = ..., - initial: Incomplete = ..., - separate: Incomplete = ..., - enforce: Incomplete = ..., - check: Incomplete = ..., - propagate: Incomplete = ..., - local: Incomplete = ..., - dynamic: Incomplete = ..., - removable: Incomplete = ..., - stickingatnode: Incomplete = ..., - ) -> Incomplete: ... + node: Node, + cons: Constraint, + validnode: Node | None = None, + name: str = "", + initial: bool = True, + separate: bool = True, + enforce: bool = True, + check: bool = True, + propagate: bool = True, + local: bool = True, + dynamic: bool = False, + removable: bool = True, + stickingatnode: bool = True, + ) -> None: ... def addConsOr( self, - vars: Incomplete, - resvar: Incomplete, - name: Incomplete = ..., - initial: Incomplete = ..., - separate: Incomplete = ..., - enforce: Incomplete = ..., - check: Incomplete = ..., - propagate: Incomplete = ..., - local: Incomplete = ..., - modifiable: Incomplete = ..., - dynamic: Incomplete = ..., - removable: Incomplete = ..., - stickingatnode: Incomplete = ..., - ) -> Incomplete: ... + vars: Sequence[Variable], + resvar: Variable, + name: str = "", + initial: bool = True, + separate: bool = True, + enforce: bool = True, + check: bool = True, + propagate: bool = True, + local: bool = False, + modifiable: bool = False, + dynamic: bool = False, + removable: bool = False, + stickingatnode: bool = False, + ) -> Constraint: ... def addConsSOS1( self, - vars: Incomplete, - weights: Incomplete = ..., - name: Incomplete = ..., - initial: Incomplete = ..., - separate: Incomplete = ..., - enforce: Incomplete = ..., - check: Incomplete = ..., - propagate: Incomplete = ..., - local: Incomplete = ..., - dynamic: Incomplete = ..., - removable: Incomplete = ..., - stickingatnode: Incomplete = ..., - ) -> Incomplete: ... + vars: Sequence[Variable], + weights: Sequence[float] | None = None, + name: str = "", + initial: bool = True, + separate: bool = True, + enforce: bool = True, + check: bool = True, + propagate: bool = True, + local: bool = False, + dynamic: bool = False, + removable: bool = False, + stickingatnode: bool = False, + ) -> Constraint: ... def addConsSOS2( self, - vars: Incomplete, - weights: Incomplete = ..., - name: Incomplete = ..., - initial: Incomplete = ..., - separate: Incomplete = ..., - enforce: Incomplete = ..., - check: Incomplete = ..., - propagate: Incomplete = ..., - local: Incomplete = ..., - dynamic: Incomplete = ..., - removable: Incomplete = ..., - stickingatnode: Incomplete = ..., - ) -> Incomplete: ... + vars: Sequence[Variable], + weights: Sequence[float] | None = None, + name: str = "", + initial: bool = True, + separate: bool = True, + enforce: bool = True, + check: bool = True, + propagate: bool = True, + local: bool = False, + dynamic: bool = False, + removable: bool = False, + stickingatnode: bool = False, + ) -> Constraint: ... def addConsXor( self, - vars: Incomplete, - rhsvar: Incomplete, - name: Incomplete = ..., - initial: Incomplete = ..., - separate: Incomplete = ..., - enforce: Incomplete = ..., - check: Incomplete = ..., - propagate: Incomplete = ..., - local: Incomplete = ..., - modifiable: Incomplete = ..., - dynamic: Incomplete = ..., - removable: Incomplete = ..., - stickingatnode: Incomplete = ..., - ) -> Incomplete: ... + vars: Sequence[Variable], + rhsvar: bool, + name: str = "", + initial: bool = True, + separate: bool = True, + enforce: bool = True, + check: bool = True, + propagate: bool = True, + local: bool = False, + modifiable: bool = False, + dynamic: bool = False, + removable: bool = False, + stickingatnode: bool = False, + ) -> Constraint: ... def addConss( self, - conss: Incomplete, - name: Incomplete = ..., - initial: Incomplete = ..., - separate: Incomplete = ..., - enforce: Incomplete = ..., - check: Incomplete = ..., - propagate: Incomplete = ..., - local: Incomplete = ..., - modifiable: Incomplete = ..., - dynamic: Incomplete = ..., - removable: Incomplete = ..., - stickingatnode: Incomplete = ..., - ) -> Incomplete: ... - def addCut(self, cut: Incomplete, forcecut: Incomplete = ...) -> Incomplete: ... + conss: Iterable[Incomplete], + name: str | Iterable[str] = "", + initial: bool | Iterable[bool] = True, + separate: bool | Iterable[bool] = True, + enforce: bool | Iterable[bool] = True, + check: bool | Iterable[bool] = True, + propagate: bool | Iterable[bool] = True, + local: bool | Iterable[bool] = False, + modifiable: bool | Iterable[bool] = False, + dynamic: bool | Iterable[bool] = False, + removable: bool | Iterable[bool] = False, + stickingatnode: bool | Iterable[bool] = False, + ) -> list[Constraint]: ... + def addCut(self, cut: Row, forcecut: bool = False) -> bool: ... def addExprNonlinear( - self, cons: Incomplete, expr: Incomplete, coef: Incomplete - ) -> Incomplete: ... + self, cons: Constraint, expr: Incomplete, coef: float + ) -> None: ... def addMatrixCons( self, cons: Incomplete, - name: Incomplete = ..., - initial: Incomplete = ..., - separate: Incomplete = ..., - enforce: Incomplete = ..., - check: Incomplete = ..., - propagate: Incomplete = ..., - local: Incomplete = ..., - modifiable: Incomplete = ..., - dynamic: Incomplete = ..., - removable: Incomplete = ..., - stickingatnode: Incomplete = ..., - ) -> Incomplete: ... + name: str | np.ndarray = "", + initial: bool | np.ndarray = True, + separate: bool | np.ndarray = True, + enforce: bool | np.ndarray = True, + check: bool | np.ndarray = True, + propagate: bool | np.ndarray = True, + local: bool | np.ndarray = False, + modifiable: bool | np.ndarray = False, + dynamic: bool | np.ndarray = False, + removable: bool | np.ndarray = False, + stickingatnode: bool | np.ndarray = False, + ) -> MatrixConstraint: ... def addMatrixConsIndicator( self, cons: Incomplete, - binvar: Incomplete = ..., - activeone: Incomplete = ..., - name: Incomplete = ..., - initial: Incomplete = ..., - separate: Incomplete = ..., - enforce: Incomplete = ..., - check: Incomplete = ..., - propagate: Incomplete = ..., - local: Incomplete = ..., - dynamic: Incomplete = ..., - removable: Incomplete = ..., - stickingatnode: Incomplete = ..., - ) -> Incomplete: ... + binvar: Variable | MatrixVariable | None = None, + activeone: bool | np.ndarray = True, + name: str | np.ndarray = "", + initial: bool | np.ndarray = True, + separate: bool | np.ndarray = True, + enforce: bool | np.ndarray = True, + check: bool | np.ndarray = True, + propagate: bool | np.ndarray = True, + local: bool | np.ndarray = False, + dynamic: bool | np.ndarray = False, + removable: bool | np.ndarray = False, + stickingatnode: bool | np.ndarray = False, + ) -> MatrixConstraint: ... def addMatrixVar( self, - shape: Incomplete, - name: Incomplete = ..., - vtype: Incomplete = ..., - lb: Incomplete = ..., - ub: Incomplete = ..., - obj: Incomplete = ..., - pricedVar: Incomplete = ..., - pricedVarScore: Incomplete = ..., - ) -> Incomplete: ... - def addObjoffset( - self, offset: Incomplete, solutions: Incomplete = ... - ) -> Incomplete: ... - def addPoolCut(self, row: Incomplete) -> Incomplete: ... - def addPyCons(self, cons: Incomplete) -> Incomplete: ... - def addRowDive(self, row: Incomplete) -> Incomplete: ... - def addRowExact(self, rowexact: Incomplete) -> Incomplete: ... - def addSol(self, solution: Incomplete, free: Incomplete = ...) -> Incomplete: ... + shape: int | tuple[int, ...], + name: str | np.ndarray = "", + vtype: str | np.ndarray = "C", + lb: float | np.ndarray | None = 0.0, + ub: float | np.ndarray | None = None, + obj: float | np.ndarray | None = 0.0, + pricedVar: bool | np.ndarray = False, + pricedVarScore: float | np.ndarray | None = 1.0, + ) -> MatrixVariable: ... + def addObjoffset(self, offset: float, solutions: bool = False) -> None: ... + def addPoolCut(self, row: Row) -> None: ... + def addPyCons(self, cons: Constraint) -> None: ... + def addRowDive(self, row: Row) -> None: ... + def addRowExact(self, rowexact: RowExact) -> None: ... + def addSol(self, solution: Solution, free: bool = True) -> bool: ... def addVar( self, - name: Incomplete = ..., - vtype: Incomplete = ..., - lb: Incomplete = ..., - ub: Incomplete = ..., - obj: Incomplete = ..., - pricedVar: Incomplete = ..., - pricedVarScore: Incomplete = ..., - deletable: Incomplete = ..., - ) -> Incomplete: ... - def addVarLocks( - self, var: Incomplete, nlocksdown: Incomplete, nlocksup: Incomplete - ) -> Incomplete: ... + name: str = "", + vtype: str = "C", + lb: float | None = 0.0, + ub: float | None = None, + obj: float | None = 0.0, + pricedVar: bool = False, + pricedVarScore: float = 1.0, + deletable: bool = False, + ) -> Variable: ... + def addVarLocks(self, var: Variable, nlocksdown: int, nlocksup: int) -> None: ... def addVarLocksType( - self, - var: Incomplete, - locktype: Incomplete, - nlocksdown: Incomplete, - nlocksup: Incomplete, - ) -> Incomplete: ... - def addVarSOS1( - self, cons: Incomplete, var: Incomplete, weight: Incomplete - ) -> Incomplete: ... - def addVarSOS2( - self, cons: Incomplete, var: Incomplete, weight: Incomplete - ) -> Incomplete: ... - def addVarToRow( - self, row: Incomplete, var: Incomplete, value: Incomplete - ) -> Incomplete: ... + self, var: Variable, locktype: int, nlocksdown: int, nlocksup: int + ) -> None: ... + def addVarSOS1(self, cons: Constraint, var: Variable, weight: float) -> None: ... + def addVarSOS2(self, cons: Constraint, var: Variable, weight: float) -> None: ... + def addVarToRow(self, row: Row, var: Variable, value: float) -> None: ... def adjustedVarLb(self, var: Variable, lb: float) -> float: ... def adjustedVarUb(self, var: Variable, ub: float) -> float: ... def aggregateVars( self, varx: Variable, vary: Variable, - coefx: float = ..., - coefy: float = ..., - rhs: float = ..., + coefx: float = 1.0, + coefy: float = -1.0, + rhs: float = 0.0, ) -> tuple[bool, bool, bool]: ... - def allColsInLP(self) -> Incomplete: ... - def allowNegSlackExact(self) -> Incomplete: ... - def appendVarSOS1(self, cons: Incomplete, var: Incomplete) -> Incomplete: ... - def appendVarSOS2(self, cons: Incomplete, var: Incomplete) -> Incomplete: ... - def applyCutsProbing(self) -> Incomplete: ... + def allColsInLP(self) -> bool: ... + def allowNegSlackExact(self) -> bool: ... + def appendVarSOS1(self, cons: Constraint, var: Variable) -> None: ... + def appendVarSOS2(self, cons: Constraint, var: Variable) -> None: ... + def applyCutsProbing(self) -> bool: ... def attachEventHandlerCallback( self, callback: Incomplete, @@ -911,10 +890,12 @@ class Model: name: Incomplete = ..., description: Incomplete = ..., ) -> Incomplete: ... - def backtrackProbing(self, probingdepth: Incomplete) -> Incomplete: ... + def backtrackProbing(self, probingdepth: int) -> None: ... def branchLPExact(self) -> Incomplete: ... - def branchVar(self, variable: Incomplete) -> Incomplete: ... - def branchVarVal(self, variable: Incomplete, value: Incomplete) -> Incomplete: ... + def branchVar(self, variable: Variable) -> tuple[Node, Node | None, Node]: ... + def branchVarVal( + self, variable: Variable, value: float + ) -> tuple[Node, Node | None, Node]: ... def cacheRowExtensions(self, row: Incomplete) -> Incomplete: ... def calcChildEstimate( self, variable: Incomplete, targetvalue: Incomplete From 7ffee1fc0c4e4843fa93dfd09f4a20be10ba6c26 Mon Sep 17 00:00:00 2001 From: Jonathan Berthias Date: Thu, 14 May 2026 20:15:08 +0200 Subject: [PATCH 2/3] fixup! Annotate several Model methods in the stubs --- src/pyscipopt/scip.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pyscipopt/scip.pyi b/src/pyscipopt/scip.pyi index d033aed0a..51b37d88c 100644 --- a/src/pyscipopt/scip.pyi +++ b/src/pyscipopt/scip.pyi @@ -351,7 +351,7 @@ class Expr(ExprLike): def __ge__(self, other: object, /) -> bool: ... def __getitem__(self, index: Incomplete, /) -> Incomplete: ... def __gt__(self, other: object, /) -> bool: ... - def __iadd__(self, other: Incomplete, /) -> Incomplete: ... # noqa: PYI034 + def __iadd__(self, other: Incomplete, /) -> Incomplete: ... def __iter__(self) -> Incomplete: ... def __le__(self, other: object, /) -> bool: ... def __lt__(self, other: object, /) -> bool: ... From 613be7125a9aefa2aa7afd73cd17098a2f98d57b Mon Sep 17 00:00:00 2001 From: Jonathan Berthias Date: Thu, 21 May 2026 00:06:23 +0200 Subject: [PATCH 3/3] Annotate all other Model methods --- src/pyscipopt/scip.pyi | 1228 ++++++++++++++++++++-------------------- 1 file changed, 612 insertions(+), 616 deletions(-) diff --git a/src/pyscipopt/scip.pyi b/src/pyscipopt/scip.pyi index 51b37d88c..a1b61f2ff 100644 --- a/src/pyscipopt/scip.pyi +++ b/src/pyscipopt/scip.pyi @@ -1,9 +1,10 @@ -from collections.abc import Iterable, Sequence -from typing import ClassVar, Union, overload +import os +from collections.abc import Iterable, Mapping, Sequence +from typing import Any, AnyStr, ClassVar, Literal, SupportsFloat, Union, overload import numpy as np from _typeshed import Incomplete -from typing_extensions import disjoint_base +from typing_extensions import CapsuleType, disjoint_base CONST: Term EventNames: dict @@ -351,7 +352,7 @@ class Expr(ExprLike): def __ge__(self, other: object, /) -> bool: ... def __getitem__(self, index: Incomplete, /) -> Incomplete: ... def __gt__(self, other: object, /) -> bool: ... - def __iadd__(self, other: Incomplete, /) -> Incomplete: ... + def __iadd__(self, other: Incomplete, /) -> Incomplete: ... # noqa: PYI034 def __iter__(self) -> Incomplete: ... def __le__(self, other: object, /) -> bool: ... def __lt__(self, other: object, /) -> bool: ... @@ -896,737 +897,732 @@ class Model: def branchVarVal( self, variable: Variable, value: float ) -> tuple[Node, Node | None, Node]: ... - def cacheRowExtensions(self, row: Incomplete) -> Incomplete: ... - def calcChildEstimate( - self, variable: Incomplete, targetvalue: Incomplete - ) -> Incomplete: ... + def cacheRowExtensions(self, row: Row) -> None: ... + def calcChildEstimate(self, variable: Variable, targetvalue: float) -> float: ... def calcNodeselPriority( - self, variable: Incomplete, branchdir: Incomplete, targetvalue: Incomplete - ) -> Incomplete: ... - def catchEvent( - self, eventtype: Incomplete, eventhdlr: Incomplete - ) -> Incomplete: ... + self, variable: Variable, branchdir: Incomplete, targetvalue: float + ) -> int: ... + def catchEvent(self, eventtype: Incomplete, eventhdlr: Eventhdlr) -> None: ... def catchRowEvent( - self, row: Incomplete, eventtype: Incomplete, eventhdlr: Incomplete - ) -> Incomplete: ... + self, row: Row, eventtype: Incomplete, eventhdlr: Eventhdlr + ) -> None: ... def catchVarEvent( - self, var: Incomplete, eventtype: Incomplete, eventhdlr: Incomplete - ) -> Incomplete: ... + self, var: Variable, eventtype: Incomplete, eventhdlr: Eventhdlr + ) -> None: ... def checkBendersSubproblemOptimality( - self, solution: Incomplete, probnumber: Incomplete, benders: Incomplete = ... - ) -> Incomplete: ... - def checkQuadraticNonlinear(self, cons: Incomplete) -> Incomplete: ... + self, solution: Solution, probnumber: int, benders: Benders | None = None + ) -> bool: ... + def checkQuadraticNonlinear(self, cons: Constraint) -> bool: ... def checkSol( self, - solution: Incomplete, - printreason: Incomplete = ..., - completely: Incomplete = ..., - checkbounds: Incomplete = ..., - checkintegrality: Incomplete = ..., - checklprows: Incomplete = ..., - original: Incomplete = ..., - ) -> Incomplete: ... - def chgCapacityKnapsack( - self, cons: Incomplete, capacity: Incomplete - ) -> Incomplete: ... - def chgCoefLinear( - self, cons: Incomplete, var: Incomplete, value: Incomplete - ) -> Incomplete: ... - def chgLhs(self, cons: Incomplete, lhs: Incomplete) -> Incomplete: ... + solution: Solution, + printreason: bool = True, + completely: bool = False, + checkbounds: bool = True, + checkintegrality: bool = True, + checklprows: bool = True, + original: bool = False, + ) -> bool: ... + def chgCapacityKnapsack(self, cons: Constraint, capacity: float | None) -> None: ... + def chgCoefLinear(self, cons: Constraint, var: Variable, value: float) -> None: ... + def chgLhs(self, cons: Constraint, lhs: float | None) -> None: ... def chgReoptObjective( - self, coeffs: Incomplete, sense: Incomplete = ... - ) -> Incomplete: ... - def chgRhs(self, cons: Incomplete, rhs: Incomplete) -> Incomplete: ... - def chgRowLhsDive(self, row: Incomplete, newlhs: Incomplete) -> Incomplete: ... - def chgRowRhsDive(self, row: Incomplete, newrhs: Incomplete) -> Incomplete: ... - def chgVarBranchPriority( - self, var: Incomplete, priority: Incomplete - ) -> Incomplete: ... - def chgVarLb(self, var: Incomplete, lb: Incomplete) -> Incomplete: ... - def chgVarLbDive(self, var: Incomplete, newbound: Incomplete) -> Incomplete: ... - def chgVarLbGlobal(self, var: Incomplete, lb: Incomplete) -> Incomplete: ... - def chgVarLbNode( - self, node: Incomplete, var: Incomplete, lb: Incomplete - ) -> Incomplete: ... - def chgVarLbProbing(self, var: Incomplete, lb: Incomplete) -> Incomplete: ... - def chgVarObjDive(self, var: Incomplete, newobj: Incomplete) -> Incomplete: ... - def chgVarObjProbing(self, var: Incomplete, newobj: Incomplete) -> Incomplete: ... - def chgVarType(self, var: Incomplete, vtype: Incomplete) -> Incomplete: ... - def chgVarUb(self, var: Incomplete, ub: Incomplete) -> Incomplete: ... - def chgVarUbDive(self, var: Incomplete, newbound: Incomplete) -> Incomplete: ... - def chgVarUbGlobal(self, var: Incomplete, ub: Incomplete) -> Incomplete: ... - def chgVarUbNode( - self, node: Incomplete, var: Incomplete, ub: Incomplete - ) -> Incomplete: ... - def chgVarUbProbing(self, var: Incomplete, ub: Incomplete) -> Incomplete: ... - def computeBestSolSubproblems(self) -> Incomplete: ... - def constructLP(self) -> Incomplete: ... + self, coeffs: Expr, sense: Literal["minimize", "maximize"] = "minimize" + ) -> None: ... + def chgRhs(self, cons: Constraint, rhs: float | None) -> None: ... + def chgRowLhsDive(self, row: Row, newlhs: float) -> None: ... + def chgRowRhsDive(self, row: Row, newrhs: float) -> None: ... + def chgVarBranchPriority(self, var: Variable, priority: int) -> None: ... + def chgVarLb(self, var: Variable, lb: float | None) -> None: ... + def chgVarLbDive(self, var: Variable, newbound: float) -> None: ... + def chgVarLbGlobal(self, var: Variable, lb: float | None) -> None: ... + def chgVarLbNode(self, node: Node, var: Variable, lb: float | None) -> None: ... + def chgVarLbProbing(self, var: Variable, lb: float | None) -> None: ... + def chgVarObjDive(self, var: Variable, newobj: float) -> None: ... + def chgVarObjProbing(self, var: Variable, newobj: float) -> None: ... + def chgVarType(self, var: Variable, vtype: str) -> None: ... + def chgVarUb(self, var: Variable, ub: float | None) -> None: ... + def chgVarUbDive(self, var: Variable, newbound: float) -> None: ... + def chgVarUbGlobal(self, var: Variable, ub: float | None) -> None: ... + def chgVarUbNode(self, node: Node, var: Variable, ub: float | None) -> None: ... + def chgVarUbProbing(self, var: Variable, ub: float | None) -> None: ... + def computeBestSolSubproblems(self) -> None: ... + def constructLP(self) -> bool: ... def copyLargeNeighborhoodSearch( - self, to_fix: Incomplete, fix_vals: Incomplete - ) -> Incomplete: ... - def count(self) -> Incomplete: ... - def createChild( - self, nodeselprio: Incomplete, estimate: Incomplete - ) -> Incomplete: ... + self, to_fix: Sequence[Variable], fix_vals: Sequence[float] + ) -> Model: ... + def count(self) -> None: ... + def createChild(self, nodeselprio: int, estimate: float) -> Node: ... def createCons( self, - conshdlr: Incomplete, - name: Incomplete, - initial: Incomplete = ..., - separate: Incomplete = ..., - enforce: Incomplete = ..., - check: Incomplete = ..., - propagate: Incomplete = ..., - local: Incomplete = ..., - modifiable: Incomplete = ..., - dynamic: Incomplete = ..., - removable: Incomplete = ..., - stickingatnode: Incomplete = ..., - ) -> Incomplete: ... + conshdlr: Conshdlr, + name: str, + initial: bool = True, + separate: bool = True, + enforce: bool = True, + check: bool = True, + propagate: bool = True, + local: bool = False, + modifiable: bool = False, + dynamic: bool = False, + removable: bool = False, + stickingatnode: bool = False, + ) -> Constraint: ... def createConsFromExpr( self, cons: Incomplete, - name: Incomplete = ..., - initial: Incomplete = ..., - separate: Incomplete = ..., - enforce: Incomplete = ..., - check: Incomplete = ..., - propagate: Incomplete = ..., - local: Incomplete = ..., - modifiable: Incomplete = ..., - dynamic: Incomplete = ..., - removable: Incomplete = ..., - stickingatnode: Incomplete = ..., - ) -> Incomplete: ... + name: str = "", + initial: bool = True, + separate: bool = True, + enforce: bool = True, + check: bool = True, + propagate: bool = True, + local: bool = False, + modifiable: bool = False, + dynamic: bool = False, + removable: bool = False, + stickingatnode: bool = False, + ) -> Constraint: ... def createEmptyRowSepa( self, - sepa: Incomplete, - name: Incomplete = ..., - lhs: Incomplete = ..., - rhs: Incomplete = ..., - local: Incomplete = ..., - modifiable: Incomplete = ..., - removable: Incomplete = ..., - ) -> Incomplete: ... + sepa: Sepa, + name: str = "row", + lhs: float | None = 0.0, + rhs: float | None = None, + local: bool = True, + modifiable: bool = False, + removable: bool = True, + ) -> Row: ... def createEmptyRowUnspec( self, - name: Incomplete = ..., - lhs: Incomplete = ..., - rhs: Incomplete = ..., - local: Incomplete = ..., - modifiable: Incomplete = ..., - removable: Incomplete = ..., - ) -> Incomplete: ... - def createOrigSol(self, heur: Incomplete = ...) -> Incomplete: ... - def createPartialSol(self, heur: Incomplete = ...) -> Incomplete: ... - def createProbBasic(self, problemName: Incomplete = ...) -> Incomplete: ... - def createSol( - self, heur: Incomplete = ..., initlp: Incomplete = ... - ) -> Incomplete: ... - def cutoffNode(self, node: Incomplete) -> Incomplete: ... - def deactivatePricer(self, pricer: Incomplete) -> Incomplete: ... - def delCoefLinear(self, cons: Incomplete, var: Incomplete) -> Incomplete: ... - def delCons(self, cons: Incomplete) -> Incomplete: ... - def delConsLocal(self, cons: Incomplete) -> Incomplete: ... - def delVar(self, var: Incomplete) -> Incomplete: ... - def disableDebugSol(self) -> Incomplete: ... - def disablePropagation(self, onlyroot: Incomplete = ...) -> Incomplete: ... - def dropEvent(self, eventtype: Incomplete, eventhdlr: Incomplete) -> Incomplete: ... + name: str = "row", + lhs: float | None = 0.0, + rhs: float | None = None, + local: bool = True, + modifiable: bool = False, + removable: bool = True, + ) -> Row: ... + def createOrigSol(self, heur: Heur | None = None) -> Solution: ... + def createPartialSol(self, heur: Heur | None = None) -> Solution: ... + def createProbBasic(self, problemName: str = "model") -> None: ... + def createSol(self, heur: Heur | None = None, initlp: bool = False) -> Solution: ... + def cutoffNode(self, node: Node) -> None: ... + def deactivatePricer(self, pricer: Pricer) -> None: ... + def delCoefLinear(self, cons: Constraint, var: Variable) -> None: ... + def delCons(self, cons: Constraint) -> None: ... + def delConsLocal(self, cons: Constraint) -> None: ... + def delVar(self, var: Variable) -> bool: ... + def disableDebugSol(self) -> None: ... + def disablePropagation(self, onlyroot: bool = False) -> None: ... + def dropEvent(self, eventtype: Incomplete, eventhdlr: Eventhdlr) -> None: ... def dropRowEvent( - self, row: Incomplete, eventtype: Incomplete, eventhdlr: Incomplete - ) -> Incomplete: ... + self, row: Row, eventtype: Incomplete, eventhdlr: Eventhdlr + ) -> None: ... def dropVarEvent( - self, var: Incomplete, eventtype: Incomplete, eventhdlr: Incomplete - ) -> Incomplete: ... - def enableDebugSol(self) -> Incomplete: ... - def enableExactSolving(self, enable: Incomplete) -> Incomplete: ... - def enableReoptimization(self, enable: Incomplete = ...) -> Incomplete: ... - def endDive(self) -> Incomplete: ... - def endProbing(self) -> Incomplete: ... - def endStrongbranch(self) -> Incomplete: ... - def epsilon(self) -> Incomplete: ... - def feasCeil(self, value: Incomplete) -> Incomplete: ... - def feasFloor(self, value: Incomplete) -> Incomplete: ... - def feasFrac(self, value: Incomplete) -> Incomplete: ... - def feasRound(self, value: Incomplete) -> Incomplete: ... - def feastol(self) -> Incomplete: ... - def fixVar(self, var: Incomplete, val: Incomplete) -> Incomplete: ... - def fixVarProbing(self, var: Incomplete, fixedval: Incomplete) -> Incomplete: ... - def flushRowExtensions(self, row: Incomplete) -> Incomplete: ... - def frac(self, value: Incomplete) -> Incomplete: ... + self, var: Variable, eventtype: Incomplete, eventhdlr: Eventhdlr + ) -> None: ... + def enableDebugSol(self) -> None: ... + def enableExactSolving(self, enable: bool) -> None: ... + def enableReoptimization(self, enable: bool = True) -> None: ... + def endDive(self) -> None: ... + def endProbing(self) -> None: ... + def endStrongbranch(self) -> None: ... + def epsilon(self) -> float: ... + def feasCeil(self, value: float) -> float: ... + def feasFloor(self, value: float) -> float: ... + def feasFrac(self, value: float) -> float: ... + def feasRound(self, value: float) -> float: ... + def feastol(self) -> float: ... + def fixVar(self, var: Variable, val: float) -> tuple[bool, bool]: ... + def fixVarProbing(self, var: Variable, fixedval: float) -> None: ... + def flushRowExtensions(self, row: Row) -> None: ... + def frac(self, value: float) -> float: ... def free(self) -> None: ... - def freeBendersSubproblems(self) -> Incomplete: ... - def freeProb(self) -> Incomplete: ... - def freeReoptSolve(self) -> Incomplete: ... - def freeSol(self, solution: Incomplete) -> Incomplete: ... - def freeTransform(self) -> Incomplete: ... + def freeBendersSubproblems(self) -> None: ... + def freeProb(self) -> None: ... + def freeReoptSolve(self) -> None: ... + def freeSol(self, solution: Solution) -> None: ... + def freeTransform(self) -> None: ... @staticmethod - def from_ptr(capsule: Incomplete, take_ownership: Incomplete) -> Incomplete: ... - def generateIIS(self) -> Incomplete: ... - def getActivity(self, cons: Incomplete, sol: Incomplete = ...) -> Incomplete: ... + def from_ptr(capsule: CapsuleType, take_ownership: bool) -> Model: ... + def generateIIS(self) -> IIS: ... + def getActivity(self, cons: Constraint, sol: Solution | None = None) -> float: ... def getBendersAuxiliaryVar( - self, probnumber: Incomplete, benders: Incomplete = ... - ) -> Incomplete: ... + self, probnumber: int, benders: Benders | None = None + ) -> Variable: ... def getBendersSubproblem( - self, probnumber: Incomplete, benders: Incomplete = ... - ) -> Incomplete: ... + self, probnumber: int, benders: Benders | None = None + ) -> Model: ... def getBendersVar( - self, var: Incomplete, benders: Incomplete = ..., probnumber: Incomplete = ... - ) -> Incomplete: ... - def getBestChild(self) -> Incomplete: ... - def getBestLeaf(self) -> Incomplete: ... - def getBestNode(self) -> Incomplete: ... - def getBestSibling(self) -> Incomplete: ... - def getBestSol(self) -> Incomplete: ... - def getBestboundNode(self) -> Incomplete: ... + self, var: Variable, benders: Benders | None = None, probnumber: int = -1 + ) -> Variable | None: ... + def getBestChild(self) -> Node | None: ... + def getBestLeaf(self) -> Node | None: ... + def getBestNode(self) -> Node | None: ... + def getBestSibling(self) -> Node | None: ... + def getBestSol(self) -> Solution | None: ... + def getBestboundNode(self) -> Node | None: ... def getBipartiteGraphRepresentation( self, - prev_col_features: Incomplete = ..., - prev_edge_features: Incomplete = ..., - prev_row_features: Incomplete = ..., - static_only: Incomplete = ..., - suppress_warnings: Incomplete = ..., - ) -> Incomplete: ... - def getBranchScoreMultiple( - self, var: Incomplete, gains: Incomplete - ) -> Incomplete: ... - def getCapacityKnapsack(self, cons: Incomplete) -> Incomplete: ... - def getChildren(self) -> Incomplete: ... - def getColRedCost(self, col: Incomplete) -> Incomplete: ... - def getCondition(self, exact: Incomplete = ...) -> Incomplete: ... - def getConsNVars(self, constraint: Incomplete) -> Incomplete: ... - def getConsVals(self, constraint: Incomplete) -> Incomplete: ... - def getConsVars(self, constraint: Incomplete) -> Incomplete: ... - def getConss(self, transformed: Incomplete = ...) -> Incomplete: ... - def getCurrentNode(self) -> Incomplete: ... - def getCutEfficacy(self, cut: Incomplete, sol: Incomplete = ...) -> Incomplete: ... - def getCutLPSolCutoffDistance( - self, cut: Incomplete, sol: Incomplete - ) -> Incomplete: ... - def getCutoffbound(self) -> Incomplete: ... - def getDepth(self) -> Incomplete: ... - def getDualMultiplier(self, cons: Incomplete) -> Incomplete: ... + prev_col_features: Sequence[Sequence[float]] | None = None, + prev_edge_features: Sequence[Sequence[float]] | None = None, + prev_row_features: Sequence[Sequence[float]] | None = None, + static_only: bool = False, + suppress_warnings: bool = False, + ) -> tuple[ + list[list[float | None]], + list[list[float]], + list[list[float]], + dict[str, dict[str, int]], + ]: ... + def getBranchScoreMultiple(self, var: Variable, gains: list[float]) -> float: ... + def getCapacityKnapsack(self, cons: Constraint) -> float: ... + def getChildren(self) -> list[Node]: ... + def getColRedCost(self, col: Column) -> float: ... + def getCondition(self, exact: bool = False) -> float: ... + def getConsNVars(self, constraint: Constraint) -> int: ... + def getConsVals(self, constraint: Constraint) -> list[float]: ... + def getConsVars(self, constraint: Constraint) -> list[Variable]: ... + def getConss(self, transformed: bool = True) -> list[Constraint]: ... + def getCurrentNode(self) -> Node: ... + def getCutEfficacy(self, cut: Row, sol: Solution | None = None) -> float: ... + def getCutLPSolCutoffDistance(self, cut: Row, sol: Solution) -> float: ... + def getCutoffbound(self) -> float: ... + def getDepth(self) -> int: ... + def getDualMultiplier(self, cons: Constraint) -> float: ... def getDualSolVal( - self, cons: Incomplete, boundconstraint: Incomplete = ... - ) -> Incomplete: ... - def getDualbound(self) -> Incomplete: ... - def getDualboundRoot(self) -> Incomplete: ... - def getDualfarkasKnapsack(self, cons: Incomplete) -> Incomplete: ... - def getDualfarkasLinear(self, cons: Incomplete) -> Incomplete: ... - def getDualsolKnapsack(self, cons: Incomplete) -> Incomplete: ... - def getDualsolLinear(self, cons: Incomplete) -> Incomplete: ... - def getGap(self) -> Incomplete: ... - def getHeurTiming(self, heurname: Incomplete) -> Incomplete: ... - def getIIS(self) -> Incomplete: ... - def getLPBInvARow(self, row: Incomplete) -> Incomplete: ... - def getLPBInvRow(self, row: Incomplete) -> Incomplete: ... - def getLPBasisInd(self) -> Incomplete: ... - def getLPBranchCands(self) -> Incomplete: ... - def getLPColsData(self) -> Incomplete: ... - def getLPObjVal(self) -> Incomplete: ... - def getLPRowsData(self) -> Incomplete: ... + self, cons: Constraint, boundconstraint: bool = False + ) -> float: ... + def getDualbound(self) -> float: ... + def getDualboundRoot(self) -> float: ... + def getDualfarkasKnapsack(self, cons: Constraint) -> float: ... + def getDualfarkasLinear(self, cons: Constraint) -> float: ... + def getDualsolKnapsack(self, cons: Constraint) -> float: ... + def getDualsolLinear(self, cons: Constraint) -> float: ... + def getGap(self) -> float: ... + def getHeurTiming(self, heurname: str) -> Incomplete: ... + def getIIS(self) -> IIS: ... + def getLPBInvARow(self, row: int) -> list[float]: ... + def getLPBInvRow(self, row: int) -> list[float]: ... + def getLPBasisInd(self) -> list[int]: ... + def getLPBranchCands( + self, + ) -> tuple[list[Variable], list[float], list[float], int, int, int]: ... + def getLPColsData(self) -> list[Column]: ... + def getLPObjVal(self) -> float: ... + def getLPRowsData(self) -> list[Row]: ... def getLPSolstat(self) -> Incomplete: ... - def getLeaves(self) -> Incomplete: ... - def getLhs(self, cons: Incomplete) -> Incomplete: ... - def getLinearConsIndicator(self, cons: Incomplete) -> Incomplete: ... - def getLocalEstimate(self, original: Incomplete = ...) -> Incomplete: ... - def getLowerbound(self) -> Incomplete: ... - def getMajorVersion(self) -> Incomplete: ... - def getMaxDepth(self) -> Incomplete: ... - def getMinorVersion(self) -> Incomplete: ... - def getNBestSolsFound(self) -> Incomplete: ... - def getNBinVars(self) -> Incomplete: ... - def getNChildren(self) -> Incomplete: ... - def getNConss(self, transformed: Incomplete = ...) -> Incomplete: ... - def getNContVars(self) -> Incomplete: ... - def getNCountedSols(self) -> Incomplete: ... - def getNCuts(self) -> Incomplete: ... - def getNCutsApplied(self) -> Incomplete: ... - def getNFeasibleLeaves(self) -> Incomplete: ... - def getNImplVars(self) -> Incomplete: ... - def getNInfeasibleLeaves(self) -> Incomplete: ... - def getNIntVars(self) -> Incomplete: ... - def getNLPBranchCands(self) -> Incomplete: ... - def getNLPCols(self) -> Incomplete: ... - def getNLPIterations(self) -> Incomplete: ... - def getNLPRows(self) -> Incomplete: ... - def getNLPs(self) -> Incomplete: ... + def getLeaves(self) -> list[Node]: ... + def getLhs(self, cons: Constraint) -> None: ... + def getLinearConsIndicator(self, cons: Constraint) -> Constraint | None: ... + def getLocalEstimate(self, original: bool = False) -> float: ... + def getLowerbound(self) -> float: ... + def getMajorVersion(self) -> int: ... + def getMaxDepth(self) -> int: ... + def getMinorVersion(self) -> int: ... + def getNBestSolsFound(self) -> int: ... + def getNBinVars(self) -> int: ... + def getNChildren(self) -> int: ... + def getNConss(self, transformed: bool = True) -> int: ... + def getNContVars(self) -> int: ... + def getNCountedSols(self) -> int: ... + def getNCuts(self) -> int: ... + def getNCutsApplied(self) -> int: ... + def getNFeasibleLeaves(self) -> int: ... + def getNImplVars(self) -> int: ... + def getNInfeasibleLeaves(self) -> int: ... + def getNIntVars(self) -> int: ... + def getNLPBranchCands(self) -> int: ... + def getNLPCols(self) -> int: ... + def getNLPIterations(self) -> int: ... + def getNLPRows(self) -> int: ... + def getNLPs(self) -> int: ... def getMemUsed(self) -> int: ... def getMemTotal(self) -> int: ... def getMemExternEstim(self) -> int: ... - def getNLeaves(self) -> Incomplete: ... - def getNLimSolsFound(self) -> Incomplete: ... - def getNNlRows(self) -> Incomplete: ... - def getNNodeLPIterations(self) -> Incomplete: ... - def getNNodes(self) -> Incomplete: ... - def getNReaders(self) -> Incomplete: ... - def getNSepaRounds(self) -> Incomplete: ... - def getNSiblings(self) -> Incomplete: ... - def getNSols(self) -> Incomplete: ... - def getNSolsFound(self) -> Incomplete: ... - def getNStrongbranchLPIterations(self) -> Incomplete: ... + def getNLeaves(self) -> int: ... + def getNLimSolsFound(self) -> int: ... + def getNNlRows(self) -> int: ... + def getNNodeLPIterations(self) -> int: ... + def getNNodes(self) -> int: ... + def getNReaders(self) -> int: ... + def getNSepaRounds(self) -> int: ... + def getNSiblings(self) -> int: ... + def getNSols(self) -> int: ... + def getNSolsFound(self) -> int: ... + def getNStrongbranchLPIterations(self) -> int: ... def getPrimalDualIntegral(self) -> Incomplete: ... - def getNTotalNodes(self) -> Incomplete: ... - def getNVars(self, transformed: Incomplete = ...) -> Incomplete: ... - def getNVarsAnd(self, and_cons: Incomplete) -> Incomplete: ... - def getNlRowActivityBounds(self, nlrow: Incomplete) -> Incomplete: ... + def getNTotalNodes(self) -> int: ... + def getNVars(self, transformed: bool = True) -> int: ... + def getNVarsAnd(self, and_cons: Constraint) -> int: ... + def getNlRowActivityBounds(self, nlrow: NLRow) -> tuple[float, float]: ... def getNlRowSolActivity( - self, nlrow: Incomplete, sol: Incomplete = ... - ) -> Incomplete: ... + self, nlrow: NLRow, sol: Solution | None = None + ) -> float: ... def getNlRowSolFeasibility( - self, nlrow: Incomplete, sol: Incomplete = ... - ) -> Incomplete: ... - def getNlRows(self) -> Incomplete: ... - def getObjVal(self, original: Incomplete = ...) -> Incomplete: ... - def getObjective(self) -> Incomplete: ... - def getObjectiveSense(self) -> Incomplete: ... - def getObjlimit(self) -> Incomplete: ... - def getObjoffset(self, original: Incomplete = ...) -> Incomplete: ... - def getOpenNodes(self) -> Incomplete: ... - def getParam(self, name: Incomplete) -> Incomplete: ... - def getParams(self) -> Incomplete: ... - def getPlungeDepth(self) -> Incomplete: ... - def getPresolvingTime(self) -> Incomplete: ... - def getPrimalRay(self) -> Incomplete: ... - def getPrimalRayVal(self, var: Incomplete) -> Incomplete: ... - def getPrimalbound(self) -> Incomplete: ... - def getPrioChild(self) -> Incomplete: ... - def getPrioSibling(self) -> Incomplete: ... - def getProbName(self) -> Incomplete: ... - def getProbingDepth(self) -> Incomplete: ... - def getPseudoBranchCands(self) -> Incomplete: ... - def getReadingTime(self) -> Incomplete: ... - def getResultantAnd(self, and_cons: Incomplete) -> Incomplete: ... - def getRhs(self, cons: Incomplete) -> Incomplete: ... - def getRowActivity(self, row: Incomplete) -> Incomplete: ... - def getRowDualSol(self, row: Incomplete) -> Incomplete: ... - def getRowLPActivity(self, row: Incomplete) -> Incomplete: ... - def getRowLinear(self, cons: Incomplete) -> Incomplete: ... - def getRowNumIntCols(self, row: Incomplete) -> Incomplete: ... - def getRowObjParallelism(self, row: Incomplete) -> Incomplete: ... + self, nlrow: NLRow, sol: Solution | None = None + ) -> float: ... + def getNlRows(self) -> list[NLRow]: ... + def getObjVal(self, original: bool = True) -> float: ... + def getObjective(self) -> Expr: ... + def getObjectiveSense(self) -> Literal["maximize", "minimize", "unknown"]: ... + def getObjlimit(self) -> float: ... + def getObjoffset(self, original: bool = True) -> float: ... + def getOpenNodes(self) -> tuple[list[Node], list[Node], list[Node]]: ... + def getParam(self, name: str) -> bool | float | str: ... + def getParams(self) -> dict[str, bool | float | str]: ... + def getPlungeDepth(self) -> int: ... + def getPresolvingTime(self) -> float: ... + def getPrimalRay(self) -> list[float]: ... + def getPrimalRayVal(self, var: Variable) -> float: ... + def getPrimalbound(self) -> float: ... + def getPrioChild(self) -> Node | None: ... + def getPrioSibling(self) -> Node | None: ... + def getProbName(self) -> str: ... + def getProbingDepth(self) -> int: ... + def getPseudoBranchCands(self) -> tuple[list[Variable], int, int]: ... + def getReadingTime(self) -> float: ... + def getResultantAnd(self, and_cons: Constraint) -> Variable: ... + def getRhs(self, cons: Constraint) -> float: ... + def getRowActivity(self, row: Row) -> float: ... + def getRowDualSol(self, row: Row) -> float: ... + def getRowLPActivity(self, row: Row) -> float: ... + def getRowLinear(self, cons: Constraint) -> Row: ... + def getRowNumIntCols(self, row: Row) -> int: ... + def getRowObjParallelism(self, row: Row) -> float: ... def getRowParallelism( - self, row1: Incomplete, row2: Incomplete, orthofunc: Incomplete = ... - ) -> Incomplete: ... - def getSiblings(self) -> Incomplete: ... + self, row1: Row, row2: Row, orthofunc: Literal["d", "e", 100, 101] = 101 + ) -> float: ... + def getSiblings(self) -> list[Node]: ... def getSlack( - self, cons: Incomplete, sol: Incomplete = ..., side: Incomplete = ... - ) -> Incomplete: ... - def getSlackVarIndicator(self, cons: Incomplete) -> Incomplete: ... - def getSolObjVal( - self, sol: Incomplete, original: Incomplete = ... - ) -> Incomplete: ... - def getSolTime(self, sol: Incomplete) -> Incomplete: ... + self, + cons: Constraint, + sol: Solution | None = None, + side: Literal["lhs", "rhs"] | None = None, + ) -> float: ... + def getSlackVarIndicator(self, cons: Constraint) -> Variable: ... + def getSolObjVal(self, sol: Solution | None, original: bool = True) -> float: ... + def getSolTime(self, sol: Solution) -> float: ... @overload def getSolVal(self, sol: Solution, expr: Union[Expr, GenExpr]) -> float: ... @overload def getSolVal(self, sol: Solution, expr: MatrixExpr) -> np.ndarray: ... - def getSols(self) -> Incomplete: ... - def getSolvingTime(self) -> Incomplete: ... + def getSols(self) -> list[Solution]: ... + def getSolvingTime(self) -> float: ... def getStage(self) -> Incomplete: ... - def getStageName(self) -> Incomplete: ... - def getStatus(self) -> Incomplete: ... - def getTechVersion(self) -> Incomplete: ... - def getTermsQuadratic(self, cons: Incomplete) -> Incomplete: ... - def getTotalTime(self) -> Incomplete: ... - def getTransformedCons(self, cons: Incomplete) -> Incomplete: ... - def getTransformedVar(self, var: Incomplete) -> Incomplete: ... - def getTreesizeEstimation(self) -> Incomplete: ... + def getStageName(self) -> str: ... + def getStatus( + self, + ) -> Literal[ + "optimal", + "timelimit", + "infeasible", + "unbounded", + "userinterrupt", + "inforunbd", + "nodelimit", + "totalnodelimit", + "stallnodelimit", + "gaplimit", + "memlimit", + "sollimit", + "bestsollimit", + "restartlimit", + "primallimit", + "duallimit", + "unknown", + ]: ... + def getTechVersion(self) -> int: ... + def getTermsQuadratic( + self, cons: Constraint + ) -> tuple[ + list[tuple[Variable, Variable, float]], + list[tuple[Variable, float, float]], + list[tuple[Variable, float]], + ]: ... + def getTotalTime(self) -> float: ... + def getTransformedCons(self, cons: Constraint) -> Constraint: ... + def getTransformedVar(self, var: Variable) -> Variable: ... + def getTreesizeEstimation(self) -> float: ... @overload def getVal(self, expr: Union[Expr, GenExpr]) -> float: ... @overload def getVal(self, expr: MatrixExpr) -> np.ndarray: ... - def getValsLinear(self, cons: Incomplete) -> Incomplete: ... - def getVarDict(self, transformed: Incomplete = ...) -> Incomplete: ... - def getVarLbDive(self, var: Incomplete) -> Incomplete: ... - def getVarPseudocost( - self, var: Incomplete, branchdir: Incomplete - ) -> Incomplete: ... - def getVarPseudocostScore( - self, var: Incomplete, solVal: Incomplete - ) -> Incomplete: ... - def getVarRedcost(self, var: Incomplete) -> Incomplete: ... + def getValsLinear(self, cons: Constraint) -> dict[str, float]: ... + def getVarDict(self, transformed: bool = False) -> dict[str, float]: ... + def getVarLbDive(self, var: Variable) -> float: ... + def getVarPseudocost(self, var: Variable, branchdir: Incomplete) -> float: ... + def getVarPseudocostScore(self, var: Variable, solVal: float) -> float: ... + def getVarRedcost(self, var: Variable) -> float: ... def getVarStrongbranch( self, - var: Incomplete, - itlim: Incomplete, - idempotent: Incomplete = ..., - integral: Incomplete = ..., - ) -> Incomplete: ... - def getVarStrongbranchLast(self, var: Incomplete) -> Incomplete: ... - def getVarStrongbranchNode(self, var: Incomplete) -> Incomplete: ... - def getVarUbDive(self, var: Incomplete) -> Incomplete: ... - def getVars(self, transformed: Incomplete = ...) -> Incomplete: ... - def getVarsAnd(self, and_cons: Incomplete) -> Incomplete: ... - def getWeightsKnapsack(self, cons: Incomplete) -> Incomplete: ... - def hasPrimalRay(self) -> Incomplete: ... - def hideOutput(self, quiet: Incomplete = ...) -> Incomplete: ... - def inProbing(self) -> Incomplete: ... - def inRepropagation(self) -> Incomplete: ... + var: Variable, + itlim: int, + idempotent: bool = False, + integral: bool = False, + ) -> tuple[float, float, bool, bool, bool, bool, bool, bool, bool]: ... + def getVarStrongbranchLast( + self, var: Variable + ) -> tuple[float, float, bool, bool, float, float]: ... + def getVarStrongbranchNode(self, var: Variable) -> int: ... + def getVarUbDive(self, var: Variable) -> float: ... + def getVars(self, transformed: bool = False) -> list[Variable]: ... + def getVarsAnd(self, and_cons: Constraint) -> list[Variable]: ... + def getWeightsKnapsack(self, cons: Constraint) -> dict[str, float]: ... + def hasPrimalRay(self) -> bool: ... + def hideOutput(self, quiet: bool = True) -> None: ... + def inProbing(self) -> bool: ... + def inRepropagation(self) -> bool: ... def includeBenders( self, - benders: Incomplete, - name: Incomplete, - desc: Incomplete, - priority: Incomplete = ..., - cutlp: Incomplete = ..., - cutpseudo: Incomplete = ..., - cutrelax: Incomplete = ..., - shareaux: Incomplete = ..., - ) -> Incomplete: ... - def includeBendersDefaultCuts(self, benders: Incomplete) -> Incomplete: ... + benders: Benders, + name: str, + desc: str, + priority: int = 1, + cutlp: bool = True, + cutpseudo: bool = True, + cutrelax: bool = True, + shareaux: bool = False, + ) -> None: ... + def includeBendersDefaultCuts(self, benders: Benders) -> None: ... def includeBenderscut( self, - benders: Incomplete, - benderscut: Incomplete, - name: Incomplete, - desc: Incomplete, - priority: Incomplete = ..., - islpcut: Incomplete = ..., - ) -> Incomplete: ... + benders: Benders, + benderscut: Benderscut, + name: str, + desc: str, + priority: int = 1, + islpcut: bool = True, + ) -> None: ... def includeBranchrule( self, - branchrule: Incomplete, - name: Incomplete, - desc: Incomplete, - priority: Incomplete, - maxdepth: Incomplete, - maxbounddist: Incomplete, - ) -> Incomplete: ... + branchrule: Branchrule, + name: str, + desc: str, + priority: int, + maxdepth: int, + maxbounddist: float, + ) -> None: ... def includeConshdlr( self, - conshdlr: Incomplete, - name: Incomplete, - desc: Incomplete, - sepapriority: Incomplete = ..., - enfopriority: Incomplete = ..., - chckpriority: Incomplete = ..., - sepafreq: Incomplete = ..., - propfreq: Incomplete = ..., - eagerfreq: Incomplete = ..., - maxprerounds: Incomplete = ..., - delaysepa: Incomplete = ..., - delayprop: Incomplete = ..., - needscons: Incomplete = ..., + conshdlr: Conshdlr, + name: str, + desc: str, + sepapriority: int = 0, + enfopriority: int = 0, + chckpriority: int = 0, + sepafreq: int = -1, + propfreq: int = -1, + eagerfreq: int = 100, + maxprerounds: int = -1, + delaysepa: bool = False, + delayprop: bool = False, + needscons: bool = True, proptiming: Incomplete = ..., presoltiming: Incomplete = ..., - ) -> Incomplete: ... + ) -> None: ... def includeCutsel( - self, - cutsel: Incomplete, - name: Incomplete, - desc: Incomplete, - priority: Incomplete, - ) -> Incomplete: ... - def includeDefaultPlugins(self) -> Incomplete: ... - def includeEventhdlr( - self, eventhdlr: Incomplete, name: Incomplete, desc: Incomplete - ) -> Incomplete: ... + self, cutsel: Cutsel, name: str, desc: str, priority: int + ) -> None: ... + def includeDefaultPlugins(self) -> None: ... + def includeEventhdlr(self, eventhdlr: Eventhdlr, name: str, desc: str) -> None: ... def includeHeur( self, - heur: Incomplete, - name: Incomplete, - desc: Incomplete, - dispchar: Incomplete, - priority: Incomplete = ..., - freq: Incomplete = ..., - freqofs: Incomplete = ..., - maxdepth: Incomplete = ..., + heur: Heur, + name: str, + desc: str, + dispchar: str, + priority: int = 10000, + freq: int = 1, + freqofs: int = 0, + maxdepth: int = -1, timingmask: Incomplete = ..., - usessubscip: Incomplete = ..., - ) -> Incomplete: ... + usessubscip: bool = False, + ) -> None: ... def includeIISfinder( self, - iisfinder: Incomplete, - name: Incomplete, - desc: Incomplete, - priority: Incomplete = ..., - freq: Incomplete = ..., - ) -> Incomplete: ... + iisfinder: IISfinder, + name: str, + desc: str, + priority: int = 10000, + freq: int = 1, + ) -> None: ... def includeNodesel( self, - nodesel: Incomplete, - name: Incomplete, - desc: Incomplete, - stdpriority: Incomplete, - memsavepriority: Incomplete, - ) -> Incomplete: ... + nodesel: Nodesel, + name: str, + desc: str, + stdpriority: int, + memsavepriority: int, + ) -> None: ... def includePresol( self, - presol: Incomplete, - name: Incomplete, - desc: Incomplete, - priority: Incomplete, - maxrounds: Incomplete, + presol: Presol, + name: str, + desc: str, + priority: int, + maxrounds: int, timing: Incomplete = ..., - ) -> Incomplete: ... + ) -> None: ... def includePricer( self, - pricer: Incomplete, - name: Incomplete, - desc: Incomplete, - priority: Incomplete = ..., - delay: Incomplete = ..., - ) -> Incomplete: ... + pricer: Pricer, + name: str, + desc: str, + priority: int = 1, + delay: bool = True, + ) -> None: ... def includeProp( self, - prop: Incomplete, - name: Incomplete, - desc: Incomplete, - presolpriority: Incomplete, - presolmaxrounds: Incomplete, + prop: Prop, + name: str, + desc: str, + presolpriority: int, + presolmaxrounds: int, proptiming: Incomplete, presoltiming: Incomplete = ..., - priority: Incomplete = ..., - freq: Incomplete = ..., - delay: Incomplete = ..., - ) -> Incomplete: ... - def includeReader( - self, reader: Incomplete, name: Incomplete, desc: Incomplete, ext: Incomplete - ) -> Incomplete: ... + priority: int = 1, + freq: int = 1, + delay: bool = True, + ) -> None: ... + def includeReader(self, reader: Reader, name: str, desc: str, ext: str) -> None: ... def includeRelax( - self, - relax: Incomplete, - name: Incomplete, - desc: Incomplete, - priority: Incomplete = ..., - freq: Incomplete = ..., - ) -> Incomplete: ... + self, relax: Relax, name: str, desc: str, priority: int = 10000, freq: int = 1 + ) -> None: ... def includeSepa( self, - sepa: Incomplete, - name: Incomplete, - desc: Incomplete, - priority: Incomplete = ..., - freq: Incomplete = ..., - maxbounddist: Incomplete = ..., - usessubscip: Incomplete = ..., - delay: Incomplete = ..., - ) -> Incomplete: ... - def infinity(self) -> Incomplete: ... - def initBendersDefault(self, subproblems: Incomplete) -> Incomplete: ... - def interruptSolve(self) -> Incomplete: ... - def isAndConsSorted(self, and_cons: Incomplete) -> Incomplete: ... - def isCutEfficacious( - self, cut: Incomplete, sol: Incomplete = ... - ) -> Incomplete: ... - def isEQ(self, val1: Incomplete, val2: Incomplete) -> Incomplete: ... - def isExact(self) -> Incomplete: ... - def isFeasEQ(self, val1: Incomplete, val2: Incomplete) -> Incomplete: ... - def isFeasGE(self, val1: Incomplete, val2: Incomplete) -> Incomplete: ... - def isFeasGT(self, val1: Incomplete, val2: Incomplete) -> Incomplete: ... - def isFeasIntegral(self, value: Incomplete) -> Incomplete: ... - def isFeasLE(self, val1: Incomplete, val2: Incomplete) -> Incomplete: ... - def isFeasLT(self, val1: Incomplete, val2: Incomplete) -> Incomplete: ... - def isFeasNegative(self, value: Incomplete) -> Incomplete: ... - def isFeasPositive(self, value: Incomplete) -> Incomplete: ... - def isFeasZero(self, value: Incomplete) -> Incomplete: ... - def isGE(self, val1: Incomplete, val2: Incomplete) -> Incomplete: ... - def isGT(self, val1: Incomplete, val2: Incomplete) -> Incomplete: ... - def isHugeValue(self, val: Incomplete) -> Incomplete: ... - def isInfinity(self, value: Incomplete) -> Incomplete: ... + sepa: Sepa, + name: str, + desc: str, + priority: int = 0, + freq: int = 10, + maxbounddist: float = 1.0, + usessubscip: bool = False, + delay: bool = False, + ) -> None: ... + def infinity(self) -> float: ... + def initBendersDefault(self, subproblems: Model | dict[Any, Model]) -> None: ... + def interruptSolve(self) -> None: ... + def isAndConsSorted(self, and_cons: Constraint) -> bool: ... + def isCutEfficacious(self, cut: Row, sol: Solution | None = None) -> bool: ... + def isEQ(self, val1: float, val2: float) -> bool: ... + def isExact(self) -> bool: ... + def isFeasEQ(self, val1: float, val2: float) -> bool: ... + def isFeasGE(self, val1: float, val2: float) -> bool: ... + def isFeasGT(self, val1: float, val2: float) -> bool: ... + def isFeasIntegral(self, value: float) -> bool: ... + def isFeasLE(self, val1: float, val2: float) -> bool: ... + def isFeasLT(self, val1: float, val2: float) -> bool: ... + def isFeasNegative(self, value: float) -> bool: ... + def isFeasPositive(self, value: float) -> bool: ... + def isFeasZero(self, value: float) -> bool: ... + def isGE(self, val1: float, val2: float) -> bool: ... + def isGT(self, val1: float, val2: float) -> bool: ... + def isHugeValue(self, val: float) -> bool: ... + def isInfinity(self, value: float) -> bool: ... def isIntegral(self, value: float) -> bool: ... - def isLE(self, val1: Incomplete, val2: Incomplete) -> Incomplete: ... - def isLPSolBasic(self) -> Incomplete: ... - def isLT(self, val1: Incomplete, val2: Incomplete) -> Incomplete: ... - def isNLPConstructed(self) -> Incomplete: ... - def isNegative(self, val: Incomplete) -> Incomplete: ... - def isObjChangedProbing(self) -> Incomplete: ... + def isLE(self, val1: float, val2: float) -> bool: ... + def isLPSolBasic(self) -> bool: ... + def isLT(self, val1: float, val2: float) -> bool: ... + def isNLPConstructed(self) -> bool: ... + def isNegative(self, val: float) -> bool: ... + def isObjChangedProbing(self) -> bool: ... def isObjIntegral(self) -> Incomplete: ... - def isPositive(self, val: Incomplete) -> Incomplete: ... + def isPositive(self, val: float) -> bool: ... def isReoptEnabled(self) -> bool: ... - def isZero(self, value: Incomplete) -> Incomplete: ... - def lpiGetIterations(self) -> Incomplete: ... - def markDoNotAggrVar(self, var: Incomplete) -> Incomplete: ... - def markDoNotMultaggrVar(self, var: Incomplete) -> Incomplete: ... - def newProbingNode(self) -> Incomplete: ... - def optimize(self) -> Incomplete: ... - def optimizeNogil(self) -> Incomplete: ... - def presolve(self) -> Incomplete: ... - def printBestSol(self, write_zeros: Incomplete = ...) -> Incomplete: ... - def printCons(self, constraint: Incomplete) -> Incomplete: ... - def printExternalCodeVersions(self) -> Incomplete: ... - def printNlRow(self, nlrow: Incomplete) -> Incomplete: ... + def isZero(self, value: float) -> bool: ... + def lpiGetIterations(self) -> int: ... + def markDoNotAggrVar(self, var: Variable) -> None: ... + def markDoNotMultaggrVar(self, var: Variable) -> None: ... + def newProbingNode(self) -> None: ... + def optimize(self) -> None: ... + def optimizeNogil(self) -> None: ... + def presolve(self) -> None: ... + def printBestSol(self, write_zeros: bool = False) -> None: ... + def printCons(self, constraint: Constraint) -> None: ... + def printExternalCodeVersions(self) -> None: ... + def printNlRow(self, nlrow: NLRow) -> None: ... def printProblem( - self, - ext: Incomplete = ..., - trans: Incomplete = ..., - genericnames: Incomplete = ..., - ) -> Incomplete: ... - def printRow(self, row: Incomplete) -> Incomplete: ... + self, ext: str = ".cip", trans: bool = False, genericnames: bool = False + ) -> None: ... + def printRow(self, row: Row) -> None: ... def printSol( - self, solution: Incomplete = ..., write_zeros: Incomplete = ... - ) -> Incomplete: ... - def printStatistics(self, filename: Incomplete = ...) -> Incomplete: ... - def printStatisticsJson(self) -> Incomplete: ... - def printVersion(self) -> Incomplete: ... - def propagateProbing(self, maxproprounds: Incomplete) -> Incomplete: ... - def readParams(self, file: Incomplete) -> Incomplete: ... + self, solution: Solution | None = None, write_zeros: bool = False + ) -> None: ... + def printStatistics( + self, filename: str | os.PathLike[str] | None = None + ) -> None: ... + def printStatisticsJson(self) -> None: ... + def printVersion(self) -> None: ... + def propagateProbing(self, maxproprounds: int) -> tuple[bool, int]: ... + def readParams(self, file: str | os.PathLike[str]) -> None: ... def readProblem( - self, filename: Incomplete, extension: Incomplete = ... - ) -> Incomplete: ... - def readSol(self, filename: Incomplete) -> Incomplete: ... - def readSolFile(self, filename: Incomplete) -> Incomplete: ... - def redirectOutput(self) -> Incomplete: ... - def relax(self) -> Incomplete: ... - def releaseRow(self, row: Incomplete) -> Incomplete: ... - def repropagateNode(self, node: Incomplete) -> Incomplete: ... - def resetParam(self, name: Incomplete) -> Incomplete: ... - def resetParams(self) -> Incomplete: ... - def restartSolve(self) -> Incomplete: ... + self, filename: str | os.PathLike[str], extension: str | None = None + ) -> None: ... + def readSol(self, filename: str | os.PathLike[str]) -> None: ... + def readSolFile(self, filename: str | os.PathLike[str]) -> Solution: ... + def redirectOutput(self) -> None: ... + def relax(self) -> None: ... + def releaseRow(self, row: Row) -> None: ... + def repropagateNode(self, node: Node) -> None: ... + def resetParam(self, name: str) -> None: ... + def resetParams(self) -> None: ... + def restartSolve(self) -> None: ... def separateSol( self, - sol: Incomplete = ..., - pretendroot: Incomplete = ..., - allowlocal: Incomplete = ..., - onlydelayed: Incomplete = ..., - ) -> Incomplete: ... + sol: Solution | None = None, + pretendroot: bool = False, + allowlocal: bool = True, + onlydelayed: bool = False, + ) -> tuple[bool, bool]: ... def setBendersSubproblemIsConvex( - self, benders: Incomplete, probnumber: Incomplete, isconvex: Incomplete = ... - ) -> Incomplete: ... - def setBoolParam(self, name: Incomplete, value: Incomplete) -> Incomplete: ... - def setCharParam(self, name: Incomplete, value: Incomplete) -> Incomplete: ... - def setCheck(self, cons: Incomplete, newCheck: Incomplete) -> Incomplete: ... - def setEmphasis( - self, paraemphasis: Incomplete, quiet: Incomplete = ... - ) -> Incomplete: ... - def setEnforced(self, cons: Incomplete, newEnf: Incomplete) -> Incomplete: ... - def setHeurTiming( - self, heurname: Incomplete, heurtiming: Incomplete - ) -> Incomplete: ... - def setHeuristics(self, setting: Incomplete) -> Incomplete: ... - def setInitial(self, cons: Incomplete, newInit: Incomplete) -> Incomplete: ... - def setIntParam(self, name: Incomplete, value: Incomplete) -> Incomplete: ... - def setLogfile(self, path: Incomplete) -> Incomplete: ... - def setLongintParam(self, name: Incomplete, value: Incomplete) -> Incomplete: ... - def setMaximize(self) -> Incomplete: ... - def setMinimize(self) -> Incomplete: ... - def setModifiable(self, cons: Incomplete, newMod: Incomplete) -> Incomplete: ... - def setObjIntegral(self) -> Incomplete: ... + self, benders: Benders, probnumber: int, isconvex: bool = True + ) -> None: ... + def setBoolParam(self, name: str, value: float) -> None: ... + def setCharParam(self, name: str, value: str) -> None: ... + def setCheck(self, cons: Constraint, newCheck: bool) -> None: ... + def setEmphasis(self, paraemphasis: Incomplete, quiet: bool = True) -> None: ... + def setEnforced(self, cons: Constraint, newEnf: bool) -> None: ... + def setHeurTiming(self, heurname: str, heurtiming: Incomplete) -> None: ... + def setHeuristics(self, setting: Incomplete) -> None: ... + def setInitial(self, cons: Constraint, newInit: bool) -> None: ... + def setIntParam(self, name: str, value: int) -> None: ... + def setLogfile(self, path: str | None) -> None: ... + def setLongintParam(self, name: str, value: int) -> None: ... + def setMaximize(self) -> None: ... + def setMinimize(self) -> None: ... + def setModifiable(self, cons: Constraint, newMod: bool) -> None: ... + def setObjIntegral(self) -> None: ... def setObjective( - self, expr: Incomplete, sense: Incomplete = ..., clear: Incomplete = ... - ) -> Incomplete: ... - def setObjlimit(self, objlimit: Incomplete) -> Incomplete: ... - def setParam(self, name: Incomplete, value: Incomplete) -> Incomplete: ... - def setParams(self, params: Incomplete) -> Incomplete: ... - def setParamsCountsols(self) -> Incomplete: ... - def setPresolve(self, setting: Incomplete) -> Incomplete: ... - def setProbName(self, name: Incomplete) -> Incomplete: ... - def setRealParam(self, name: Incomplete, value: Incomplete) -> Incomplete: ... - def setRelaxSolVal(self, var: Incomplete, val: Incomplete) -> Incomplete: ... - def setRemovable(self, cons: Incomplete, newRem: Incomplete) -> Incomplete: ... - def setSeparating(self, setting: Incomplete) -> Incomplete: ... - def setSolVal( - self, solution: Incomplete, var: Incomplete, val: Incomplete - ) -> Incomplete: ... - def setStringParam(self, name: Incomplete, value: Incomplete) -> Incomplete: ... + self, + expr: Expr | SupportsFloat, + sense: Literal["minimize", "maximize"] = "minimize", + clear: bool | Literal["true"] = "true", # TODO: typo? + ) -> None: ... + def setObjlimit(self, objlimit: float) -> None: ... + def setParam(self, name: str, value: object) -> None: ... + def setParams(self, params: Mapping[str, bool | float | str]) -> None: ... + def setParamsCountsols(self) -> None: ... + def setPresolve(self, setting: Incomplete) -> None: ... + def setProbName(self, name: str) -> None: ... + def setRealParam(self, name: str, value: float) -> None: ... + def setRelaxSolVal(self, var: Variable, val: float) -> None: ... + def setRemovable(self, cons: Constraint, newRem: bool) -> None: ... + def setSeparating(self, setting: Incomplete) -> None: ... + def setSolVal(self, solution: Solution, var: Variable, val: float) -> None: ... + def setStringParam(self, name: str, value: str) -> None: ... def setupBendersSubproblem( self, - probnumber: Incomplete, - benders: Incomplete = ..., - solution: Incomplete = ..., + probnumber: int, + benders: Benders | None = None, + solution: Solution | None = None, checktype: Incomplete = ..., - ) -> Incomplete: ... + ) -> None: ... def solveBendersSubproblem( self, - probnumber: Incomplete, - solvecip: Incomplete, - benders: Incomplete = ..., - solution: Incomplete = ..., - ) -> Incomplete: ... - def solveConcurrent(self) -> Incomplete: ... - def solveDiveLP(self, itlim: Incomplete = ...) -> Incomplete: ... - def solveProbingLP(self, itlim: Incomplete = ...) -> Incomplete: ... + probnumber: int, + solvecip: bool, + benders: Benders | None = None, + solution: Solution | None = None, + ) -> tuple[bool, float | None]: ... + def solveConcurrent(self) -> None: ... + def solveDiveLP(self, itlim: int = -1) -> tuple[bool, bool]: ... + def solveProbingLP(self, itlim: int = -1) -> tuple[bool, bool]: ... def solveProbingLPWithPricing( self, pretendroot: Incomplete = ..., displayinfo: Incomplete = ..., maxpricerounds: Incomplete = ..., ) -> Incomplete: ... - def sortAndCons(self, and_cons: Incomplete) -> Incomplete: ... - def startDive(self) -> Incomplete: ... - def startProbing(self) -> Incomplete: ... - def startStrongbranch(self) -> Incomplete: ... + def sortAndCons(self, and_cons: Constraint) -> None: ... + def startDive(self) -> None: ... + def startProbing(self) -> None: ... + def startStrongbranch(self) -> None: ... def tightenVarLb( - self, var: Incomplete, lb: Incomplete, force: Incomplete = ... - ) -> Incomplete: ... + self, var: Variable, lb: float, force: bool = False + ) -> tuple[bool, bool]: ... def tightenVarLbGlobal( - self, var: Incomplete, lb: Incomplete, force: Incomplete = ... - ) -> Incomplete: ... + self, var: Variable, lb: float, force: bool = False + ) -> tuple[bool, bool]: ... def tightenVarUb( - self, var: Incomplete, ub: Incomplete, force: Incomplete = ... - ) -> Incomplete: ... + self, var: Variable, ub: float, force: bool = False + ) -> tuple[bool, bool]: ... def tightenVarUbGlobal( - self, var: Incomplete, ub: Incomplete, force: Incomplete = ... - ) -> Incomplete: ... - def to_ptr(self, give_ownership: Incomplete) -> Incomplete: ... + self, var: Variable, ub: float, force: bool = False + ) -> tuple[bool, bool]: ... + def to_ptr(self, give_ownership: bool) -> CapsuleType: ... def translateSubSol( - self, sub_model: Incomplete, sol: Incomplete, heur: Incomplete - ) -> Incomplete: ... + self, sub_model: Model, sol: Solution, heur: Heur + ) -> Solution: ... def trySol( self, - solution: Incomplete, - printreason: Incomplete = ..., - completely: Incomplete = ..., - checkbounds: Incomplete = ..., - checkintegrality: Incomplete = ..., - checklprows: Incomplete = ..., - free: Incomplete = ..., - ) -> Incomplete: ... + solution: Solution, + printreason: bool = True, + completely: bool = False, + checkbounds: bool = True, + checkintegrality: bool = True, + checklprows: bool = True, + free: bool = True, + ) -> bool: ... def updateBendersLowerbounds( - self, lowerbounds: Incomplete, benders: Incomplete = ... - ) -> Incomplete: ... - def updateNodeLowerbound(self, node: Incomplete, lb: Incomplete) -> Incomplete: ... + self, lowerbounds: dict[int, float], benders: Benders | None = None + ) -> None: ... + def updateNodeLowerbound(self, node: Node, lb: float) -> None: ... def updateVarPseudocost( - self, - var: Incomplete, - valdelta: Incomplete, - objdelta: Incomplete, - weight: Incomplete, - ) -> Incomplete: ... - def version(self) -> Incomplete: ... + self, var: Variable, valdelta: float, objdelta: float, weight: float + ) -> None: ... + def version(self) -> float: ... def writeBestSol( - self, filename: Incomplete = ..., write_zeros: Incomplete = ... - ) -> Incomplete: ... + self, + filename: str | bytes | os.PathLike[AnyStr] = "origprob.sol", + write_zeros: bool = False, + ) -> None: ... def writeBestTransSol( - self, filename: Incomplete = ..., write_zeros: Incomplete = ... - ) -> Incomplete: ... - def writeLP(self, filename: Incomplete = ...) -> Incomplete: ... + self, + filename: str | bytes | os.PathLike[AnyStr] = "transprob.sol", + write_zeros: bool = False, + ) -> None: ... + def writeLP(self, filename: str | os.PathLike[str] = "LP.lp") -> None: ... def writeMIP( self, - filename: Incomplete, - genericnames: Incomplete = ..., - origobj: Incomplete = ..., - lazyconss: Incomplete = ..., - ) -> Incomplete: ... - def writeName(self, var: Incomplete) -> Incomplete: ... + filename: str | os.PathLike[str], + genericnames: bool = False, + origobj: bool = False, + lazyconss: bool = False, + ) -> None: ... + def writeName(self, var: Variable) -> None: ... def writeParams( self, - filename: Incomplete = ..., - comments: Incomplete = ..., - onlychanged: Incomplete = ..., - verbose: Incomplete = ..., - ) -> Incomplete: ... + filename: str | os.PathLike[str] = "param.set", + comments: bool = True, + onlychanged: bool = True, + verbose: bool = True, + ) -> None: ... def writeProblem( self, - filename: Incomplete = ..., - trans: Incomplete = ..., - genericnames: Incomplete = ..., - verbose: Incomplete = ..., - ) -> Incomplete: ... + filename: str | os.PathLike[str] = "model.cip", + trans: bool = False, + genericnames: bool = False, + verbose: bool = True, + ) -> None: ... def writeSol( self, - solution: Incomplete, - filename: Incomplete = ..., - write_zeros: Incomplete = ..., - ) -> Incomplete: ... - def writeStatistics(self, filename: Incomplete = ...) -> Incomplete: ... - def writeStatisticsJson(self, filename: Incomplete = ...) -> Incomplete: ... + solution: Solution, + filename: str | bytes | os.PathLike[AnyStr] = "origprob.sol", + write_zeros: bool = False, + ) -> None: ... + def writeStatistics( + self, filename: str | bytes | os.PathLike[AnyStr] = "origprob.stats" + ) -> None: ... + def writeStatisticsJson( + self, filename: str | os.PathLike[str] = "origprob.stats.json" + ) -> None: ... def writeTransSol( self, - solution: Incomplete, - filename: Incomplete = ..., - write_zeros: Incomplete = ..., - ) -> Incomplete: ... + solution: Solution, + filename: str | bytes | os.PathLike[AnyStr] = "transprob.sol", + write_zeros: bool = False, + ) -> None: ... def __eq__(self, other: object, /) -> bool: ... def __ge__(self, other: object, /) -> bool: ... def __gt__(self, other: object, /) -> bool: ...