lumix.linearization.config.LXLinearizerConfig

class lumix.linearization.config.LXLinearizerConfig(default_method=LXLinearizationMethod.MCCORMICK, tolerance=1e-06, verbose_logging=True, big_m_value=1000000.0, pwl_num_segments=20, pwl_method='sos2', prefer_sos2=True, adaptive_breakpoints=True, auto_detect_bounds=True, mccormick_tighten_bounds=True, binary_expansion_bits=10)[source]

Configuration for automatic linearization engine.

Parameters:
default_method

Default linearization technique

big_m_value

Big-M constant for conditional constraints (default: 1e6)

pwl_num_segments

Number of segments for piecewise-linear approximations

pwl_method

Method for piecewise-linear (“sos2”, “incremental”, “logarithmic”)

prefer_sos2

Use SOS2 formulation when solver supports it

adaptive_breakpoints

Use adaptive breakpoint generation for PWL

auto_detect_bounds

Automatically detect variable bounds for McCormick

mccormick_tighten_bounds

Apply bound tightening for McCormick envelopes

binary_expansion_bits

Number of bits for binary expansion method

tolerance

Numerical tolerance for comparisons

verbose_logging

Enable detailed linearization logging

Example:

config = LXLinearizerConfig(
    big_m_value=1e5,
    pwl_num_segments=30,
    adaptive_breakpoints=True,
    mccormick_tighten_bounds=True
)
__init__(default_method=LXLinearizationMethod.MCCORMICK, tolerance=1e-06, verbose_logging=True, big_m_value=1000000.0, pwl_num_segments=20, pwl_method='sos2', prefer_sos2=True, adaptive_breakpoints=True, auto_detect_bounds=True, mccormick_tighten_bounds=True, binary_expansion_bits=10)
Parameters:
Return type:

None

Methods

__init__([default_method, tolerance, ...])

Attributes

default_method: LXLinearizationMethod = 'mccormick'
tolerance: float = 1e-06
verbose_logging: bool = True
big_m_value: float = 1000000.0
pwl_num_segments: int = 20
pwl_method: Literal['sos2', 'incremental', 'logarithmic'] = 'sos2'
prefer_sos2: bool = True
adaptive_breakpoints: bool = True
auto_detect_bounds: bool = True
mccormick_tighten_bounds: bool = True
binary_expansion_bits: int = 10
__init__(default_method=LXLinearizationMethod.MCCORMICK, tolerance=1e-06, verbose_logging=True, big_m_value=1000000.0, pwl_num_segments=20, pwl_method='sos2', prefer_sos2=True, adaptive_breakpoints=True, auto_detect_bounds=True, mccormick_tighten_bounds=True, binary_expansion_bits=10)
Parameters:
Return type:

None