Skip to content

API Reference

This page documents every public symbol in the cyhighs package. The descriptions are generated from the docstrings in the source.

Solver interfaces

cyhighs.solve_linear_problem

solve_linear_problem(
    objective_coefficients,
    *,
    constraint_matrix_values=None,
    constraint_matrix_row_indices=None,
    constraint_matrix_column_pointers=None,
    constraint_lower_bounds=None,
    constraint_upper_bounds=None,
    variable_lower_bounds=None,
    variable_upper_bounds=None,
    integrality=None,
    initial_column_values=None,
    objective_sense: ObjectiveSense | int = MINIMIZE,
    options=None,
) -> LinearProblemSolution

Solve minimize c @ x subject to linear constraints and bounds.

This is the thin low level interface. It maps almost one to one onto the HiGHS C API, so the constraint matrix must already be a single matrix in compressed sparse column form together with per row lower and upper bounds. The problem solved is:

optimize   objective_coefficients @ x
subject to constraint_lower_bounds <= A @ x <= constraint_upper_bounds
           variable_lower_bounds <= x <= variable_upper_bounds

Inequality and equality constraints are both expressed through the row bounds. An inequality row A_i @ x <= b_i uses a lower bound of negative infinity and an upper bound of b_i, while an equality row uses equal lower and upper bounds. The convenience wrapper solve_linear_problem_sparse builds this merged form from separate inequality and equality matrices.

Parameters:

Name Type Description Default
objective_coefficients

The objective coefficient vector c of length number_of_columns.

required
constraint_matrix_values

The A matrix stored values in CSC form.

None
constraint_matrix_row_indices

The A matrix row indices in CSC form.

None
constraint_matrix_column_pointers

The A matrix column pointers in CSC form. The three constraint matrix arrays must be given together, or all omitted for a problem with no constraints.

None
constraint_lower_bounds

Per row lower bounds. Required when the constraint matrix is given.

None
constraint_upper_bounds

Per row upper bounds. Required when the constraint matrix is given, and must match the lower bounds length.

None
variable_lower_bounds

Per variable lower bounds. Default to negative infinity, meaning free below.

None
variable_upper_bounds

Per variable upper bounds. Default to positive infinity, meaning free above.

None
integrality

Per variable integrality using VariableType values. When omitted the problem is solved as a pure linear program.

None
initial_column_values

A warm start solution for the variables.

None
objective_sense ObjectiveSense | int

Whether to minimize (default) or maximize the objective.

MINIMIZE
options

Solver options as a mapping from HighsOption to a value. Unlike raw HiGHS, HighsOption.OUTPUT_FLAG defaults to False here, so the solver is silent unless it is explicitly set.

None

Returns:

Type Description
LinearProblemSolution

The LinearProblemSolution record.

cyhighs.solve_linear_problem_sparse

solve_linear_problem_sparse(
    objective_coefficients,
    *,
    inequality_constraint_matrix=None,
    inequality_upper_bounds=None,
    equality_constraint_matrix=None,
    equality_right_hand_sides=None,
    variable_lower_bounds=None,
    variable_upper_bounds=None,
    integrality=None,
    initial_column_values=None,
    objective_sense: ObjectiveSense | int = MINIMIZE,
    options=None,
) -> LinearProblemSolution

Solve a linear or mixed integer program with SciPy sparse matrices.

Minimizes c @ x subject to A_ub @ x <= b_ub, A_eq @ x == b_eq and the variable bounds. The two constraint matrices are merged internally into the row bounded form used by solve_linear_problem.

Parameters:

Name Type Description Default
objective_coefficients

The objective coefficient vector c.

required
inequality_constraint_matrix

The inequality matrix A_ub in any sparse format.

None
inequality_upper_bounds

The right hand side vector b_ub. Required when A_ub is given.

None
equality_constraint_matrix

The equality matrix A_eq in any sparse format. When both matrices are given they must share the same sparse format.

None
equality_right_hand_sides

The right hand side vector b_eq. Required when A_eq is given.

None
variable_lower_bounds

Per variable lower bounds.

None
variable_upper_bounds

Per variable upper bounds.

None
integrality

Per variable integrality using VariableType values.

None
initial_column_values

A warm start solution.

None
objective_sense ObjectiveSense | int

Whether to minimize (default) or maximize.

MINIMIZE
options

Solver options as a mapping from HighsOption to a value.

None

Returns:

Type Description
LinearProblemSolution

The LinearProblemSolution record.

cyhighs.linprog

linprog(
    c,
    A_ub=None,
    b_ub=None,
    A_eq=None,
    b_eq=None,
    bounds=None,
    method: str = "highs",
    x0=None,
    integrality=None,
    options=None,
)

Solve a linear program with a SciPy linprog compatible interface.

Minimizes c @ x subject to A_ub @ x <= b_ub, A_eq @ x == b_eq and the given variable bounds. Constraint matrices may be dense array likes or SciPy sparse matrices.

Parameters:

Name Type Description Default
c

Coefficients of the linear objective to minimize.

required
A_ub

Inequality constraint matrix.

None
b_ub

Inequality right hand side.

None
A_eq

Equality constraint matrix.

None
b_eq

Equality right hand side.

None
bounds

Bounds on the variables following the SciPy convention. Defaults to (0, None) for every variable.

None
method str

Present for SciPy compatibility. Only HiGHS is used, so this is accepted and otherwise ignored.

'highs'
x0

A warm start solution, wired to the HiGHS warm start.

None
integrality

Per variable integrality using the SciPy convention, which matches the VariableType values.

None
options

Solver options as a mapping from HighsOption to a value.

None

Returns:

Type Description

An OptimizeResult with x, fun, slack,

con, status, success, message, nit and highs_solution

fields.

The solution record

cyhighs.LinearProblemSolution

Bases: NamedTuple

The outcome of solving a linear or mixed integer program.

The field names follow HiGHS terminology. Columns are decision variables and rows are constraints. For mixed integer problems the dual value and row value fields are set to None, since dual information is not defined there.

Attributes:

Name Type Description
model_status ModelStatus

The status HiGHS reported for the solve, as a ModelStatus value.

column_values ndarray

The solution vector x, one value per variable.

objective_value float

The objective value at the returned solution.

column_dual_values ndarray | None

The reduced costs, one per variable. None for mixed integer problems.

row_dual_values ndarray | None

The dual values of the constraints, one per row. None for mixed integer problems.

row_values ndarray | None

The activity of each constraint row, that is the left hand side value at the solution. None for mixed integer problems.

simplex_iteration_count int

The number of simplex iterations performed, or -1 if not available.

presolved_num_columns int

The number of columns in the presolved model. Equal to column_values's length if presolve was off or made no reductions.

presolved_num_rows int

The number of rows in the presolved model. Equal to row_values's length if presolve was off or made no reductions.

presolved_num_nonzeros int

The number of nonzeros in the constraint matrix of the presolved model.

is_optimal property

is_optimal: bool

Return True if HiGHS proved the returned solution optimal.

cyhighs.OptimizeResult

Bases: NamedTuple

SciPy linprog shaped result, returned by linprog.

Carries the same field names scipy.optimize.OptimizeResult exposes for a linprog call, plus a highs_solution field with the full HiGHS solve result.

Attributes:

Name Type Description
x ndarray

The solution vector.

fun float

The objective value at the returned solution.

slack ndarray

The slack in each inequality constraint, b_ub - A_ub @ x.

