How can I specify statistic and attribute probes? And how can I plot confidence intervals and compare one statistic to another?

Categories:
Solution Number:
S20806
Last Modified:
2013-08-20
Issue

How can I specify statistic and attribute probes? And how can I plot confidence intervals and compare one statistic to another?

Solution

If you are using OPNET 9.1 or previous, please refer to FAQ#913.To plot the confidence interval, or one attribute against another, you will have to run a simulation with multiple seeds. Also you may want to obtain these results for multiple values of an attribute. The workflow is to:1. Create a scalar probe for a statistic 2. Create attribute probes (or configure your code to write a scalar statistic directly)3. Specify output scalar file4. Configure multiple simulation sets and run them5. Plot the scalar output of a statistic against the attribute values along with confidence intervalCreate a scalar probe for a statistic:--------------------------1. Choose the statistic(s) of interest: right click in the project workspace, select Choose Individual Statistics, select the statistic(s) of interest and close the dialog box. At this point you are collecting statistics as vectors, or values vs. time.2. Open the probe editor: From the project editor menu DES / Choose Statistics (Advanced).3. In the probe editor, right click on the statistic of interest and edit its attributes.4. Set the attribute scalar data to enabled.5. Choose the scalar type (eg: max_value, sample_mean etc..), this determines how the values obtained during a simulation run get represented by a single scalar value at the end of the simulation.Create attribute probes:--------------------------1. Open the Probe editor (DES / Choose Statistics (Advanced)), if it is not open already.2. Create an attribute probe (Objects / Create Attribute Probe).3. Scroll down, and expand the Attribute Probes tree (click on the plus (+) sign). You should see your new probe. The newly created probe can be identified because it has no values under Attribute and Object columns.4. Right click on the newly created probe, and select Choose Attributed Object.5. Select the object of interest and click OK to retain the changes.6. Right click again on the attribute probe and select Edit Attribtes.7. Specify the attribute you want to probe (NOTE: The attribute you want to probe must be a non-compound attribute and must be of type integer or double)Once you have specified the scalar probes save and close the probe editor.Another way to write values to a scalar file without configuring probes is to do so directly from your custom model code with the Kernel Procedure op_stat_scalar_write ().Specify an output scalar file:----------------------------By default a simulation does not generate an output scalar file (.os). Do the following for each simulation that needs to append information to the scalar file.1. Open the Configure/Run DES dialog box (running man button).2. In the Output branch choose the statistics collection branch. (This is slightly different in 10.0 where tabs are used instead of branches).3. Set the Scalar File Name to an appropriate value---the NETWORK NAME is recommended but you can set it to anything you like so that results from different scenarios can be appended to the same scalar file.Configure multiple simulation sets and run them:----------------------------1. Promote any attributes of interest2. Set multiple values for attributes of interest using the Input / Global Attributes and Object Attributes branches of the Configure/Run DES dialog box. You can also set multiple values for the seed simulation attribute in the Common branch.3. Run the simulations.Plot the scalar output:----------------------------1. You will have to run each scenario with multiple variations of input parameters2. Open Analysis Configuration Editor (New / Analysis Configuration) or DES / Results / View Results (Advanced)3. Load scalar file you specified in the Configure/Run DES dialog box earlier (File / Load Output Scalar File...)4. Click on the second action button (Create graph from two scalars)5. Choose the Attribute probe for horizontal axis and the statistic probe for the vertical axis.6. The graph shows up, if you have had multiple runs for an attribute, you will see multiple y-values for the same x-value. 7. Right click on the graph and choose edit graph properties.8. Check the Show Confidence Interval box and choose the desired Confidence Interval percentage.

Environment

DES Kernel->Process Modeling/Coding,DES Kernel->Statistics and Reports

Attachments
NOTICE: Riverbed® product names have changed. Please refer to the Product List for a complete list of product names.
Can't find an answer? Create a case