jijzept_solver.solver_parameters

Module Contents

class ALMSimulatedAnnealingOption

Bases: BaseSolverOption

Options for ALM Simulated Annealing algorithm.

num_iters

Number of iterations to run the search algorithm.

time_limit_sec_per_iter

Time limit in seconds per iteration.

count_per_iter

Number of sweeps per iteration.

disable_annealing

If True, the zero temperature annealing, called hill-climbing, is executed.

allow_optimal_move

If True, allow optimal move.

alm_search_option_number

Option number for ALM parameter search strategy. 0: Standard 1: PenaltyHybrid

normalize_coefficients

If True, coefficients of the objective function and constraints are normalized to its maximum coefficient being 1.

cancel_token

Token that can be used to cancel the algorithm.

allow_optimal_move: bool = True
alm_search_option_number: int = 1
cancel_token: CancelToken | None = None
count_per_iter: int | None = None
disable_annealing: bool = False
normalize_coefficients: bool = True
num_iters: int
time_limit_sec_per_iter: float | None = None
class BaseSolverOption

Bases: abc.ABC

Base class for solver options.

class CBCOption

Bases: BaseSolverOption

Options for the CBC solver (via Python-MIP).

time_limit_sec

Time limit in seconds.

time_limit_sec: float
class CancelToken(manager=None)

A channel for sending a cancel signal to the Rust thread. Supports both single-process and multiprocess modes.

cancel()
Return type:

None

is_cancelled()
Return type:

bool

class JijZeptSolverOption

Options for JijZeptSolver

processes

List of SolverOptions, which is list of SolverOption. SolverOption can be WeightedHillClimbingOption, WeightedSimulatedAnnealingOption, LocalILPOption, SCIPOption, or CBCOption.

processes: list[SolverOptions]
class LocalILPOption

Bases: BaseSolverOption

Options for the Local ILP algorithm.

time_limit_sec

Time limit in seconds for the algorithm.

terminate_if_feasible

If True, the algorithm terminates if a feasible solution is found.

sparse

If True, the algorithm uses a sparse representation.

zero_objective

If True, the algorithm ignore the objective function and search for feasible solutions.

num_tabu_capacity

Number of tabu list capacity.

cancel_token: CancelToken | None = None
num_tabu_capacity: int = 10
sparse: bool = True
terminate_if_feasible: bool = False
time_limit_sec: float
zero_objective: bool = False
class SCIPOption

Bases: BaseSolverOption

Options for the SCIP solver.

time_limit_sec

Time limit in seconds.

time_limit_sec: float
class WeightedHillClimbingOption

Bases: BaseSolverOption

Options for the Weighted Hill Climbing algorithm.

num_iters

Number of iterations to run the search algorithm.

time_limit_sec_per_iter

Time limit in seconds per iteration.

cancel_token

Token that can be used to cancel the algorithm.

cancel_token: CancelToken | None = None
num_iters: int
time_limit_sec_per_iter: float
class WeightedSimulatedAnnealingOption

Bases: BaseSolverOption

Options for Weighted Simulated Annealing algorithm.

num_iters

Number of iterations to run the search algorithm.

time_limit_sec_per_iter

Time limit in seconds per iteration.

count_per_iter

Number of sweeps per iteration.

disable_annealing

If True, the zero temperature annealing, called hill-climbing, is executed.

allow_multihot_equality_move

If True, allow multihot equality move.

allow_multihot_inequality_move

If True, allow multihot inequality move.

allow_balance_equality_move

If True, allow multihot balance move.

allow_balance_inequality_move

If True, allow multihot balance inequality move.

square_linear_equality_penalty

If True, squared penalty is applied to linear equality constraints.

square_linear_inequality_penalty

If True, squared penalty is applied to linear inequality constraints.

square_quadratic_equality_penalty

If True, squared penalty is applied to quadratic equality constraints.

square_quadratic_inequality_penalty

If True, squared penalty is applied to quadratic inequality constraints.

normalize_coefficients

If True, coefficients of the objective function and constraints are normalized to its maximum coefficient being 1.

cancel_token

Token that can be used to cancel the algorithm.

allow_balance_equality_move: bool = True
allow_balance_inequality_move: bool = True
allow_multihot_equality_move: bool = True
allow_multihot_inequality_move: bool = True
cancel_token: CancelToken | None = None
count_per_iter: int | None = None
disable_annealing: bool = False
normalize_coefficients: bool = True
num_iters: int
square_linear_equality_penalty: bool = True
square_linear_inequality_penalty: bool = True
square_quadratic_equality_penalty: bool = False
square_quadratic_inequality_penalty: bool = False
time_limit_sec_per_iter: float | None = None
cancel_token()

A context manager for creating a cancel token.

SolverOption
SolverOptions