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 — TypeBarrierIterationsNumber 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 — TypeDualObjectiveValueObjective value of the current dual solution.
Type: T
Modifiable: No
Examples
Tulip.get_attribute(model, Tulip.DualObjectiveValue())Tulip.ModelName — TypeModelNameThe 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 — TypeNumberOfConstraintsNumber of constraints in the model.
Type: Int
Modifiable: No
Examples
Tulip.get_attribute(model, Tulip.NumberOfConstraints())Tulip.NumberOfVariables — TypeNumberOfVariablesNumber of variables in the model.
Type: Int
Modifiable: No
Examples
Tulip.get_attribute(model, Tulip.NumberOfVariables())Tulip.ObjectiveConstant — TypeObjectiveConstantConstant 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 — TypeObjectiveSenseTulip.ObjectiveValue — TypeObjectiveValueObjective value of the current primal solution.
Type: T
Modifiable: No
Examples
Tulip.get_attribute(model, Tulip.ObjectiveValue())Tulip.SolutionTime — TypeSolutionTimeTotal solution time, in seconds.
Type: Float64
Modifiable: No
Examples
Tulip.get_attribute(model, Tulip.SolutionTime())Tulip.Status — TypeStatusModel status
Type:
Modifiable: No
Examples
Tulip.get(model, Tulip.Status())Variable attributes
Tulip.VariableLowerBound — TypeVariableLowerBoundVariable 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 — TypeVariableNameName 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 — TypeVariableObjectiveCoeffObjective 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 — TypeVariableUpperBoundVariable 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 — TypeConstraintLowerBoundConstraint 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 — TypeConstraintNameName 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 — TypeConstraintUpperBoundConstraint upper bound.
Type: T
Modifiable: Yes
Examples
Tulip.set_attribute(model, Tulip.ConstraintUpperBound(), 1, one(T))
Tulip.get_attribute(model, Tulip.ConstraintUpperBound(), 1)