Skip to main content
FRAMES NO FRAMES

Class IloOplCplexVectors

Definition file: ilopl/ilooplmodel.h
Map of IloOplCplexVectorsIloOplCplexVectorsIloOplCplexVectors
Utility for CPLEX warm start of MIP problems.

An instance of this class can be used to save MIP start information for one instance of IloCplex and restore it on other instances of IloCplex. Either you cannot mix getStart with attah method that is either you get a MIP Start from an existing cplex either you build it by hands.

See Also:

Method Summary
public voidattach(IloIntVarMap vars, IloIntMap values)
public voidattach(IloNumVarMap vars, IloNumMap values)
public voidclear()
public voiddeleteStart(IloCplex cplex)
public voidend()
public IloIntgetNcols() const
public IloIntgetNrows() const
public IloBoolgetStart(IloCplex cplex)
public IloIntgetStatus() const
public IloOplCplexVectors(IloEnv env)
public IloBoolsetStart(IloCplex cplex)
Method Detail

IloOplCplexVectors

public IloOplCplexVectors(IloEnv env)

Constructor.


attach

public void attach(IloIntVarMap vars, IloIntMap values)

Attach a variable map vars to a value map values. After some attachments have been done only the elements with attachments are taken into account to get/set vectors.

Parameters:

vars
The IloNumVarMap to be attached.
values
The IloIntMap to be attached.

attach

public void attach(IloNumVarMap vars, IloNumMap values)

Attach a variable map vars to a value map values. After some attachments have been done only the elements with attachments are taken into account to get/set vectors.

Parameters:

vars
The IloNumVarMap to be attached.
values
The IloNumMap to be attached.

clear

public void clear()

Clears this objects and gets it back to a clean version


deleteStart

public void deleteStart(IloCplex cplex)

Delete all the MIP start information of the given cplex

Parameters:

cplex
Will clear the MIP Starts from this cplex

end

public void end()

Clears the memory used by this object


getNcols

public IloInt getNcols() const

Returns the number of columns in the currently saved basis.

Returns:

An integer to indicate the number of columns in the currently saved basis.

getNrows

public IloInt getNrows() const

Returns the number of rows in the currently saved basis.

Returns:

An integer to indicate the number of rows in the currently saved basis.

getStart

public IloBool getStart(IloCplex cplex)

Saves the MIP start information.

Parameters:

cplex
Saves the MIP start currently available on the given CPLEX instance.

Returns:

IloTrue if MIP start was successfully saved.

getStatus

public IloInt getStatus() const

Returns the CPLEX status of the last invocation of CPLEX API.

Returns:

An integer to indicate the status of the CPLEX instance.

setStart

public IloBool setStart(IloCplex cplex)

Restores the MIP start information.

Note
This utility can restore MIP start only if the problem of the given CPLEX instance has exactly the number of rows and columns as the problem it was taken from.

Parameters:

cplex
Restores this MIP start on the given CPLEX instance.

Returns:

IloTrue if MIP start was successfully restored.