ModelIntAttr

Enum ModelIntAttr 

Source
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.

Reference manual.

§

BoundSVioIndex

  • Modifiable: No
  • Type: integer (i32)

Index of variable with the largest (scaled) bound violation.

Only available for continuous models.

Reference manual.

§

BoundVioIndex

  • Modifiable: No
  • Type: integer (i32)

Index of variable with the largest (unscaled) bound violation.

Available for all model types.

Reference manual.

§

ComplVioIndex

  • Modifiable: No
  • Type: integer (i32)

Index of variable with the largest complementarity violation.

Only available for continuous models.

Reference manual.

§

ConstrResidualIndex

  • Modifiable: No
  • Type: integer (i32)

Index of linear constraint with the largest (unscaled) constraint error.

Only available for continuous models.

Reference manual.

§

ConstrSResidualIndex

  • Modifiable: No
  • Type: integer (i32)

Index of linear constraint with the largest (scaled) constraint error.

Only available for continuous models.

Reference manual.

§

ConstrSVioIndex

  • Modifiable: No
  • Type: integer (i32)

Index of linear constraint with the largest (scaled) slack bound violation.

Only available for continuous models.

Reference manual.

§

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.

Reference manual.

§

DualResidualIndex

  • Modifiable: No
  • Type: integer (i32)

Index of variable with the largest (unscaled) dual constraint error.

Only available for continuous models.

Reference manual.

§

DualSResidualIndex

  • Modifiable: No
  • Type: integer (i32)

Index of variable with the largest (scaled) dual constraint error.

Only available for continuous models.

Reference manual.

§

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.

Reference manual.

§

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.

Reference manual.

§

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).

Reference manual.

§

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).

Reference manual.

§

IntVioIndex

  • Modifiable: No
  • Type: integer (i32)

Index of variable with the largest integrality violation.

Only available for MIP models.

Reference manual.

§

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.

Reference manual.

§

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.

Reference manual.

§

IsQCP

  • Modifiable: No
  • Type: integer (i32)

Indicates whether the model has quadratic constraints.

Reference manual.

§

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.

Reference manual.

§

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.

Reference manual.

§

NumBinVars

  • Modifiable: No
  • Type: integer (i32)

The number of binary variables in the model.

Reference manual.

§

NumConstrs

  • Modifiable: No
  • Type: integer (i32)

The number of linear constraints in the model.

Reference manual.

§

NumGenConstrs

  • Modifiable: No
  • Type: integer (i32)

The number of general constraints in the model.

Reference manual.

§

NumIntVars

  • Modifiable: No
  • Type: integer (i32)

The number of integer variables in the model. This includes both binary variables and general integer variables.

Reference manual.

§

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.

Reference manual.

§

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.

Reference manual.

§

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).

Reference manual.

§

NumQCNZs

  • Modifiable: No
  • Type: integer (i32)

The number of non-zero coefficients in the quadratic constraints.

Reference manual.

§

NumQConstrs

  • Modifiable: No
  • Type: integer (i32)

The number of quadratic constraints in the model.

Reference manual.

§

NumQNZs

  • Modifiable: No
  • Type: integer (i32)

The number of terms in the lower triangle of the Q matrix in the quadratic objective.

Reference manual.

§

NumSOS

  • Modifiable: No
  • Type: integer (i32)

The number of Special Ordered Set (SOS) constraints in the model.

Reference manual.

§

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.

Reference manual.

§

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.

Reference manual.

§

NumVars

  • Modifiable: No
  • Type: integer (i32)

The number of decision variables in the model.

Reference manual.

§

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.

Reference manual.

§

SolCount

  • Modifiable: No
  • Type: integer (i32)

Number of stored solutions from the most recent optimization.

Reference manual.

§

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.

Reference manual.

§

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.

Reference manual.

Trait Implementations§

Source§

impl AsCStr for ModelIntAttr

Source§

fn as_cstr(&self) -> &'static CStr

Represent self as a &CStr
Source§

impl Clone for ModelIntAttr

Source§

fn clone(&self) -> ModelIntAttr

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ModelIntAttr

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromCStr for ModelIntAttr

Source§

type Err = &'static str

The error type returned if parsing fails. Read more
Source§

fn from_cstr(s: &CStr) -> Result<Self, Self::Err>

Parse the &CStr for an instance of Self. Read more
Source§

impl Hash for ModelIntAttr

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl ModelAttrGet<i32> for ModelIntAttr

Source§

fn get(&self, model: &Model) -> Result<i32>

Query the value for this attribute
Source§

impl ModelAttrSet<i32> for ModelIntAttr

Source§

fn set(&self, model: &Model, val: i32) -> Result<()>

Set a new value for this attribute
Source§

impl PartialEq for ModelIntAttr

Source§

fn eq(&self, other: &ModelIntAttr) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for ModelIntAttr

Source§

impl Eq for ModelIntAttr

Source§

impl StructuralPartialEq for ModelIntAttr

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.