SimGrid  3.18
Versatile Simulation of Distributed Systems
simgrid::kernel::lmm::Variable Class Reference

Detailed Description

LMM variable.

When something prevents us from enabling a variable, we "stage" the weight that we would have like to set, so that as soon as possible we enable the variable with desired weight

#include <maxmin.hpp>

Public Member Functions

void initialize (simgrid::surf::Action *id_value, double sharing_weight_value, double bound_value, int number_of_constraints, unsigned visited_value)
 
double get_value () const
 Get the value of the variable after the last lmm solve. More...
 
double get_bound () const
 Get the maximum value of the variable (-1.0 if no maximum value) More...
 
void set_concurrency_share (short int value)
 Set the concurrent share of the variable. More...
 
lmm_constraint_t get_constraint (unsigned num) const
 Get the numth constraint associated to the variable. More...
 
double get_constraint_weight (unsigned num) const
 Get the weigth of the numth constraint associated to the variable. More...
 
int get_number_of_constraint () const
 Get the number of constraint associated to a variable. More...
 
simgrid::surf::Actionget_id () const
 Get the data associated to a variable. More...
 
double get_weight () const
 Get the weight of a variable. More...
 
int get_min_concurrency_slack () const
 Measure the minimum concurrency slack across all constraints where the given var is involved. More...
 
int can_enable () const
 Check if a variable can be enabled Make sure to set staged_weight before, if your intent is only to check concurrency. More...
 

Public Attributes

boost::intrusive::list_member_hook variable_set_hook
 
boost::intrusive::list_member_hook saturated_variable_set_hook
 
std::vector< Elementcnsts
 
double sharing_weight
 
double staged_weight
 
double bound
 
double value
 
short int concurrency_share
 
simgrid::surf::Actionid
 
int id_int
 
unsigned visited
 
double mu
 
double new_mu
 
double(* func_f )(const Variable &var, double x)
 
double(* func_fp )(const Variable &var, double x)
 
double(* func_fpi )(const Variable &var, double x)
 

Member Function Documentation

◆ initialize()

void simgrid::kernel::lmm::Variable::initialize ( simgrid::surf::Action id_value,
double  sharing_weight_value,
double  bound_value,
int  number_of_constraints,
unsigned  visited_value 
)

◆ get_value()

double simgrid::kernel::lmm::Variable::get_value ( ) const
inline

Get the value of the variable after the last lmm solve.

Returns
The value of the variable

◆ get_bound()

double simgrid::kernel::lmm::Variable::get_bound ( ) const
inline

Get the maximum value of the variable (-1.0 if no maximum value)

Returns
The bound of the variable

◆ set_concurrency_share()

void simgrid::kernel::lmm::Variable::set_concurrency_share ( short int  value)
inline

Set the concurrent share of the variable.

Parameters
valueThe new concurrency share

◆ get_constraint()

lmm_constraint_t simgrid::kernel::lmm::Variable::get_constraint ( unsigned  num) const
inline

Get the numth constraint associated to the variable.

Parameters
numThe rank of constraint we want to get
Returns
The numth constraint

◆ get_constraint_weight()

double simgrid::kernel::lmm::Variable::get_constraint_weight ( unsigned  num) const
inline

Get the weigth of the numth constraint associated to the variable.

Parameters
numThe rank of constraint we want to get
Returns
The numth constraint

◆ get_number_of_constraint()

int simgrid::kernel::lmm::Variable::get_number_of_constraint ( ) const
inline

Get the number of constraint associated to a variable.

Returns
The number of constraint associated to the variable

◆ get_id()

simgrid::surf::Action* simgrid::kernel::lmm::Variable::get_id ( ) const
inline

Get the data associated to a variable.

Returns
The data associated to the variable

◆ get_weight()

double simgrid::kernel::lmm::Variable::get_weight ( ) const
inline

Get the weight of a variable.

Returns
The weight of the variable

◆ get_min_concurrency_slack()

int simgrid::kernel::lmm::Variable::get_min_concurrency_slack ( ) const

Measure the minimum concurrency slack across all constraints where the given var is involved.

◆ can_enable()

int simgrid::kernel::lmm::Variable::can_enable ( ) const
inline

Check if a variable can be enabled Make sure to set staged_weight before, if your intent is only to check concurrency.

Member Data Documentation

◆ variable_set_hook

boost::intrusive::list_member_hook simgrid::kernel::lmm::Variable::variable_set_hook

◆ saturated_variable_set_hook

boost::intrusive::list_member_hook simgrid::kernel::lmm::Variable::saturated_variable_set_hook

◆ cnsts

std::vector<Element> simgrid::kernel::lmm::Variable::cnsts

◆ sharing_weight

double simgrid::kernel::lmm::Variable::sharing_weight

◆ staged_weight

double simgrid::kernel::lmm::Variable::staged_weight

◆ bound

double simgrid::kernel::lmm::Variable::bound

◆ value

double simgrid::kernel::lmm::Variable::value

◆ concurrency_share

short int simgrid::kernel::lmm::Variable::concurrency_share

◆ id

simgrid::surf::Action* simgrid::kernel::lmm::Variable::id

◆ id_int

int simgrid::kernel::lmm::Variable::id_int

◆ visited

unsigned simgrid::kernel::lmm::Variable::visited

◆ mu

double simgrid::kernel::lmm::Variable::mu

◆ new_mu

double simgrid::kernel::lmm::Variable::new_mu

◆ func_f

double(* simgrid::kernel::lmm::Variable::func_f) (const Variable &var, double x)

◆ func_fp

double(* simgrid::kernel::lmm::Variable::func_fp) (const Variable &var, double x)

◆ func_fpi

double(* simgrid::kernel::lmm::Variable::func_fpi) (const Variable &var, double x)

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