Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use variable from header for enum values #64

Merged
merged 1 commit into from
Apr 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions basindtype_enum.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

package gmsk

// #include <mosek.h>
import "C"

import "strconv"

// BasIndType is MSKbasindtype_enum.
Expand All @@ -11,11 +14,11 @@ import "strconv"
type BasIndType uint32

const (
BI_NEVER BasIndType = 0 // Never do basis identification.
BI_ALWAYS BasIndType = 1 // Basis identification is always performed even if the interior-point optimizer terminates abnormally.
BI_NO_ERROR BasIndType = 2 // Basis identification is performed if the interior-point optimizer terminates without an error.
BI_IF_FEASIBLE BasIndType = 3 // Basis identification is not performed if the interior-point optimizer terminates with a problem status saying that the problem is primal or dual infeasible.
BI_RESERVERED BasIndType = 4 // Not currently in use.
BI_NEVER BasIndType = C.MSK_BI_NEVER // Never do basis identification.
BI_ALWAYS BasIndType = C.MSK_BI_ALWAYS // Basis identification is always performed even if the interior-point optimizer terminates abnormally.
BI_NO_ERROR BasIndType = C.MSK_BI_NO_ERROR // Basis identification is performed if the interior-point optimizer terminates without an error.
BI_IF_FEASIBLE BasIndType = C.MSK_BI_IF_FEASIBLE // Basis identification is not performed if the interior-point optimizer terminates with a problem status saying that the problem is primal or dual infeasible.
BI_RESERVERED BasIndType = C.MSK_BI_RESERVERED // Not currently in use.
)

var _BasIndType_map = map[BasIndType]string{
Expand Down
13 changes: 8 additions & 5 deletions boundkey_enum.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

package gmsk

// #include <mosek.h>
import "C"

import "strconv"

// BoundKey is MSKboundkey_enum.
Expand All @@ -11,11 +14,11 @@ import "strconv"
type BoundKey uint32

const (
BK_LO BoundKey = 0 // The constraint or variable has a finite lower bound and an infinite upper bound.
BK_UP BoundKey = 1 // The constraint or variable has an infinite lower bound and an finite upper bound.
BK_FX BoundKey = 2 // The constraint or variable is fixed.
BK_FR BoundKey = 3 // The constraint or variable is free.
BK_RA BoundKey = 4 // The constraint or variable is ranged.
BK_LO BoundKey = C.MSK_BK_LO // The constraint or variable has a finite lower bound and an infinite upper bound.
BK_UP BoundKey = C.MSK_BK_UP // The constraint or variable has an infinite lower bound and an finite upper bound.
BK_FX BoundKey = C.MSK_BK_FX // The constraint or variable is fixed.
BK_FR BoundKey = C.MSK_BK_FR // The constraint or variable is free.
BK_RA BoundKey = C.MSK_BK_RA // The constraint or variable is ranged.
)

var _BoundKey_map = map[BoundKey]string{
Expand Down
19 changes: 11 additions & 8 deletions branchdir_enum.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

package gmsk

// #include <mosek.h>
import "C"

import "strconv"

// BranchDir is MSKbranchdir_enum.
Expand All @@ -11,14 +14,14 @@ import "strconv"
type BranchDir uint32

const (
BRANCH_DIR_FREE BranchDir = 0 // The mixed-integer optimizer decides which branch to choose.
BRANCH_DIR_UP BranchDir = 1 // The mixed-integer optimizer always chooses the up branch first.
BRANCH_DIR_DOWN BranchDir = 2 // The mixed-integer optimizer always chooses the down branch first.
BRANCH_DIR_NEAR BranchDir = 3 // Branch in direction nearest to selected fractional variable.
BRANCH_DIR_FAR BranchDir = 4 // Branch in direction farthest from selected fractional variable.
BRANCH_DIR_ROOT_LP BranchDir = 5 // Chose direction based on root lp value of selected variable.
BRANCH_DIR_GUIDED BranchDir = 6 // Branch in direction of current incumbent.
BRANCH_DIR_PSEUDOCOST BranchDir = 7 // Branch based on the pseudocost of the variable.
BRANCH_DIR_FREE BranchDir = C.MSK_BRANCH_DIR_FREE // The mixed-integer optimizer decides which branch to choose.
BRANCH_DIR_UP BranchDir = C.MSK_BRANCH_DIR_UP // The mixed-integer optimizer always chooses the up branch first.
BRANCH_DIR_DOWN BranchDir = C.MSK_BRANCH_DIR_DOWN // The mixed-integer optimizer always chooses the down branch first.
BRANCH_DIR_NEAR BranchDir = C.MSK_BRANCH_DIR_NEAR // Branch in direction nearest to selected fractional variable.
BRANCH_DIR_FAR BranchDir = C.MSK_BRANCH_DIR_FAR // Branch in direction farthest from selected fractional variable.
BRANCH_DIR_ROOT_LP BranchDir = C.MSK_BRANCH_DIR_ROOT_LP // Chose direction based on root lp value of selected variable.
BRANCH_DIR_GUIDED BranchDir = C.MSK_BRANCH_DIR_GUIDED // Branch in direction of current incumbent.
BRANCH_DIR_PSEUDOCOST BranchDir = C.MSK_BRANCH_DIR_PSEUDOCOST // Branch based on the pseudocost of the variable.
)

var _BranchDir_map = map[BranchDir]string{
Expand Down
Loading