simulation

Finding the Optimum Input for a Simulation in Matlab

做~自己de王妃 提交于 2019-12-24 07:01:22
问题 I have the following simulation running in Matlab. For a period of 25 years, it simulates "Assets", which grow according to geometric brownian motion, and "Liabilities", which grow at a fixed rate of 7% each year. At the end of the simulation, I take the ratio of Assets to Liabilities, and the trial is successful if this is greater than 90%. All inputs are fixed except for Sigma (the standard deviation). My goal is to find the lowest possible value of sigma that will result in a ratio of

Difference in initializing a state machine between a simulator and synthesizer

只愿长相守 提交于 2019-12-24 06:40:36
问题 My question is regarding the first state used in a synthesized state machine. I'm working with a Lattice iCE40 FPGA, the EDA Playground for simulation and Lattice's Diamond Programmer for synthesizing. In the following example I am generating a series of signals (the example only shows the lines referring to the state machine). This works fine in simulation; i.e. the first case accessed is sm_init_lattice and the required signals are produced). However, the synthesized version goes straight

How to emulate Internet in multi machine environment with Vagrant

非 Y 不嫁゛ 提交于 2019-12-24 04:31:36
问题 I'm creating a vagrant multi machine configuration file. Here is a chunk: Vagrant.configure(2) do |config| config.vm.box = "chef/centos-7.0" config.vm.define "radius" do |radius| radius.vm.hostname = "radius-server" end config.vm.define "mysql" do |mysql| mysql.vm.hostname = "mysql-server" end end how can I emulate the situation in which the above two virtual machines are in different networks separated by Internet? I could create two different private networks having two different private ip

How to emulate Internet in multi machine environment with Vagrant

荒凉一梦 提交于 2019-12-24 04:31:25
问题 I'm creating a vagrant multi machine configuration file. Here is a chunk: Vagrant.configure(2) do |config| config.vm.box = "chef/centos-7.0" config.vm.define "radius" do |radius| radius.vm.hostname = "radius-server" end config.vm.define "mysql" do |mysql| mysql.vm.hostname = "mysql-server" end end how can I emulate the situation in which the above two virtual machines are in different networks separated by Internet? I could create two different private networks having two different private ip

How to avoid particles glitching together in an elastic particle collision simulator?

≡放荡痞女 提交于 2019-12-24 03:15:29
问题 Here is a short video in which can be seen that groups of two (maybe more) particles are glitched into each other. The source-code can be found here. And this is the code I use to calculate the collisions with: function collisionPhysics() { for (var i = 0; i < N - 1; ++i) { for (var j = i + 1; j < N; ++j) { var Dx = objects[j].x - objects[i].x; // Difference in X direction between objects[i] and objects[j]. var Dy = objects[j].y - objects[i].y; // Difference in Y direction between objects[i]

is there any tool to simulate http requests in java

邮差的信 提交于 2019-12-24 02:24:12
问题 I am trying to simulate HTTP requests in Java with the URL class and the HttpURLConnection class, the GET requests are easy to simulate while some POST requests seem harder because most POST request need Cookie in the request header. Some cookies were set by the HTTP response in the Set-Cookie field and I can get them by the function provided by HttpURLConnection, but I found that other cookies may be set by JavaScript and I have no way to handle them, so I wonder is there any packaged tool

aligning omnet++ clock with the system clock

淺唱寂寞╮ 提交于 2019-12-24 00:07:44
问题 I'm trying to integrate omnet++ with a 3d robot simulator, and this is roughly what I'm picturing. So There are a number of objects in the robot simulator, and they communicate with each other using 802.11 which will be simulated by omnet++. Each node in omnet++ corresponds to each object in the robot simulator, and an object's movement will be synchronized with the corresponding node in omnet++. But since omnet++ is a discrete event simulator, I need to deal with the clock mismatch problem

How to detect oscillations in gate logic simulations?

廉价感情. 提交于 2019-12-23 20:53:21
问题 I'm writing cycle based logic simulation in C#. I want to simulate both combinational and sequential circuits. Combinational circuits are straightforward but sequential circuits give me trouble. I want to detect oscillations and display appropriate warning message. Is there a simple way to check how many times a single gate can change its state and still leave the circuit stable? I thought about 'minimum feedback arc set algorithm' but it seems to be an overkill. Many desktop applications

generate multinomial random varibles with varying sample size in R

牧云@^-^@ 提交于 2019-12-23 18:38:45
问题 I need to genereate multinomial random variables with varying sample size. Let say i already generated my sample sizes as follows, samplesize =c(50,45,40,48) then i need to generate multinomial random variables based on this varying sample size. I tried this using a for loop and using a apply function(sapply). Using For loop , p1=c(0.4,0.3,0.3) for( i in 1:4) { xx1[i]=rmultinom(4, samplesize[i], p1) } If my code is correct then i should get a matrix that have 4 columns and 3 rows. Where

How do I solve this delta cycle clock delay issue

让人想犯罪 __ 提交于 2019-12-23 12:47:28
问题 I have the following simplified example of my code, where the DeltasTest entity can be simulated to show the issue. The clock in the real design is inverted or not based on a generic, and feeds several other entities below this one. The problem is that the simple edge detector does not work ( data_out is just a glitch) in behavioral simulation, due to the delta cycle delay introduced on the clock by the inversion stage. Is there a standard or otherwise elegant way to solve this? So far my