List of all members | Public Member Functions | Public Attributes
casadi::CplexMemory Struct Reference

#include <cplex_interface.hpp>

Detailed Description

Definition at line 47 of file cplex_interface.hpp.

Inheritance diagram for casadi::CplexMemory:
Inheritance graph
[legend]
Collaboration diagram for casadi::CplexMemory:
Collaboration graph
[legend]

Public Member Functions

 CplexMemory ()
 Constructor. More...
 
 ~CplexMemory ()
 Destructor. More...
 
void add_stat (const std::string &s)
 

Public Attributes

bool is_warm
 Indicates if we have to warm-start. More...
 
casadi_int objsen
 Nature of problem (always minimization) More...
 
std::vector< char > sense
 Determines relation >,<, = in the linear constraints. More...
 
std::vector< int > matcnt
 Coefficients of matrix A (constraint Jacobian) More...
 
std::vector< double > rhs
 Right-hand side of constraints. More...
 
std::vector< double > rngval
 Range of constraints. More...
 
std::vector< int > qmatcnt
 Coefficients of matrix H (objective Hessian) More...
 
std::vector< int > cstat
 Storage for basis info of primal variables. More...
 
std::vector< int > rstat
 Storage for basis info of slack variables. More...
 
CPXENVptr env
 CPLEX environment. More...
 
CPXLPptr lp
 
std::vector< CPXDIM > a_row
 
std::vector< CPXDIM > h_row
 
std::vector< CPXNNZ > a_colind
 
std::vector< CPXNNZ > h_colind
 
std::vector< CPXNNZ > socp_colind
 
std::vector< CPXDIM > socp_qind
 
std::vector< CPXDIM > socp_lind
 
std::vector< CPXDIM > socp_row
 
std::vector< double > socp_qval
 
std::vector< double > socp_lbound
 
std::vector< double > socp_lval
 
std::vector< double > socp_lbx
 
int return_status
 
casadi_qp_data< double > d_qp
 
bool stats_available
 
std::map< std::string, FStatsfstats
 
FStatst_total
 

Constructor & Destructor Documentation

◆ CplexMemory()

casadi::CplexMemory::CplexMemory ( )

Definition at line 726 of file cplex_interface.cpp.

726  {
727  // Setting warm-start flag
728  this->is_warm = false;
729 
730  // Set pointer to zero to avoid deleting a nonexisting instance
731  this->env = nullptr;
732  this->lp = nullptr;
733  }
bool is_warm
Indicates if we have to warm-start.
CPXENVptr env
CPLEX environment.

References env, is_warm, and lp.

◆ ~CplexMemory()

casadi::CplexMemory::~CplexMemory ( )

Definition at line 735 of file cplex_interface.cpp.

735  {
736  // Return flag
737  casadi_int status;
738 
739  // Only free if Cplex problem if it has been allocated
740  if (this->lp!=nullptr) {
741  status = CPXXfreeprob(this->env, &this->lp);
742  if (status!=0) {
743  uerr() << "CPXXfreeprob failed, error code " << status << ".\n";
744  }
745  this->lp = nullptr;
746  }
747 
748  // Closing down license
749  if (this->env!=nullptr) {
750  status = CPXXcloseCPLEX(&this->env);
751  if (status!=0) {
752  uerr() << "CPXXcloseCPLEX failed, error code " << status << ".\n";
753  }
754  this->env = nullptr;
755  }
756  }
std::ostream & uerr()

References env, lp, and casadi::uerr().

Member Function Documentation

◆ add_stat()

void casadi::ProtoFunctionMemory::add_stat ( const std::string &  s)
inlineinherited

Member Data Documentation

◆ a_colind

std::vector<CPXNNZ> casadi::CplexMemory::a_colind

Definition at line 80 of file cplex_interface.hpp.

◆ a_row

std::vector<CPXDIM> casadi::CplexMemory::a_row

Definition at line 79 of file cplex_interface.hpp.

◆ cstat

std::vector<int> casadi::CplexMemory::cstat

Definition at line 70 of file cplex_interface.hpp.

◆ d_qp

casadi_qp_data<double> casadi::ConicMemory::d_qp
inherited

Definition at line 39 of file conic_impl.hpp.

Referenced by casadi::Conic::get_stats().

◆ env

CPXENVptr casadi::CplexMemory::env

Definition at line 76 of file cplex_interface.hpp.

Referenced by CplexMemory(), and ~CplexMemory().

◆ fstats

std::map<std::string, FStats> casadi::ProtoFunctionMemory::fstats
inherited

◆ h_colind

std::vector<CPXNNZ> casadi::CplexMemory::h_colind

Definition at line 80 of file cplex_interface.hpp.

◆ h_row

std::vector<CPXDIM> casadi::CplexMemory::h_row

Definition at line 79 of file cplex_interface.hpp.

◆ is_warm

bool casadi::CplexMemory::is_warm

Definition at line 49 of file cplex_interface.hpp.

Referenced by CplexMemory().

◆ lp

CPXLPptr casadi::CplexMemory::lp

Definition at line 77 of file cplex_interface.hpp.

Referenced by CplexMemory(), and ~CplexMemory().

◆ matcnt

std::vector<int> casadi::CplexMemory::matcnt

Definition at line 58 of file cplex_interface.hpp.

◆ objsen

casadi_int casadi::CplexMemory::objsen

Definition at line 52 of file cplex_interface.hpp.

◆ qmatcnt

std::vector<int> casadi::CplexMemory::qmatcnt

Definition at line 67 of file cplex_interface.hpp.

◆ return_status

int casadi::CplexMemory::return_status

Definition at line 86 of file cplex_interface.hpp.

◆ rhs

std::vector<double> casadi::CplexMemory::rhs

Definition at line 61 of file cplex_interface.hpp.

◆ rngval

std::vector<double> casadi::CplexMemory::rngval

Definition at line 64 of file cplex_interface.hpp.

◆ rstat

std::vector<int> casadi::CplexMemory::rstat

Definition at line 73 of file cplex_interface.hpp.

◆ sense

std::vector<char> casadi::CplexMemory::sense

Definition at line 55 of file cplex_interface.hpp.

◆ socp_colind

std::vector<CPXNNZ> casadi::CplexMemory::socp_colind

Definition at line 82 of file cplex_interface.hpp.

◆ socp_lbound

std::vector<double> casadi::CplexMemory::socp_lbound

Definition at line 84 of file cplex_interface.hpp.

◆ socp_lbx

std::vector<double> casadi::CplexMemory::socp_lbx

Definition at line 84 of file cplex_interface.hpp.

◆ socp_lind

std::vector<CPXDIM> casadi::CplexMemory::socp_lind

Definition at line 83 of file cplex_interface.hpp.

◆ socp_lval

std::vector<double> casadi::CplexMemory::socp_lval

Definition at line 84 of file cplex_interface.hpp.

◆ socp_qind

std::vector<CPXDIM> casadi::CplexMemory::socp_qind

Definition at line 83 of file cplex_interface.hpp.

◆ socp_qval

std::vector<double> casadi::CplexMemory::socp_qval

Definition at line 84 of file cplex_interface.hpp.

◆ socp_row

std::vector<CPXDIM> casadi::CplexMemory::socp_row

Definition at line 83 of file cplex_interface.hpp.

◆ stats_available

bool casadi::FunctionMemory::stats_available
inherited

◆ t_total

FStats* casadi::ProtoFunctionMemory::t_total
inherited

Definition at line 71 of file function_internal.hpp.

Referenced by casadi::LinsolCall< Tr >::eval(), and casadi::Linsol::solve().


The documentation for this struct was generated from the following files: