Documentation
¶
Overview ¶
Package common provides shared utility types and functions used across multiple internal packages.
This package is intended for internal use only and serves as a place for reusable logic that does not belong to a specific domain or module.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateSolverConfig ¶
func ValidateSolverConfig(cfg *SolverConfig) error
validateSolverConfig checks if the SolverConfig is valid.
Types ¶
type BranchingStrategy ¶
type BranchingStrategy string
BranchingStrategy represents the strategy used for branching in integer programming.
const ( FirstFractional BranchingStrategy = "first-fractional" MostFractional BranchingStrategy = "most-fractional" LeastFractional BranchingStrategy = "least-fractional" RandomBranching BranchingStrategy = "random-branching" )
type HeuristicStrategy ¶
type HeuristicStrategy string
HeuristicStrategy represents the strategy used for heuristics in integer programming.
const ( RandomHeuristic HeuristicStrategy = "random" LargestInfeasibility HeuristicStrategy = "largest-infeasibility" )
type SolverConfig ¶
type SolverConfig struct {
// TimeLimit // TODO: Add time.Duration field later
Tolerance float64
MaxIterations int
GapSensitivity float64
UseCuttingPlanes bool
BranchingStrategy BranchingStrategy
HeuristicStrategy HeuristicStrategy
StrongBranchingDepth int
Threads int
RandomSeed int
SolverMethod SolverMethod
Logging bool
}
SolverConfig holds the actual configuration with no pointers.
func DefaultSolverConfig ¶
func DefaultSolverConfig() *SolverConfig
DefaultSolverConfig returns the default solver configuration.
func (*SolverConfig) String ¶
func (opts *SolverConfig) String() string
type SolverMethod ¶
type SolverMethod string
SolverMethod represents the method used for solving linear programming problems or the LP relaxation of integer programming problems.
const (
SimplexMethod SolverMethod = "simplex" // Currently the only option is the simplex method
)