con ndarray

The residual of each equality constraint, A_eq @ x - b_eq.

status int

SciPy convention status code: 0 optimal, 1 iteration or time limit, 2 infeasible, 3 unbounded, 4 numerical or other failure.

success bool

True if status is 0.

message str

Human readable description of status.

nit int

The number of solver iterations performed.

highs_solution LinearProblemSolution

The full LinearProblemSolution HiGHS returned for this solve.

Enumerations

cyhighs.ObjectiveSense

Bases: IntEnum

Direction in which the objective function is optimized.

Mirrors the kHighsObjSense constants.

MAXIMIZE class-attribute instance-attribute

MAXIMIZE = -1

Maximize the objective.

MINIMIZE class-attribute instance-attribute

MINIMIZE = 1

Minimize the objective. This is the default and the convention the package interface is documented against.

cyhighs.VariableType

Bases: IntEnum

Integrality domain of a single decision variable.

Mirrors the kHighsVarType constants. This is what HiGHS calls integrality, and the values are used directly in the integrality array passed to Highs_passMip.

CONTINUOUS class-attribute instance-attribute

CONTINUOUS = 0

The variable may take any real value within its bounds.

IMPLICIT_INTEGER class-attribute instance-attribute

IMPLICIT_INTEGER = 4

The variable is continuous but known to take an integer value at the optimum. This is used internally by HiGHS and is rarely set by callers.

INTEGER class-attribute instance-attribute

INTEGER = 1

The variable must take an integer value within its bounds.

SEMI_CONTINUOUS class-attribute instance-attribute

SEMI_CONTINUOUS = 2

The variable is either zero or a real value within its bounds. A finite upper bound is required by HiGHS for semi continuous variables.

SEMI_INTEGER class-attribute instance-attribute

SEMI_INTEGER = 3

The variable is either zero or an integer value within its bounds. A finite upper bound is required by HiGHS for semi integer variables.

cyhighs.ModelStatus

Bases: IntEnum

Outcome reported by HiGHS after a solve.

Mirrors the kHighsModelStatus constants from HiGHS 1.15.1. The most commonly inspected values are OPTIMAL, INFEASIBLE and UNBOUNDED.

INFEASIBLE class-attribute instance-attribute

INFEASIBLE = 8

The model has no feasible solution.

INTERRUPT class-attribute instance-attribute

INTERRUPT = 17

The solve was interrupted by the user.

ITERATION_LIMIT class-attribute instance-attribute

ITERATION_LIMIT = 14

The solve stopped because the iteration limit was reached.

LOAD_ERROR class-attribute instance-attribute

LOAD_ERROR = 1

The model could not be loaded.

MODEL_EMPTY class-attribute instance-attribute

MODEL_EMPTY = 6

The model contains no variables and no constraints.

MODEL_ERROR class-attribute instance-attribute

MODEL_ERROR = 2

The model is invalid, for example because of inconsistent dimensions.

NOTSET class-attribute instance-attribute

NOTSET = 0

No status has been set. Seen when a solve has not been run.

OBJECTIVE_BOUND class-attribute instance-attribute

OBJECTIVE_BOUND = 11

The solve stopped because the objective reached a supplied bound.

OBJECTIVE_TARGET class-attribute instance-attribute

OBJECTIVE_TARGET = 12

The solve stopped because the objective reached a supplied target.

OPTIMAL class-attribute instance-attribute

OPTIMAL = 7

An optimal solution was found.

POSTSOLVE_ERROR class-attribute instance-attribute

POSTSOLVE_ERROR = 5

An error occurred during postsolve.

PRESOLVE_ERROR class-attribute instance-attribute

PRESOLVE_ERROR = 3

An error occurred during presolve.

SOLUTION_LIMIT class-attribute instance-attribute

SOLUTION_LIMIT = 16

The solve stopped because the solution count limit was reached.

SOLVE_ERROR class-attribute instance-attribute

SOLVE_ERROR = 4

An error occurred during the main solve.

TIME_LIMIT class-attribute instance-attribute

TIME_LIMIT = 13

The solve stopped because the time limit was reached.

UNBOUNDED class-attribute instance-attribute

UNBOUNDED = 10

The objective is unbounded, so no finite optimum exists.

UNBOUNDED_OR_INFEASIBLE class-attribute instance-attribute

UNBOUNDED_OR_INFEASIBLE = 9

The model is either unbounded or infeasible. HiGHS could not distinguish the two, often because presolve detected the condition.

UNKNOWN class-attribute instance-attribute

UNKNOWN = 15

The status could not be determined.

cyhighs.PresolveRule

Bases: IntEnum

A presolve reduction rule, identified by its bit position.

Mirrors the PresolveRuleType constants from HiGHS 1.15.1. Each member's value is the bit position HiGHS uses for that rule in the HighsOption.PRESOLVE_RULE_OFF bitmask and in HighsOption.PRESOLVE_RULE_TEST. Use PresolveRule.mask to combine rules into a bitmask rather than shifting bits by hand, for example:

{HighsOption.PRESOLVE_RULE_OFF: PresolveRule.mask(PresolveRule.PROBING, PresolveRule.SPARSIFY)}

EMPTY_ROW through DOMINATED_COL are always active in HiGHS and cannot actually be turned off through the bitmask, only FORCING_ROW onward can.

AGGREGATOR class-attribute instance-attribute

AGGREGATOR = 12

Substitute out columns by aggregating rows.

COL_STUFFING class-attribute instance-attribute

COL_STUFFING = 18

Fix columns to their best bound when doing so cannot cause infeasibility.

DEPENDENT_EQUATIONS class-attribute instance-attribute

DEPENDENT_EQUATIONS = 10

Remove equations that are linearly dependent on other equations.

DEPENDENT_FREE_COLS class-attribute instance-attribute

DEPENDENT_FREE_COLS = 11

Remove free columns that are linearly dependent on other columns.

DOMINATED_COL class-attribute instance-attribute

DOMINATED_COL = 5

Fix columns whose cost and bounds mean one bound is always optimal.

DOUBLETON_EQUATION class-attribute instance-attribute

DOUBLETON_EQUATION = 9

Substitute out one column of an equation with exactly two columns.

DUAL_FIXING class-attribute instance-attribute

DUAL_FIXING = 17

Fix columns whose reduced cost sign forces them to a bound.

EMPTY_COL class-attribute instance-attribute

EMPTY_COL = 3

Remove columns with no nonzero coefficients by fixing them.

EMPTY_ROW class-attribute instance-attribute

EMPTY_ROW = 0

Remove rows with no nonzero coefficients.

ENUMERATION class-attribute instance-attribute

ENUMERATION = 16

Solve small independent components of the model by enumeration.

FIXED_COL class-attribute instance-attribute

FIXED_COL = 4

Substitute out columns whose bounds force a single value.

FORCING_COL class-attribute instance-attribute

FORCING_COL = 7

Remove columns whose bounds force every row containing them.

FORCING_ROW class-attribute instance-attribute

FORCING_ROW = 6

Remove rows whose bounds force every column in the row to a bound.

FREE_COL_SUBSTITUTION class-attribute instance-attribute

FREE_COL_SUBSTITUTION = 8

Substitute out free columns using a row they appear in.

INITIAL_SWEEP class-attribute instance-attribute

INITIAL_SWEEP = 19

The initial sweep that removes empty rows and columns.

