Preview

MM1 simulation in Matlab

Good Essays
Open Document
Open Document
884 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
MM1 simulation in Matlab
mm1 simulation in matlab clc;clear; ST_Idle=0;
ST_Busy=1;
EV_NULL=0;
EV_Arrive=1;
EV_Depart=2;
EV_LEN=3;

Q_LIMIT=1000000;

% next_event _type=[];
% num_custs _delayed=[];
% num_delays _count=[];
% num_events=[];
% num_in _queue=[];
% server_status=[];
% area_num _in _queue=[];
% area_server _status=[];
% mean_interarrival=[];
% mean_service=[];
% clock=[];
% time_last _event=[];
% total_of _delays=[]; time_arrival=[];

time_next _event=zeros(1,EV_LEN);

num_events=EV_LEN-1; mean_interarrival=0.25; mean_service=0.2; num_delays _counts=10000;

outfile=fopen('mm1.txt','w'); fprintf(outfile, 'Single-server queueing system \n \n'); fprintf(outfile, 'Mean interarrival time %11 .3f minutes \n \n',mean_interarrival); fprintf(outfile, 'Mean service time %16 .3f minutes \n \n', mean_service); fprintf(outfile, 'Number of customers %14 d \n \n', num_delays _counts);

%% part1

clock=0.0;
% Initialize the state variables. server_status = 0; % idle num_in _queue = 0; time_last _event = 0.0; % Initialize the statistical counters. num_custs_delayed = 0; total_of _delays = 0.0; area_num _in _queue = 0.0; area_server _status = 0.0; % Initialize event list. Since no customers are present, the departure
%(service completion) event is eliminated from consideration. time_next_event(EV_Arrive) = clock + exprnd(mean_interarrival); time_next _event(EV_Depart) = 1.0e+230;

%% part2 while (num_custs _delayed < num_delays _counts)
% Run the simulation while more customer service counts are still needed. %Determine the next event. min_time_next _event = 1.0e+290; next_event _type = 0; % Determine the event type of the next event to occur. for i = 1: num_events if (time_next _event(i) < min_time _next _event) min_time _next _event = time_next _event(i); next_event _type = i; end end %

