Attribute reference
Attributes are queried using get_attribute
and set using set_attribute
.
Model attributes
Name | Type | Description |
---|---|---|
ModelName | String | Name of the model |
NumberOfConstraints | Int | Number of constraints in the model |
NumberOfVariables | Int | Number of variables in the model |
ObjectiveValue | T | Objective value of the current primal solution |
DualObjectiveValue | T | Objective value of the current dual solution |
ObjectiveConstant | T | Value of the objective constant |
ObjectiveSense | Optimization sense | |
Status | Model status | |
BarrierIterations | Int | Number of barrier iterations |
SolutionTime | Float64 | Solution time, in seconds |
Variable attributes
Name | Type | Description |
---|---|---|
VariableLowerBound | T | Variable lower bound |
VariableUpperBound | T | Variable upper bound |
VariableObjectiveCoeff | T | Variable objective coefficient |
VariableName | String | Variable name |
Constraint attributes
Name | Type | Description |
---|---|---|
ConstraintLowerBound | T | Constraint lower bound |
ConstraintUpperBound | T | Constraint upper bound |
ConstraintName | String | Constraint name |
Reference
Model attributes
Tulip.BarrierIterations
— TypeBarrierIterations
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())
Tulip.DualObjectiveValue
— TypeDualObjectiveValue
Objective value of the current dual solution.
Type: T
Modifiable: No
Examples
Tulip.get_attribute(model, Tulip.DualObjectiveValue())
Tulip.ModelName
— TypeModelName
The name of the model.
Type: String
Modifiable: Yes
Examples
Tulip.set_attribute(model, Tulip.ModelName(), "lp_example")
Tulip.get_attribute(model, Tulip.ModelName())
Tulip.NumberOfConstraints
— TypeNumberOfConstraints
Number of constraints in the model.
Type: Int
Modifiable: No
Examples
Tulip.get_attribute(model, Tulip.NumberOfConstraints())
Tulip.NumberOfVariables
— TypeNumberOfVariables
Number of variables in the model.
Type: Int
Modifiable: No
Examples
Tulip.get_attribute(model, Tulip.NumberOfVariables())
Tulip.ObjectiveConstant
— TypeObjectiveConstant
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())
Tulip.ObjectiveSense
— TypeObjectiveSense
Tulip.ObjectiveValue
— TypeObjectiveValue
Objective value of the current primal solution.
Type: T
Modifiable: No
Examples
Tulip.get_attribute(model, Tulip.ObjectiveValue())
Tulip.SolutionTime
— TypeSolutionTime
Total solution time, in seconds.
Type: Float64
Modifiable: No
Examples
Tulip.get_attribute(model, Tulip.SolutionTime())
Tulip.Status
— TypeStatus
Model status
Type:
Modifiable: No
Examples
Tulip.get(model, Tulip.Status())
Variable attributes
Tulip.VariableLowerBound
— TypeVariableLowerBound
Variable lower bound.
Type: T
Modifiable: Yes
Examples
Tulip.set_attribute(model, Tulip.VariableLowerBound(), 1, zero(T))
Tulip.get_attribute(model, Tulip.VariableLowerBound(), 1)
Tulip.VariableName
— TypeVariableName
Name of the variable.
Type: String
Modifiable: Yes
Examples
Tulip.set_attribute(model, Tulip.VariableName(), 1, "x1")
Tulip.get_attribute(model, Tulip.VariableName(), 1)
Tulip.VariableObjectiveCoeff
— TypeVariableObjectiveCoeff
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)
Tulip.VariableUpperBound
— TypeVariableUpperBound
Variable upper bound.
Type: T
Modifiable: Yes
Examples
Tulip.set_attribute(model, Tulip.VariableUpperBound(), 1, one(T))
Tulip.get_attribute(model, Tulip.VariableUpperBound(), 1)
Constraint attributes
Tulip.ConstraintLowerBound
— TypeConstraintLowerBound
Constraint lower bound.
Type: T
Modifiable: Yes
Examples
Tulip.set_attribute(model, Tulip.ConstraintLowerBound(), 1, zero(T))
Tulip.get_attribute(model, Tulip.ConstraintLowerBound(), 1)
Tulip.ConstraintName
— TypeConstraintName
Name of the constraint.
Type: String
Modifiable: Yes
Examples
Tulip.set_attribute(model, Tulip.ConstraintName(), 1, "c1")
Tulip.get_attribute(model, Tulip.ConstraintName(), 1)
Tulip.ConstraintUpperBound
— TypeConstraintUpperBound
Constraint upper bound.
Type: T
Modifiable: Yes
Examples
Tulip.set_attribute(model, Tulip.ConstraintUpperBound(), 1, one(T))
Tulip.get_attribute(model, Tulip.ConstraintUpperBound(), 1)