Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Featol = 1.0e-6
The feasibility tolerance to check whether constraints are satisfied
View Source
var Plinfy = 1.0e10
A placeholder for +/-Inf for finite calculations
Functions ¶
This section is empty.
Types ¶
type Constraint ¶
type Constraint struct { Name string Sense ConstraintSense Shape Shape Min float64 Max float64 Variables []Variable Index int // contains filtered or unexported fields }
func (Constraint) Gradient ¶
func (c Constraint) Gradient(x []float64) ([]float64, error)
Get the gradient of the constraint at a given point. Returns a nil slice and an error if AMPL is unable to compute the gradient
func (Constraint) IsSatisfied ¶
func (c Constraint) IsSatisfied(value float64) bool
Returns a bool for whether or not the given value (as computed by `Value`) satisfies this constraint
func (Constraint) String ¶
func (c Constraint) String() string
type ConstraintSense ¶
type ConstraintSense int
const ( ConstraintGreaterThan ConstraintSense = iota ConstraintLessThan ConstraintEqualTo ConstraintRange ConstraintNonBinding )
func (ConstraintSense) String ¶
func (t ConstraintSense) String() string
type Objective ¶
type Objective struct { Name string Sense ObjectiveSense Shape Shape Variables []Variable Index int // contains filtered or unexported fields }
Represents a single objective in the problem
type ObjectiveSense ¶
type ObjectiveSense int
const ( ObjectiveMin ObjectiveSense = 0 ObjectiveMax ObjectiveSense = 1 )
func (ObjectiveSense) String ¶
func (s ObjectiveSense) String() string
type Problem ¶
type Problem struct { Name string // contains filtered or unexported fields }
func (*Problem) ConstraintJacobian ¶
Evaluate the Jacobian of the constraints
func (*Problem) ConstraintValues ¶
Evaluate the value of all constraints at point x
func (*Problem) Constraints ¶
func (p *Problem) Constraints() []Constraint
Get the list of Constraints in this problem
func (*Problem) Objectives ¶
Get the list of Objectives in this problem
type Variable ¶
type Variable struct { Name string Type VariableType LowerBound float64 UpperBound float64 Index int }
type VariableType ¶
type VariableType int
const ( VariableReal VariableType = iota VariableInteger VariableBinary VariableArc )
func (VariableType) String ¶
func (t VariableType) String() string
Click to show internal directories.
Click to hide internal directories.