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

Detailed Description

LMM system.

#include <maxmin.hpp>

Public Member Functions

 System (bool selective_update)
 Create a new Linear MaxMim system. More...
 
 ~System ()
 Free an existing Linear MaxMin system. More...
 
lmm_constraint_t constraint_new (void *id, double bound_value)
 Create a new Linear MaxMin constraint. More...
 
lmm_variable_t variable_new (simgrid::surf::Action *id, double weight_value, double bound, int number_of_constraints)
 Create a new Linear MaxMin variable. More...
 
void variable_free (lmm_variable_t var)
 Free a variable. More...
 
void expand (lmm_constraint_t cnst, lmm_variable_t var, double value)
 Associate a variable to a constraint with a coefficient. More...
 
void expand_add (lmm_constraint_t cnst, lmm_variable_t var, double value)
 Add value to the coefficient between a constraint and a variable or create one. More...
 
void update_variable_bound (lmm_variable_t var, double bound)
 Update the bound of a variable. More...
 
void update_variable_weight (lmm_variable_t var, double weight)
 Update the weight of a variable. More...
 
void update_constraint_bound (lmm_constraint_t cnst, double bound)
 Update a constraint bound. More...
 
int constraint_used (lmm_constraint_t cnst)
 [brief description] More...
 
void print () const
 Print the lmm system. More...
 
void solve ()
 Solve the lmm system. More...
 

Public Attributes

bool modified
 
boost::intrusive::list< Variable, boost::intrusive::member_hook< Variable, boost::intrusive::list_member_hook<>, &Variable::variable_set_hook > > variable_set
 
boost::intrusive::list< Constraint, boost::intrusive::member_hook< Constraint, boost::intrusive::list_member_hook<>, &Constraint::active_constraint_set_hook > > active_constraint_set
 
boost::intrusive::list< Variable, boost::intrusive::member_hook< Variable, boost::intrusive::list_member_hook<>, &Variable::saturated_variable_set_hook > > saturated_variable_set
 
boost::intrusive::list< Constraint, boost::intrusive::member_hook< Constraint, boost::intrusive::list_member_hook<>, &Constraint::saturated_constraint_set_hook > > saturated_constraint_set
 
simgrid::surf::ActionLmmListPtr keep_track
 
void(* solve_fun )(lmm_system_t self)
 

Constructor & Destructor Documentation

◆ System()

simgrid::kernel::lmm::System::System ( bool  selective_update)
explicit

Create a new Linear MaxMim system.

Parameters
selective_updatewhether we should do lazy updates

◆ ~System()

simgrid::kernel::lmm::System::~System ( )

Free an existing Linear MaxMin system.

Member Function Documentation

◆ constraint_new()

lmm_constraint_t simgrid::kernel::lmm::System::constraint_new ( void id,
double  bound_value 
)

Create a new Linear MaxMin constraint.

Parameters
idData associated to the constraint (e.g.: a network link)
bound_valueThe bound value of the constraint

◆ variable_new()

lmm_variable_t simgrid::kernel::lmm::System::variable_new ( simgrid::surf::Action id,
double  weight_value,
double  bound,
int  number_of_constraints 
)

Create a new Linear MaxMin variable.

Parameters
idData associated to the variable (e.g.: a network communication)
weight_valueThe weight of the variable (0.0 if not used)
boundThe maximum value of the variable (-1.0 if no maximum value)
number_of_constraintsThe maximum number of constraint to associate to the variable

◆ variable_free()

void simgrid::kernel::lmm::System::variable_free ( lmm_variable_t  var)

Free a variable.

Parameters
varThe variable to free

◆ expand()

void simgrid::kernel::lmm::System::expand ( lmm_constraint_t  cnst,
lmm_variable_t  var,
double  value 
)

Associate a variable to a constraint with a coefficient.

Parameters
cnstA constraint
varA variable
valueThe coefficient associated to the variable in the constraint

◆ expand_add()

void simgrid::kernel::lmm::System::expand_add ( lmm_constraint_t  cnst,
lmm_variable_t  var,
double  value 
)

Add value to the coefficient between a constraint and a variable or create one.

Parameters
cnstA constraint
varA variable
valueThe value to add to the coefficient associated to the variable in the constraint

◆ update_variable_bound()

void simgrid::kernel::lmm::System::update_variable_bound ( lmm_variable_t  var,
double  bound 
)

Update the bound of a variable.

Attribute the value bound to var->bound.

Parameters
varA constraint
boundThe new bound
varthe lmm_variable_t
boundthe new bound to associate with var

Makes var->bound equal to bound. Whenever this function is called a change is signed in the system. To avoid false system changing detection it is a good idea to test (bound != 0) before calling it.

◆ update_variable_weight()

void simgrid::kernel::lmm::System::update_variable_weight ( lmm_variable_t  var,
double  weight 
)

Update the weight of a variable.

Parameters
varA variable
weightThe new weight of the variable

◆ update_constraint_bound()

void simgrid::kernel::lmm::System::update_constraint_bound ( lmm_constraint_t  cnst,
double  bound 
)

Update a constraint bound.

Parameters
cnstA constraint
boundThe new bound of the consrtaint

◆ constraint_used()

int simgrid::kernel::lmm::System::constraint_used ( lmm_constraint_t  cnst)
inline

[brief description]

Parameters
cnstA constraint
Returns
[description]

◆ print()

void simgrid::kernel::lmm::System::print ( ) const

Print the lmm system.

◆ solve()

void simgrid::kernel::lmm::System::solve ( )

Solve the lmm system.

Member Data Documentation

◆ modified

bool simgrid::kernel::lmm::System::modified

◆ variable_set

boost::intrusive::list<Variable, boost::intrusive::member_hook<Variable, boost::intrusive::list_member_hook<>, &Variable::variable_set_hook> > simgrid::kernel::lmm::System::variable_set

◆ active_constraint_set

boost::intrusive::list<Constraint, boost::intrusive::member_hook<Constraint, boost::intrusive::list_member_hook<>, &Constraint::active_constraint_set_hook> > simgrid::kernel::lmm::System::active_constraint_set

◆ saturated_variable_set

boost::intrusive::list<Variable, boost::intrusive::member_hook<Variable, boost::intrusive::list_member_hook<>, &Variable::saturated_variable_set_hook> > simgrid::kernel::lmm::System::saturated_variable_set

◆ saturated_constraint_set

boost::intrusive::list<Constraint, boost::intrusive::member_hook<Constraint, boost::intrusive::list_member_hook<>, &Constraint::saturated_constraint_set_hook> > simgrid::kernel::lmm::System::saturated_constraint_set

◆ keep_track

simgrid::surf::ActionLmmListPtr simgrid::kernel::lmm::System::keep_track

◆ solve_fun

void(* simgrid::kernel::lmm::System::solve_fun) (lmm_system_t self)

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