op_dist_exponential()

Abstract

Returns a random value from an exponential distribution having a specified mean.

Syntax

op_dist_exponential (mean)
Argument Type Description
mean double mean of the distribution

Return Type

double

Generated exponential random value.

This value is between 0.0, inclusive and an unspecified upper limit, with the mean provided characterizing the distribution.

Example

/* Schedule self interrupt for the next send time. */
op_intrpt_schedule_self (op_sim_time() + op_dist_exponential(0.5), 0);

Details

The random number stream used by this KP is generated by calls to the BSD random() procedure, and is shared by all Dist package KPs and by the generator modules. The random number stream is dependent on an initial seed, which can be altered via the simulation environment attribute “seed” (see Chapter 1 “Executing a Discrete Event Simulation” on page 1 for more information). Simulation results are repeatable if the simulation inputs are identical, including the same random seed.

op_dist_load() does not need to be called before using this function.

Purpose

Provides a mechanism to generate a random number based on an exponential distribution with a specified mean.

Errors

  • No errors are trapped.

Reference

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com