pub enum ModelIntAttr {
Show 38 variants
BarIterCount,
BoundSVioIndex,
BoundVioIndex,
ComplVioIndex,
ConstrResidualIndex,
ConstrSResidualIndex,
ConstrSVioIndex,
ConstrVioIndex,
DualResidualIndex,
DualSResidualIndex,
DualSVioIndex,
DualVioIndex,
Fingerprint,
IISMinimal,
IntVioIndex,
IsMIP,
IsMultiObj,
IsQCP,
IsQP,
LicenseExpiration,
NumBinVars,
NumConstrs,
NumGenConstrs,
NumIntVars,
NumNZs,
NumObj,
NumPWLObjVars,
NumQCNZs,
NumQConstrs,
NumQNZs,
NumSOS,
NumScenarios,
NumStart,
NumVars,
ObjNPriority,
SolCount,
TuneResultCount,
ConcurrentWinMethod,
}Variants§
BarIterCount
- Modifiable: No
- Type: integer (
i32)
Number of barrier iterations performed during the most recent optimization.
BoundSVioIndex
- Modifiable: No
- Type: integer (
i32)
Index of variable with the largest (scaled) bound violation.
Only available for continuous models.
BoundVioIndex
- Modifiable: No
- Type: integer (
i32)
Index of variable with the largest (unscaled) bound violation.
Available for all model types.
ComplVioIndex
- Modifiable: No
- Type: integer (
i32)
Index of variable with the largest complementarity violation.
Only available for continuous models.
ConstrResidualIndex
- Modifiable: No
- Type: integer (
i32)
Index of linear constraint with the largest (unscaled) constraint error.
Only available for continuous models.
ConstrSResidualIndex
- Modifiable: No
- Type: integer (
i32)
Index of linear constraint with the largest (scaled) constraint error.
Only available for continuous models.
ConstrSVioIndex
- Modifiable: No
- Type: integer (
i32)
Index of linear constraint with the largest (scaled) slack bound violation.
Only available for continuous models.
ConstrVioIndex
- Modifiable: No
- Type: integer (
i32)
Index of linear constraint with the largest (unscaled) slack bound violation for continuous linear models solved by simplex.
For MIP or other situations, it is for all the constraints. The constraint order is linear, quadratic, SOS and general. Assume there are $l$ linear, $q$ quadratic, $s$ SOS and $g$ general constraints and the index $i$ is between $l+q+s$ and $l+q+s+g$, then the general constraint with index $i-l-q-s$ has the biggest violation.
Available for all model types.
DualResidualIndex
- Modifiable: No
- Type: integer (
i32)
Index of variable with the largest (unscaled) dual constraint error.
Only available for continuous models.
DualSResidualIndex
- Modifiable: No
- Type: integer (
i32)
Index of variable with the largest (scaled) dual constraint error.
Only available for continuous models.
DualSVioIndex
- Modifiable: No
- Type: integer (
i32)
Index of variable with the largest (scaled) reduced cost violation. Note that the result may be larger than the number of variables in the model, which indicates that a constraint slack is the variable with the largest violation. Subtract the variable count from the result to get the index of the corresponding constraint.
Only available for continuous models.
DualVioIndex
- Modifiable: No
- Type: integer (
i32)
Index of variable with the largest (unscaled) reduced cost violation. Note that the result may be larger than the number of variables in the model, which indicates that a constraint slack is the variable with the largest violation. Subtract the variable count from the result to get the index of the corresponding constraint.
Only available for continuous models.
Fingerprint
- Modifiable: No
- Type: integer (
i32)
A hash value computed on model data and attributes that can influence the optimization process. The intent is that models that differ in any meaningful way will have different fingerprints (almost always).
IISMinimal
- Modifiable: No
- Type: integer (
i32)
Indicates whether the current Irreducible Inconsistent Subsystem (IIS) is minimal. This attribute is only available after you have computed an IIS on an infeasible model. It will normally take value 1, but it may take value 0 if the IIS computation was stopped early (e.g., due to a time limit or user interrupt).
IntVioIndex
- Modifiable: No
- Type: integer (
i32)
Index of variable with the largest integrality violation.
Only available for MIP models.
IsMIP
- Modifiable: No
- Type: integer (
i32)
Indicates whether the model is a MIP. Note that any discrete elements make the model a MIP. Discrete elements include binary, integer, semi-continuous, semi-integer variables, SOS constraints, and general constraints. In addition, models having multiple objectives or multiple scenarios are considered as MIP models, even when all variables are continuous and all constraints are linear.
IsMultiObj
- Modifiable: No
- Type: integer (
i32)
Indicates whether the model has multiple objectives.
Note that the case where the model has a single objective (NumObj = 1) is slightly ambiguous. If you used setObjectiveN to set your objective, or if you set any of the multi-objective attributes (e.g., ObjNPriority), then the model is considered to be a multi-objective model. Otherwise, it is not.
To reset a multi-objective model back to a single objective model, you should set the NumObj attribute to 0, call
model update, and then set a new single objective.
IsQCP
- Modifiable: No
- Type: integer (
i32)
Indicates whether the model has quadratic constraints.
IsQP
- Modifiable: No
- Type: integer (
i32)
Indicates whether the model is a quadratic programming problem. Note that a model with both a quadratic objective and quadratic constraints is classified as a QCP, not a QP.
LicenseExpiration
- Modifiable: No
- Type: integer (
i32)
License expiration date. The format is YYYYMMDD, so for example if the license currently in use expired on July 20, 2018, the result would be 20180720. If the license has no expiration date, the result will be 99999999.
This attribute is available for node licenses and for clients of a Gurobi Compute Server. Unfortunately, this attribute isn’t available for clients of a Gurobi Token Server.
NumBinVars
NumConstrs
NumGenConstrs
- Modifiable: No
- Type: integer (
i32)
The number of general constraints in the model.
NumIntVars
- Modifiable: No
- Type: integer (
i32)
The number of integer variables in the model. This includes both binary variables and general integer variables.
NumNZs
- Modifiable: No
- Type: integer (
i32)
The number of non-zero coefficients in the linear constraints of the model. For models with more than 2 billion non-zero coefficients use DNumNZs.
NumObj
- Modifiable: Yes
- Type: integer (
i32)
Number of objectives in the model. If you modify this attribute, it will change the number of objectives in the model.
Decreasing it will discard existing objectives. Increasing it will create new objectives (initialized to 0). Setting it
to 0 will create a model with no objective (i.e., a feasibility model). If you want to switch from a multi-objective
model to a single-objective model you also need to set NumObj to 0 and call model update before installing a new
single objective.
You can use the ObjNumber parameter, in conjunction with multi-objective attributes (ObjN, ObjNName, etc.), to query or modify attributes for different objectives. The value of ObjNumber should always be less than NumObj.
Please refer to the discussion of Multiple Objectives for more information on the use of alternative objectives.
NumPWLObjVars
- Modifiable: No
- Type: integer (
i32)
The number of variables in the model with piecewise-linear objective functions. You can query the function for a specific variable using the appropriate getPWLObj method for your language (in C, C++, C#, Java, and Python).
NumQCNZs
- Modifiable: No
- Type: integer (
i32)
The number of non-zero coefficients in the quadratic constraints.
NumQConstrs
- Modifiable: No
- Type: integer (
i32)
The number of quadratic constraints in the model.
NumQNZs
- Modifiable: No
- Type: integer (
i32)
The number of terms in the lower triangle of the Q matrix in the quadratic objective.
NumSOS
- Modifiable: No
- Type: integer (
i32)
The number of Special Ordered Set (SOS) constraints in the model.
NumScenarios
- Modifiable: Yes
- Type: integer (
i32)
Number of scenarios in the model. Modifying this attribute changes the number: decreasing it discards existing scenarios; increasing it creates new scenarios (initialized to have no changes w.r.t. the base model); setting it to 0 discards all scenarios so that the base model is no longer a multi-scenario model.
You can use the ScenarioNumber parameter, in conjunction with multi-scenario attributes (ScenNLB, ScenNUB, ScenNObj, ScenNRHS, ScenNName, etc.), to query or modify attributes for different scenarios. The value of ScenarioNumber should always be less than NumScenarios.
Please refer to the Multiple Scenarios discussion for more information.
NumStart
- Modifiable: Yes
- Type: integer (
i32)
Number of MIP starts in the model. Decreasing this attribute will discard existing MIP starts. Increasing it will create new MIP starts (initialized to undefined).
You can use the StartNumber parameter to query or modify start values for different MIP starts, or to append a new one. The value of StartNumber should always be less than NumStart.
NumVars
ObjNPriority
- Modifiable: Yes
- Type: integer (
i32)
This attribute is used to query or modify the priority of objective $n$ when doing hierarchical multi-objective optimization. You set $n$ using the ObjNumber parameter.
The default priority for an objective is 0.
The number of objectives in the model can be queried (or modified) using the NumObj attribute.
Please refer to the discussion of Multiple Objectives for more information on the use of alternative objectives.
SolCount
- Modifiable: No
- Type: integer (
i32)
Number of stored solutions from the most recent optimization.
TuneResultCount
- Modifiable: No
- Type: integer (
i32)
After the tuning tool has been run, this attribute reports the number of parameter sets that were stored. This value will be zero if no improving parameter sets were found, and its upper bound is determined by the TuneResults parameter.
ConcurrentWinMethod
- Modifiable: No
- Type: integer (
i32)
This attribute is used to query the winning method after a continuous problem has been solved with concurrent optimization. In this case it returns the corresponding method identifier 0 (for primal Simplex), 1 (for dual Simplex), or 2 (for Barrier). In all other cases -1 is returned.
Trait Implementations§
Source§impl AsCStr for ModelIntAttr
impl AsCStr for ModelIntAttr
Source§impl Clone for ModelIntAttr
impl Clone for ModelIntAttr
Source§fn clone(&self) -> ModelIntAttr
fn clone(&self) -> ModelIntAttr
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more