亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? mm1.cc

?? SensorSimII is the framework of a simulator that I have been working on to study how future sensor n
?? CC
?? 第 1 頁 / 共 2 頁
字號:
/************************************************************************ * @<title> M/M/1 Simulation written in COST/COMPC++ </title>@ * * @<h1> M/M/1 Simulation </h1>@ * To help users understand how COST facilitates the development of  * simulation models, we will describe in detail the process of building an  * M/M/1 system.  * In an M/M/1 system, packets(or customers) arrive according  * to a Poisson distribution and compete for the service in an FIFO * (First-In-First-Out) manner. The service time is also drawn from a  * Poisson distribution. In practice, M/M/1 systems are useful because many * complex systems can be abstracted as compositions of simple M/M/1 systems.  * Theoretically, M/M/1 system has an accurate mathematical solution * with respect to the mean arrival rate and the mean service rate. As a  * result, it is well suited for validating simulation results.  * * An M/M/1 system built using COST/COMPC++ is composed of four components, namely,  * Source, FIFO, Server and Sink. Packets are created by Source, queued  * in FIFO, served by Server, and dispatched from Sink.  * * @<center><img src=mm1.png></center>@ * * @<h2> Using COST </h2>@ * To use COST, simply include the header file @cost.h@. The other file, * @deque@, is required by the FIFO component which we will describe momentarily. ************************************************************************/#include "../../common/cost.h"#include <deque>/************************************************************************ * @<h2> New Data Type </h2>@ * A new data type, @packet_t@, is created to represent the packets  * that flow through the M/M/1 system. We are interested in measuring the  * delay of packets, which is equal to the time spent in the  * FIFO queue plus the service time. For this purpose, @packet_t@ contains  * two fields, @arrival_time@ and @departure_time@, which  * record the arrival time and the departure time, respectively. In  * addition, to identify each packet, another field @seq_number@ is  * declared to hold the sequence number (these fields are not all used * in the sample simulation, but they may be essential in other cases). ************************************************************************/ struct packet_t{    int seq_number;    double arrival_time,departure_time;};/************************************************************************ * @<h2> Source </h2>@ * Now let us build our first component class @Source@, derived  * from @TypeII@. @TypeII@ is the base class for all simulation components in COST. * All components in COST must be derived from @TypeII@. And the reason * it is called TypeII is that in our simulation component classification * they are Time-Aware, meaning they are aware of the existence of * simulated time but have no control over it. ***********************************************************************/component Source : public TypeII{public:/************************************************************************ * The @Source@ component creates packets randomly at an average rate  * specified by the parameter @interval@. It has an outport with * an argument type @packet_t@ and return type @void@ (nothing to return),  * and a timer @wait@ for scheduling the event to deliver the next packet.************************************************************************/    double interval;    outport void out (packet_t&);    Timer <trigger_t> wait;    /************************************************************************ * A timer is defined a component.  It has an outport called @to_component@ * which will be invoked once the event associated with the timer is activated. * Therefore, any component that embeds a timer component must also connect  * the outport of the timer to one of its inports.  The inport @create@ is declared * for this purpose, and its return type must be @void@, and it (only) argument must be * consistent with the template parameter of the timer (@trigger_t@ in this case).************************************************************************/        inport inline void create(trigger_t& t);    Source();    virtual ~Source() {}    void Start();private:	packet_t m_packet; // for temporarily holding the outgoing packet    int m_seq_number; // each packet has an unique sequence number};/************************************************************************ * Here is where we connect the outport of the timer component to the @create()@ inport ************************************************************************/Source::Source(){    connect wait.to_component,create;}/************************************************************************ * The @Start()@ function, invoked the moment the simulation just * gets started, i.e., at the simulation time zero, is where a component * can perform initialization of variables and schedule initial events * by calling the @Set()@ method of the desired timer.  * @Exponential()@ is an function declared in the @TypeII@ * class to generate a Poisson distribution. ************************************************************************/void Source::Start(){    m_seq_number=0;    wait.Set(Exponential(interval));}/************************************************************************ * The @create()@ function is bound to the outport of the timer @wait@, * so it is invoked every time the timer becomes activated. Upon activation, * it needs to schedule the next timer event whose timestamp represents the time * the next packet is to be generated, and deliver the current packet * to the outport @out@. * * @SimTime()@, a member function declared in the @TypeII@ class, returns * the current simulated time.  ************************************************************************/void Source::create(trigger_t&){    wait.Set(SimTime()+Exponential(interval) );    m_packet.seq_number=m_seq_number++;    m_packet.arrival_time = SimTime();    out(m_packet);    return;}/************************************************************************ * @<h2>FIFO Queue</h2>@ * The @FIFO@ component is declared as a template class with a template * parameter specifying the type of packets that the queue can hold. When * instantiated with different packet types, this component can be  * reused to handle packets of any type. ************************************************************************/ template < class DATATYPE >component FIFO : public TypeII{public:    FIFO();    virtual ~FIFO();    void Start();/************************************************************************ * The parameter @queue_length@ indicates the maximum number of packets * that can be held in the queue. ************************************************************************/    unsigned int queue_length;/************************************************************************ * This component contains an inport and outport, to receive * and sent packets, of type @DATATYPE@, the template parameter, * as the parameter type, and @void@ as the return type.  * Another port, named @next@, is an inport * indicating that it is time to send out the next packet. Its parameter * type is @trigger_t@, a predefined empty class. ************************************************************************/    inport inline void in(DATATYPE&);    outport void out(DATATYPE&);    inport inline void next();private:/************************************************************************ * A FIFO queue is usually linked to a server, and it needs to know * whether the server is busy or not, since when it receives a new packet * it must determine if it needs to pass on the packet directly or save * it in an internal queue.  @m_busy@ indicates the status of the server, * and @m_queue@ is the internal queue. ************************************************************************/    bool m_busy;    std::deque<DATATYPE> m_queue;};template < class DATATYPE >FIFO <DATATYPE> :: FIFO(){}template < class DATATYPE >FIFO <DATATYPE> :: ~FIFO(){}/************************************************************************ * @m_busy@ must be set to false at the beginning, since the server * is free at time 0. ************************************************************************/template < class DATATYPE >void FIFO <DATATYPE> :: Start(){    m_busy=false;}/************************************************************************ * The inport @in@ is invoked when a new packet arrives. * Packets are passed by reference to avoid copying overhead. * @m_busy@ remembers the status of the connected server. If the * server is free, simply forward the packet to the outport and update * @m_busy@ accordingly. Otherwise, append the packet to the tail of * the internal queue, if the queue is not full. ************************************************************************/template < class DATATYPE >void FIFO<DATATYPE>::in(DATATYPE& packet){    if (!m_busy)    { // server is free, we can pass it through        out(packet);        m_busy=true;    }     else if (m_queue.size()<queue_length)    { // queue is not full        	m_queue.push_back(packet);    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产一区999| 91天堂素人约啪| 国产盗摄女厕一区二区三区 | 国产无一区二区| 亚洲综合免费观看高清在线观看| 狠狠色丁香婷婷综合久久片| 欧美四级电影在线观看| 亚洲国产电影在线观看| 久久99国产精品麻豆| 在线成人小视频| 亚洲激情五月婷婷| av高清不卡在线| xvideos.蜜桃一区二区| 日韩精品亚洲一区二区三区免费| 91高清在线观看| 中文字幕中文字幕一区| 丁香激情综合五月| 久久久噜噜噜久噜久久综合| 免费高清视频精品| 欧美一区二区三区四区高清 | 欧美激情综合在线| 国产精品一卡二| 26uuu国产电影一区二区| 蜜臀a∨国产成人精品| 91精品国产欧美一区二区成人| 亚洲一区二区成人在线观看| 色94色欧美sute亚洲线路一ni| 国产精品国产三级国产aⅴ入口| 成熟亚洲日本毛茸茸凸凹| 国产欧美一区二区精品婷婷 | 91在线一区二区| 国产精品久久久久久亚洲毛片| 国产 欧美在线| 国产清纯美女被跳蛋高潮一区二区久久w | 欧美久久久久久久久久| 亚洲一区在线观看视频| 欧美色老头old∨ideo| 亚洲成av人片一区二区梦乃| 欧美久久高跟鞋激| 久久国产精品色| 26uuu国产日韩综合| 高清视频一区二区| 国产精品福利电影一区二区三区四区| 成人精品小蝌蚪| 亚洲最新在线观看| 欧美一区午夜视频在线观看| 国产中文一区二区三区| 国产女人aaa级久久久级| proumb性欧美在线观看| 亚洲综合久久久久| 日韩一区二区三区高清免费看看| 国内精品在线播放| 国产精品看片你懂得| 日本道色综合久久| 蜜臀a∨国产成人精品| 国产欧美日韩久久| 色老综合老女人久久久| 全部av―极品视觉盛宴亚洲| 久久精品人人做| 欧美影院午夜播放| 精品一区二区三区欧美| 成人免费小视频| 日韩一区二区不卡| 成人sese在线| 奇米色777欧美一区二区| 日本一区二区免费在线| 欧美三日本三级三级在线播放| 蓝色福利精品导航| 亚洲免费av高清| 精品毛片乱码1区2区3区| 91一区二区三区在线观看| 久久精品噜噜噜成人88aⅴ| 国产精品美女久久久久aⅴ | 欧美写真视频网站| 国内外成人在线| 亚洲一区二区欧美日韩| 欧美国产精品一区| 日韩一区二区在线观看视频| 91浏览器打开| 国产99精品国产| 青椒成人免费视频| 一区二区三区四区高清精品免费观看| 欧美成人精品高清在线播放 | 成人免费视频一区二区| 日韩电影免费一区| 亚洲激情av在线| 欧美国产一区视频在线观看| 欧美一区二区成人6969| 91久久精品网| 9i在线看片成人免费| 国产在线精品不卡| 免费成人你懂的| 亚洲成人免费观看| 亚洲精品综合在线| 中文字幕中文字幕一区| 国产人伦精品一区二区| 亚洲精品一线二线三线| 欧美一区二区三区在线看| 欧美在线不卡一区| 色综合久久九月婷婷色综合| 懂色av一区二区三区免费观看 | 国产成人av电影| 麻豆91精品91久久久的内涵| 偷偷要91色婷婷| 有坂深雪av一区二区精品| 国产精品成人在线观看| 日本一区二区视频在线| 国产欧美一区二区在线| 国产夜色精品一区二区av| 日韩欧美国产综合| 日韩精品一区二区三区视频播放 | 尤物视频一区二区| 综合色天天鬼久久鬼色| 1区2区3区国产精品| 日韩一区在线播放| 中文字幕一区二区三区色视频| 国产精品每日更新在线播放网址| 中文字幕乱码日本亚洲一区二区| 国产欧美日韩亚州综合 | 国产精品1区2区3区在线观看| 麻豆中文一区二区| 麻豆91免费观看| 国产成人在线观看| 成人动漫在线一区| 91在线丨porny丨国产| 91久久香蕉国产日韩欧美9色| 在线观看日韩av先锋影音电影院| 欧美性高清videossexo| 91麻豆精品国产无毒不卡在线观看| 91精品婷婷国产综合久久| 日韩三级精品电影久久久| 欧美精品一区二区三区在线| 久久久高清一区二区三区| 国产精品毛片久久久久久| 亚洲精品日韩一| 轻轻草成人在线| 国产69精品久久99不卡| 色狠狠一区二区三区香蕉| 欧美日韩精品一区二区| 精品国产三级电影在线观看| 国产精品国产三级国产普通话蜜臀 | 日韩欧美一级精品久久| 精品国产髙清在线看国产毛片| 国产女主播视频一区二区| 亚洲欧美日韩在线不卡| 日日夜夜精品视频免费| 国产成人一区在线| 欧美视频一区二| 久久久国产午夜精品| 亚洲综合久久av| 国产精品一区专区| 精品视频1区2区3区| 久久综合视频网| 另类小说综合欧美亚洲| kk眼镜猥琐国模调教系列一区二区| 欧美色图第一页| 久久久九九九九| 天天影视网天天综合色在线播放| 国内精品视频一区二区三区八戒| 色婷婷精品久久二区二区蜜臀av | 美女网站色91| 91美女视频网站| 精品国产91久久久久久久妲己 | 国产亚洲精品超碰| 亚洲h精品动漫在线观看| 国产精品99久久久| 91精品久久久久久久91蜜桃| 国产精品动漫网站| 久久成人羞羞网站| 欧美情侣在线播放| 中文字幕一区二区三区在线播放 | 国产精品久久久久婷婷| 久久99精品视频| 欧美三级在线看| 中文字幕日本不卡| 国产成人在线免费| 欧美videos大乳护士334| 亚洲成年人网站在线观看| 91首页免费视频| 中国av一区二区三区| 国产综合色产在线精品| 91精品国产91久久久久久一区二区| 一区二区三区在线不卡| 成人教育av在线| 欧美国产精品专区| 国产成人精品影院| 久久人人超碰精品| 韩国精品免费视频| 精品国产a毛片| 国产综合一区二区| 精品国产髙清在线看国产毛片| 午夜av区久久| 91精品视频网| 免费观看30秒视频久久| 日韩美女一区二区三区四区| 麻豆久久久久久久| 欧美成人aa大片| 国产资源在线一区| 久久蜜桃av一区二区天堂| 国产一区二区三区免费看 |