PARALLEL_ROWS_AND_COLS class-attribute instance-attribute

PARALLEL_ROWS_AND_COLS = 13

Merge rows or columns that are parallel to one another.

PROBING class-attribute instance-attribute

PROBING = 15

Fix binary variables whose value can be deduced by probing.

REDUNDANT_ROW class-attribute instance-attribute

REDUNDANT_ROW = 2

Remove rows implied by the bounds of their columns.

SINGLETON_ROW class-attribute instance-attribute

SINGLETON_ROW = 1

Remove rows with a single nonzero coefficient by bounding the column.

SPARSIFY class-attribute instance-attribute

SPARSIFY = 14

Reduce fill-in by combining rows to cancel out matrix entries.

mask classmethod

mask(*rules: PresolveRule) -> int

Combine rules into the bitmask presolve_rule_off expects.

For example, PresolveRule.mask(PresolveRule.PROBING, PresolveRule.SPARSIFY) disables just those two rules.

Options

cyhighs.HighsOption

Bases: Enum

A HiGHS option together with its name and value kind.

The enumeration value is a (name, kind) pair. name is the string the HiGHS C API expects and kind is one of the OPTION_KIND_* labels.

ALLOWED_COST_SCALE_FACTOR class-attribute instance-attribute

ALLOWED_COST_SCALE_FACTOR = (
    "allowed_cost_scale_factor",
    OPTION_KIND_INT,
)

Largest power-of-two factor permitted when scaling the costs. Integer, default 0.

ALLOWED_MATRIX_SCALE_FACTOR class-attribute instance-attribute

ALLOWED_MATRIX_SCALE_FACTOR = (
    "allowed_matrix_scale_factor",
    OPTION_KIND_INT,
)

Largest power-of-two factor permitted when scaling the constraint matrix. Integer, default 20.

ALLOW_UNBOUNDED_OR_INFEASIBLE class-attribute instance-attribute

ALLOW_UNBOUNDED_OR_INFEASIBLE = (
    "allow_unbounded_or_infeasible",
    OPTION_KIND_BOOL,
)

Whether ModelStatus.UNBOUNDED_OR_INFEASIBLE may be reported when presolve cannot distinguish the two. Boolean, default False.

BLEND_MULTI_OBJECTIVES class-attribute instance-attribute

BLEND_MULTI_OBJECTIVES = (
    "blend_multi_objectives",
    OPTION_KIND_BOOL,
)

Blend multiple objectives or apply lexicographically. Boolean, default True.

CENTRING_RATIO_TOLERANCE class-attribute instance-attribute

CENTRING_RATIO_TOLERANCE = (
    "centring_ratio_tolerance",
    OPTION_KIND_DOUBLE,
)

Centring stops when the ratio max(x_js_j) / min(x_js_j) is below this tolerance. Double, default 100.

COST_SCALE_FACTOR class-attribute instance-attribute

COST_SCALE_FACTOR = ('cost_scale_factor', OPTION_KIND_INT)

Scaling factor for costs. Integer, default 0.

DUAL_FEASIBILITY_TOLERANCE class-attribute instance-attribute

DUAL_FEASIBILITY_TOLERANCE = (
    "dual_feasibility_tolerance",
    OPTION_KIND_DOUBLE,
)

Tolerance for dual feasibility. Double, default 1e-7.

DUAL_RESIDUAL_TOLERANCE class-attribute instance-attribute

DUAL_RESIDUAL_TOLERANCE = (
    "dual_residual_tolerance",
    OPTION_KIND_DOUBLE,
)

Dual residual tolerance. Double, default 1e-7.

DUAL_SIMPLEX_COST_PERTURBATION_MULTIPLIER class-attribute instance-attribute

DUAL_SIMPLEX_COST_PERTURBATION_MULTIPLIER = (
    "dual_simplex_cost_perturbation_multiplier",
    OPTION_KIND_DOUBLE,
)

Dual simplex cost perturbation multiplier. 0 means no perturbation. Double, default 1.0.

DUAL_SIMPLEX_PIVOT_GROWTH_TOLERANCE class-attribute instance-attribute

DUAL_SIMPLEX_PIVOT_GROWTH_TOLERANCE = (
    "dual_simplex_pivot_growth_tolerance",
    OPTION_KIND_DOUBLE,
)

Dual simplex pivot growth tolerance. Double, default 1e-9.

DUAL_STEEPEST_EDGE_WEIGHT_ERROR_TOLERANCE class-attribute instance-attribute

DUAL_STEEPEST_EDGE_WEIGHT_ERROR_TOLERANCE = (
    "dual_steepest_edge_weight_error_tolerance",
    OPTION_KIND_DOUBLE,
)

Tolerance on dual steepest edge weight errors. Double, default infinity.

DUAL_STEEPEST_EDGE_WEIGHT_LOG_ERROR_THRESHOLD class-attribute instance-attribute

DUAL_STEEPEST_EDGE_WEIGHT_LOG_ERROR_THRESHOLD = (
    "dual_steepest_edge_weight_log_error_threshold",
    OPTION_KIND_DOUBLE,
)

Threshold on dual steepest edge weight errors for the Devex switch. Double, default 10.

FACTOR_PIVOT_THRESHOLD class-attribute instance-attribute

FACTOR_PIVOT_THRESHOLD = (
    "factor_pivot_threshold",
    OPTION_KIND_DOUBLE,
)

Matrix factorization pivot threshold. Double, default 0.1.

FACTOR_PIVOT_TOLERANCE class-attribute instance-attribute

FACTOR_PIVOT_TOLERANCE = (
    "factor_pivot_tolerance",
    OPTION_KIND_DOUBLE,
)

Matrix factorization pivot tolerance. Double, default 1e-10.

GLPSOL_COST_ROW_LOCATION class-attribute instance-attribute

GLPSOL_COST_ROW_LOCATION = (
    "glpsol_cost_row_location",
    OPTION_KIND_INT,
)

Location of cost row for Glpsol file: -2 => Last; -1 => None; 0 => None if empty, otherwise data file location; 1 <= n <= num_row => Location n; n > num_row => Last. Integer, default 0.

HIGHS_ANALYSIS_LEVEL class-attribute instance-attribute

HIGHS_ANALYSIS_LEVEL = (
    "highs_analysis_level",
    OPTION_KIND_INT,
)

Analysis level in HiGHS. Integer, default 0.

HIGHS_DEBUG_LEVEL class-attribute instance-attribute

HIGHS_DEBUG_LEVEL = ('highs_debug_level', OPTION_KIND_INT)

Internal debugging verbosity from 0 to 3. Integer, default 0.

HIPO_BLOCK_SIZE class-attribute instance-attribute

HIPO_BLOCK_SIZE = ('hipo_block_size', OPTION_KIND_INT)

Block size for dense linear algebra within HiPO. Integer, default 128.

HIPO_ORDERING class-attribute instance-attribute

HIPO_ORDERING = ('hipo_ordering', OPTION_KIND_STRING)

HiPO matrix reordering: "choose", "metis", "amd" or "rcm". String, default "choose".

HIPO_PARALLEL_TYPE class-attribute instance-attribute

HIPO_PARALLEL_TYPE = (
    "hipo_parallel_type",
    OPTION_KIND_STRING,
)

HiPO parallelism: "tree", "node" or "both". String, default "both".

HIPO_SYSTEM class-attribute instance-attribute

HIPO_SYSTEM = ('hipo_system', OPTION_KIND_STRING)

