* under the terms of the license (GNU LGPL) which comes with this package. */
#include "network_constant.hpp"
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "network_constant.hpp"
-static int host_number_int = 0;
-
-static void netcste_parse_nolink(sg_platf_link_cbarg_t link){
- xbt_die("There is no link in the Constant network model. "
- "Please remove any link from your platform (and switch to routing='None')");
-}
{
xbt_assert(surf_network_model == NULL);
surf_network_model = new simgrid::surf::NetworkConstantModel();
{
xbt_assert(surf_network_model == NULL);
surf_network_model = new simgrid::surf::NetworkConstantModel();
- simgrid::surf::Host::onCreation.connect([](simgrid::surf::Host*) {
- host_number_int++;
+ simgrid::surf::on_link.connect([](sg_platf_link_cbarg_t link){
+ xbt_die("There is no link in the Constant network model. "
+ "Please remove any link from your platform (and switch to routing='None')");
{
NetworkConstantAction *action = NULL;
double min = -1.0;
ActionList *actionSet = getRunningActionSet();
for(ActionList::iterator it(actionSet->begin()), itend(actionSet->end())
{
NetworkConstantAction *action = NULL;
double min = -1.0;
ActionList *actionSet = getRunningActionSet();
for(ActionList::iterator it(actionSet->begin()), itend(actionSet->end())
- ; it != itend ; ++it) {
- action = static_cast<NetworkConstantAction*>(&*it);
- if (action->m_latency > 0 && (min < 0 || action->m_latency < min))
- min = action->m_latency;
+ ; it != itend ; ++it) {
+ action = static_cast<NetworkConstantAction*>(&*it);
+ if (action->m_latency > 0 && (min < 0 || action->m_latency < min))
+ min = action->m_latency;
NetworkConstantAction *action = NULL;
ActionList *actionSet = getRunningActionSet();
for(ActionList::iterator it(actionSet->begin()), itNext=it, itend(actionSet->end())
NetworkConstantAction *action = NULL;
ActionList *actionSet = getRunningActionSet();
for(ActionList::iterator it(actionSet->begin()), itNext=it, itend(actionSet->end())
if (action->m_latency > 0) {
if (action->m_latency > delta) {
double_update(&(action->m_latency), delta, sg_surf_precision);
if (action->m_latency > 0) {
if (action->m_latency > delta) {
double_update(&(action->m_latency), delta, sg_surf_precision);
XBT_IN("(%s,%s,%g,%g)", src_name, dst_name, size, rate);
NetworkConstantAction *action = new NetworkConstantAction(this, size, sg_latency_factor);
XBT_IN("(%s,%s,%g,%g)", src_name, dst_name, size, rate);
NetworkConstantAction *action = new NetworkConstantAction(this, size, sg_latency_factor);