solver

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Optimizer

type Optimizer struct {
	// contains filtered or unexported fields
}

func NewOptimizerFromSpec

func NewOptimizerFromSpec(spec *config.OptimizerSpec) *Optimizer

Create optimizer from spec

func (*Optimizer) Optimize

func (o *Optimizer) Optimize() error

func (*Optimizer) SolutionTimeMsec

func (o *Optimizer) SolutionTimeMsec() int64

func (*Optimizer) String

func (o *Optimizer) String() string

type ServerEntriesOrder

type ServerEntriesOrder func(a, b *serverEntry) int

sorting function for server entries

type Solver

type Solver struct {
	// contains filtered or unexported fields
}

Solver of allocation assignment problem

func NewSolver

func NewSolver(optimizerSpec *config.OptimizerSpec) *Solver

func (*Solver) AllocationDiff

func (s *Solver) AllocationDiff() map[string]*core.AllocationDiff

func (*Solver) Solve

func (s *Solver) Solve() error

Find optimal allocation for all service classes

func (*Solver) SolveGreedy

func (s *Solver) SolveGreedy()

Find optimal allocations using greedy algorithm, assuming limited accelerator capacity

func (*Solver) SolveUnlimited

func (s *Solver) SolveUnlimited()

Find optimal allocations assuming unlimited accelerator capacity (separable objective function: best allocation for each server)

func (*Solver) String

func (s *Solver) String() string

Jump to

Keyboard shortcuts

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