Attribute reference

Attributes are queried using get_attribute and set using set_attribute.

Model attributes

NameTypeDescription
ModelNameStringName of the model
NumberOfConstraintsIntNumber of constraints in the model
NumberOfVariablesIntNumber of variables in the model
ObjectiveValueTObjective value of the current primal solution
DualObjectiveValueTObjective value of the current dual solution
ObjectiveConstantTValue of the objective constant
ObjectiveSenseOptimization sense
StatusModel status
BarrierIterationsIntNumber of barrier iterations
SolutionTimeFloat64Solution time, in seconds

Variable attributes

NameTypeDescription
VariableLowerBoundTVariable lower bound
VariableUpperBoundTVariable upper bound
VariableObjectiveCoeffTVariable objective coefficient
VariableNameStringVariable name

Constraint attributes

NameTypeDescription
ConstraintLowerBoundTConstraint lower bound
ConstraintUpperBoundTConstraint upper bound
ConstraintNameStringConstraint name

Reference

Model attributes

Tulip.BarrierIterationsType
BarrierIterations

Number of iterations of the barrier algorithm in the last call.

This number may be zero in the following cases:

  • the model has been solved yet
  • presolve solved the model
  • the initial solution was optimal

Type: Int

Modifiable: No

Examples

Tulip.get_attribute(model, Tulip.BarrierIterations())
source
Tulip.DualObjectiveValueType
DualObjectiveValue

Objective value of the current dual solution.

Type: T

Modifiable: No

Examples

Tulip.get_attribute(model, Tulip.DualObjectiveValue())
source
Tulip.ModelNameType
ModelName

The name of the model.

Type: String

Modifiable: Yes

Examples

Tulip.set_attribute(model, Tulip.ModelName(), "lp_example")
Tulip.get_attribute(model, Tulip.ModelName())
source
Tulip.NumberOfConstraintsType
NumberOfConstraints

Number of constraints in the model.

Type: Int

Modifiable: No

Examples

Tulip.get_attribute(model, Tulip.NumberOfConstraints())
source
Tulip.NumberOfVariablesType
NumberOfVariables

Number of variables in the model.

Type: Int

Modifiable: No

Examples

Tulip.get_attribute(model, Tulip.NumberOfVariables())
source
Tulip.ObjectiveConstantType
ObjectiveConstant

Constant objective offset, defaults to zero.

Type: T

Modifiable: Yes

Examples

Tulip.set_attribute(model, Tulip.ObjectiveConstant(), zero(T))
Tulip.get_attribute(model, Tulip.ObjectiveConstant())
source
Tulip.ObjectiveValueType
ObjectiveValue

Objective value of the current primal solution.

Type: T

Modifiable: No

Examples

Tulip.get_attribute(model, Tulip.ObjectiveValue())
source
Tulip.SolutionTimeType
SolutionTime

Total solution time, in seconds.

Type: Float64

Modifiable: No

Examples

Tulip.get_attribute(model, Tulip.SolutionTime())
source
Tulip.StatusType
Status

Model status

Type:

Modifiable: No

Examples

Tulip.get(model, Tulip.Status())
source

Variable attributes

Tulip.VariableLowerBoundType
VariableLowerBound

Variable lower bound.

Type: T

Modifiable: Yes

Examples

Tulip.set_attribute(model, Tulip.VariableLowerBound(), 1, zero(T))
Tulip.get_attribute(model, Tulip.VariableLowerBound(), 1)
source
Tulip.VariableNameType
VariableName

Name of the variable.

Type: String

Modifiable: Yes

Examples

Tulip.set_attribute(model, Tulip.VariableName(), 1, "x1")
Tulip.get_attribute(model, Tulip.VariableName(), 1)
source
Tulip.VariableObjectiveCoeffType
VariableObjectiveCoeff

Objective coefficient of the variable.

Type: T

Modifiable: Yes

Examples

Tulip.set_attribute(model, Tulip.VariableObjectiveCoeff(), 1, one(T))
Tulip.get_attribute(model, Tulip.VariableObjectiveCoeff(), 1)
source
Tulip.VariableUpperBoundType
VariableUpperBound

Variable upper bound.

Type: T

Modifiable: Yes

Examples

Tulip.set_attribute(model, Tulip.VariableUpperBound(), 1, one(T))
Tulip.get_attribute(model, Tulip.VariableUpperBound(), 1)
source

Constraint attributes

Tulip.ConstraintLowerBoundType
ConstraintLowerBound

Constraint lower bound.

Type: T

Modifiable: Yes

Examples

Tulip.set_attribute(model, Tulip.ConstraintLowerBound(), 1, zero(T))
Tulip.get_attribute(model, Tulip.ConstraintLowerBound(), 1)
source
Tulip.ConstraintNameType
ConstraintName

Name of the constraint.

Type: String

Modifiable: Yes

Examples

Tulip.set_attribute(model, Tulip.ConstraintName(), 1, "c1")
Tulip.get_attribute(model, Tulip.ConstraintName(), 1)
source
Tulip.ConstraintUpperBoundType
ConstraintUpperBound

Constraint upper bound.

Type: T

Modifiable: Yes

Examples

Tulip.set_attribute(model, Tulip.ConstraintUpperBound(), 1, one(T))
Tulip.get_attribute(model, Tulip.ConstraintUpperBound(), 1)
source