NAM Editor is not NAM. You can invoke it by "NAM ->File->New Nam Editor..."
NAM Editor can be used for topology and scenario generation. However, when you delete an object (Node, Link, Agent, etc), You will get a "Segmentation fault".
Answer:
in /nam-version/editview.cc, EditView::cmdDeleteObj(float cx, float cy)
if (p == NULL) { defTag_->remove(); } else { if (p->classid() == ClassNodeID) { Node * n = (Node *) p; EditorNetModel * emodel_ = (EditorNetModel *) model_; emodel_->removeNode(n); draw(); } else if (p->classid() == ClassEdgeID) { Edge * e = (Edge *) p; EditorNetModel * emodel_ = (EditorNetModel *) model_; emodel_->removeLink(e); draw(); } else if (p->classid() == ClassAgentID) { Agent * a = (Agent *) p; EditorNetModel* emodel_ = (EditorNetModel *) model_; emodel_->removeAgent(a); draw(); } else if (p->classid() == ClassTrafficSourceID) { TrafficSource * ts = (TrafficSource *) p; EditorNetModel* emodel_ = (EditorNetModel *) model_; emodel_->removeTrafficSource(ts); draw(); } else if (p->classid() == ClassLossModelID) { LossModel * lossmodel = (LossModel *) p; EditorNetModel* emodel_ = (EditorNetModel *) model_; emodel_->removeLossModel(lossmodel); draw(); }
}
Please replace the if with "else if" and make the nam again. Then try the Nam Editor again:)
|