# Discrete-event simulation with SimPy and Optimization with SciPy -- 5

Problem1

We would like to design a [network packet]([login to view URL]) routing system. To do so, we will need to define the system and run a simulation so that we can generate data that will be used for the optimization of design parameters. Our router will be a bit of a simpler system, so do not worry about any specifics you know about ethernet or telecommunications in general. The goal of our router is that it will route packets from devices connected to it through to the internet.

We'll parameterize our router so that it can accept $\alpha$ packet routing connections at any time. Assume that packets take $\beta$ time to be routed through the router. Let's say that each device connected to the router is only willing to wait for up to $\gamma$ time for the packet to be routed to its destination.

Let's also say that our system will allow for prioritization on three levels so that we can make sure those high-priority packets like those for voice and video calls can route through before lower-priority packets like standard file downloads.

Please refer to the below attached file for a better understanding

To model our system, let's say that we have $n$ devices on our network connection to the router. Each device generates $X_v$ video calling packets, $X_s$ standard priority packets, and $X_l$ low priority packets at an $X_i$ interval time between each packet submitted to the router. So, say that this device has a total of $X_v + X_s + X_l$ packets. I would recommend that you shuffle this set of packets. This device would submit the first of these packets (in any order) to the router at time 0. The device would then wait for $X_i$ before submitting the next packet (which again can be any of those in this device's collection), and again until the total number of packets has been submitted to the router.

Higher priority packets will not preempt lower-priority packets, but they will be able to jump the queue ([login to view URL]).

Based on the distributions for the parameters below, what is the average number of packets that make it through the router to the internet, for $n$ = [3, 5, 10, 15]? All time-related parameters below are in milliseconds. Make sure to set the random seed.

- $\alpha$ = 6

- $\beta$ = exponentially-modified normal continuous random variable at location 1 and scale 1.5

- $\gamma$ = 3

- $X_v$ = uniform discrete random variable between [2,10]

- $X_s$ = uniform discrete random variable between [2,10]

- $X_l$ = uniform discrete random variable between [2,10]

- $X_i$ = binomial discrete random variable with n at 10 and p at 0.5

Problem2

Create a function that will automatically run the simulation above, introducing a new constraint named $\omega$, which is the length of time the router is willing to dedicate to routing a packet. Thus, you will need to modify Problem 1 so that $\omega$ is incorporated as another wait time that will interrupt the packet routing.

Then, we would like to see how $\omega$ affects the number of packets that successfully route through. Make sure that the function sets the same random seed inside the function so that your simulation parameters are consistent across runs.

Using scipy.optimize.minimize_scalar() ([see reference]([login to view URL])), what is the value of $\omega$ (router processing time allocated) that results in the highest number of packets that successfully route through our router design, where $2 \le \omega \le 10$?

Jupyternotebook formate

Please find the below file for better understanding

Habilidades: Python, Arquitetura de software, SciPy, Simulation

Acerca do Empregador:
( 2 comentários ) Los Angeles, United States

ID do Projeto: #32257972

## 7 freelancers estão ofertando em média $203 nesse trabalho liveexperts123 Hi there,I'm biddin on your project "Discrete-event simulation with SimPy and Optimization with SciPy -- 5" I have read your project description and i'm an expert in Python and machine learning therefore i can do this Mais$250 USD in 3 dias
(83 Comentários)
7.7
hsh564cf84accd96

We will do your work I am writing this proposal in order to work for you in Software and Web Development. We are highly trained professional developers seeking to freelance and earn online. Having a flair in programm Mais

$200 USD in 7 dias (22 Comentários) 5.0 shashaev96 Professional Software Developer️ Hello , I hope you are safe and Doing well I have seen your project requirements , I am looking to discuss further with you Hope we will meet soon to discuss further Coming to me, I Mais$200 USD in 5 dias
(19 Comentários)
4.6
freelancerIrvan

Hi there, I am a talented python dev, and I suppose I can handle this task successfully. Please let me know more details, and Please give me your chance. I look forward to hearing from you. Mais

$139 USD in 7 dias (6 Comentários) 4.5 (4 Comentários) 4.0 Baalateja Hello, I have previous experience writing simulations using SimPy and using SciPy for optimization problems. Your project of simulating a network and analyzing the effect of different parameters is very interesting, I Mais$240 USD in 3 dias
(1 Comentário)
1.6
uvtxyz1991

- previous experience in such topics - eager to discuss a lot in this chat stream - degree stats maths

\$240 USD in 3 dias
(7 Comentários)
3.5