simulation

Anylogic: How to keep an agent waiting in queue until it changes state? (Discrete Events flowchart)

泪湿孤枕 提交于 2020-03-04 18:19:38
问题 I'm starting to use Anylogic for a simulation class, and for this I need to model the following behaviour: there's a stream of agents that enter a FIFO queue, and then enter into a server (that I modeled with a delay block), one at a time. The agents have two states (call them A and B), and if an agent reaches the end of the queue in state A, it has to wait until it returns to state B to go into the service. I think a wait block with capacity for one agent, between the queue and the delay

Anylogic: How to keep an agent waiting in queue until it changes state? (Discrete Events flowchart)

≯℡__Kan透↙ 提交于 2020-03-04 18:19:04
问题 I'm starting to use Anylogic for a simulation class, and for this I need to model the following behaviour: there's a stream of agents that enter a FIFO queue, and then enter into a server (that I modeled with a delay block), one at a time. The agents have two states (call them A and B), and if an agent reaches the end of the queue in state A, it has to wait until it returns to state B to go into the service. I think a wait block with capacity for one agent, between the queue and the delay

Anylogic simulate material stored in containers

懵懂的女人 提交于 2020-02-07 05:18:05
问题 I'm trying to simulate materials stored in containers on a shelf where the containers slide forward if you remove the first one. Example: A container can hold 10 elements and is filled by the batch-block. The container moves to the shelf(conveyor) where it should stay until it's empty. The assembly-block should take one piece out of the container and assemble the product. If the container is empty it can be dropped off the conveyor. I did try to model the shelf as a conveyor, which does work

what is the Beta valuel when simulate a hybrid Geyer model using spatstat, R package

烂漫一生 提交于 2020-02-06 12:52:31
问题 I fit a hybrid geyer model including a hardcore and a geyer saturation components, now I want to simulate the fitted model by rmh() in spatstat, the code is following: mo.X<-rmhmodel(cif=c("hardcore","geyer"), par=list(list(beta=0.0001746418,hc=30.31542), list(beta=1, gamma=0.4195612,r=122,sat=2)), w=Window(A1a2.unmark)) there are two beta in simulating the hybrid model: beta for hardcore(), and beta for geyer (), however, when fitting real data to get a hybrid model, only one beta value

what is the Beta valuel when simulate a hybrid Geyer model using spatstat, R package

﹥>﹥吖頭↗ 提交于 2020-02-06 12:51:27
问题 I fit a hybrid geyer model including a hardcore and a geyer saturation components, now I want to simulate the fitted model by rmh() in spatstat, the code is following: mo.X<-rmhmodel(cif=c("hardcore","geyer"), par=list(list(beta=0.0001746418,hc=30.31542), list(beta=1, gamma=0.4195612,r=122,sat=2)), w=Window(A1a2.unmark)) there are two beta in simulating the hybrid model: beta for hardcore(), and beta for geyer (), however, when fitting real data to get a hybrid model, only one beta value

Veins: Get Tripinfo and emissions in output

爱⌒轻易说出口 提交于 2020-02-06 03:32:23
问题 I'm using veins 4.6 with omnetpp 5.1.1 and trying to output tripinfo of vehicles using following configurations in .sumocfg file: <input> <net-file value="erlangen.net.xml"/> <route-files value="erlangen.rou.xml"/> <additional-files value="erlangen.poly.xml"/> </input> <time> <begin value="0"/> <end value="300"/> <step-length value="0.1"/> </time> <report> <no-step-log value="true"/> </report> <gui_only> <start value="true"/> </gui_only> <emissions> <device.emissions.probability value="1"/> <

Why shouldn't I use pixels as unit with Box2D?

心不动则不痛 提交于 2020-02-04 04:52:26
问题 In the manual it says that I should use small units (0.1-10 meters). It's discouraged to use pixels as the unit of measure. But why would Box2D be working better, and have better simulation than when I'd use small units? 回答1: Box2D is a simulation framework which internally uses the MKS system of units. If you want a reliable and predictable simulation, you should express the simulation systems you create in reasonable values within this system of units. You want a box to behave like a box, a

Defining exponential distribution in R to estimate probabilities

泪湿孤枕 提交于 2020-01-24 12:44:27
问题 I have a bunch of random variables (X1,....,Xn) which are i.i.d. Exp(1/2) and represent the duration of time of a certain event. So this distribution has obviously an expected value of 2, but I am having problems defining it in R. I did some research and found something about a so-called Monte-Carlo Stimulation, but I don't seem to find what I am looking for in it. An example of what i want to estimate is: let's say we have 10 random variables (X1,..,X10) distributed as above, and we want to

How to for loop in reverse?

↘锁芯ラ 提交于 2020-01-24 12:24:10
问题 I'm making a water simulation program, and I need it to do a for loop through y, x. But I need it to check the most bottom y first, then up. This is my lvl: lvl = [[0, 0, 1, 0, 0], [0, 0, 1, 0, 0], [0, 0, 1, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]] I need it to check lvl[4] and then lvl[3], lvl[2], etc. Please help! NB: I'm using nested for loops, so I can check y, x. 回答1: You can use the reversed built-in method to reverse the ordering of your list of lists: for li in reversed(lvl): print li

How to for loop in reverse?

允我心安 提交于 2020-01-24 12:24:06
问题 I'm making a water simulation program, and I need it to do a for loop through y, x. But I need it to check the most bottom y first, then up. This is my lvl: lvl = [[0, 0, 1, 0, 0], [0, 0, 1, 0, 0], [0, 0, 1, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]] I need it to check lvl[4] and then lvl[3], lvl[2], etc. Please help! NB: I'm using nested for loops, so I can check y, x. 回答1: You can use the reversed built-in method to reverse the ordering of your list of lists: for li in reversed(lvl): print li