virtual ~Resource();
/** @brief Get the Model of the current Resource */
- Model* model() const;
+ Model* get_model() const;
/** @brief Get the name of the current Resource */
const std::string& get_name() const;
bool operator==(const Resource& other) const;
- /**
- * @brief Apply an event of external load event to that resource
- *
- * @param event What happened
- * @param value [TODO]
- */
+ /** @brief Apply an event of external load event to that resource */
virtual void apply_event(TraceEvent* event, double value) = 0;
/** @brief Check if the current Resource is used (if it currently serves an action) */
virtual bool is_used() = 0;
/** @brief returns the current load (in flops per second, byte per second or similar) */
- virtual double getLoad();
+ virtual double get_load();
/** @brief Check if the current Resource is active */
- virtual bool isOn() const;
+ virtual bool is_on() const;
/** @brief Check if the current Resource is shut down */
- virtual bool isOff() const;
+ virtual bool is_off() const;
/** @brief Turn on the current Resource */
- virtual void turnOn();
+ virtual void turn_on();
/** @brief Turn off the current Resource */
- virtual void turnOff();
+ virtual void turn_off();
private:
std::string name_;
public: /* LMM */
/** @brief Get the lmm constraint associated to this Resource if it is part of a LMM component (or null if none) */
- kernel::lmm::Constraint* constraint() const;
+ lmm::Constraint* get_constraint() const;
private:
kernel::lmm::Constraint* const constraint_ = nullptr;
Resource::~Resource() = default;
-bool Resource::isOn() const
+bool Resource::is_on() const
{
return is_on_;
}
-bool Resource::isOff() const
+bool Resource::is_off() const
{
return not is_on_;
}
-void Resource::turnOn()
+void Resource::turn_on()
{
is_on_ = true;
}
-void Resource::turnOff()
+void Resource::turn_off()
{
is_on_ = false;
}
-double Resource::getLoad()
+double Resource::get_load()
{
return constraint_->get_usage();
}
-Model* Resource::model() const
+Model* Resource::get_model() const
{
return model_;
}
return name_ == other.name_;
}
-kernel::lmm::Constraint* Resource::constraint() const
+kernel::lmm::Constraint* Resource::get_constraint() const
{
return constraint_;
}
// this VM got in the sharing on the PM
XBT_DEBUG("assign %f to vm %s @ pm %s", solved_value, ws_vm->get_cname(), ws_vm->getPm()->get_cname());
- xbt_assert(cpu->model() == surf_cpu_model_vm);
- kernel::lmm::System* vcpu_system = cpu->model()->get_maxmin_system();
- vcpu_system->update_constraint_bound(cpu->constraint(), virt_overhead * solved_value);
+ xbt_assert(cpu->get_model() == surf_cpu_model_vm);
+ kernel::lmm::System* vcpu_system = cpu->get_model()->get_maxmin_system();
+ vcpu_system->update_constraint_bound(cpu->get_constraint(), virt_overhead * solved_value);
}
/* 2. Calculate resource share at the virtual machine layer. */
if (isOff()) {
simgrid::simix::kernelImmediate([this] {
this->extension<simgrid::simix::Host>()->turnOn();
- this->pimpl_cpu->turnOn();
+ this->pimpl_cpu->turn_on();
onStateChange(*this);
});
}
}
bool Host::isOn() {
- return this->pimpl_cpu->isOn();
+ return this->pimpl_cpu->is_on();
}
int Host::getPstatesCount() const
double Host::getLoad()
{
- return this->pimpl_cpu->getLoad();
+ return this->pimpl_cpu->get_load();
}
} // namespace simgrid
double Link::getUsage()
{
- return this->pimpl_->constraint()->get_usage();
+ return this->pimpl_->get_constraint()->get_usage();
}
void Link::turnOn()
{
- simgrid::simix::kernelImmediate([this]() {
- this->pimpl_->turnOn();
- });
+ simgrid::simix::kernelImmediate([this]() { this->pimpl_->turn_on(); });
}
void Link::turnOff()
{
- simgrid::simix::kernelImmediate([this]() {
- this->pimpl_->turnOff();
- });
+ simgrid::simix::kernelImmediate([this]() { this->pimpl_->turn_off(); });
}
void* Link::getData()
xbt_assert((host != nullptr), "Invalid parameters");
if (h->isOn()) {
- h->pimpl_cpu->turnOff();
+ h->pimpl_cpu->turn_off();
/* Clean Simulator data */
if (not host->process_list.empty()) {
/* iterate for all virtual machines */
for (s4u::VirtualMachine* const& ws_vm : vm::VirtualMachineImpl::allVms_) {
Cpu* cpu = ws_vm->pimpl_cpu;
- int active_tasks = cpu->constraint()->get_variable_amount();
+ int active_tasks = cpu->get_constraint()->get_variable_amount();
/* The impact of the VM over its PM is the min between its vCPU amount and the amount of tasks it contains */
int impact = std::min(active_tasks, ws_vm->getImpl()->coreAmount());
, size_(size)
, attach_(attach)
{
- StorageImpl::turnOn();
+ StorageImpl::turn_on();
XBT_DEBUG("Create resource with Bread '%f' Bwrite '%f' and Size '%llu'", bread, bwrite, size);
constraintRead_ = maxminSystem->constraint_new(this, bread);
constraintWrite_ = maxminSystem->constraint_new(this, bwrite);
THROW_UNIMPLEMENTED;
}
-void StorageImpl::turnOn()
+void StorageImpl::turn_on()
{
- if (isOff()) {
- Resource::turnOn();
+ if (is_off()) {
+ Resource::turn_on();
storageStateChangedCallbacks(this, 0, 1);
}
}
-void StorageImpl::turnOff()
+void StorageImpl::turn_off()
{
- if (isOn()) {
- Resource::turnOff();
+ if (is_on()) {
+ Resource::turn_off();
storageStateChangedCallbacks(this, 1, 0);
}
}
void apply_event(tmgr_trace_event_t event, double value) override;
- void turnOn() override;
- void turnOff() override;
+ void turn_on() override;
+ void turn_off() override;
/**
* @brief Read a file
CpuCas01::~CpuCas01()
{
- if (model() == surf_cpu_model_pm)
+ if (get_model() == surf_cpu_model_pm)
speedPerPstate_.clear();
}
bool CpuCas01::is_used()
{
- return model()->get_maxmin_system()->constraint_used(constraint());
+ return get_model()->get_maxmin_system()->constraint_used(get_constraint());
}
/** @brief take into account changes of speed (either load or max) */
kernel::lmm::Variable* var = nullptr;
const_lmm_element_t elem = nullptr;
- model()->get_maxmin_system()->update_constraint_bound(constraint(), coresAmount_ * speed_.scale * speed_.peak);
- while ((var = constraint()->get_variable(&elem))) {
+ get_model()->get_maxmin_system()->update_constraint_bound(get_constraint(),
+ coresAmount_ * speed_.scale * speed_.peak);
+ while ((var = get_constraint()->get_variable(&elem))) {
CpuCas01Action* action = static_cast<CpuCas01Action*>(var->get_id());
- model()->get_maxmin_system()->update_variable_bound(action->get_variable(),
- action->requestedCore() * speed_.scale * speed_.peak);
+ get_model()->get_maxmin_system()->update_variable_bound(action->get_variable(),
+ action->requestedCore() * speed_.scale * speed_.peak);
}
Cpu::onSpeedChange();
xbt_assert(coresAmount_ == 1, "FIXME: add state change code also for constraint_core[i]");
if (value > 0) {
- if(isOff())
+ if (is_off())
host_that_restart.push_back(getHost());
- turnOn();
+ turn_on();
} else {
- kernel::lmm::Constraint* cnst = constraint();
+ kernel::lmm::Constraint* cnst = get_constraint();
kernel::lmm::Variable* var = nullptr;
const_lmm_element_t elem = nullptr;
double date = surf_get_clock();
- turnOff();
+ turn_off();
while ((var = cnst->get_variable(&elem))) {
kernel::resource::Action* action = static_cast<kernel::resource::Action*>(var->get_id());
/** @brief Start a new execution on this CPU lasting @param size flops and using one core */
CpuAction* CpuCas01::execution_start(double size)
{
- return new CpuCas01Action(model(), size, isOff(), speed_.scale * speed_.peak, constraint());
+ return new CpuCas01Action(get_model(), size, is_off(), speed_.scale * speed_.peak, get_constraint());
}
CpuAction* CpuCas01::execution_start(double size, int requestedCores)
{
- return new CpuCas01Action(model(), size, isOff(), speed_.scale * speed_.peak, constraint(), requestedCores);
+ return new CpuCas01Action(get_model(), size, is_off(), speed_.scale * speed_.peak, get_constraint(), requestedCores);
}
CpuAction *CpuCas01::sleep(double duration)
duration = std::max(duration, sg_surf_precision);
XBT_IN("(%s,%g)", get_cname(), duration);
- CpuCas01Action* action = new CpuCas01Action(model(), 1.0, isOff(), speed_.scale * speed_.peak, constraint());
+ CpuCas01Action* action = new CpuCas01Action(get_model(), 1.0, is_off(), speed_.scale * speed_.peak, get_constraint());
// FIXME: sleep variables should not consume 1.0 in System::expand()
action->set_max_duration(duration);
if (duration < 0) { // NO_MAX_DURATION
/* Move to the *end* of the corresponding action set. This convention is used to speed up update_resource_state */
simgrid::xbt::intrusive_erase(*action->get_state_set(), *action);
- action->state_set_ = &static_cast<CpuCas01Model*>(model())->cpuRunningActionSetThatDoesNotNeedBeingChecked_;
+ action->state_set_ = &static_cast<CpuCas01Model*>(get_model())->cpuRunningActionSetThatDoesNotNeedBeingChecked_;
action->get_state_set()->push_back(*action);
}
- model()->get_maxmin_system()->update_variable_weight(action->get_variable(), 0.0);
- if (model()->get_update_algorithm() == kernel::resource::Model::UpdateAlgo::Lazy) { // remove action from the heap
- model()->get_action_heap().remove(action);
+ get_model()->get_maxmin_system()->update_variable_weight(action->get_variable(), 0.0);
+ if (get_model()->get_update_algorithm() == kernel::resource::Model::UpdateAlgo::Lazy) { // remove action from the heap
+ get_model()->get_action_heap().remove(action);
// this is necessary for a variable with weight 0 since such variables are ignored in lmm and we need to set its
// max_duration correctly at the next call to share_resources
- model()->get_modified_set()->push_front(*action);
+ get_model()->get_modified_set()->push_front(*action);
}
XBT_OUT();
} else if (event == stateEvent_) {
if (value > 0) {
- if(isOff())
+ if (is_off())
host_that_restart.push_back(getHost());
- turnOn();
+ turn_on();
} else {
- turnOff();
+ turn_off();
double date = surf_get_clock();
/* put all action running on cpu to failed */
action.get_state() == kernel::resource::Action::State::not_in_the_system) {
action.set_finish_time(date);
action.set_state(kernel::resource::Action::State::failed);
- model()->get_action_heap().remove(&action);
+ get_model()->get_action_heap().remove(&action);
}
}
}
}
/* add in action heap */
if (min_finish > NO_MAX_DURATION)
- model()->get_action_heap().update(&action, min_finish, kernel::resource::ActionHeap::Type::unset);
+ get_model()->get_action_heap().update(&action, min_finish, kernel::resource::ActionHeap::Type::unset);
else
- model()->get_action_heap().remove(&action);
+ get_model()->get_action_heap().remove(&action);
XBT_DEBUG("Update finish time: Cpu(%s) Action: %p, Start Time: %f Finish Time: %f Max duration %f", get_cname(),
&action, action.get_start_time(), action.get_finish_time(), action.get_max_duration());
XBT_DEBUG("Flops total: %f, Last update %f", area_total, last_update_);
for (CpuTiAction& action : action_set_) {
/* action not running, skip it */
- if (action.get_state_set() != model()->get_running_action_set())
+ if (action.get_state_set() != get_model()->get_running_action_set())
continue;
/* bogus priority, skip it */
CpuAction *CpuTi::execution_start(double size)
{
XBT_IN("(%s,%g)", get_cname(), size);
- CpuTiAction* action = new CpuTiAction(static_cast<CpuTiModel*>(model()), size, isOff(), this);
+ CpuTiAction* action = new CpuTiAction(static_cast<CpuTiModel*>(get_model()), size, is_off(), this);
action_set_.push_back(*action);
duration = std::max(duration, sg_surf_precision);
XBT_IN("(%s,%g)", get_cname(), duration);
- CpuTiAction* action = new CpuTiAction(static_cast<CpuTiModel*>(model()), 1.0, isOff(), this);
+ CpuTiAction* action = new CpuTiAction(static_cast<CpuTiModel*>(get_model()), 1.0, is_off(), this);
action->set_max_duration(duration);
action->suspended_ = kernel::resource::Action::SuspendStates::sleeping;
if (duration == NO_MAX_DURATION) {
/* Move to the *end* of the corresponding action set. This convention is used to speed up update_resource_state */
simgrid::xbt::intrusive_erase(*action->get_state_set(), *action);
- action->state_set_ = &static_cast<CpuTiModel*>(model())->runningActionSetThatDoesNotNeedBeingChecked_;
+ action->state_set_ = &static_cast<CpuTiModel*>(get_model())->runningActionSetThatDoesNotNeedBeingChecked_;
action->get_state_set()->push_back(*action);
}
void CpuTi::set_modified(bool modified)
{
- CpuTiList& modifiedCpu = static_cast<CpuTiModel*>(model())->modified_cpus_;
+ CpuTiList& modifiedCpu = static_cast<CpuTiModel*>(get_model())->modified_cpus_;
if (modified) {
if (not cpu_ti_hook.is_linked()) {
modifiedCpu.push_back(*this);
src->get_cname(), dst->get_cname());
for (auto const& link : route)
- if (link->isOff())
+ if (link->is_off())
failed = 1;
if (sg_network_crosstraffic == 1) {
dst->routeTo(src, back_route, nullptr);
for (auto const& link : back_route)
- if (link->isOff())
+ if (link->is_off())
failed = 1;
}
}
for (auto const& link : route)
- get_maxmin_system()->expand(link->constraint(), action->get_variable(), 1.0);
+ get_maxmin_system()->expand(link->get_constraint(), action->get_variable(), 1.0);
if (not back_route.empty()) { // sg_network_crosstraffic was activated
XBT_DEBUG("Crosstraffic active adding backward flow using 5%%");
for (auto const& link : back_route)
- get_maxmin_system()->expand(link->constraint(), action->get_variable(), .05);
+ get_maxmin_system()->expand(link->get_constraint(), action->get_variable(), .05);
// Change concurrency_share here, if you want that cross-traffic is included in the SURF concurrency
// (You would also have to change simgrid::kernel::lmm::Element::get_concurrency())
latency_.peak = latency;
if (policy == SURF_LINK_FATPIPE)
- constraint()->unshare();
+ get_constraint()->unshare();
simgrid::s4u::Link::onCreation(this->piface_);
}
} else if (triggered == stateEvent_) {
if (value > 0)
- turnOn();
+ turn_on();
else {
kernel::lmm::Variable* var = nullptr;
const_lmm_element_t elem = nullptr;
double now = surf_get_clock();
- turnOff();
- while ((var = constraint()->get_variable(&elem))) {
+ turn_off();
+ while ((var = get_constraint()->get_variable(&elem))) {
kernel::resource::Action* action = static_cast<kernel::resource::Action*>(var->get_id());
if (action->get_state() == kernel::resource::Action::State::running ||
xbt_die("Unknown event!\n");
}
- XBT_DEBUG("There was a resource state event, need to update actions related to the constraint (%p)", constraint());
+ XBT_DEBUG("There was a resource state event, need to update actions related to the constraint (%p)",
+ get_constraint());
}
void NetworkCm02Link::setBandwidth(double value)
{
bandwidth_.peak = value;
- model()->get_maxmin_system()->update_constraint_bound(constraint(),
- sg_bandwidth_factor * (bandwidth_.peak * bandwidth_.scale));
+ get_model()->get_maxmin_system()->update_constraint_bound(get_constraint(),
+ sg_bandwidth_factor * (bandwidth_.peak * bandwidth_.scale));
TRACE_surf_link_set_bandwidth(surf_get_clock(), get_cname(),
sg_bandwidth_factor * bandwidth_.peak * bandwidth_.scale);
const_lmm_element_t elem = nullptr;
const_lmm_element_t nextelem = nullptr;
int numelem = 0;
- while ((var = constraint()->get_variable_safe(&elem, &nextelem, &numelem))) {
+ while ((var = get_constraint()->get_variable_safe(&elem, &nextelem, &numelem))) {
NetworkCm02Action* action = static_cast<NetworkCm02Action*>(var->get_id());
action->weight_ += delta;
if (not action->is_suspended())
- model()->get_maxmin_system()->update_variable_weight(action->get_variable(), action->weight_);
+ get_model()->get_maxmin_system()->update_variable_weight(action->get_variable(), action->weight_);
}
}
}
latency_.peak = value;
- while ((var = constraint()->get_variable_safe(&elem, &nextelem, &numelem))) {
+ while ((var = get_constraint()->get_variable_safe(&elem, &nextelem, &numelem))) {
NetworkCm02Action* action = static_cast<NetworkCm02Action*>(var->get_id());
action->lat_current_ += delta;
action->weight_ += delta;
if (action->rate_ < 0)
- model()->get_maxmin_system()->update_variable_bound(action->get_variable(),
- sg_tcp_gamma / (2.0 * action->lat_current_));
+ get_model()->get_maxmin_system()->update_variable_bound(action->get_variable(),
+ sg_tcp_gamma / (2.0 * action->lat_current_));
else {
- model()->get_maxmin_system()->update_variable_bound(
+ get_model()->get_maxmin_system()->update_variable_bound(
action->get_variable(), std::min(action->rate_, sg_tcp_gamma / (2.0 * action->lat_current_)));
if (action->rate_ < sg_tcp_gamma / (2.0 * action->lat_current_)) {
}
}
if (not action->is_suspended())
- model()->get_maxmin_system()->update_variable_weight(action->get_variable(), action->weight_);
+ get_model()->get_maxmin_system()->update_variable_weight(action->get_variable(), action->weight_);
}
}
bool LinkImpl::is_used()
{
- return model()->get_maxmin_system()->constraint_used(constraint());
+ return get_model()->get_maxmin_system()->constraint_used(get_constraint());
}
double LinkImpl::latency()
int LinkImpl::sharingPolicy()
{
- return constraint()->get_sharing_policy();
+ return get_constraint()->get_sharing_policy();
}
- void LinkImpl::turnOn()
+ void LinkImpl::turn_on()
{
- if (isOff()) {
- Resource::turnOn();
+ if (is_off()) {
+ Resource::turn_on();
s4u::Link::onStateChange(this->piface_);
}
}
- void LinkImpl::turnOff()
+ void LinkImpl::turn_off()
{
- if (isOn()) {
- Resource::turnOff();
+ if (is_on()) {
+ Resource::turn_off();
s4u::Link::onStateChange(this->piface_);
}
}
/** @brief Check if the Link is used */
bool is_used() override;
- void turnOn() override;
- void turnOff() override;
+ void turn_on() override;
+ void turn_off() override;
virtual void setStateTrace(tmgr_trace_t trace); /*< setup the trace file with states events (ON or OFF).
Trace must contain boolean values. */
// We consider that the machine is then fully loaded. That's arbitrary but it avoids a NaN
cpu_load = 1;
else
- cpu_load = host->pimpl_cpu->constraint()->get_usage() / current_speed;
+ cpu_load = host->pimpl_cpu->get_constraint()->get_usage() / current_speed;
/** Divide by the number of cores here **/
cpu_load /= host->pimpl_cpu->coreCount();
, last_updated(surf_get_clock())
, last_reset(surf_get_clock())
, current_speed(host->getSpeed())
- , current_flops(host->pimpl_cpu->constraint()->get_usage())
+ , current_flops(host->pimpl_cpu->get_constraint()->get_usage())
, theor_max_flops(0)
, was_prev_idle(current_flops == 0)
{
/* Current flop per second computed by the cpu; current_flops = k * pstate_speed_in_flops, k \in {0, 1, ..., cores}
* number of active cores */
- current_flops = host->pimpl_cpu->constraint()->get_usage();
+ current_flops = host->pimpl_cpu->get_constraint()->get_usage();
/* flops == pstate_speed * cores_being_currently_used */
computed_flops += (now - last_updated) * current_flops;
idle_time = 0;
computed_flops = 0;
theor_max_flops = 0;
- current_flops = host->pimpl_cpu->constraint()->get_usage();
+ current_flops = host->pimpl_cpu->get_constraint()->get_usage();
current_speed = host->getSpeed();
was_prev_idle = (current_flops == 0);
}
while (cnst != nullptr) {
i++;
void* constraint_id = cnst->get_id();
- if (static_cast<simgrid::kernel::resource::Resource*>(constraint_id)->isOff()) {
+ if (static_cast<simgrid::kernel::resource::Resource*>(constraint_id)->is_off()) {
XBT_DEBUG("Action (%p) Failed!!", &action);
action.finish(kernel::resource::Action::State::failed);
break;
model->get_maxmin_system()->update_variable_weight(get_variable(), 0.0);
for (int i = 0; i < host_nb; i++)
- model->get_maxmin_system()->expand(host_list[i]->pimpl_cpu->constraint(), get_variable(), flops_amount[i]);
+ model->get_maxmin_system()->expand(host_list[i]->pimpl_cpu->get_constraint(), get_variable(), flops_amount[i]);
if(bytes_amount != nullptr) {
for (int i = 0; i < host_nb; i++) {
hostList_->at(i)->routeTo(hostList_->at(j), route, nullptr);
for (auto const& link : route)
- model->get_maxmin_system()->expand_add(link->constraint(), this->get_variable(),
+ model->get_maxmin_system()->expand_add(link->get_constraint(), this->get_variable(),
bytes_amount[i * host_nb + j]);
}
}
latency_.peak = latency;
if (policy == SURF_LINK_FATPIPE)
- constraint()->unshare();
+ get_constraint()->unshare();
s4u::Link::onCreation(this->piface_);
}
host_list[0] = getHost();
flops_amount[0] = size;
- return static_cast<CpuL07Model*>(model())->hostModel_->execute_parallel(1, host_list, flops_amount, nullptr, -1);
+ return static_cast<CpuL07Model*>(get_model())->hostModel_->execute_parallel(1, host_list, flops_amount, nullptr, -1);
}
kernel::resource::Action* CpuL07::sleep(double duration)
L07Action *action = static_cast<L07Action*>(execution_start(1.0));
action->set_max_duration(duration);
action->suspended_ = kernel::resource::Action::SuspendStates::sleeping;
- model()->get_maxmin_system()->update_variable_weight(action->get_variable(), 0.0);
+ get_model()->get_maxmin_system()->update_variable_weight(action->get_variable(), 0.0);
return action;
}
bool CpuL07::is_used()
{
- return model()->get_maxmin_system()->constraint_used(constraint());
+ return get_model()->get_maxmin_system()->constraint_used(get_constraint());
}
/** @brief take into account changes of speed (either load or max) */
kernel::lmm::Variable* var = nullptr;
const_lmm_element_t elem = nullptr;
- model()->get_maxmin_system()->update_constraint_bound(constraint(), speed_.peak * speed_.scale);
- while ((var = constraint()->get_variable(&elem))) {
+ get_model()->get_maxmin_system()->update_constraint_bound(get_constraint(), speed_.peak * speed_.scale);
+ while ((var = get_constraint()->get_variable(&elem))) {
kernel::resource::Action* action = static_cast<kernel::resource::Action*>(var->get_id());
- model()->get_maxmin_system()->update_variable_bound(action->get_variable(), speed_.scale * speed_.peak);
+ get_model()->get_maxmin_system()->update_variable_bound(action->get_variable(), speed_.scale * speed_.peak);
}
Cpu::onSpeedChange();
bool LinkL07::is_used()
{
- return model()->get_maxmin_system()->constraint_used(constraint());
+ return get_model()->get_maxmin_system()->constraint_used(get_constraint());
}
void CpuL07::apply_event(tmgr_trace_event_t triggered, double value)
} else if (triggered == stateEvent_) {
if (value > 0)
- turnOn();
+ turn_on();
else
- turnOff();
+ turn_off();
tmgr_trace_event_unref(&stateEvent_);
} else {
} else if (triggered == stateEvent_) {
if (value > 0)
- turnOn();
+ turn_on();
else
- turnOff();
+ turn_off();
tmgr_trace_event_unref(&stateEvent_);
} else {
void LinkL07::setBandwidth(double value)
{
bandwidth_.peak = value;
- model()->get_maxmin_system()->update_constraint_bound(constraint(), bandwidth_.peak * bandwidth_.scale);
+ get_model()->get_maxmin_system()->update_constraint_bound(get_constraint(), bandwidth_.peak * bandwidth_.scale);
}
void LinkL07::setLatency(double value)
const_lmm_element_t elem = nullptr;
latency_.peak = value;
- while ((var = constraint()->get_variable(&elem))) {
+ while ((var = get_constraint()->get_variable(&elem))) {
action = static_cast<L07Action*>(var->get_id());
action->updateBound();
}
StorageAction* StorageN11::read(sg_size_t size)
{
- return new StorageN11Action(model(), size, isOff(), this, READ);
+ return new StorageN11Action(get_model(), size, is_off(), this, READ);
}
StorageAction* StorageN11::write(sg_size_t size)
{
- return new StorageN11Action(model(), size, isOff(), this, WRITE);
+ return new StorageN11Action(get_model(), size, is_off(), this, WRITE);
}
/**********
XBT_IN("(%s,%g", storage->get_cname(), cost);
// Must be less than the max bandwidth for all actions
- model->get_maxmin_system()->expand(storage->constraint(), get_variable(), 1.0);
+ model->get_maxmin_system()->expand(storage->get_constraint(), get_variable(), 1.0);
switch(type) {
case READ:
model->get_maxmin_system()->expand(storage->constraintRead_, get_variable(), 1.0);