HiPO Newton system: "choose", "augmented" or "normaleq". String, default "choose".

ICRASH class-attribute instance-attribute

ICRASH = ('icrash', OPTION_KIND_BOOL)

Run iCrash. Boolean, default False.

ICRASH_APPROX_ITER class-attribute instance-attribute

ICRASH_APPROX_ITER = ("icrash_approx_iter", OPTION_KIND_INT)

iCrash approximate minimization iterations. Integer, default 50.

ICRASH_BREAKPOINTS class-attribute instance-attribute

ICRASH_BREAKPOINTS = (
    "icrash_breakpoints",
    OPTION_KIND_BOOL,
)

Exact subproblem solution for iCrash. Boolean, default False.

ICRASH_DUALIZE class-attribute instance-attribute

ICRASH_DUALIZE = ('icrash_dualize', OPTION_KIND_BOOL)

Dualize strategy for iCrash. Boolean, default False.

ICRASH_EXACT class-attribute instance-attribute

ICRASH_EXACT = ('icrash_exact', OPTION_KIND_BOOL)

Exact subproblem solution for iCrash. Boolean, default False.

ICRASH_ITERATIONS class-attribute instance-attribute

ICRASH_ITERATIONS = ('icrash_iterations', OPTION_KIND_INT)

iCrash iterations. Integer, default 30.

ICRASH_STARTING_WEIGHT class-attribute instance-attribute

ICRASH_STARTING_WEIGHT = (
    "icrash_starting_weight",
    OPTION_KIND_DOUBLE,
)

iCrash starting weight. Double, default 1e-3.

ICRASH_STRATEGY class-attribute instance-attribute

ICRASH_STRATEGY = ('icrash_strategy', OPTION_KIND_STRING)

Strategy for iCrash. String, default "ICA".

IIS_STRATEGY class-attribute instance-attribute

IIS_STRATEGY = ('iis_strategy', OPTION_KIND_INT)

Strategy for IIS calculation: 0 => Light test; 1 => Try dual ray; 2 => Try elastic LP; 4 => Prioritise columns; 8 => Find true IIS; 16 => Find relaxation IIS for MIP. Integer, default 0.

IIS_TIME_LIMIT class-attribute instance-attribute

IIS_TIME_LIMIT = ('iis_time_limit', OPTION_KIND_DOUBLE)

Time limit for computing IIS (seconds). Double, default infinity.

INFINITE_BOUND class-attribute instance-attribute

INFINITE_BOUND = ('infinite_bound', OPTION_KIND_DOUBLE)

Limit on |constraint bound|: values greater than or equal to this will be treated as infinite. Double, default 1e20.

INFINITE_COST class-attribute instance-attribute

INFINITE_COST = ('infinite_cost', OPTION_KIND_DOUBLE)

Limit on |cost coefficient|: values greater than or equal to this will be treated as infinite. Double, default 1e20.

IPM_ITERATION_LIMIT class-attribute instance-attribute

IPM_ITERATION_LIMIT = (
    "ipm_iteration_limit",
    OPTION_KIND_INT,
)

Iteration limit for IPM solver. Integer, default a very large value.

IPM_OPTIMALITY_TOLERANCE class-attribute instance-attribute

IPM_OPTIMALITY_TOLERANCE = (
    "ipm_optimality_tolerance",
    OPTION_KIND_DOUBLE,
)

IPM optimality tolerance. Double, default 1e-8.

IPX_DUALIZE_STRATEGY class-attribute instance-attribute

IPX_DUALIZE_STRATEGY = (
    "ipx_dualize_strategy",
    OPTION_KIND_INT,
)

Strategy for dualizing before IPX. Integer, default 2.

KEEP_N_ROWS class-attribute instance-attribute

KEEP_N_ROWS = ('keep_n_rows', OPTION_KIND_INT)

For multiple N-rows in MPS files: delete rows / delete entries / keep rows (-1/0/1). Integer, default -1.

KKT_TOLERANCE class-attribute instance-attribute

KKT_TOLERANCE = ('kkt_tolerance', OPTION_KIND_DOUBLE)

If changed from its default value, this tolerance is used for all feasibility and optimality (KKT) measures. Double, default 1e-7.

LARGE_MATRIX_VALUE class-attribute instance-attribute

LARGE_MATRIX_VALUE = (
    "large_matrix_value",
    OPTION_KIND_DOUBLE,
)

Upper limit on |matrix entries|: values greater than or equal to this will be treated as infinite. Double, default 1e15.

LESS_INFEASIBLE_DSE_CHECK class-attribute instance-attribute

LESS_INFEASIBLE_DSE_CHECK = (
    "less_infeasible_DSE_check",
    OPTION_KIND_BOOL,
)

Check whether the LP is a candidate for less infeasible dual steepest edge (LiDSE). Boolean, default True.

LESS_INFEASIBLE_DSE_CHOOSE_ROW class-attribute instance-attribute

LESS_INFEASIBLE_DSE_CHOOSE_ROW = (
    "less_infeasible_DSE_choose_row",
    OPTION_KIND_BOOL,
)

Use LiDSE if the LP has the right properties. Boolean, default True.

LOG_DEV_LEVEL class-attribute instance-attribute

LOG_DEV_LEVEL = ('log_dev_level', OPTION_KIND_INT)

Output development messages: 0 => none; 1 => info; 2 => detailed; 3 => verbose. Integer, default 0.

LOG_FILE class-attribute instance-attribute

LOG_FILE = ('log_file', OPTION_KIND_STRING)

Log file. String, default "".

LOG_GITHASH class-attribute instance-attribute

LOG_GITHASH = ('log_githash', OPTION_KIND_BOOL)

Log the githash. Boolean, default True.

LOG_TO_CONSOLE class-attribute instance-attribute

LOG_TO_CONSOLE = ('log_to_console', OPTION_KIND_BOOL)

Whether log messages are written to the console. Boolean, default True.

LP_PRESOLVE_REQUIRES_BASIS_POSTSOLVE class-attribute instance-attribute

LP_PRESOLVE_REQUIRES_BASIS_POSTSOLVE = (
    "lp_presolve_requires_basis_postsolve",
    OPTION_KIND_BOOL,
)

Prevents LP presolve steps for which postsolve cannot maintain a basis. Boolean, default True.

MAX_CENTRING_STEPS class-attribute instance-attribute

MAX_CENTRING_STEPS = ("max_centring_steps", OPTION_KIND_INT)

Maximum number of steps to use when computing the analytic centre. Integer, default 5.

MAX_DUAL_SIMPLEX_CLEANUP_LEVEL class-attribute instance-attribute

MAX_DUAL_SIMPLEX_CLEANUP_LEVEL = (
    "max_dual_simplex_cleanup_level",
    OPTION_KIND_INT,
)

Max level of dual simplex cleanup. Integer, default 1.

MAX_DUAL_SIMPLEX_PHASE1_CLEANUP_LEVEL class-attribute instance-attribute

MAX_DUAL_SIMPLEX_PHASE1_CLEANUP_LEVEL = (
    "max_dual_simplex_phase1_cleanup_level",
    OPTION_KIND_INT,
)

Max level of dual simplex phase 1 cleanup. Integer, default 2.

MIP_ABS_GAP class-attribute instance-attribute

MIP_ABS_GAP = ('mip_abs_gap', OPTION_KIND_DOUBLE)

