CONOPT
Loading...
Searching...
No Matches

the variable data More...

#include <conopt.hpp>

Public Member Functions

 ConoptVariable (int idx, double low, double up, double cur=0, int varstat=-1)
 
void addNonzero (int conindex, double value, int nlflag)
 adds a non-zero to the variable data
 
void sortNonzeros ()
 sorts the non-zeros by constraint index.
 

Data Fields

int index
 
double lower
 
double upper
 
double curr
 
int varstatus
 
std::vector< int > consindex_
 
std::vector< double > value_
 
std::vector< int > nlflag_
 
std::vector< int > sortorder_
 

Detailed Description

the variable data

This struct is used internally for supplying the variable data to CONOPT. The user is able to query this data from the ConoptModelData object. However, the user is not able to change the data after the variable has been added to CONOPT.

Definition at line 517 of file conopt.hpp.

Constructor & Destructor Documentation

◆ ConoptVariable()

ConoptVariable::ConoptVariable ( int idx,
double low,
double up,
double cur = 0,
int varstat = -1 )
inline

Definition at line 519 of file conopt.hpp.

Member Function Documentation

◆ addNonzero()

void ConoptVariable::addNonzero ( int conindex,
double value,
int nlflag )
inline

adds a non-zero to the variable data

Note
this is used internally.

Definition at line 537 of file conopt.hpp.

◆ sortNonzeros()

void ConoptVariable::sortNonzeros ( )
inline

sorts the non-zeros by constraint index.

Note
this is used internally.

Definition at line 551 of file conopt.hpp.

Field Documentation

◆ index

int ConoptVariable::index

the index of the variable in the problem

Definition at line 559 of file conopt.hpp.

◆ lower

double ConoptVariable::lower

the lower bound of the variable

Definition at line 560 of file conopt.hpp.

◆ upper

double ConoptVariable::upper

the upper bound of the variable

Definition at line 561 of file conopt.hpp.

◆ curr

double ConoptVariable::curr

the initial value of the variable. This is 0 by default.

Definition at line 562 of file conopt.hpp.

◆ varstatus

int ConoptVariable::varstatus

the initial status of the variable. This depends on the COIDEF_IniStat setting.

Definition at line 563 of file conopt.hpp.

◆ consindex_

std::vector<int> ConoptVariable::consindex_

the index of the constraints

Definition at line 566 of file conopt.hpp.

◆ value_

std::vector<double> ConoptVariable::value_

the non-zero for linear terms, for non-linear terms this is ignored

Definition at line 567 of file conopt.hpp.

◆ nlflag_

std::vector<int> ConoptVariable::nlflag_

indicator whether the non-zero is part of a non-linear term

Definition at line 568 of file conopt.hpp.

◆ sortorder_

std::vector<int> ConoptVariable::sortorder_

a vector to support the sorting of the non-zeros

Definition at line 571 of file conopt.hpp.


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