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.
5,769
questions
611
votes
24
answers
411k
views
Simulator or Emulator? What is the difference?
While I understand what simulation and emulation mean in general, I almost always get confused about them. Assume that I create a piece of software that mimics existing hardware/software, what should ...
262
votes
16
answers
165k
views
Network tools that simulate slow network connection [closed]
I would like to visually evaluate web pages response time for several Internet connections types (DSL, Cable, T1, dial-up etc.) while my browser and web server are on the same LAN or even on the same ...
243
votes
18
answers
186k
views
source of historical stock data [closed]
I'm trying to make a stock market simulator (perhaps eventually growing into a predicting AI), but I'm having trouble finding data to use. I'm looking for a (hopefully free) source of historical stock ...
204
votes
13
answers
10k
views
Simulating tremor (from e.g. Parkinson's Disease) with the mouse on a webpage?
I'm working for a foundation that raises awareness for accessibility in the internet. For a presentation, we want to offer a small workshop that simulates different disabilities/impairments to people. ...
152
votes
7
answers
78k
views
iPhone Simulator - Simulate a slow connection?
Is there a way to slow down the internet connection to the iPhone Simulator, so as to mimic how the App might react when you are in a slow spot on the cellular network?
121
votes
3
answers
203k
views
How to use curl to get a GET request exactly same as using Chrome?
I have a web api http://something.com/api and I want to use GET to get the response body.
This is my command:
curl "http://something.com/api"
Of course, it fails and gives an error message.
When I ...
110
votes
10
answers
118k
views
What's the difference between emulation and simulation? [duplicate]
Possible Duplicate:
Simulator or Emulator? What is the difference?
In simple understandable terms, what is the difference between the two terms?
[I have already looked at this, this and this]
94
votes
8
answers
276k
views
Simulate a click on 'a' element using javascript/jquery
I am trying to simulate a click on on an element.
HTML for the same is as follows
<a id="gift-close" href="javascript:void(0)" class="cart-mask-close p-abs" onclick="_gaq.push(['_trackEvent','...
80
votes
9
answers
184k
views
Using Camera in the Android emulator
I wish to simulate camera in the android emulator using the webcam. Basically I need to only take photos with the camera in the emulator (live preview is not needed i.e if it makes it any easier)
I ...
72
votes
5
answers
96k
views
iPhone Browser simulator for Windows?
Note: This is a question about simulating the Browser on the iPhone, not simulating the whole device. I know that iPhone-device simulation is not possible on Windows, as discussed at length here.
I ...
56
votes
1
answer
192k
views
Play audio as microphone input
I am to test voice recognition programs. Some which I have access to the code and others where I don't.
Sadly my (beautiful) voice is not perfect, so when I am reading a text it sounds slightly ...
46
votes
9
answers
158k
views
How to set fake GPS location on IOS real device
Currently I have to test app and set the different fake GPS locations on real IOS 7 devices. On Android I use 'My Fake Location'. Unfortunately, I didn't find the same app for IOS 7.
Any ideas to ...
45
votes
10
answers
35k
views
Suggestions for Python debugging tools? [closed]
Yesterday I made a simulation using Python. I had a few difficulties with variables and debugging.
Is there any software for Python, which provides a decent debugger?
Related question: What is the ...
43
votes
1
answer
13k
views
How do you simulate Stripe Subscription Renewal Failure? [closed]
I'm trying to test different Stripe Subscription failures. Specifically, what happens when an active subscription gets renewed when initially the card got accepted and the subscription is active, but ...
41
votes
2
answers
71k
views
Simulate Python keypresses for controlling a game
I'm trying to control a game (my two test games are Half Life 2 and Minecraft) using my Kinect and Python. Everything works except for one thing. The game will respond to simulated mouse events and ...
40
votes
5
answers
124k
views
Python simulate keydown
After searching for several hours i´m wondering if its possible to simulate a keydown press on the keyboard. For example I want my program to hold the x key down for five seconds so when I run it in ...
38
votes
4
answers
159k
views
VHDL - How should I create a clock in a testbench?
How should I create a clock in a testbench? I already have found one answer, however others on stack overflow have suggested that there are alternative or better ways of achieving this:
LIBRARY ieee;
...
38
votes
4
answers
14k
views
Simulating low battery for iPhones
I am working on a mobile game, which appearantly crashes when the Low Battery alert is displayed. It works fine on low memory, incoming calls and other messages.
Its a pain to test and debug this, ...
35
votes
6
answers
4k
views
How to make virtual organisms learn using neural networks? [closed]
I'm making a simple learning simulation, where there are multiple organisms on screen. They're supposed to learn how to eat, using their simple neural networks. They have 4 neurons, and each neuron ...
33
votes
4
answers
49k
views
Android simulate key press
How can I programmatically simulate a key press on a Droid? I would like to mimic a manual key press (appearing on the droid that someone is pressing a key but it is being done programmatically).
...
31
votes
8
answers
6k
views
Experiences with Test Driven Development (TDD) for logic (chip) design in Verilog or VHDL
I have looked on the web and the discussions/examples appear to be for traditional software development. Since Verilog and VHDL (used for chip design, e.g. FPGAs and ASICs) are similar to software ...
31
votes
4
answers
89k
views
Simulate pressing tab key with jQuery
I have some textboxes on a .net-page and want to achieve the following with jQuery: if the user presses return, the program should behave "as if" he had used the tab key, thus, selecting the next ...
31
votes
3
answers
78k
views
numpy array of objects
I'm trying to implement a simulation for a lattice model (lattice boltzmann) in Python. Each site of the lattice has a number of properties, and interact with neighboring sites according to certain ...
30
votes
2
answers
41k
views
Simulate fake location on real iOS device
I want to simulate fake location on my iPhone 5S device using specific longitude and latitude. Is there a way to do this in XCode. I tried using the simulate location feature by adding a GPX file in ...
30
votes
9
answers
10k
views
Software simulation of a quantum computer
While we are waiting for our quantum computers, is it possible to write a software simulation of one? I suspect the answer is no, but hope the reasons why not will throw some light on the mystery.
30
votes
7
answers
93k
views
How to plot data by c program?
I am a mechanical engineer who has only limited knowledge in C programming. I wrote some code in order to make simulations, and I want to visualize the simulation results. At the moment I am using Dev-...
29
votes
3
answers
25k
views
Simulating a keyboard's output (making a computer pose as another computer's keyboard)
I want to be able to connect a computer A's USB port to computer B's USB port so as to make computer A act as computer B's keyboard.
Any idea how I would go about doing that?
I'm not looking for a ...
28
votes
4
answers
22k
views
Soccer simulation for a game
I would like to build a simulation engine which can simulate a soccer (association football) match. It would be cool great if you could help me. What is important to me is to decide which actions ...
28
votes
12
answers
16k
views
What are some algorithms that will allow me to simulate planetary physics?
I'm interested in doing a "Solar System" simulator that will allow me to simulate the rotational and gravitational forces of planets and stars.
I'd like to be able to say, simulate our solar system, ...
26
votes
4
answers
209k
views
Recursion in Python? RuntimeError: maximum recursion depth exceeded while calling a Python object [duplicate]
I have another problem with my code.
I'm writing my first program in Vpython and I have to make a simulation of mixing two gases. First, I had a problem with borders, but now when the balls(that ...
25
votes
3
answers
5k
views
Program design in Haskell: how to do simulation without mutability
I have a question about the best way to design a program I'm working on in Haskell. I'm writing a physics simulator, which is something I've done a bunch in standard imperative languages, and usually ...
25
votes
2
answers
424
views
Why does my water explode?
I am trying to implement the Clavet method for simulating fluids in JavaScript, so debugging is a nightmare, which is why I'm asking here, hoping that someone who has gone through the same thing will ...
24
votes
4
answers
35k
views
Checkbox is not `checked` after simulate `change` with enzyme
I tried to use enzyme to simulate change event on a checkbox, and use chai-enzyme to assert if it's been checked.
This is my Hello react component:
import React from 'react';
class Hello extends ...
24
votes
4
answers
7k
views
Just how good is VTK? [closed]
I have heard some good reviews of the Visualization ToolKit (VTK) from developers. But exactly how powerful is it? For example, can it handle visualization of an entire oil reservoir (in a simulator) ...
23
votes
5
answers
45k
views
How to simulate touch for any application in Android?
I know some similar questions have already been asked, but I think they are asking for simulating touch in their own applications, however I want to make an agent that can "use" any application.
So ...
23
votes
2
answers
32k
views
java simple neural network setup
I have decided to play around with some simple concepts involving neural networks in Java, and in adapting somewhat useless code I found on a forum, I have been able to create a very simple model for ...
22
votes
6
answers
56k
views
Simulate keystroke in Linux with Python
How can I simulate a keystroke in python? I also want to press multiple keys simultaneously.
Something like:
keystroke('CTRL+F4')
or
keystroke('Shift+A')
22
votes
3
answers
14k
views
Generate N random integers that sum to M in R
I would like to generate N random positive integers that sum to M. I would like the random positive integers to be selected around a fairly normal distribution whose mean is M/N, with a small ...
21
votes
4
answers
12k
views
How can I simulate a "locked" file (one which has a write lock)
I am trying to debug a problem where users occasionally have locked files which they try to open. The code appears to have correct exception handling but users are still reporting seeing error ...
21
votes
7
answers
39k
views
How can I simulate SerialPort interactions for testing?
I'm about to start developing a small app (C#) that communicates with a PLC and a testing unit via Serial Ports - this is my first venture into this area.
In essence, I am going to send the PLC a ...
20
votes
6
answers
44k
views
How to simulate a mouse movement
How can I simulate a mouse event causing the pointer to move 500 pixels to the left, then click using C++. How would I do something like this?
20
votes
6
answers
83k
views
plotting package for c++ [closed]
I have got a question about plotting package for c++. For last few years I was using python and matplotlib, right now I am using c++ and I would like to find something similar to matplotlib (http://...
20
votes
6
answers
10k
views
How to simulate OutOfMemory exception
I need to refactor my project in order to make it immune to OutOfMemory exception.
There are huge collections used in my project and by changing one parameter I can make my program to be more ...
20
votes
6
answers
26k
views
Bullet vs Newton Game Dynamics vs ODE physics engines [closed]
I am trying to pick a physics engine for a simple software application. It would be to simulate a rather small number of objects so performance isn't a huge concern. I am mostly concerned with the ...
20
votes
5
answers
15k
views
How to simulate DDOS/Slashdotting?
So, I'd like to get more experience working with high-traffic websites, but unfortunately the Internet is not beating down the doors to my blog.
How can I simulate tens/hundreds of hits per second on ...
20
votes
6
answers
5k
views
How does functional programming apply to simulations?
Besides the general question in the title,
How do functional programmers and functional languages approach the domain of simulations, which seem to be most naturally handled by object-oriented ...
18
votes
3
answers
7k
views
How to test what will happen when you publish an update to your app to the Market
I'm about to publish a new version of an app to the Market. In order to avoid any potential problems once its been pushed to the Market and people get notified of an update, I'd like to simulate that ...
18
votes
1
answer
2k
views
How to make verlet integration collisions more stable?
I'm not using any engine, but instead trying to build my own softbody dynamics for fun using verlet integeration. I made a cube defined by 4x4 points with segments keeping its shape like so:
I have ...
17
votes
5
answers
32k
views
High-level Architecture (HLA) versus Distributed Interactive Simulation (DIS)
Is there a high-level overview of HLA versus DIS simulation frameworks? Can one host the other and vice-versa?
17
votes
3
answers
48k
views
What to use for VHDL/digital-logic simulation on Mac OS X
I suddenly realized that there is no Altera Quartus or Xilins ISE or ModelSim on Mac OS X.
What do people use to at least simulate VHDL and schematic designs on Macs?