Questions tagged [simulation]

Simulation is the imitation of some real thing, state of affairs, or process. The act of simulating something generally entails representing certain key characteristics or behaviours of a selected physical or abstract system.

5194 questions
1
vote
0 answers

what is pure translation and pure simulation in programming?

I recently read in the book "programming languages design and implementation by Pratt" that pure translation is seldom used except in cases where the input language is in fact quite similar to the machine language and pure simulation is used in the…
1
vote
2 answers

Not seeing a clock cycle delay in Vivado simulation during a register/flipflop assignment

I am trying to generate a pulse from a signal ext_sample_clk. My design currently has 2 clock signals, clk and ext_sample_clk, which I am generating through a testbench. The following is my simplified code. Besides this, I also have the clk and…
user2532296
  • 828
  • 1
  • 10
  • 27
1
vote
0 answers

PovRay rendering stops when simulating Gaussian beam passing through lens

I am trying to create a scene in PovRay where I have a Gaussian beam (tilted by 45°) passing through a lens with a focal point of 500mm, then reflecting off a flat surface. Rendering without the lens is no problem but at the point when I included…
Fabian
  • 11
  • 3
1
vote
1 answer

Anylogic: How to execute a downtime for only some workers of a same resourcePool

I have to model a task in which in a simplified example two workers do some work on queue of objects they have. but their work shifts may differ and my model should support this. Is there any way for doing this simply that each unit of a same…
1
vote
2 answers

How to find confidence interval from the simulation of linear model

I have used the arm package, sim() function, to create a simulation of linear model. The simulation result contains the coefficients and residual error. I would like to find the 95% confidence interval for the coefficients. How do I find it? The…
1
vote
1 answer

Anylogic: different results when running model .bat file and calling .bat file from C#

I successfully can run an anylogic model using a standalone java application and I run a .bat file without any problem on my windows 10. this is the image of run description in this case; but when I call the same .bat file through c# application,…
1
vote
1 answer

how to change the attribute of an object after n seconds using setTimeout

enter image description herehttps://github.com/sarang997/simulation1 Here is the simulation I am working on. You can try running the html file for it to work. There are circles colliding with each other in the simulation. Whenever a red circle…
1
vote
1 answer

How can I get z position of hector_quadrotor in ROS?

I am trying to get z position of hector_quadrotor in simulation. I can get X and Y axis coordinates but I couldn't get Z coordinate. I tried to get it by using GPS but the values are not correct. So I want to get Z coordinate by using barometer or…
YusufUcan
  • 49
  • 5
1
vote
2 answers

Reading Parameters row by row from excel for Anylogic Experiment

I want to run an Anylogic Parameter experiment, and I want the parameters to be read continuously from an excel file such that each row of excel data corresponds to parameters of one run. Likewise I want it to run as many times as rows of…
1
vote
1 answer

How to generate random numbers until sum of difference is 3000?

I need to generate random numbers until the condition(sum of the difference of each random number is 3000.) is satisfied. and random numbers are already generated from the truncated normal distribution. I already try to use while loop while(1) and…
Brad Yun
  • 13
  • 3
1
vote
1 answer

Rollback function in simmer

I am not understanding the rollback function in simmer correctly, According to https://r-simmer.org/reference/rollback.html the amount parameter represents the amount of activities to roll back. But my code is not doing what is supposed to. Here I…
ncnc_2020
  • 67
  • 9
1
vote
1 answer

Exporting the results of an Anylogic experiment

I have built my model and run the experiment. I cannot seem to find where the data is stored. I now need to conduct several runs and compare the results, I am using normally distributed repair times so the results should vary between runs without…
Simon
  • 11
  • 1
1
vote
1 answer

Arrays in Excel VBA. At some point it puts NA instead of the value

I am trying to make a simple simulation in Excel VBA in which we roll two dices. What is the probability of getting "1"+"2" or "1"+"3"? This is my code: Sub ProbabilityMeyerArray() Dim i As Long Dim ArrayDices(1 To 100000, 1 To 2) As…
Avocado
  • 70
  • 8
1
vote
1 answer

simulating data with bayesian network in R using own specification

Say I have a simple DAG representing a confounding variable X = Smoking, a treatment T and outcome Y = Death such that: T ~ X Y ~ T + X Is it possible to produce a synthetic dataset of say 1m observations that follows some specified conditional…
chrisjacques
  • 635
  • 1
  • 5
  • 17
1
vote
2 answers

Simulating correlated answers to a multi-choice test

I am trying to simulate the answers to a multi-choice question test (MCQ). Currently, I am using the following code to simulate the answers to a MCQ with only two questions: answers <- data.frame( Q1 = sample(LETTERS[1:5],10,replace = T,…
PaulS
  • 21,159
  • 2
  • 9
  • 26