<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic An M/M/n queuing model simulation with Object Pascal and my Thr in Intel® Moderncode for Parallel Architectures</title>
    <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/An-M-M-n-queuing-model-simulation-with-Object-Pascal-and-my/m-p/832714#M1564</link>
    <description>&lt;P&gt;&lt;BR /&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Note: next time i will show you how to simulate &lt;BR /&gt; a more complex problem in Object Pascal...&lt;/P&gt;&lt;P&gt;Of course, if you want to simulate a 'general' distribution , &lt;BR /&gt;like uniform or normal ,you can do it like this by changing &lt;BR /&gt;your variables inside MMn.pas: &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Define your variables:&lt;/P&gt;&lt;P&gt;var InterArrivals: TUniformDistribution; &lt;BR /&gt; ServiceTimes: TUniformDistribution;&lt;/P&gt;&lt;P&gt;and after that:&lt;/P&gt;&lt;P&gt;InterArrivals:=TUniformDistribution.Create(420623,0,2);&lt;BR /&gt;ServiceTimes:=TUniformDistribution.Create(2990623,0,1.5);&lt;/P&gt;&lt;P&gt;for i:=1 to simnumber&lt;BR /&gt;do &lt;BR /&gt; begin&lt;BR /&gt; obj:=TJob.create;&lt;BR /&gt; obj.simnumber:=simnumber;&lt;BR /&gt; obj.number:=i;&lt;BR /&gt; currtime:=currtime+InterArrivals.Sample;&lt;BR /&gt; obj.ArrivalTime:=currtime;&lt;BR /&gt; obj.Servicetime:= ServiceTimes.sample;&lt;BR /&gt; TP.execute(myobj.myproc1,pointer(obj),NORMAL_PRIORITY);&lt;BR /&gt; &lt;BR /&gt; end;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Welcome: &lt;A href="http://pages.videotron.com/aminer/"&gt;http://pages.videotron.com/aminer/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;That all.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Sincerely,&lt;BR /&gt;Amine Moulay Ramdane.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 26 Apr 2010 02:54:52 GMT</pubDate>
    <dc:creator>aminer10</dc:creator>
    <dc:date>2010-04-26T02:54:52Z</dc:date>
    <item>
      <title>An M/M/n queuing model simulation with Object Pascal and my Thread Pool Engine...</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/An-M-M-n-queuing-model-simulation-with-Object-Pascal-and-my/m-p/832711#M1561</link>
      <description>&lt;SPAN style="font-size: x-small;"&gt;&lt;SPAN style="font-size: x-small;"&gt;&lt;P&gt;&lt;BR /&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An M/M/n queuing model simulation with Object Pascal and my Thread Pool Engine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Author: Amine Moulay Ramdane &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Description:&lt;/P&gt;&lt;P&gt;It's harder and sometimes impossible to get analytical results &lt;/P&gt;&lt;P&gt;about waiting times and and queue length for general interarrival&lt;/P&gt;&lt;P&gt;and service distributions; so it's important to be able to estimate&lt;/P&gt;&lt;P&gt;these quantities by observing the results of simulation. &lt;/P&gt;&lt;P&gt;It's very easy in Object Pascal to simulate a sequence of arrival times&lt;/P&gt;&lt;P&gt;with a given interarrival distribution.&lt;/P&gt;&lt;P&gt;Look for example at the M/M/n example MMn.pas inside the zip file:&lt;/P&gt;&lt;P&gt;---------------------------&lt;/P&gt;&lt;P&gt;InterArrivals:=TExponentialDistribution.Create(420623,1.0/3.0);&lt;/P&gt;&lt;P&gt;ServiceTimes:=TExponentialDistribution.Create(220623,1.0/4.0);&lt;/P&gt;&lt;P&gt;currtime:=0.0;&lt;/P&gt;&lt;P&gt;for i:=1 to simnumber&lt;/P&gt;&lt;P&gt;do &lt;/P&gt;&lt;P&gt;begin&lt;/P&gt;&lt;P&gt;obj:=TJob.create;&lt;/P&gt;&lt;P&gt;obj.simnumber:=simnumber;&lt;/P&gt;&lt;P&gt;obj.number:=i;&lt;/P&gt;&lt;P&gt;currtime:=currtime+InterArrivals.Sample;&lt;/P&gt;&lt;P&gt;obj.ArrivalTime:=currtime;&lt;/P&gt;&lt;P&gt;obj.Servicetime:= ServiceTimes.sample;&lt;/P&gt;&lt;P&gt;TP.execute(myobj.myproc1,pointer(obj),NORMAL_PRIORITY);&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;-------------------------------------------&lt;/P&gt;&lt;P&gt;Here we have the InterArrivals object and ServiceTimes object and &lt;/P&gt;&lt;P&gt;we are calling InterArrivals.Sample to get our samples from the &lt;/P&gt;&lt;P&gt;Exponential Distribution.&lt;/P&gt;&lt;P&gt;After that we are calling myobj.myproc1 to simulate our&lt;/P&gt;&lt;P&gt;M/M/n queuig model... &lt;/P&gt;&lt;P&gt;If you look at MMn.pas , you will see that the InterArrival rate&lt;/P&gt;&lt;P&gt;is 3 and the Service rate is 4 , so, this will give us a theoretical&lt;/P&gt;&lt;P&gt;value of 1/(4-3) = 1, and the Object Pascal simulation give us 1.02.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can download the M/M/n queuing model simulation from:&lt;/P&gt;&lt;P&gt;&lt;A href="http://pages.videotron.com/aminer/" target="_blank"&gt;http://pages.videotron.com/aminer/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Language: FPC Pascal v2.2.0+ / Delphi 7+: &lt;A href="http://www.freepascal.org/" target="_blank"&gt;http://www.freepascal.org/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Operating Systems: Win , Linux and Mac (x86). &lt;/P&gt;&lt;P&gt;Required FPC switches: -O3 -Sd -dFPC -dWin32 -dFreePascal &lt;/P&gt;&lt;P&gt;-Sd for delphi mode.... &lt;/P&gt;&lt;P&gt;Required Delphi switches: -DMSWINDOWS -$H+ &lt;/P&gt;&lt;P&gt;For Delphi 5,6,7 use -DDelphi&lt;/P&gt;&lt;P&gt;For Delphi 2005,2006,2007,2009,2010+ use the switch -DDELPHI2005+ &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Disclaimer:&lt;/P&gt;&lt;P&gt;This software is provided on an "as-is" basis, with no warranties,&lt;/P&gt;&lt;P&gt;express or implied. The entire risk and liability of using it is yours.&lt;/P&gt;&lt;P&gt;Any damages resulting from the use or misuse of this software will be &lt;/P&gt;&lt;P&gt;the responsibility of the user.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sincerely,&lt;/P&gt;&lt;P&gt;Amine Moulay Ramdane.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;</description>
      <pubDate>Sun, 25 Apr 2010 17:55:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/An-M-M-n-queuing-model-simulation-with-Object-Pascal-and-my/m-p/832711#M1561</guid>
      <dc:creator>aminer10</dc:creator>
      <dc:date>2010-04-25T17:55:17Z</dc:date>
    </item>
    <item>
      <title>An M/M/n queuing model simulation with Object Pascal and my Thr</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/An-M-M-n-queuing-model-simulation-with-Object-Pascal-and-my/m-p/832712#M1562</link>
      <description>I wrote:&lt;BR /&gt;&lt;BR /&gt;&amp;gt;If you look at MMn.pas , you will see that the InterArrival rate &lt;P&gt;&amp;gt;is 3 and the Service rate is 4 , so, this will give us a theoretical&lt;/P&gt;&lt;P&gt;&amp;gt;value of 1/(4-3) = 1, and the Object Pascal simulation give us 1.02.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;I mean for one server - M/M/1 - it givesa theorerical value &lt;BR /&gt;of 1/(4-3) = 1and 1.02 in the simulation..&lt;BR /&gt;&lt;BR /&gt;But as you have noticed MMn.pascan simulatean M/M/n queuig model &lt;BR /&gt;with1 or many servers...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Sincerely,&lt;BR /&gt;Amine Moulay Ramdane.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 25 Apr 2010 18:17:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/An-M-M-n-queuing-model-simulation-with-Object-Pascal-and-my/m-p/832712#M1562</guid>
      <dc:creator>aminer10</dc:creator>
      <dc:date>2010-04-25T18:17:29Z</dc:date>
    </item>
    <item>
      <title>An M/M/n queuing model simulation with Object Pascal and my Thr</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/An-M-M-n-queuing-model-simulation-with-Object-Pascal-and-my/m-p/832713#M1563</link>
      <description>&lt;P&gt;&lt;BR /&gt;Hello , &lt;/P&gt;&lt;P&gt;I have updated MMn.pas to version1.01 - i have corrected a bug - &lt;BR /&gt;and put it back inside the zip file that you can download from:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Welcome: &lt;A href="http://pages.videotron.com/aminer/"&gt;http://pages.videotron.com/aminer/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Note: MMn.pas - n: numbers of servers - is queuing model simulation with &lt;BR /&gt; Object Pascal and my Thread Pool Engine.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Sincerely,&lt;BR /&gt;Amine Moulay Ramdane.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Apr 2010 01:58:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/An-M-M-n-queuing-model-simulation-with-Object-Pascal-and-my/m-p/832713#M1563</guid>
      <dc:creator>aminer10</dc:creator>
      <dc:date>2010-04-26T01:58:22Z</dc:date>
    </item>
    <item>
      <title>An M/M/n queuing model simulation with Object Pascal and my Thr</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/An-M-M-n-queuing-model-simulation-with-Object-Pascal-and-my/m-p/832714#M1564</link>
      <description>&lt;P&gt;&lt;BR /&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Note: next time i will show you how to simulate &lt;BR /&gt; a more complex problem in Object Pascal...&lt;/P&gt;&lt;P&gt;Of course, if you want to simulate a 'general' distribution , &lt;BR /&gt;like uniform or normal ,you can do it like this by changing &lt;BR /&gt;your variables inside MMn.pas: &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Define your variables:&lt;/P&gt;&lt;P&gt;var InterArrivals: TUniformDistribution; &lt;BR /&gt; ServiceTimes: TUniformDistribution;&lt;/P&gt;&lt;P&gt;and after that:&lt;/P&gt;&lt;P&gt;InterArrivals:=TUniformDistribution.Create(420623,0,2);&lt;BR /&gt;ServiceTimes:=TUniformDistribution.Create(2990623,0,1.5);&lt;/P&gt;&lt;P&gt;for i:=1 to simnumber&lt;BR /&gt;do &lt;BR /&gt; begin&lt;BR /&gt; obj:=TJob.create;&lt;BR /&gt; obj.simnumber:=simnumber;&lt;BR /&gt; obj.number:=i;&lt;BR /&gt; currtime:=currtime+InterArrivals.Sample;&lt;BR /&gt; obj.ArrivalTime:=currtime;&lt;BR /&gt; obj.Servicetime:= ServiceTimes.sample;&lt;BR /&gt; TP.execute(myobj.myproc1,pointer(obj),NORMAL_PRIORITY);&lt;BR /&gt; &lt;BR /&gt; end;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Welcome: &lt;A href="http://pages.videotron.com/aminer/"&gt;http://pages.videotron.com/aminer/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;That all.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Sincerely,&lt;BR /&gt;Amine Moulay Ramdane.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Apr 2010 02:54:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/An-M-M-n-queuing-model-simulation-with-Object-Pascal-and-my/m-p/832714#M1564</guid>
      <dc:creator>aminer10</dc:creator>
      <dc:date>2010-04-26T02:54:52Z</dc:date>
    </item>
  </channel>
</rss>