Absolute optimality gap at which a mixed integer solve stops. Double, default 1e-6.

MIP_ALLOW_CUT_SEPARATION_AT_NODES class-attribute instance-attribute

MIP_ALLOW_CUT_SEPARATION_AT_NODES = (
    "mip_allow_cut_separation_at_nodes",
    OPTION_KIND_BOOL,
)

Whether cut separation at nodes other than the root node is permitted. Boolean, default True.

MIP_ALLOW_RESTART class-attribute instance-attribute

MIP_ALLOW_RESTART = ('mip_allow_restart', OPTION_KIND_BOOL)

Whether MIP restart is permitted. Boolean, default True.

MIP_DETECT_SYMMETRY class-attribute instance-attribute

MIP_DETECT_SYMMETRY = (
    "mip_detect_symmetry",
    OPTION_KIND_BOOL,
)

Whether MIP symmetry should be detected. Boolean, default True.

MIP_FEASIBILITY_TOLERANCE class-attribute instance-attribute

MIP_FEASIBILITY_TOLERANCE = (
    "mip_feasibility_tolerance",
    OPTION_KIND_DOUBLE,
)

Feasibility tolerance for integer variables. Double, default 1e-6.

MIP_HEURISTIC_EFFORT class-attribute instance-attribute

MIP_HEURISTIC_EFFORT = (
    "mip_heuristic_effort",
    OPTION_KIND_DOUBLE,
)

Effort spent for MIP heuristics. Double, default 0.05.

MIP_HEURISTIC_RUN_FEASIBILITY_JUMP class-attribute instance-attribute

MIP_HEURISTIC_RUN_FEASIBILITY_JUMP = (
    "mip_heuristic_run_feasibility_jump",
    OPTION_KIND_BOOL,
)

Use the feasibility jump heuristic. Boolean, default True.

MIP_HEURISTIC_RUN_RENS class-attribute instance-attribute

MIP_HEURISTIC_RUN_RENS = (
    "mip_heuristic_run_rens",
    OPTION_KIND_BOOL,
)

Use the RENS heuristic. Boolean, default True.

MIP_HEURISTIC_RUN_RINS class-attribute instance-attribute

MIP_HEURISTIC_RUN_RINS = (
    "mip_heuristic_run_rins",
    OPTION_KIND_BOOL,
)

Use the RINS heuristic. Boolean, default True.

MIP_HEURISTIC_RUN_ROOT_REDUCED_COST class-attribute instance-attribute

MIP_HEURISTIC_RUN_ROOT_REDUCED_COST = (
    "mip_heuristic_run_root_reduced_cost",
    OPTION_KIND_BOOL,
)

Use the rootReducedCost heuristic. Boolean, default True.

MIP_HEURISTIC_RUN_SHIFTING class-attribute instance-attribute

MIP_HEURISTIC_RUN_SHIFTING = (
    "mip_heuristic_run_shifting",
    OPTION_KIND_BOOL,
)

Use the Shifting heuristic. Boolean, default False.

MIP_HEURISTIC_RUN_ZI_ROUND class-attribute instance-attribute

MIP_HEURISTIC_RUN_ZI_ROUND = (
    "mip_heuristic_run_zi_round",
    OPTION_KIND_BOOL,
)

Use the ZI Round heuristic. Boolean, default False.

MIP_IMPROVING_SOLUTION_FILE class-attribute instance-attribute

MIP_IMPROVING_SOLUTION_FILE = (
    "mip_improving_solution_file",
    OPTION_KIND_STRING,
)

File for reporting improving MIP solutions. Not reported for an empty string. String, default "".

MIP_IMPROVING_SOLUTION_REPORT_SPARSE class-attribute instance-attribute

MIP_IMPROVING_SOLUTION_REPORT_SPARSE = (
    "mip_improving_solution_report_sparse",
    OPTION_KIND_BOOL,
)

Whether improving MIP solutions should be reported in sparse format. Boolean, default False.

MIP_IMPROVING_SOLUTION_SAVE class-attribute instance-attribute

MIP_IMPROVING_SOLUTION_SAVE = (
    "mip_improving_solution_save",
    OPTION_KIND_BOOL,
)

Whether improving MIP solutions should be saved. Boolean, default False.

MIP_IPM_SOLVER class-attribute instance-attribute

MIP_IPM_SOLVER = ('mip_ipm_solver', OPTION_KIND_STRING)

MIP IPM solver: "choose", "ipx" or "hipo". String, default "choose".

MIP_LIFTING_FOR_PROBING class-attribute instance-attribute

MIP_LIFTING_FOR_PROBING = (
    "mip_lifting_for_probing",
    OPTION_KIND_INT,
)

Level of lifting for probing that is used. Integer, default -1.

MIP_LP_AGE_LIMIT class-attribute instance-attribute

MIP_LP_AGE_LIMIT = ('mip_lp_age_limit', OPTION_KIND_INT)

Maximal age of dynamic LP rows before they are removed from the LP relaxation in the MIP solver. Integer, default 10.

MIP_LP_SOLVER class-attribute instance-attribute

MIP_LP_SOLVER = ('mip_lp_solver', OPTION_KIND_STRING)

MIP LP solver: "choose", "simplex", "ipm", "ipx" or "hipo". String, default "choose".

MIP_MAX_IMPROVING_SOLS class-attribute instance-attribute

MIP_MAX_IMPROVING_SOLS = (
    "mip_max_improving_sols",
    OPTION_KIND_INT,
)

Limit on the number of improving solutions found to stop the MIP solver prematurely. Integer, default a very large value.

MIP_MAX_LEAVES class-attribute instance-attribute

MIP_MAX_LEAVES = ('mip_max_leaves', OPTION_KIND_INT)

MIP solver max number of leaf nodes. Integer, default a very large value.

MIP_MAX_NODES class-attribute instance-attribute

MIP_MAX_NODES = ('mip_max_nodes', OPTION_KIND_INT)

Maximum number of branch and bound nodes. Integer, default a very large value.

MIP_MAX_STALL_NODES class-attribute instance-attribute

MIP_MAX_STALL_NODES = (
    "mip_max_stall_nodes",
    OPTION_KIND_INT,
)

MIP solver max number of nodes where estimate is above cutoff bound. Integer, default a very large value.

MIP_MAX_START_NODES class-attribute instance-attribute

MIP_MAX_START_NODES = (
    "mip_max_start_nodes",
    OPTION_KIND_INT,
)

MIP solver max number of nodes when completing a partial MIP start. Integer, default 500.

MIP_MIN_CLIQUETABLE_ENTRIES_FOR_PARALLELISM class-attribute instance-attribute

MIP_MIN_CLIQUETABLE_ENTRIES_FOR_PARALLELISM = (
    "mip_min_cliquetable_entries_for_parallelism",
    OPTION_KIND_INT,
)

Minimal number of entries in the MIP solver cliquetable before neighbourhood queries of the conflict graph use parallel processing. Integer, default 100000.

MIP_MIN_LOGGING_INTERVAL class-attribute instance-attribute

MIP_MIN_LOGGING_INTERVAL = (
    "mip_min_logging_interval",
    OPTION_KIND_DOUBLE,
)

MIP minimum logging interval. Double, default 5.

MIP_POOL_AGE_LIMIT class-attribute instance-attribute

MIP_POOL_AGE_LIMIT = ("mip_pool_age_limit", OPTION_KIND_INT)

