CONOPT
Loading...
Searching...
No Matches

the variable data More...

#include <modeldata.h>

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 42 of file modeldata.h.

Constructor & Destructor Documentation

◆ ConoptVariable()

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

Definition at line 44 of file modeldata.h.

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 62 of file modeldata.h.

◆ sortNonzeros()

void ConoptVariable::sortNonzeros ( )
inline

sorts the non-zeros by constraint index.

Note
this is used internally.

Definition at line 76 of file modeldata.h.

Field Documentation

◆ index

int ConoptVariable::index

the index of the variable in the problem

Definition at line 84 of file modeldata.h.

◆ lower

double ConoptVariable::lower

the lower bound of the variables

Definition at line 85 of file modeldata.h.

◆ upper

double ConoptVariable::upper

the upper bounds of the variables

Definition at line 86 of file modeldata.h.

◆ curr

double ConoptVariable::curr

the initial values of the variables. This is 0 by default.

Definition at line 87 of file modeldata.h.

◆ varstatus

int ConoptVariable::varstatus

the initial status of the variables. The depends on the COIDEF_IniStat setting.

Definition at line 88 of file modeldata.h.

◆ consindex_

std::vector<int> ConoptVariable::consindex_

the index of the constraints

Definition at line 91 of file modeldata.h.

◆ value_

std::vector<double> ConoptVariable::value_

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

Definition at line 92 of file modeldata.h.

◆ nlflag_

std::vector<int> ConoptVariable::nlflag_

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

Definition at line 93 of file modeldata.h.

◆ sortorder_

std::vector<int> ConoptVariable::sortorder_

a vector to support the sorting of the non-zeros

Definition at line 96 of file modeldata.h.


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