Build your model: Create an environment and resources
You have been asked to help optimize the assembly line of an aircraft manufacturer. The main components of the aircraft are the (1) fuselage, (2) wings, (3) empennage (the tail end), (4) power plant (engine and propeller), and (5) landing gear.
Each of these components goes in a different assembly section that has 3, 2, 2, and 3 slots. This means that once a step is completed, it will go to the following step if a slot is available; otherwise, it will have to wait. The assembly sequence must follow the order of Steps 1-4 displayed in the following diagram. The model time is in hours.

Build a discrete-event model to simulate the assembly line.
Deze oefening maakt deel uit van de cursus
Discrete Event Simulation in Python
Oefeninstructies
- Complete the dictionary with information about your resources; keys are
step_1_fuselage,step_2_wings,step_3_power_plant, andstep_4_landing_gear, with the following values (process durations), 20, 8, 10, and 8 hours. - Create the SimPy environment and store it in a variable named
env. - Complete the resources of the model with the respective capacities shown in the diagram (i.e., slots), and store them in variables with names
step_1_fuselage,step_2_wings,step_3_power_plant, andstep_4_landing_gear.
Praktische interactieve oefening
Probeer deze oefening eens door deze voorbeeldcode in te vullen.
# Define a dictionary with your processes
processing_time = {
"____": 20,
"____": 8,
"step_3_power_plant": ____,
"step_4_landing_gear": ____
}
# Create your SimPy Environment with the name env
env = simpy.____()
# Create resources for each assembly step
step_1_fuselage = simpy.____(env, capacity=____)
step_2_wings = simpy.____(env, capacity=2)
step_3_power_plant = simpy.____(env, capacity=2)
step_4_landing_gear = simpy.____(env, capacity=3)
env.process(order_aircraft(env, PLANE_ORDERS, step_1_fuselage, step_2_wings, step_3_power_plant, step_4_landing_gear))
env.run()