How to get my Run Number ??

501 views
Skip to first unread message

Norberto Barroca

unread,
Dec 29, 2010, 12:47:48 PM12/29/10
to omn...@googlegroups.com

Hello,
Does anyone knows how to get the my actual run number?
Tanks in Advance.
 

muhana magbool

unread,
Dec 29, 2010, 2:04:24 PM12/29/10
to omn...@googlegroups.com
from the output files (e.g., filename.sca or filename.vec)


 
--
You received this message because you are subscribed to the Google Groups "omnetpp" group.
To post to this group, send email to omn...@googlegroups.com.
To unsubscribe from this group, send email to omnetpp+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/omnetpp?hl=en.

Skidder

unread,
Feb 8, 2011, 10:02:26 AM2/8/11
to omnetpp
Looking for the same thing here, I guess you mean within the C++ code.

cSimulation used to have (in version 3.4) a way to get the current run
number:

csimul.h:
274 /**
275 * Returns the current run number. A run is the execution of a
276 * model with a given set of parameter settings. Runs can be
defined
277 * in omnetpp.ini.
278 */
279 // TBD does run number really belong to the simulation kernel?
why not in Envir?
280 int runNumber() const {return run_number;}

Like the comment says, maybe Envir is a better place for it. And if we
check Envir in 4.1, that's where we find it:

sectionbasedconfig.cc:
159 int SectionBasedConfiguration::getActiveRunNumber() const
160 {
161 return activeRunNumber;
162 }

But how you get to this from the cEnvir or cSimulation...

HAEFLINGER, PATRICK (PATRICK)

unread,
Feb 8, 2011, 10:21:04 AM2/8/11
to omn...@googlegroups.com
Hi to get the run number in 4.1 just use

currentRun = ev.getConfigEx()->getActiveRunNumber();

Patrick

-----Message d'origine-----
De : omn...@googlegroups.com [mailto:omn...@googlegroups.com] De la part de Skidder
Envoyé : mardi 8 février 2011 16:02
À : omnetpp
Objet : [Omnetpp-l] Re: How to get my Run Number ??

--

Skidder

unread,
Feb 8, 2011, 11:10:39 AM2/8/11
to omnetpp
There, that's the one! Thanks Patrick.
Reply all
Reply to author
Forward
0 new messages