I am trying to simulate running of two manufacturing lines (Line A and Line B).Their time to failure follows Weibull distribution(shape = 0.7, scale = 12 (mins)). Line A and Line B both produces at rate of 100 products/min. From real world scenario, if any of lines fails, I want to increase rate of other line (say – 120 products/min)
Tag: simulation
Inventory discrete event simulation with simpy object oriented
I m trying to formulate an inventory simulation with Simpy (a Python library for discrete event simulation) using an Object Oriented approach. The simulation follow these steps: Initialization : A warehouse with unlimoted capacity and initial inventory on hand. Serve Customers : Customers arrive each inter arrival time and ask for a quantity of items demand. If we have enough
Simulating expectation of continuous random variable
Currently I want to generate some samples to get expectation & variance of it. Given the probability density function: f(x) = {2x, 0 <= x <= 1; 0 otherwise} I already found that E(X) = 2/3, Var(X) = 1/18, my detail solution is from here https://math.stackexchange.com/questions/4430163/simulating-expectation-of-continuous-random-variable But here is what I have when simulating using python: What am I doing
SimPy, How to incorporate a break for resources?
At the moment I am creating doctors as following: These doctors are requested for a flow of patients using the following: What I would like to do, is initialize the doctors with some kind of fatigue level (and other characteristics) like: Then in the encounter I would like to access the doctor to add fatigue such as: Where once the
GEKKO variable update in real time
How do I need to setup m.time and update the initial conditions if I want to use GEKKO in an online simulation that updates every second? I have tried: but it doesn’t seem to update the values. I’m using IMODE = 4 This is just a dynamic simulation application. No control at the moment. Answer Gekko manages the initial conditions
FiPy: How to find node (vertex) at interface between two mesh
I’ve defined two meshes in FiPy via Gmsh and would like to find the nodes at the interface between the two mesh. Is there a way to do this in FiPy? I’d like to get all the nodes (or lines) at the interface between mesh m0 and m1. Answer FiPy has a function called nearest which gets the nearest values
How to terminate simulation in SimPy 4
Is there a way to terminate the simpy simulation by using a command like env.exit()? I don’t understand how to place an event into env.run(until=event). I want to terminate the simulation when there are no objects left in my certain Simpy Stores. How can I do that? Answer Everything is an event in simpy, even the environment itself. Thus, you