I need a code to simulate a system with the following specifications:

Components of the system:

Sensors continuously generate two types of packets: Type A and Type B.
Type A packets are processed locally at the micro data center. The service time for Type A packets is 4 units. If a free server or an available local buffer exists, the packets are handled locally. Otherwise, they are forwarded (with a delay of 1 unit) to the cloud data center for processing, which takes 2 units of service time. If there are no free cloud servers and the cloud buffer is full, the packet is dropped, and the dropped packet counter is incremented.

Type B packets undergo pre-processing locally at the micro data center. The service time for Type B packets is 2 units. After pre-processing, they are forwarded (with a delay of 1 unit) to the cloud data center for complete processing, which takes 4 units of service time. If there are no free local servers and the local buffer is full, the packets are directly forwarded (with a delay of 1 unit) to the cloud data center. In such cases, the cloud data center handles their processing entirely, requiring 5 units of service time. If there are no free cloud servers and the cloud buffer is full, the packet is dropped, and the dropped packet counter is incremented.

There is a fraction of the total packets (Type A and Type B) represented by "f" which can be modified.

The micro data center consists of a single buffer (local buffer) and multiple edge servers. The number of edge servers can be modified. The micro data center can forward packets to the cloud data center. Note that whenever a packet is forwarded to the cloud, a delay of 1 unit is considered.

The cloud data center consists of a single buffer (cloud buffer) and multiple edge servers. The number of cloud servers can be modified.

Notes:

Although service times and delays are specified, they should be modifiable using separate unique variables.
The arrival time of packets should be modifiable using a separate unique variable. The inter-arrival times are exponentially distributed.
The simulation time should be modifiable.
The code should provide measurements during the simulation in a separate class called "measurements." The measurements include the number of dropped packets, the number of packet arrivals (Type A and Type B), and the average delay per packet. These measurements are printed after simulation.

Code Components:

Packet class: Takes "f" as an argument and generates packets randomly of Type A or Type B.

Local micro data center class: Contains five functions - process packet A, preprocess packet B, forward packet A, forward packet B, and forward packet B without preprocessing. Each function can be triggered or not based on the scenario. The class also has attributes - "num_edge_server" to specify the number of edge servers and "buffer_size" to specify the size of the local micro data center packet.

Cloud data center class: Contains three functions - process packet A, process packet B, and entire process packet B. It also has attributes - "num_cloud_server" to specify the number of cloud servers and "buffer_size" to specify the cloud buffer size.

system simulation class: Contains two main functions - process packet A and process packet B. the main simulation happen here