*********/
Model::Model(const char *name)
- : p_name(name)
- , p_maxminSystem(NULL)
+ : p_maxminSystem(NULL)
+ , p_name(name)
{
p_readyActionSet = new ActionList();
p_runningActionSet = new ActionList();
{}
Resource::Resource(surf_model_t model, const char *name, xbt_dict_t props)
- : p_name(xbt_strdup(name)), p_properties(props), p_model(model)
- , m_running(true), m_stateCurrent(SURF_RESOURCE_ON)
+ : m_stateCurrent(SURF_RESOURCE_ON)
+ , p_name(xbt_strdup(name)), p_properties(props), p_model(model)
+ , m_running(true)
{}
Resource::Resource(surf_model_t model, const char *name, xbt_dict_t props, lmm_constraint_t constraint)
- : p_name(xbt_strdup(name)), p_properties(props), p_model(model)
- , m_running(true), m_stateCurrent(SURF_RESOURCE_ON), p_constraint(constraint)
+ : m_stateCurrent(SURF_RESOURCE_ON)
+ , p_name(xbt_strdup(name)), p_properties(props), p_model(model)
+ , m_running(true), p_constraint(constraint)
{}
Resource::Resource(surf_model_t model, const char *name, xbt_dict_t props, e_surf_resource_state_t stateInit)
- : p_name(xbt_strdup(name)), p_properties(props), p_model(model)
- , m_running(true), m_stateCurrent(stateInit)
+ : m_stateCurrent(stateInit)
+ , p_name(xbt_strdup(name)), p_properties(props), p_model(model)
+ , m_running(true)
{}
Resource::~Resource() {
Action::Action(ModelPtr model, double cost, bool failed)
: m_priority(1.0)
- , m_failed(failed)
- , m_start(surf_get_clock()), m_finish(-1.0)
+ , m_refcount(1)
, m_remains(cost)
, m_maxDuration(NO_MAX_DURATION)
+ , m_finish(-1.0)
+ , m_failed(failed)
+ , m_start(surf_get_clock())
, m_cost(cost)
- , p_data(NULL)
, p_model(model)
- , m_refcount(1)
+ , p_data(NULL)
+ , p_variable(NULL)
, m_lastValue(0)
, m_lastUpdate(0)
, m_suspended(false)
- , p_variable(NULL)
{
#ifdef HAVE_TRACING
p_category = NULL;
Action::Action(ModelPtr model, double cost, bool failed, lmm_variable_t var)
: m_priority(1.0)
- , m_failed(failed)
- , m_start(surf_get_clock()), m_finish(-1.0)
+ , m_refcount(1)
, m_remains(cost)
, m_maxDuration(NO_MAX_DURATION)
+ , m_finish(-1.0)
+ , m_failed(failed)
+ , m_start(surf_get_clock())
, m_cost(cost)
- , p_data(NULL)
, p_model(model)
- , m_refcount(1)
+ , p_data(NULL)
+ , p_variable(var)
, m_lastValue(0)
, m_lastUpdate(0)
, m_suspended(false)
- , p_variable(var)
{
#ifdef HAVE_TRACING
p_category = NULL;
-/* Copyright (c) 2004-2013. The SimGrid Team.
+/* Copyright (c) 2004-2014. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
e_surf_resource_state_t m_stateCurrent;
private:
- ModelPtr p_model;
const char *p_name;
xbt_dict_t p_properties;
+ ModelPtr p_model;
void *p_resource;
bool m_running;
ActionLmmListPtr p_modifiedSet;
xbt_heap_t p_actionHeap;
int m_selectiveUpdate;
- ModelPtr p_model;
double m_bound; /**< the capping of the CPU use */
bool m_failed;
double m_start; /**< start time */
int m_latencyLimited; /**< Set to 1 if is limited by latency, 0 otherwise */
#endif
int m_cost;
+ ModelPtr p_model;
void *p_data; /**< for your convenience */
/* LMM */
protected:
lmm_variable_t p_variable;
- double m_lastUpdate;
double m_lastValue;
+ double m_lastUpdate;
int m_suspended;
int m_indexHeap;
enum heap_action_type m_hat;