ILOG CPLEX .NET Reference Manual

Cplex Methods

The methods of the Cplex class are listed below. For a complete list of Cplex class members, see the Cplex Members topic.

Public Static Methods

Putenv Sets the ILOG_LICENSE_FILE environment variable used by CPLEX.
RegisterLicense Passes memory-based information to the ILOG License Manager.

Public Instance Methods

Abs (inherited from CplexModeler)Overloaded. Returns an expression representing the absolute value of its argument, the expression indicated by expr.
Add (inherited from CplexModeler)Overloaded. Adds part of the array of objects to the invoking model, starting with the index start and continuing to the number of objects indicated by num.
AddCut Adds the constraint cut as a cut to the invoking Cplex object.
AddCutsOverloaded. Adds num constraints given in cut as cuts to the invoking Cplex object, starting with element cut[start].
AddEq (inherited from CplexModeler)Overloaded. See {
AddGe (inherited from CplexModeler)Overloaded. See {
AddLazyConstraint This is an advanced method.
AddLazyConstraintsOverloaded. This is an advanced method.
AddLe (inherited from CplexModeler)Overloaded. See {
AddLPMatrix (inherited from CplexModeler)Overloaded. See {
AddMaximize (inherited from CplexModeler)Overloaded. See {
AddMinimize (inherited from CplexModeler)Overloaded. See {
AddObjective (inherited from CplexModeler)Overloaded. See {
AddRange (inherited from CplexModeler)Overloaded. See {
AddSOS1 (inherited from CplexModeler)Overloaded. See {
AddSOS2 (inherited from CplexModeler)Overloaded. See {
AddToExpr (inherited from CplexModeler)Overloaded. See {
AddUserCut This is an advanced method.
AddUserCutsOverloaded. This is an advanced method.
And (inherited from CplexModeler)Overloaded. Groups together the constraints indicated by its arguments and assigns the string name to the group.
AndOverloaded. Creates and returns an and goal from two arguments.
Apply Returns a goal that applies the evaluator to the search tree defined by the goal.
BoolVar (inherited from CplexModeler)Overloaded. See {
BoolVarArray (inherited from CplexModeler)Overloaded. See {
Bound Creates and returns an object of type INumVarBound to represent the specified bound of the variable var.
BranchAsCplex Creates and returns a goal that branches the same way Cplex would in the absence of any goal at the current node.
Card (inherited from CplexModeler) 
Cardinality (inherited from CplexModeler) 
ClearCallbacks Removes all callbacks from the invoking Cplex object.
ClearCuts Deletes all cuts added by the user to the invoking Cplex object with the methods addCut and addCuts.
ClearLazyConstraints This is an advanced method.
ClearModel Removes all modeling objects from the active model.
ClearUserCuts This is an advanced method.
Column (inherited from CplexModeler)Overloaded. See {
ColumnArray (inherited from CplexModeler)Overloaded. See {
Constant (inherited from CplexModeler)Overloaded. See {
ConstraintGoalOverloaded. Creates and returns a constraint goal for the specified constraint cut.
Conversion (inherited from CplexModeler)Overloaded. See {
DelDirection Removes any existing branching direction assignments from the variable var.
DelDirectionsOverloaded. Removes any existing branching direction assignments from num consecutive variables in the array var, starting with the variable var[start].
Delete (inherited from CplexModeler)Overloaded. See {
DelPrioritiesOverloaded. Removes any existing branch priority assignment from num consecutive variables in the array var, starting with the variable var[start].
DelPriority Removes any existing branch priority assignment from variable var.
Diff (inherited from CplexModeler)Overloaded. See {
DualFarkas This is an advanced method.
EndOverloaded. Releases the Cplex license held by the invoking object, and all the memory allocated by it.
EndModel 
Eq (inherited from CplexModeler)Overloaded. See {
EqGoalOverloaded. Creates a constraint goal for the constraint lhs == expr.
EqIntersection (inherited from CplexModeler) 
EqMax (inherited from CplexModeler)Overloaded.  
EqMin (inherited from CplexModeler)Overloaded.  
EqSum (inherited from CplexModeler)Overloaded.  
Equals (inherited from Object) Determines whether the specified Object is equal to the current Object.
EqUnion (inherited from CplexModeler) 
ExportModel Writes the active model to the file indicated by filename.
FailGoal Creates and returns a goal that always fails.
FeasOptOverloaded. This method computes a minimum-cost relaxation in order to make the active model feasible by relaxing the bounds of the range constraints specified in the array rngs.
Ge (inherited from CplexModeler)Overloaded. See {
GeGoalOverloaded. Creates a constraint goal for the constraint lhs >= expr.
GetAlgorithm Returns the algorithm that was used to generate the current solution.
GetAXOverloaded. Queries row activity values for a set of range constraints.
GetBasisStatusOverloaded. Returns the basis status for the constraint con.
GetBasisStatusesOverloaded. Returns basis statuses for num consecutive constraints, starting from the index specified by start, in the array of constraints con.
GetBoundSAOverloaded. Computes and returns sensitivity analysis for the bounds of the num consecutive variables, starting from the index specified by start, in the array var.
GetClone 
GetConflictOverloaded. This method accesses a conflict (or a subset of a conflict) previously computed by the method refineConflict and returns the conflict status of num consecutive constraints in the array cts.
GetConversionEnumerator (inherited from CplexModeler) Returns an enumerator over all IConversion objects in the active model.
GetCplexStatus Returns the status of the Cplex algorithm.
GetCplexSubStatus Returns the Cplex.CplexStatus status of the last node problem solved.
GetDefaultOverloaded. Returns the default value of a string parameter.
GetDeleteMode Returns the current delete mode of the invoking Cplex object.
GetDirection Returns the branch direction for a variable.
GetDirectionsOverloaded. Returns branch directions for num consecutive variables, starting from the index specified by var[start].
GetDiverging This method returns the diverging variable or constraint, in a case where the primal simplex algorithm has determined the problem to be infeasible.
GetDual Returns the dual solution value for a constraint.
GetDualsOverloaded. Returns dual solution values for num consecutive range constraints, starting from the index specified by start.
GetEnumerator (inherited from CplexModeler) Returns an enumerator suitable for the invoking model.
GetHashCode (inherited from Object) Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetInfeasibilitiesOverloaded. Returns infeasibility values for num consecutive constraints, starting from the index specified by start, from an array con of constraints.
GetInfeasibilityOverloaded. Returns the infeasibility value for a constraint.
GetIntSetValue 
GetLPMatrixEnumerator (inherited from CplexModeler) Returns an enumerator over all ILPMatrix objects in the active model.
GetMaxOverloaded. Returns the maximum allowed value for a double parameter.
GetMinOverloaded. Returns the minimum value allowed for a double parameter.
GetModel (inherited from CplexModeler) Returns the active model.
GetName (inherited from CplexModeler) Returns the name of the invoking model, if there is one.
GetNSOSs Returns the number of SOSs of both types, 1 and 2 in the active model.
GetObjective (inherited from CplexModeler) Returns the IObjective object of the active model, or null if no IObjective object is currently in the active model.
GetObjSAOverloaded. Computes and returns sensitivity analysis for objective coefficients for num consecutive variables, starting at the index specified by start.
GetParamOverloaded. Returns the current value of a string parameter.
GetParameterSet Returns a parameter set corresponding to the present parameter state.
GetPrioritiesOverloaded. Returns branch priorities for num consecutive variables, starting from the index specified by start.
GetPriority Returns the branch priority for a variable.
GetQuality Returns an instance of Cplex.Quality that contains the requested quality measure.
GetRangeEnumerator (inherited from CplexModeler) Returns an enumerator over all instances of IRange in the active model.
GetRangeSAOverloaded. Computes and returns sensitivity analysis for the constraints corresponding to the rows of the LP matrix matrix.
GetReducedCost Returns the reduced cost for a variable.
GetReducedCostsOverloaded. Returns reduced costs for num consecutive variables, starting from the index specified by start.
GetRHSSAOverloaded. Computes and returns sensitivity analysis for the righthand side (RHS) values of num constraints, corresponding to a range of rows of an LP matrix, starting from the index specified by start.
GetSlack Returns the slack value for a range constraint.
GetSlacksOverloaded. Returns slack values for num consecutive constraints, starting from the index specified by start, from an array rng.
GetSOS1Enumerator (inherited from CplexModeler) Returns an enumerator over all ISOS1 objects in the active model.
GetSOS2Enumerator (inherited from CplexModeler) Returns an enumerator over all ISOS2 objects in the active model.
GetStatus Returns the solution status of the active model.
GetType (inherited from Object) Gets the Type of the current instance.
GetValueOverloaded. Returns the value that expr takes for the current solution.
GetValuesOverloaded. Returns solution values for a set of variables.
GlobalCutGoalOverloaded. Creates and returns a global cut goal for the constraint cut.
IfThen (inherited from CplexModeler)Overloaded. Returns a constraint that if con1 is true, then con2 must also be true.
ImportModel Reads a model from the file indicated by name into the active model.
Intersect (inherited from CplexModeler) 
IntExpr (inherited from CplexModeler) See {
IntSet (inherited from CplexModeler)Overloaded. Creates and returns a set of integers populated by values, an array of integers.
IntSetVar (inherited from CplexModeler)Overloaded.  
IntSetVarArray (inherited from CplexModeler) 
IntVar (inherited from CplexModeler)Overloaded. See {
IntVarArray (inherited from CplexModeler)Overloaded. See {
IsDualFeasible Returns true if a dual feasible solution is available.
IsMIP Returns true if the active model is a MIP.
IsPrimalFeasible Returns true if a primal feasible solution is available.
IsQC Returns true if the active model has quadratic constraints.
IsQO Returns true if the active model has a quadratic objective function.
IsQP 
IsQuadratic 
Le (inherited from CplexModeler)Overloaded. See {
LeGoalOverloaded. Creates a constraint goal for the constraint lhs >= expr.
LimitSearch This function creates and returns a goal that limits the exploration of the search tree defined by goal, as specified by limit.
LinearIntExpr (inherited from CplexModeler)Overloaded. See {
LinearNumExpr (inherited from CplexModeler)Overloaded. See {
LowerBound Creates and returns an object of type INumVarBound to represent the lower bound of the variable var.
LPMatrix (inherited from CplexModeler)Overloaded. See {
MakeClone 
Max (inherited from CplexModeler)Overloaded. Returns an expression representing the maximum of its argument, the elements of an array.
Maximize (inherited from CplexModeler)Overloaded. See {
Member (inherited from CplexModeler) 
Min (inherited from CplexModeler)Overloaded. Returns an expression representing the minimum of its argument, the elements of an array.
Minimize (inherited from CplexModeler)Overloaded. See {
Negative (inherited from CplexModeler)Overloaded. See {
Neq (inherited from CplexModeler)Overloaded.  
Not (inherited from CplexModeler)Overloaded. Returns a constraint that is the logical negation of its argument.
NotMember (inherited from CplexModeler) 
NullIntersect (inherited from CplexModeler) 
NumExpr (inherited from CplexModeler) See {
NumVar (inherited from CplexModeler)Overloaded. See {
NumVarArray (inherited from CplexModeler)Overloaded. See {
Objective (inherited from CplexModeler)Overloaded. See {
Or (inherited from CplexModeler)Overloaded. Returns a constraint that at least one and possibly both of its arguments are true.
OrOverloaded. Creates and returns an or goal from two arguments.
Output 
PiecewiseLinear (inherited from CplexModeler)Overloaded. See {
Prod (inherited from CplexModeler)Overloaded. See {
QpIndefCertificate Returns a vector proving that the Q matrix of QP is not positive semi-definite.
Range (inherited from CplexModeler)Overloaded. See {
ReadBasis Reads a simplex basis from the BAS file indicated by name, and copies that basis into the invoking object.
ReadMIPStart Reads the SOL file denoted by name and copies the MIP start information into the invoking object.
ReadOrder Reads the ORD file indicated by name and copies the priority order information into the invoking CPLEX problem object.
ReadParam Reads parameters and their settings from the file indicated by name and applies them to the invoking object.
ReadSolution Reads a solution from the SOL file denoted by name and copies this information into the invoking object.
ReadVectors 
RefineConflictOverloaded. Refines a conflict consisting of a subset of constraints from an array.
Remove (inherited from CplexModeler)Overloaded. Removes part of the array of objects from the invoking model, starting with the index start and continuing to the number of objects indicated by num.
ScalProd (inherited from CplexModeler)Overloaded. Creates and returns a linear expression representing the scalar product of the given variables.
SemiContVar (inherited from CplexModeler)Overloaded. See {
SemiContVarArray (inherited from CplexModeler)Overloaded. See {
SetBasisStatusesOverloaded. Sets basis statuses for cnum consecutive variables, starting from the index specified by var[start], and rnum consecutive constraints, starting from the index specified by con[start].
SetDefaults Resets all parameters to their default values.
SetDeleteMode Sets the delete mode.
SetDirection Sets the branching direction for a variable.
SetDirectionsOverloaded. Sets branching directions for num consecutive variables, starting from the index specified by start.
SetLinearCoef (inherited from CplexModeler)Overloaded. See {
SetLinearCoefs (inherited from CplexModeler)Overloaded. See {
SetModel Sets model as the active model.
SetName (inherited from CplexModeler) Sets str as the name of the invoking model.
SetOut Sets the default output stream of the invoking Cplex object.
SetParamOverloaded. Sets a string parameter to value val.
SetParameterSet Sets the parameter state using a parameter set.
SetPrioritiesOverloaded. Sets branch priorities for num consecutive variables, starting from the index specified by start.
SetPriority Sets the branch priority for the variable var.
SetVectorsOverloaded. Specifies a partial starting point for the next invocation of the method solve.
SetWarning Sets the warning stream of the invoking Cplex object.
SolutionGoal Creates and returns a solution goal.
SolveOverloaded. Solves the active model.
SolveFixed Solves the fixed active model.
SOS1 (inherited from CplexModeler)Overloaded. See {
SOS2 (inherited from CplexModeler)Overloaded. See {
Square (inherited from CplexModeler)Overloaded. See {
Subset (inherited from CplexModeler)Overloaded.  
SubsetEq (inherited from CplexModeler)Overloaded.  
Sum (inherited from CplexModeler)Overloaded. See {
ToString (inherited from CplexModeler) 
UpperBound Creates and returns an object of type INumVarBound to represent the upper bound of variable var.
Use Installs a user-written callback.
VisitChildren 
Warning Returns the warning output stream of the invoking Cplex object.
WriteBasis Writes the current simplex basis to the file indicated by name.
WriteConflict Writes a conflict file with the indicated name.
WriteMIPStart Writes a starting solution for a MIP in SOL format to the file denoted by name.
WriteOrder Writes a priority order file with the indicated name.
WriteParam Writes the parameter name and its current setting into the file indicated by name for all the CPLEX parameters that are not currently set at their default.
WriteSolution Writes solution information from an optimization in SOL format to the file indicated by name.
WriteTextSolution 
WriteVectors 

Protected Instance Methods

Finalize (inherited from Object) Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.

See Also

Cplex Class | ILOG.CPLEX Namespace