(Solved) : Repair Yard Simulation C Problem Description User Input Number Days Simulation Run Day Sma Q42774944 . . .

Repair Yard Simulation

In C++,

  1. Problem description

  1. User will input a number of days the simulation is to run.

  2. Each day a small random number (1 to 5) of randomly damagedrandom type vehicles will arrive.

    1. Vehicles will include 3 “soft” and 3 “hard” and one half-tracktype. V1 through V7

    2. Every arriving vehicle will have mean = 3 broken parts withstandard deviation=1, minimum=1

    3. The broken part ids will be generated randomly based on vehicletype.

    4. Each vehicle will have a certain number of parts, some partswill be shared.

V type

Parts

sum

Scrap value

V1 (soft)

P1 – P10

55

28+

V2 (soft)

P5 – P15

100

50+

V3 (soft)

P2 – P20 (even only)

110

55+

V4 (halftrack)

P1 – P19 (odd) and P21 – P25

215

107+

V5 (hard)

P21 – P35

420

210+

V6 (hard)

P25 – P40

520

260+

V7 (hard)

P21 – P43 (odd)

384

192+

  1. Time to repair = part number so P1 needs 1 hour, P15 needs 15hours

  2. Constant time to do repair checklist and testing.

  3. Yard master vehicle evaluation:

If the sum of the ids of damaged partsexceeds half of the total value (as shown above) the vehicle isscraped. The undamaged parts can be requested by the repairbays.

3a. The scrap yard will be initialized with a small number ofrandomly damaged vehicles of random types (seven)

3b. the warehouse will be initialized with a small number ofspare parts, 30 random parts out of 42 (numbers 1 to 43 except 42)with a small freq for each one (1 – 3), for example perhaps thewarehouse has three part number 17s, but 0 part number 18s

  1. From arrival, repairable vehicles are placed into a priorityqueue that is based on minimal repair time (thus maximizingoutput)

  2. Repair Bays:

    1. If a bay is empty, 1) load a vehicle from retest queue to bere-repaired.

2) if retest queue is empty, load anewly damaged vehicle from pqueue

b. Once a vehicle enter the bay, parts are requested from thescrap yard. If the yard HAS a specific part then it is returned tothe bay, and the donor vehicle part is noted broken or otherwiseused.

c. If no part exists in scrap yard, then the supply depotreceives the request.

d. if after all other parts are repaired/replaced and singlepart is still missing , the vehicle is moved back to the repairqueue.

A damaged vehicle can only reach the front of the queue 2 times,e.g. if on the 3rd trial parts are still missing thevehicle is moved to the scrap yard.

e. if all parts are available, the time = max part id

  1. Testing, all parts will be tested, old parts, new parts, etc.All parts will pass inspection with 98% rate. Any vehicles thatfail are put in the retest queue.

  1. Objects and class definitions and data structures.

Yardmaster will addvehicles to the scrapyard or repairqueue from a list of newly arrived damaged vehicles Idnumbers, to keep track of times through the repair queue.

Scrapyard, list ofavailable “good” or salvaged parts found in vehicles.Warehouse contains a list of parts.

Scrapyard and Warehouse will beinitialized with a random number of parts of random ids.

Vehicle class withpart ids, type id

Vehicles will arrive in an(unsorted) repair queue.

Repair Bays [3] eachbay has a vehicle ptr that is used to replace parts, the bays haveaccess to the clipboard for repair info.

  1. The output diary.

Every action should be noted in anoutput diary.

Vehicles arriving and their state

Yardmaster decisions

Priority queue pushes and pops

Bay assignments

Part queries and results

Testing results and either return toservice or request queue assignments

Expert Answer


Answer to Repair Yard Simulation In C++, Problem description User will input a number of days the simulation is to run. Each day a…

Leave a Comment

About

We are the best freelance writing portal. Looking for online writing, editing or proofreading jobs? We have plenty of writing assignments to handle.

Quick Links

Browse Solutions

Place Order

About Us