Documentation
¶
Index ¶
- type LPModel
- func (lp *LPModel) AddBinaryVar(varName string) *LPModel
- func (lp *LPModel) AddBound(bound string) *LPModel
- func (lp *LPModel) AddConstraint(constr string) *LPModel
- func (lp *LPModel) AddIntegerVar(varName string) *LPModel
- func (lp *LPModel) GenerateLPFile(filename string)
- func (lp *LPModel) SetObjective(objType, obj string) *LPModel
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 ¶
add binary var
func (*LPModel) AddConstraint ¶
add constraint
func (*LPModel) AddIntegerVar ¶
add integer var
func (*LPModel) GenerateLPFile ¶
generate lp file
func (*LPModel) SetObjective ¶
set objective
Click to show internal directories.
Click to hide internal directories.