Maximal age of rows in the MIP solver cutpool before they are deleted. Integer, default 30.

MIP_POOL_SOFT_LIMIT class-attribute instance-attribute

MIP_POOL_SOFT_LIMIT = (
    "mip_pool_soft_limit",
    OPTION_KIND_INT,
)

Soft limit on the number of rows in the MIP solver cutpool for dynamic age adjustment. Integer, default 10000.

MIP_PSCOST_MINRELIABLE class-attribute instance-attribute

MIP_PSCOST_MINRELIABLE = (
    "mip_pscost_minreliable",
    OPTION_KIND_INT,
)

Minimal number of observations before MIP solver pseudo costs are considered reliable. Integer, default 8.

MIP_REL_GAP class-attribute instance-attribute

MIP_REL_GAP = ('mip_rel_gap', OPTION_KIND_DOUBLE)

Relative optimality gap at which a mixed integer solve stops. Double, default 1e-4.

MIP_REPORT_LEVEL class-attribute instance-attribute

MIP_REPORT_LEVEL = ('mip_report_level', OPTION_KIND_INT)

MIP solver reporting level. Integer, default 1.

MIP_ROOT_PRESOLVE_ONLY class-attribute instance-attribute

MIP_ROOT_PRESOLVE_ONLY = (
    "mip_root_presolve_only",
    OPTION_KIND_BOOL,
)

Whether MIP presolve is only applied at the root node. Boolean, default False.

MIP_SEARCH_SIMULATE_CONCURRENCY class-attribute instance-attribute

MIP_SEARCH_SIMULATE_CONCURRENCY = (
    "mip_search_simulate_concurrency",
    OPTION_KIND_BOOL,
)

Simulate MIP search concurrency on a single thread. Boolean, default False.

MPS_PARSER_TYPE_FREE class-attribute instance-attribute

MPS_PARSER_TYPE_FREE = (
    "mps_parser_type_free",
    OPTION_KIND_BOOL,
)

Use the free format MPS file reader. Boolean, default True.

NO_UNNECESSARY_REBUILD_REFACTOR class-attribute instance-attribute

NO_UNNECESSARY_REBUILD_REFACTOR = (
    "no_unnecessary_rebuild_refactor",
    OPTION_KIND_BOOL,
)

No unnecessary refactorization on simplex rebuild. Boolean, default True.

OBJECTIVE_BOUND class-attribute instance-attribute

OBJECTIVE_BOUND = ('objective_bound', OPTION_KIND_DOUBLE)

Bound on the objective that stops the solve when reached. Double, default infinity.

OBJECTIVE_TARGET class-attribute instance-attribute

OBJECTIVE_TARGET = ('objective_target', OPTION_KIND_DOUBLE)

Target objective value that stops the solve when reached. Double, default negative infinity.

OPTIMALITY_TOLERANCE class-attribute instance-attribute

OPTIMALITY_TOLERANCE = (
    "optimality_tolerance",
    OPTION_KIND_DOUBLE,
)

Optimality tolerance. Double, default 1e-7.

OUTPUT_FLAG class-attribute instance-attribute

OUTPUT_FLAG = ('output_flag', OPTION_KIND_BOOL)

Master switch for all HiGHS logging. Set to True to let the solver print its log. Boolean; HiGHS itself defaults to True, but solve_linear_problem defaults it to False so the solver is silent unless requested.

PARALLEL class-attribute instance-attribute

PARALLEL = ('parallel', OPTION_KIND_STRING)

Parallelism control. One of "off", "choose" or "on". String, default "choose".

PDLP_CUPDLPC_RESTART_METHOD class-attribute instance-attribute

PDLP_CUPDLPC_RESTART_METHOD = (
    "pdlp_cupdlpc_restart_method",
    OPTION_KIND_INT,
)

Restart mode for cuPDLP-C solver: 0 => none; 1 => GPU (default); 2 => CPU. Integer, default 1.

PDLP_ITERATION_LIMIT class-attribute instance-attribute

PDLP_ITERATION_LIMIT = (
    "pdlp_iteration_limit",
    OPTION_KIND_INT,
)

Iteration limit for PDLP solver. Integer, default a very large value.

PDLP_OPTIMALITY_TOLERANCE class-attribute instance-attribute

PDLP_OPTIMALITY_TOLERANCE = (
    "pdlp_optimality_tolerance",
    OPTION_KIND_DOUBLE,
)

PDLP optimality tolerance. Double, default 1e-7.

PDLP_RESTART_STRATEGY class-attribute instance-attribute

PDLP_RESTART_STRATEGY = (
    "pdlp_restart_strategy",
    OPTION_KIND_INT,
)

Restart strategy for PDLP solver: 0 => off; 1 => fixed; 2 => adaptive; 3 => Halpern. Integer, default 2.

PDLP_RUIZ_ITERATIONS class-attribute instance-attribute

PDLP_RUIZ_ITERATIONS = (
    "pdlp_ruiz_iterations",
    OPTION_KIND_INT,
)

Number of Ruiz scaling iteraitons for PDLP solver. Integer, default 10.

PDLP_SCALING_MODE class-attribute instance-attribute

PDLP_SCALING_MODE = ('pdlp_scaling_mode', OPTION_KIND_INT)

Scaling mode for PDLP solver (default = 5): 1 => Ruiz; 2 => L2; 4 => PC. Integer, default 5.

PDLP_STEP_SIZE_STRATEGY class-attribute instance-attribute

PDLP_STEP_SIZE_STRATEGY = (
    "pdlp_step_size_strategy",
    OPTION_KIND_INT,
)

Step size strategy for PDLP solver: 0 => fixed; 1 => adaptive; 2 => Malitsky-Pock; 3 => PID. Integer, default 1.

PRESOLVE class-attribute instance-attribute

PRESOLVE = ('presolve', OPTION_KIND_STRING)

Presolve control. One of "off", "choose" or "on". String, default "choose".

PRESOLVE_PIVOT_THRESHOLD class-attribute instance-attribute

PRESOLVE_PIVOT_THRESHOLD = (
    "presolve_pivot_threshold",
    OPTION_KIND_DOUBLE,
)

Matrix factorization pivot threshold for substitutions in presolve. Double, default 0.01.

PRESOLVE_REDUCTION_LIMIT class-attribute instance-attribute

PRESOLVE_REDUCTION_LIMIT = (
    "presolve_reduction_limit",
    OPTION_KIND_INT,
)

Limit on number of presolve reductions. -1 means no limit. Integer, default -1.

PRESOLVE_REMOVE_SLACKS class-attribute instance-attribute

PRESOLVE_REMOVE_SLACKS = (
    "presolve_remove_slacks",
    OPTION_KIND_BOOL,
)

Remove slacks after presolve. Boolean, default False.

PRESOLVE_RULE_LOGGING class-attribute instance-attribute

PRESOLVE_RULE_LOGGING = (
    "presolve_rule_logging",
    OPTION_KIND_BOOL,
)

Log effectiveness of presolve rules for LP. Boolean, default False.

PRESOLVE_RULE_OFF class-attribute instance-attribute

PRESOLVE_RULE_OFF = ('presolve_rule_off', OPTION_KIND_INT)

Bit mask of presolve rules that are not allowed. Build the mask with PresolveRule.mask, for example PresolveRule.mask(PresolveRule.PROBING, PresolveRule.SPARSIFY). Integer, default 0 (every rule allowed).

PRESOLVE_RULE_TEST class-attribute instance-attribute

