common

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2025 License: MIT Imports: 0 Imported by: 0

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 SolverConfig

type SolverConfig struct {
	// TimeLimit        // TODO: Add time.Duration field later
	Tolerance     float64
	MaxIterations int

	GapSensitivity float64
	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
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL