solution

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractValueOfVariable

func ExtractValueOfVariable(s Solution, v symbolic.Variable) (float64, error)

func ExtractValueOfVariableWithID

func ExtractValueOfVariableWithID(s Solution, idx uint64) (float64, error)

func FindValueOfExpression

func FindValueOfExpression(s Solution, expr symbolic.Expression) (float64, error)

FindValueOfExpression evaluates a symbolic expression using the values from a solution. It substitutes all variables in the expression with their values from the solution and returns the resulting scalar value.

Types

type DummySolution

type DummySolution struct {
	Values map[uint64]float64

	// The objective for the solution
	Objective float64

	// Whether or not the solution is within the optimality threshold
	Status solution_status.SolutionStatus
}

func (*DummySolution) GetOptimalValue

func (ds *DummySolution) GetOptimalValue() float64

func (*DummySolution) GetStatus

func (*DummySolution) GetValueMap

func (ds *DummySolution) GetValueMap() map[uint64]float64

type Solution

type Solution interface {
	GetOptimalValue() float64
	GetValueMap() map[uint64]float64

	// GetStatus
	//
	GetStatus() solution_status.SolutionStatus
}

Solution stores the solution of an optimization problem and associated metadata

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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