PRESOLVE_RULE_TEST = ("presolve_rule_test", OPTION_KIND_INT)

A single PresolveRule value to test in isolation. Development and debugging use only. Integer, default 0.

PRESOLVE_SUBSTITUTION_MAXFILLIN class-attribute instance-attribute

PRESOLVE_SUBSTITUTION_MAXFILLIN = (
    "presolve_substitution_maxfillin",
    OPTION_KIND_INT,
)

Maximal fillin allowed for substitutions in presolve. Integer, default 10.

PRIMAL_FEASIBILITY_TOLERANCE class-attribute instance-attribute

PRIMAL_FEASIBILITY_TOLERANCE = (
    "primal_feasibility_tolerance",
    OPTION_KIND_DOUBLE,
)

Tolerance for primal feasibility. Double, default 1e-7.

PRIMAL_RESIDUAL_TOLERANCE class-attribute instance-attribute

PRIMAL_RESIDUAL_TOLERANCE = (
    "primal_residual_tolerance",
    OPTION_KIND_DOUBLE,
)

Primal residual tolerance. Double, default 1e-7.

PRIMAL_SIMPLEX_BOUND_PERTURBATION_MULTIPLIER class-attribute instance-attribute

PRIMAL_SIMPLEX_BOUND_PERTURBATION_MULTIPLIER = (
    "primal_simplex_bound_perturbation_multiplier",
    OPTION_KIND_DOUBLE,
)

Primal simplex bound perturbation multiplier. 0 means no perturbation. Double, default 1.0.

QP_ALLOW_HOT_START class-attribute instance-attribute

QP_ALLOW_HOT_START = (
    "qp_allow_hot_start",
    OPTION_KIND_BOOL,
)

Allow the active set QP solver to hot start. Boolean, default False.

QP_ITERATION_LIMIT class-attribute instance-attribute

QP_ITERATION_LIMIT = ("qp_iteration_limit", OPTION_KIND_INT)

Iteration limit for the active set QP solver. Integer, default a very large value.

QP_NULLSPACE_LIMIT class-attribute instance-attribute

QP_NULLSPACE_LIMIT = ("qp_nullspace_limit", OPTION_KIND_INT)

Nullspace limit for the active set QP solver. Integer, default 4000.

QP_REGULARIZATION_VALUE class-attribute instance-attribute

QP_REGULARIZATION_VALUE = (
    "qp_regularization_value",
    OPTION_KIND_DOUBLE,
)

Regularization value added to the Hessian in the active set QP solver. Double, default 1e-7.

RANDOM_SEED class-attribute instance-attribute

RANDOM_SEED = ('random_seed', OPTION_KIND_INT)

Seed for the random number generator. Integer, default 0.

RANGING class-attribute instance-attribute

RANGING = ('ranging', OPTION_KIND_STRING)

Compute cost, bound, RHS and basic solution ranging: "off" or "on". String, default "off".

READ_BASIS_FILE class-attribute instance-attribute

READ_BASIS_FILE = ('read_basis_file', OPTION_KIND_STRING)

Read basis file. String, default "".

READ_SOLUTION_FILE class-attribute instance-attribute

READ_SOLUTION_FILE = (
    "read_solution_file",
    OPTION_KIND_STRING,
)

Read solution file. String, default "".

REBUILD_REFACTOR_SOLUTION_ERROR_TOLERANCE class-attribute instance-attribute

REBUILD_REFACTOR_SOLUTION_ERROR_TOLERANCE = (
    "rebuild_refactor_solution_error_tolerance",
    OPTION_KIND_DOUBLE,
)

Tolerance on solution error when considering refactorization on simplex rebuild. Double, default 1e-8.

RESTART_PRESOLVE_REDUCTION_LIMIT class-attribute instance-attribute

RESTART_PRESOLVE_REDUCTION_LIMIT = (
    "restart_presolve_reduction_limit",
    OPTION_KIND_INT,
)

Limit on number of further presolve reductions on restart in the MIP solver. -1 means no limit. Integer, default -1.

RUN_CENTRING class-attribute instance-attribute

RUN_CENTRING = ('run_centring', OPTION_KIND_BOOL)

Perform centring steps to compute the analytic centre before crossover. Boolean, default False.

RUN_CROSSOVER class-attribute instance-attribute

RUN_CROSSOVER = ('run_crossover', OPTION_KIND_STRING)

Whether to run crossover after an interior point solve. One of "off", "choose" or "on". String, default "on".

SIMPLEX_CRASH_STRATEGY class-attribute instance-attribute

SIMPLEX_CRASH_STRATEGY = (
    "simplex_crash_strategy",
    OPTION_KIND_INT,
)

Strategy for simplex crash: off / LTSSF / Bixby (0/½). Integer, default 0.

SIMPLEX_DUALIZE_STRATEGY class-attribute instance-attribute

SIMPLEX_DUALIZE_STRATEGY = (
    "simplex_dualize_strategy",
    OPTION_KIND_INT,
)

Strategy for dualizing before simplex: off / on (-1/1). Integer, default -1.

SIMPLEX_DUAL_EDGE_WEIGHT_STRATEGY class-attribute instance-attribute

SIMPLEX_DUAL_EDGE_WEIGHT_STRATEGY = (
    "simplex_dual_edge_weight_strategy",
    OPTION_KIND_INT,
)

Strategy for simplex dual edge weights: Choose / Dantzig / Devex / Steepest Edge (-1/0/½). Integer, default -1.

SIMPLEX_ITERATION_LIMIT class-attribute instance-attribute

SIMPLEX_ITERATION_LIMIT = (
    "simplex_iteration_limit",
    OPTION_KIND_INT,
)

Iteration limit for simplex solver when solving LPs, but not subproblems in the MIP solver. Integer, default a very large value.

SIMPLEX_MAX_CONCURRENCY class-attribute instance-attribute

SIMPLEX_MAX_CONCURRENCY = (
    "simplex_max_concurrency",
    OPTION_KIND_INT,
)

Maximum level of concurrency in parallel simplex. Integer, default 8.

SIMPLEX_MIN_CONCURRENCY class-attribute instance-attribute

SIMPLEX_MIN_CONCURRENCY = (
    "simplex_min_concurrency",
    OPTION_KIND_INT,
)

Minimum level of concurrency in parallel simplex. Integer, default 1.

SIMPLEX_PERMUTE_STRATEGY class-attribute instance-attribute

SIMPLEX_PERMUTE_STRATEGY = (
    "simplex_permute_strategy",
    OPTION_KIND_INT,
)

Strategy for permuting before simplex: off / on (-1/1). Integer, default -1.

SIMPLEX_PRICE_STRATEGY class-attribute instance-attribute

SIMPLEX_PRICE_STRATEGY = (
    "simplex_price_strategy",
    OPTION_KIND_INT,
)

Strategy for PRICE in simplex. Integer, default 3.

SIMPLEX_PRIMAL_EDGE_WEIGHT_STRATEGY class-attribute instance-attribute

SIMPLEX_PRIMAL_EDGE_WEIGHT_STRATEGY = (
    "simplex_primal_edge_weight_strategy",
    OPTION_KIND_INT,
)

Strategy for simplex primal edge weights: Choose / Dantzig / Devex / Steepest Edge (-1/0/½). Integer, default -1.

SIMPLEX_SCALE_STRATEGY class-attribute instance-attribute

