lpgen

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2024 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LPModel

type LPModel struct {
	Objective     string   // 目標函數
	ObjectiveType string   // 目標函數類型(Maximize or Minimize)
	Constraints   []string // 約束條件
	Bounds        []string // 變數邊界
	BinaryVars    []string // 二進制變數
	IntegerVars   []string // 整數變數
}

func NewLPModel

func NewLPModel() *LPModel

func (*LPModel) AddBinaryVar

func (lp *LPModel) AddBinaryVar(varName string) *LPModel

add binary var

func (*LPModel) AddBound

func (lp *LPModel) AddBound(bound string) *LPModel

add bound

func (*LPModel) AddConstraint

func (lp *LPModel) AddConstraint(constr string) *LPModel

add constraint

func (*LPModel) AddIntegerVar

func (lp *LPModel) AddIntegerVar(varName string) *LPModel

add integer var

func (*LPModel) GenerateLPFile

func (lp *LPModel) GenerateLPFile(filename string)

generate lp file

func (*LPModel) SetObjective

func (lp *LPModel) SetObjective(objType, obj string) *LPModel

set objective

Jump to

Keyboard shortcuts

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