On Veins applications (veins/src/modules/application/app_name.(cc, h), how to get values like
*.car[*].appl.numVehicles from theini file?
I can get values like sim-time-limit (see below) and anothers createad by me one, by I can't acess values on *.car[*].* or *.rsu[*].* from ini file.
stringTmp = ev.getConfig()->getConfigValue("sim-time-limit");
I'd appreciate any help
I got the "numVehicles" parameter from the .ini file using the following codification:
long numV = Veins::TraCIScenarioManagerLaunchdAccess().get()->par("numVehicles").longValue();
I hope this can help you.
Douglas
Reading parameter values of a module can be done via a call to this module's par(...) method.
I would highly recommend doing the TicToc tutorial, where this is demonstrated succinctly
Related
I have some confusion with steps_per_epoch. Any clarification is appreciated.
I read that steps_per_epoch is normally set to number of samples/batch size. However, I am following this tutorial https://medium.com/the-owl/k-fold-cross-validation-in-keras-3ec4a3a00538
that uses train_data_generator=idg.flow_from_dataframe().
Am I correct in setting steps_per_epoch to be len(train_data_generator)/32 instead of len(training_data)/32.
Thank you in advance!
If anyone know where can see different values (settings) of a parameter? For example, if we need to change a default value, which other options do we have to set.
Thanks
The default settings are located in the according .ned file of your module. If you have a setup for your simulation you're usually changing your parameters in the omnetpp.ini file.
The TicToc tutorial gives you all information according to this, especially TicToc 7 might be useful for you.
This may be a somewhat basic question, but how do I add comments to a parameter file for a Jmeter test?
Have seen what purport to be examples using both # and //.
Which is correct?
In need of this as I have a number of tests using a lot of parameters and I need to comment them up such that the next guy to run them will have an easier time understanding them.
Thanks,
Iain
For you parameter file which is a properties file, comment will be specified through
#
Could anyone help me figure out how to enter a value into a QTP data table using VBScript? I'm trying the following line, but it doesn't seem to work:
datatable.Value(D,"sheetName")="A"
What is wrong? I am used to other languages and just cannot see any problem here.
What is the D you're using? Is it a variable holding the column name? If not and you mean to use the D column then you have to quote it so that QTP (VBScript actually) knows you mean the string "D".
datatable.Value("D","sheetName")="A"
I know zilch about QTP tool. However, your syntax looks correct based on this example. (see heading Adding Value to you a local sheet
Based on the information given, I would take a stab that you may have not referenced the QTP DLL, you have ON ERROR RESUME NEXT in your code AND you do not have OPTION EXPLICIT set at the top of your module.
Start by making sure you have the correct DLL referenced and adding this line to the top of the code:
OPTION EXPLICIT
If you've done that, then add more information that could help one deduce the problem (e.g. full code sample).
The way that you get data from datatable in QTP is, first import the Excel sheet into your datatable (Either Global or Local), then try to get data from datatable using following Syntax
Datatable(columnName,dtGlobalSheet) if imported in Global sheet
Datatable(columnName,dtLocalSheet) if imported in Local sheet
Importing Data
myFile = "C:\datasheet\excelone.xls"
datatable.Importsheet myFile,1,Global
Enter Value
DataTable("Coumn1Data", dtGlobalSheet)
This way you can get data from Excel sheet.
Thanks,
Karthik
I have one random variable and one variable which I read from page. How can I subtract or multiply that two variables and where or in which component in JMeter.
Check out the functions page for Jmeter. It has tons of cool math tools that you can plug anywhere in your script.
You'll most likely end up doing a jexl command, which would look something like this: ${__jexl2(${var1}-${var2})}
The above did not work for me. How ever i was able to resolve my problem with :
${__jexl(vars.get("YOUR_VARIABLE")+1)}