Posts

Showing posts from February 3, 2019

Nginx reverse proxy - .js and .css forbidden

Image
0 My setup: a raspberry pi which is part of 2 separate LAN's (192.168.1.* and 192.168.2.*), running nginx. I would like to setup nginx as a reverse proxy, so I can access the router of the first LAN from the second LAN. (Direct access to the router from outside its LAN is not possible) So from a computer in the second LAN (let's say 192.168.2.10) I want to go to the address of the pi in the second LAN (let's say 192.168.2.2), and I want to get forwarded to the web interface of the router in the first LAN (192.168.1.1). With the setup I did, this works partially: it forwards to the correct location but there are problems loading the site, as for every .js and .css file (which are reference inline in the html that gets loaded) I get a 403 error 'forbidden'. Accessing the router website direc

Is it possible to further functionalize this code for descrete event simulation

Image
0 $begingroup$ I have one machine, which produces parts. In machine_failure_rate % it produces faulty parts which need to be produced again. Thus, we end up with a simple queuing problem. Can the following code be futher functionalized? I have the feeling, I can get rid of time_parts , but all I have in mind deteriorates the code as I need further lookups in the production_df data frame to look for "what was produced / what needs to be produced now?". The following script is running: input_rate <- 1/60 # input rate [1/min, 1/input_rate corresponds to interarrival time in min] n <- 1000 # number of parts dt <- 1 # timestep = time to transfer faulty parts back to production. [min] machine_production_rate <- 1/40 # production rate [1/min] machine_failure_rate <- 0.2 # machine failure r