return new CpuTi(this, host, speedPerPstate, core);
}
-double CpuTiModel::next_occuring_event(double now)
+double CpuTiModel::nextOccuringEvent(double now)
{
double min_action_duration = -1;
CpuTiModel();
~CpuTiModel() override;
Cpu *createCpu(simgrid::s4u::Host *host, std::vector<double>* speedPerPstate, int core) override;
- double next_occuring_event(double now) override;
+ double nextOccuringEvent(double now) override;
void updateActionsState(double now, double delta) override;
ActionList *runningActionSetThatDoesNotNeedBeingChecked_;
HostCLM03Model::~HostCLM03Model() {}
-double HostCLM03Model::next_occuring_event(double now){
+double HostCLM03Model::nextOccuringEvent(double now){
adjustWeightOfDummyCpuActions();
- double min_by_cpu = surf_cpu_model_pm->next_occuring_event(now);
- double min_by_net = surf_network_model->next_occuring_event_isIdempotent() ? surf_network_model->next_occuring_event(now) : -1;
- double min_by_sto = surf_storage_model->next_occuring_event(now);
+ double min_by_cpu = surf_cpu_model_pm->nextOccuringEvent(now);
+ double min_by_net = surf_network_model->next_occuring_event_isIdempotent() ? surf_network_model->nextOccuringEvent(now) : -1;
+ double min_by_sto = surf_storage_model->nextOccuringEvent(now);
XBT_DEBUG("model %p, %s min_by_cpu %f, %s min_by_net %f, %s min_by_sto %f",
this, typeid(surf_cpu_model_pm).name(), min_by_cpu,
public:
HostCLM03Model(): HostModel(){}
~HostCLM03Model() override;
- double next_occuring_event(double now) override;
+ double nextOccuringEvent(double now) override;
void updateActionsState(double now, double delta) override;
};
}
return nullptr;
}
- double NetworkConstantModel::next_occuring_event(double /*now*/)
+ double NetworkConstantModel::nextOccuringEvent(double /*now*/)
{
double min = -1.0;
~NetworkConstantModel() override;
Action *communicate(kernel::routing::NetCard *src, kernel::routing::NetCard *dst, double size, double rate) override;
- double next_occuring_event(double now) override;
+ double nextOccuringEvent(double now) override;
bool next_occuring_event_isIdempotent() override {return true;}
void updateActionsState(double now, double delta) override;
return rate;
}
- double NetworkModel::next_occuring_event_full(double now)
+ double NetworkModel::nextOccuringEventFull(double now)
{
- double minRes = Model::next_occuring_event_full(now);
+ double minRes = Model::nextOccuringEventFull(now);
for(auto it(getRunningActionSet()->begin()), itend(getRunningActionSet()->end()); it != itend ; it++) {
NetworkAction *action = static_cast<NetworkAction*>(&*it);
* @return The new bandwidth.
*/
virtual double bandwidthConstraint(double rate, double bound, double size);
- double next_occuring_event_full(double now) override;
+ double nextOccuringEventFull(double now) override;
};
/************
return new NetworkNS3Action(this, size, src, dst);
}
-double NetworkNS3Model::next_occuring_event(double now)
+double NetworkNS3Model::nextOccuringEvent(double now)
{
double time_to_next_flow_completion;
XBT_DEBUG("ns3_next_occuring_event");
Link* createLink(const char *name, double bandwidth, double latency,
e_surf_link_sharing_policy_t policy, xbt_dict_t properties) override;
Action *communicate(kernel::routing::NetCard *src, kernel::routing::NetCard *dst, double size, double rate);
- double next_occuring_event(double now) override;
+ double nextOccuringEvent(double now) override;
bool next_occuring_event_isIdempotent() {return false;}
void updateActionsState(double now, double delta) override;
};
}
-double HostL07Model::next_occuring_event(double now)
+double HostL07Model::nextOccuringEvent(double now)
{
- double min = HostModel::next_occuring_event_full(now);
+ double min = HostModel::nextOccuringEventFull(now);
for (auto it(getRunningActionSet()->begin()), itend(getRunningActionSet()->end()); it != itend ; ++it) {
L07Action *action = static_cast<L07Action*>(&*it);
if (action->m_latency > 0 && (min < 0 || action->m_latency < min)) {
HostL07Model();
~HostL07Model();
- double next_occuring_event(double now) override;
+ double nextOccuringEvent(double now) override;
void updateActionsState(double now, double delta) override;
Action *executeParallelTask(int host_nb, sg_host_t *host_list,
double *flops_amount, double *bytes_amount, double rate) override;
return storage;
}
-double StorageN11Model::next_occuring_event(double now)
+double StorageN11Model::nextOccuringEvent(double now)
{
- double min_completion = StorageModel::next_occuring_event_full(now);
+ double min_completion = StorageModel::nextOccuringEventFull(now);
for(auto storage: p_storageList) {
double rate = 0;
~StorageN11Model();
Storage *createStorage(const char* id, const char* type_id,
const char* content_name, const char* content_type, xbt_dict_t properties, const char* attach) override;
- double next_occuring_event(double now) override;
+ double nextOccuringEvent(double now) override;
void updateActionsState(double now, double delta) override;
};
/* Physical models MUST be resolved first */
XBT_DEBUG("Looking for next event in physical models");
- double next_event_phy = surf_host_model->next_occuring_event(NOW);
+ double next_event_phy = surf_host_model->nextOccuringEvent(NOW);
if ((time_delta < 0.0 || next_event_phy < time_delta) && next_event_phy >= 0.0) {
time_delta = next_event_phy;
}
if (surf_vm_model != nullptr) {
XBT_DEBUG("Looking for next event in virtual models");
- double next_event_virt = surf_vm_model->next_occuring_event(NOW);
+ double next_event_virt = surf_vm_model->nextOccuringEvent(NOW);
if ((time_delta < 0.0 || next_event_virt < time_delta) && next_event_virt >= 0.0)
time_delta = next_event_virt;
}
XBT_DEBUG("Run the NS3 network at most %fs", time_delta);
// run until min or next flow
- model_next_action_end = surf_network_model->next_occuring_event(time_delta);
+ model_next_action_end = surf_network_model->nextOccuringEvent(time_delta);
XBT_DEBUG("Min for network : %f", model_next_action_end);
if(model_next_action_end>=0.0)
delete doneActionSet_;
}
-double Model::next_occuring_event(double now)
+double Model::nextOccuringEvent(double now)
{
//FIXME: set the good function once and for all
if (updateMechanism_ == UM_LAZY)
- return next_occuring_event_lazy(now);
+ return nextOccuringEventLazy(now);
else if (updateMechanism_ == UM_FULL)
- return next_occuring_event_full(now);
+ return nextOccuringEventFull(now);
else
xbt_die("Invalid cpu update mechanism!");
}
-double Model::next_occuring_event_lazy(double now)
+double Model::nextOccuringEventLazy(double now)
{
XBT_DEBUG("Before share resources, the size of modified actions set is %zd", modifiedSet_->size());
lmm_solve(maxminSystem_);
}
}
-double Model::next_occuring_event_full(double /*now*/) {
+double Model::nextOccuringEventFull(double /*now*/) {
maxminSystem_->solve_fun(maxminSystem_);
double min = -1;
* @param now The current time of the simulation
* @return The delta of time till the next action will finish
*/
- virtual double next_occuring_event(double now);
- virtual double next_occuring_event_lazy(double now);
- virtual double next_occuring_event_full(double now);
+ virtual double nextOccuringEvent(double now);
+ virtual double nextOccuringEventLazy(double now);
+ virtual double nextOccuringEventFull(double now);
/**
* @brief Update action to the current time
// const double virt_overhead = 0.95;
const double virt_overhead = 1;
-double VMModel::next_occuring_event(double now)
+double VMModel::nextOccuringEvent(double now)
{
/* TODO: update action's cost with the total cost of processes on the VM. */
adjustWeightOfDummyCpuActions();
/* 3. Ready. Get the next occuring event */
- return surf_cpu_model_vm->next_occuring_event(now);
+ return surf_cpu_model_vm->nextOccuringEvent(now);
}
s4u::Host *createVM(const char *name, sg_host_t host_PM);
void adjustWeightOfDummyCpuActions() override {};
- double next_occuring_event(double now) override;
+ double nextOccuringEvent(double now) override;
void updateActionsState(double /*now*/, double /*delta*/) override {};
};