My Project
SOSVariableBranchingWeights Class Reference

the SOSVariableBranchingWeights class. More...

#include <OSOption.h>

Public Member Functions

 SOSVariableBranchingWeights ()
 Default constructor.
 
 ~SOSVariableBranchingWeights ()
 Class destructor.
 
bool IsEqual (SOSVariableBranchingWeights *that)
 A function to check for the equality of two objects.
 
bool setRandom (double density, bool conformant)
 A function to make a random instance of this class.
 
bool deepCopyFrom (SOSVariableBranchingWeights *that)
 A function to make a deep copy of an instance of this class.
 
bool setSOS (int numberOfSOS, SOSWeights **sos)
 A function to set an array of <sos> elements.
 
bool addSOS (int sosIdx, int nvar, double weight, int *idx, double *value, std::string *name)
 A function to add an <sos> element.
 

Public Attributes

int numberOfSOS
 number of <sos> children
 
SOSWeights ** sos
 branching weights for the SOS
 

Detailed Description

the SOSVariableBranchingWeights class.

Author
Robert Fourer, Horand Gassmann, Jun Ma, Kipp Martin
Version
1.0, 21/11/2008
Since
OS 1.1
Remarks
A data structure class that corresponds to an xml element in the OSoL schema.

Definition at line 1853 of file OSOption.h.

Constructor & Destructor Documentation

◆ SOSVariableBranchingWeights()

SOSVariableBranchingWeights::SOSVariableBranchingWeights ( )

Default constructor.

Definition at line 645 of file OSOption.cpp.

◆ ~SOSVariableBranchingWeights()

SOSVariableBranchingWeights::~SOSVariableBranchingWeights ( )

Class destructor.

Definition at line 654 of file OSOption.cpp.

Member Function Documentation

◆ IsEqual()

bool SOSVariableBranchingWeights::IsEqual ( SOSVariableBranchingWeights * that)

A function to check for the equality of two objects.

Definition at line 11041 of file OSOption.cpp.

◆ setRandom()

bool SOSVariableBranchingWeights::setRandom ( double density,
bool conformant )

A function to make a random instance of this class.

Parameters
densitycorresponds to the probability that a particular child element is created
conformantif true enforces side constraints not enforceable in the schema (e.g., agreement of "numberOfXXX" attributes and <XXX> children)

Definition at line 12754 of file OSOption.cpp.

◆ deepCopyFrom()

bool SOSVariableBranchingWeights::deepCopyFrom ( SOSVariableBranchingWeights * that)

A function to make a deep copy of an instance of this class.

Parameters
thatthe instance from which information is to be copied
Returns
whether the copy was created successfully

Definition at line 13870 of file OSOption.cpp.

◆ setSOS()

bool SOSVariableBranchingWeights::setSOS ( int numberOfSOS,
SOSWeights ** sos )

A function to set an array of <sos> elements.

Parameters
numberOfSOSnumber of <sos> elements to be set
sosthe array of <sos> elements that are to be set

Definition at line 5804 of file OSOption.cpp.

◆ addSOS()

bool SOSVariableBranchingWeights::addSOS ( int sosIdx,
int nvar,
double weight,
int * idx,
double * value,
std::string * name )

A function to add an <sos> element.

Parameters
sosIdxthe index of the SOS that is to be added (refer back to OSiL file)
nvarthe number of variables in this SOS that are to be given weights
weighta selection weight for the entire group of variables
idxan array of variable indices
valuethe array of corresponding selection weights
sosthe content of the <sos> element that is to be added

Definition at line 5855 of file OSOption.cpp.

Member Data Documentation

◆ numberOfSOS

int SOSVariableBranchingWeights::numberOfSOS

number of <sos> children

Definition at line 1858 of file OSOption.h.

◆ sos

SOSWeights** SOSVariableBranchingWeights::sos

branching weights for the SOS

Definition at line 1861 of file OSOption.h.


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