Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

nentech is a small manufacturing company that makes one product. Each worker is positioned at a workstation and is given jobs in the order that

nentech is a small manufacturing company that makes one product. Each worker is positioned at a workstation and is given jobs in the order that the job requests arrive. Workers work on the job until complete and then start on the next job in the que. There are four jobs: build a new product, repair an existing product, perform maintenance on an existing product, and disassemble a product for parts. You are part of a team tasked with studying the workstations by creating a simulation. The basic framework of the simulation is complete and has been provided to you (see Python code at the end of this document.) Make sure you understand the code and that you can get it to execute in Python. Your job is to modify the code to make the following improvements:

Requirement 1a:

In the current code each job has an equal probability of being added to the que, but this does not reflect the situation at Inentech. Modify the code so that when a job is added to the que the probability of each type of job being added to the que is

Job Probability as a Percentage Build 50% Repair 15% Maintenance 30% Disassemble 5% Hints: you could generate a random number from 1 to 100 and use an if/elif/else statement to see which job is generated if 50 or less Build, elif 65 or less Repair, elif, 95 or less Maintenance

1b : The code for requirement 1a that randomly picks the job according to the table must be implemented as a function named GenerateJob(). Replace the existing line of code que = que + [jobs[random.randint(0,3)]] with que = GenerateJob(que). T

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Microsoft SQL Server 2012 Administration

Authors: Adam Jorgensen, Steven Wort

1st Edition

1118106881, 9781118106884

More Books

Students also viewed these Databases questions