SIMPLEX_SCALE_STRATEGY = (
    "simplex_scale_strategy",
    OPTION_KIND_INT,
)

Simplex scaling strategy: off / choose / equilibration (default) / forced equilibration / max value (0/½/¾). Integer, default 2.

SIMPLEX_STRATEGY class-attribute instance-attribute

SIMPLEX_STRATEGY = ('simplex_strategy', OPTION_KIND_INT)

Strategy for simplex solver 0 => Choose; 1 => Dual (serial); 2 => Dual (SIP); 3 => Dual (PAMI); 4 => Primal. Integer, default 1.

SIMPLEX_UNSCALED_SOLUTION_STRATEGY class-attribute instance-attribute

SIMPLEX_UNSCALED_SOLUTION_STRATEGY = (
    "simplex_unscaled_solution_strategy",
    OPTION_KIND_INT,
)

Strategy for solving the unscaled LP in simplex. Integer, default 1.

SIMPLEX_UPDATE_LIMIT class-attribute instance-attribute

SIMPLEX_UPDATE_LIMIT = (
    "simplex_update_limit",
    OPTION_KIND_INT,
)

Limit on the number of simplex UPDATE operations. Integer, default 5000.

SMALL_MATRIX_VALUE class-attribute instance-attribute

SMALL_MATRIX_VALUE = (
    "small_matrix_value",
    OPTION_KIND_DOUBLE,
)

Lower limit on |matrix entries|: values less than or equal to this will be treated as zero. Double, default 1e-9.

SOLUTION_FILE class-attribute instance-attribute

SOLUTION_FILE = ('solution_file', OPTION_KIND_STRING)

Write solution file. String, default "".

SOLVER class-attribute instance-attribute

SOLVER = ('solver', OPTION_KIND_STRING)

Which algorithm to use. One of "choose", "simplex", "ipm", "pdlp" or "hipo". String, default "choose".

SOLVE_RELAXATION class-attribute instance-attribute

SOLVE_RELAXATION = ('solve_relaxation', OPTION_KIND_BOOL)

Solve the relaxation of discrete model components instead of the discrete model itself. Boolean, default False.

START_CROSSOVER_TOLERANCE class-attribute instance-attribute

START_CROSSOVER_TOLERANCE = (
    "start_crossover_tolerance",
    OPTION_KIND_DOUBLE,
)

Tolerance to be satisfied before IPM crossover will start. Double, default 1e-8.

THREADS class-attribute instance-attribute

THREADS = ('threads', OPTION_KIND_INT)

Number of threads to use. Zero means let HiGHS choose. Integer, default 0.

TIMELESS_LOG class-attribute instance-attribute

TIMELESS_LOG = ('timeless_log', OPTION_KIND_BOOL)

Suppression of time-based data in logging. Boolean, default False.

TIME_LIMIT class-attribute instance-attribute

TIME_LIMIT = ('time_limit', OPTION_KIND_DOUBLE)

Wall clock time limit for the solve in seconds. Double, default infinity.

USER_BOUND_SCALE class-attribute instance-attribute

USER_BOUND_SCALE = ('user_bound_scale', OPTION_KIND_INT)

Exponent of power-of-two bound scaling for model. Integer, default 0.

USER_OBJECTIVE_SCALE class-attribute instance-attribute

USER_OBJECTIVE_SCALE = (
    "user_objective_scale",
    OPTION_KIND_INT,
)

Exponent of power-of-two objective scaling for model. Integer, default 0.

USE_IMPLIED_BOUNDS_FROM_PRESOLVE class-attribute instance-attribute

USE_IMPLIED_BOUNDS_FROM_PRESOLVE = (
    "use_implied_bounds_from_presolve",
    OPTION_KIND_BOOL,
)

Use relaxed implied bounds from presolve. Boolean, default False.

USE_ORIGINAL_HFACTOR_LOGIC class-attribute instance-attribute

USE_ORIGINAL_HFACTOR_LOGIC = (
    "use_original_HFactor_logic",
    OPTION_KIND_BOOL,
)

Use original HFactor logic for sparse vs hyper-sparse TRANs. Boolean, default True.

USE_WARM_START class-attribute instance-attribute

USE_WARM_START = ('use_warm_start', OPTION_KIND_BOOL)

Use any warm start that is available. Boolean, default True.

WRITE_BASIS_FILE class-attribute instance-attribute

WRITE_BASIS_FILE = ('write_basis_file', OPTION_KIND_STRING)

Write basis file. String, default "".

WRITE_HESSIAN_IMAGE class-attribute instance-attribute

WRITE_HESSIAN_IMAGE = (
    "write_hessian_image",
    OPTION_KIND_BOOL,
)

Write an image of the Hessian to a file. Boolean, default False.

WRITE_IIS_MODEL_FILE class-attribute instance-attribute

WRITE_IIS_MODEL_FILE = (
    "write_iis_model_file",
    OPTION_KIND_STRING,
)

Write IIS model file. String, default "".

WRITE_MATRIX_IMAGE class-attribute instance-attribute

WRITE_MATRIX_IMAGE = (
    "write_matrix_image",
    OPTION_KIND_BOOL,
)

Write an image of the constraint matrix to a file. Boolean, default False.

WRITE_MODEL_FILE class-attribute instance-attribute

WRITE_MODEL_FILE = ('write_model_file', OPTION_KIND_STRING)

Write model file. String, default "".

WRITE_MODEL_TO_FILE class-attribute instance-attribute

WRITE_MODEL_TO_FILE = (
    "write_model_to_file",
    OPTION_KIND_BOOL,
)

Write the model to a file. Boolean, default False.

WRITE_PRESOLVED_MODEL_FILE class-attribute instance-attribute

WRITE_PRESOLVED_MODEL_FILE = (
    "write_presolved_model_file",
    OPTION_KIND_STRING,
)

Write presolved model file. String, default "".

WRITE_PRESOLVED_MODEL_TO_FILE class-attribute instance-attribute

WRITE_PRESOLVED_MODEL_TO_FILE = (
    "write_presolved_model_to_file",
    OPTION_KIND_BOOL,
)

Write the presolved model to a file. Boolean, default False.

WRITE_SOLUTION_STYLE class-attribute instance-attribute

WRITE_SOLUTION_STYLE = (
    "write_solution_style",
    OPTION_KIND_INT,
)

Style of solution file (raw = computer-readable, pretty = human-readable): -1 => HiGHS old raw (deprecated); 0 => HiGHS raw; 1 => HiGHS pretty; 2 => Glpsol raw; 3 => Glpsol pretty; 4 => HiGHS sparse raw. Integer, default 0.

WRITE_SOLUTION_TO_FILE class-attribute instance-attribute

WRITE_SOLUTION_TO_FILE = (
    "write_solution_to_file",
    OPTION_KIND_BOOL,
)

Write the primal and dual solution to a file. Boolean, default False.

option_name property

option_name: str

Return the option name string expected by the HiGHS C API.

value_kind property

value_kind: str

Return the value kind label for this option.

Library information

cyhighs.highs_version

highs_version()

Return the version string of the linked HiGHS library.

Returns:

Type Description

The HiGHS version, for example "1.15.1".

cyhighs.highs_infinity

highs_infinity()

Return the value HiGHS uses to represent infinity.

Any bound whose magnitude is greater than or equal to this value is treated by HiGHS as unbounded.

Returns:

Type Description

The infinity threshold, typically 1e30.