Considet the code:

import simpy
import random
import matplotlib.pyplot as plt

# Parameters
num_edge_nodes = 1
edge_buffer_size = 15
cloud_buffer_size = 20


# service times
cloud_server_time = 10
A_edge_service_time = 4
A_cloud_service_time = 2
B_edge_sevice_time = 2
B_cloud_service_partialprocess = 4
B_cloud_service_fullprocess = 5
propagation_delay = 1


arrival_rate = .8


# Measurements

class Measure:
    def __init__(self, N_arr_a, N_arr_b, drop):
        self.N_arr_A = N_arr_a
        self.N_arr_B = N_arr_b
        self.drop = drop

measurements = Measure(0, 0, 0)


def packet_arrivals(env, micro_data_center, cloud_data_center, data):
    packet_type_options = ['A', 'B']
    packet_id = 1

    while True:
        packet_type = random.choices(packet_type_options, weights=(1 - f, f))[0]

        # Updating arrival data
        if packet_type == "A":
            data.N_arr_A = data.N_arr_A + 1
        else:
            data.N_arr_B = data.N_arr_B + 1



        if len(micro_data_center.items) < edge_buffer_size:
            if packet_type == "A":
                micro_data_center.put((packet_id, packet_type, A_edge_service_time))
            elif packet_type == "B":
                micro_data_center.put((packet_id, packet_type, B_edge_sevice_time))


        else:
            if len(cloud_data_center.items) < cloud_buffer_size:
                if packet_type == "A":
                    cloud_data_center.put(
                        (packet_id, packet_type, A_cloud_service_time + propagation_delay))

                elif packet_type == "B":
                    cloud_data_center.put(
                        (packet_id, packet_type, B_cloud_service_fullprocess + propagation_delay))

            else:
                data.drop = data.drop + 1


        yield env.timeout(random.expovariate(arrival_rate))
        packet_id += 1


def edge_node(env, micro_data_center, cloud_data_center, node_id):
    while True:
        packet_id, packet_type, packet_processing_time = yield micro_data_center.get()

        yield env.timeout(packet_processing_time)
        print(f"Edge Node {node_id} processed packet {packet_id} of type {packet_type} at time {env.now}")

        if packet_type == 'B':
            yield cloud_data_center.put((packet_id, packet_type, B_cloud_service_partialprocess + propagation_delay))


def cloud_server(env, cloud_data_center):
    while True:
        packet_id, packet_type, packet_processing_time = yield cloud_data_center.get()

        yield env.timeout(packet_processing_time)
        print(
            f"Cloud Server processed {packet_type} packet {packet_id} (including propagation delay) at time {env.now}")


# Simulation setup
env = simpy.Environment()
micro_data_center = simpy.Store(env)
cloud_data_center = simpy.Store(env)

f = 0.5  # Fraction of packets of type B

env.process(packet_arrivals(env, micro_data_center, cloud_data_center, measurements))

for node_id in range(num_edge_nodes):
    env.process(edge_node(env, micro_data_center, cloud_data_center, node_id + 1))

env.process(cloud_server(env, cloud_data_center))

# Recording data


# Run the simulation
losses = []
simtime_list = list(range(1, 10000 + 1, 500))
for simtime in simtime_list:
    env.run(until=simtime)
    losses.append( 100*  measurements.drop/ ( measurements.N_arr_A+ measurements.N_arr_B))


plt.plot(simtime_list, losses)
plt.axvline(x=2000, color='red', linestyle='--')
plt.text(2000, max(losses), 'Transition Period', color='red', va='bottom', ha='center')
plt.xlabel('Simulation Time')
plt.ylabel('Loss Probability at Cloud (%)')
plt.title('Loss Probability over Time (Removing Transient Period)')
plt.show()



I use the above code to perform the task below which is a part of simulating a network system, taking into account the output of the code, write an anlytic result for the task considering the task requirements.
The task:
assume a single server with finite buffer for both the Micro Data
Center and the Cloud Data Center, with f=0.5. Focusing on the Cloud Data
Center sub-system, the packet drop probabil-ity of those data packets that are
forwarded to the Cloud for any reason.
(a) Observe the system behavior during the warm-up transient period and identify
the transition to the steady state.
(b) Try to apply a method to remove the warm-up transient in your simulations.