How can I create my own custom PDF (probability distribution file) model? How could I do this using EMA, the OMS Distribution package, or the scripted PDF?

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

How can I create my own custom PDF (probability distribution file) model? How could I do this using EMA, the OMS Distribution package, or the scripted PDF?

Solution

The file format of the PDF is an internal binary format. The contents of PDF files are accessible via the PDF editor GUI or via the EMA API. If you do not wish to use the PDF editor GUI to create a PDF file, you can use EMA (External Model Access) to programmatically create a PDF file (for example, use EMA to create a PDF file based on a text file or an equation).Rather than using EMA, if you are using the OPNET Standard Models two alternatives (not covered here in detail): A) Examine the OPNET Model Suite (OMS) Distribution package (located in models/std/utilities/oms/oms_dist_support.ex.c). Follow the examples there to create your own oms_dist distribution function. B) In the OPNET project editor, when selecting a distribution, select the special scripted distribution, which allows you to specify a file containing the exact outcomes for the distribution. Note that this is not a distribution in the traditional sense, but rather a manner to specify a deterministic sequence of outcomes.In order to create a PDF using EMA please follow these steps:1. Open (or create from scratch) a PDF <pdf_model> in the PDF editor, then select File->Generate EMA Code. 2. A C file will be created named <pdf_model.em.c>. By default, this file is created in <user_dir>/op_models directory (or whatever else is the top directory in the mod_dirs preference).3. You will use this file as a template. Notice that each point in the pdf is listed as a vector in the EMA file.4. Modify the resulting EMA code file to use data points generated by iterative calls to your PDF formula or use the data points from your text file instead of the vector points defined in the EMA program.5. Once you are done editing this file, save it to a new file <new_pdf_model.em.c>. 6. Use the op_mkema program to compile and generate an EMA executable. To do this: 6.1. If you are on Windows, start an OPNET console window (Start > Program Files > OPNET Modeler > OPNET Console). 6.2. Enter the command: op_mkema -m <new_pdf_model> (Do not include the .em.c extension.) 6.3 You should see Ema executable program ... produced. The output will be called <new_pdf_model.em.x>6. Run the <new_pdf_model.em.x> executable to create your new PDF to be used in OPNET. This will create a PDF model named <new_pdf_model>7. In order to use the new PDF model, you will need to restart OPNET or alternatively do File->Model Files->Refresh Model Directories.For more information on External Model Access (EMA) please refer to the External Interfaces manual.

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