You May Also Find These Documents Helpful

  • Good Essays

    Simulation Review Paper

    • 846 Words
    • 4 Pages

    Cecilia McDaniel also gives a choice of two option plans to cover the shortfall, and propose the best decision following the analyzing impact on the cash flow statements of the hospital.…

    • 846 Words
    • 4 Pages
    Good Essays
  • Powerful Essays

    FINA 505 Simulation

    • 4059 Words
    • 15 Pages

    In the first run, In 2009 the projects selected included: Toddler Doll Accessory Line, 'Match my Doll' Clothing Line, Retail Store Expansion in Northeast and New Doll Film/DVD. In 2010 we chose: 'Dolls of the World' Initiative, Expansion of Mail-order Catalog Business to Asia, Tween Book Series. In 2011: Replace Assembly Equipment at Sacramento Facility, 'Match My Doll' Clothing Line, Expansion of Concept, New East Coast Distribution Facility, New Inventory Control System for Warehouse, Acquisition of Children's…

    • 4059 Words
    • 15 Pages
    Powerful Essays
  • Satisfactory Essays

    This file MGT 434 Week 3 Individual Assignment Interactive Simulation Paper on the topic "Workplace Discrimination Prevention (Simulation) Employment Law" includes review on this questions:…

    • 486 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Mircomotors Simulation

    • 605 Words
    • 3 Pages

    When I would start running the simulation I would start with what they gave me and advance round right away. Then after that I would immediately look into the market research section to find out more about what the customer wants so I could try and please all the customers. Every time I would try to make the customers happy I would continue to end up being fired. There was one time when I was close to having everyone very satisfied, but could not please everyone. I believe that was one topic we were trying to learn from this, that pleasing everyone and giving them exactly what they want sometimes is not possible.…

    • 605 Words
    • 3 Pages
    Satisfactory Essays
  • Powerful Essays

    The Report is based on the Everest Simulations and is based on the topics of Attitudes, Perceptions and Personality, Conflicts and Teams, and Organisational Structure. The purpose of the report is to critically analyse the members of the team and the team as a whole, and recommend any improvements.…

    • 1769 Words
    • 8 Pages
    Powerful Essays
  • Better Essays

    physics M & M lab

    • 835 Words
    • 4 Pages

    Introduction: Do you think you could measure the average thickness of a sample of M&Ms without directly measuring selected M&Ms? The answer is "yes," and in this activity you will make direct and indirect measurements of the thickness of M&Ms. You will compare the results and evaluate the reliability of each method of measurement. Be sure to view the tutorial on the proper use of the vernier caliper. Please re-visit the information on when to cite sources.…

    • 835 Words
    • 4 Pages
    Better Essays
  • Satisfactory Essays

    AIB Simulation

    • 771 Words
    • 4 Pages

    Before starting this homework assignment, please review the AIB simulation in this week’s Lecture. This simulation will provide you with an understanding of how to create a network diagram, and how to do a forward and backward pass to determine the ES, LS, EF, LF and slack (float). You will also learn how to determine the duration of the project, and the critical path.…

    • 771 Words
    • 4 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Overview of Simulation

    • 1912 Words
    • 17 Pages

    This PowerPoint presentation was prepared by Professor Timothy Luehrman for the sole purpose of aiding classroom instructors in the use of Finance Simulation: M&A in Wine…

    • 1912 Words
    • 17 Pages
    Satisfactory Essays
  • Satisfactory Essays

    5.1 Simulation

    • 261 Words
    • 2 Pages

    To conduct the experiment, as a data set we used different videos from outdoor places which comprise of both normal and abnormal motions. The experimental results of one of the videos have been presented in figure 5.1-5.8. The video consists of 100 frames where both normal and abnormal motion exists.…

    • 261 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    A master budget is a summary of a company 's plans in which specific targets are set for sales, production, distribution, and financing activities and that generally culminates in a cash budget, budgeted income statement, and budgeted balance sheet (www.mcgrawhill.ca/college/garrison5/student/olc/5mag).…

    • 620 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    Simulation Review

    • 538 Words
    • 3 Pages

    Unrestricted cash and Cash Equivalents /Cash Operation Expenses ÷ No. of Days in Period (365)…

    • 538 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    The four curriculum topic programs to be introduce in this BSN advanced Medical Surgical programs are: (a) Cultural practices and belief’s impact on medical treatment modalities, (b) Heart failure case studies and patient education, (c) Complex health problems of the young and the old, and (d) Information and communication technologies to promote the public’s health. The activity chosen for this BSN program is called Advanced High Fidelity Simulation Assessment. High Fidelity Simulation is an event or scenario made to resemble clinical practice as closely as possible. Simulation can be used to teach theory, assessment, technology, pharmacology, and skills. The emphasis in simulation is often on the application and integration…

    • 138 Words
    • 1 Page
    Satisfactory Essays
  • Satisfactory Essays

    Mgmt 1001 Everest Simulation

    • 4867 Words
    • 20 Pages

    MGMT 1001 Assignment 2 – Report – 30% of Final Mark Course: MGMT 1001 Tutorial Time: Monday 2pm (M14A) Tutor’s Name: Victor Libdy Date: 17th May 2010 Report Focus: Write a report reflecting on your experiences of the Everest group simulation exercise this semester with reference to concepts and theories encountered in this course.…

    • 4867 Words
    • 20 Pages
    Satisfactory Essays
  • Better Essays

    Chapter 8 LINUX Answers

    • 1190 Words
    • 5 Pages

    1. You have obtained a new utility, called watchit, to monitor security on your computer,…

    • 1190 Words
    • 5 Pages
    Better Essays
  • Satisfactory Essays

    CDMA is modulation technique to transmit data over a whole frequency spectrum. It was developed by Qualcomm as a better technology to TDMA based 2nd Generation GSM. In many aspects, such as power, security, number of users, and efficiency, it achieved success in displacing TDMA as the preferred technology. According to recent statistics by CDG, CDMA is used in 1/3 of wireless technologies, with 60% of the subscribers in Asia Pacific Region.…

    • 797 Words
    • 4 Pages
    Satisfactory Essays