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 — Type
BarrierIterationsNumber 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 — Type
DualObjectiveValueObjective value of the current dual solution.
Type: T
Modifiable: No
Examples
Tulip.get_attribute(model, Tulip.DualObjectiveValue())Tulip.ModelName — Type
ModelNameThe 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 — Type
NumberOfConstraintsNumber of constraints in the model.
Type: Int
Modifiable: No
Examples
Tulip.get_attribute(model, Tulip.NumberOfConstraints())Tulip.NumberOfVariables — Type
NumberOfVariablesNumber of variables in the model.
Type: Int
Modifiable: No
Examples
Tulip.get_attribute(model, Tulip.NumberOfVariables())Tulip.ObjectiveConstant — Type
ObjectiveConstantConstant 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 — Type
ObjectiveSenseTulip.ObjectiveValue — Type
ObjectiveValueObjective value of the current primal solution.
Type: T
Modifiable: No
Examples
Tulip.get_attribute(model, Tulip.ObjectiveValue())Tulip.SolutionTime — Type
SolutionTimeTotal solution time, in seconds.
Type: Float64
Modifiable: No
Examples
Tulip.get_attribute(model, Tulip.SolutionTime())Tulip.Status — Type
StatusModel status
Type:
Modifiable: No
Examples
Tulip.get(model, Tulip.Status())Variable attributes
Tulip.VariableLowerBound — Type
VariableLowerBoundVariable 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 — Type
VariableNameName 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 — Type
VariableObjectiveCoeffObjective 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 — Type
VariableUpperBoundVariable 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 — Type
ConstraintLowerBoundConstraint 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 — Type
ConstraintNameName 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 — Type
ConstraintUpperBoundConstraint upper bound.
Type: T
Modifiable: Yes
Examples
Tulip.set_attribute(model, Tulip.ConstraintUpperBound(), 1, one(T))
Tulip.get_attribute(model, Tulip.ConstraintUpperBound(), 1)