New scenario to see details of reaction on congestion. Small change in AnnotatedTopologyReader API
diff --git a/model/annotated-topology-reader.cc b/model/annotated-topology-reader.cc
index a9b66bf..d6bbad1 100644
--- a/model/annotated-topology-reader.cc
+++ b/model/annotated-topology-reader.cc
@@ -315,4 +315,22 @@
}
}
+void
+AnnotatedTopologyReader::SavePositions (const std::string &file) const
+{
+ ofstream os (file.c_str (), ios::trunc);
+ os << "router\n";
+
+ for (NodeContainer::Iterator node = m_nodes.Begin ();
+ node != m_nodes.End ();
+ node++)
+ {
+ std::string name = Names::FindName (*node);
+ Ptr<MobilityModel> mobility = (*node)->GetObject<MobilityModel> ();
+ Vector position = mobility->GetPosition ();
+
+ os << name << "\t" << "unknown" << "\t" << -position.y << "\t" << position.x << "\n";
+ }
+}
+
}
diff --git a/model/annotated-topology-reader.h b/model/annotated-topology-reader.h
index 91e6d26..95ce123 100644
--- a/model/annotated-topology-reader.h
+++ b/model/annotated-topology-reader.h
@@ -102,6 +102,12 @@
*/
void ApplyOspfMetric ();
+ /**
+ * \brief Save positions (e.g., after manual modification using visualizer)
+ */
+ void
+ SavePositions (const std::string &file) const;
+
protected:
Ptr<Node>
CreateNode (const std::string name);
diff --git a/model/rocketfuel-weights-reader.cc b/model/rocketfuel-weights-reader.cc
index 4681e4e..acd3235 100644
--- a/model/rocketfuel-weights-reader.cc
+++ b/model/rocketfuel-weights-reader.cc
@@ -177,22 +177,4 @@
SpringMobilityHelper::InstallSprings (LinksBegin (), LinksEnd ());
}
-void
-RocketfuelWeightsReader::SavePositions (const std::string &file) const
-{
- ofstream os (file.c_str (), ios::trunc);
- os << "router\n";
-
- for (NodeContainer::Iterator node = m_nodes.Begin ();
- node != m_nodes.End ();
- node++)
- {
- std::string name = Names::FindName (*node);
- Ptr<MobilityModel> mobility = (*node)->GetObject<MobilityModel> ();
- Vector position = mobility->GetPosition ();
-
- os << name << "\t" << "unknown" << "\t" << -position.y << "\t" << position.x << "\n";
- }
-}
-
} /* namespace ns3 */
diff --git a/model/rocketfuel-weights-reader.h b/model/rocketfuel-weights-reader.h
index cf6a784..e93ca32 100644
--- a/model/rocketfuel-weights-reader.h
+++ b/model/rocketfuel-weights-reader.h
@@ -67,9 +67,6 @@
LATENCIES,
POSITIONS
};
-
- void
- SavePositions (const std::string &file) const;
private:
RocketfuelWeightsReader (const RocketfuelWeightsReader&);