Questions tagged [stochastic]

A stochastic system is a system which state depends or some random elements making its behavior non-deterministic. Questions with this tag should cover topics regarding random variables and non-determenistic systems.

256 questions
3
votes
1 answer

ode45 for Langevin equation

I have a question about the use of Matlab to compute solution of stochastic differentials equations. The equations are the 2.2a,b, page 3, in this paper (PDF). My professor suggested using ode45 with a small time step, but the results do not match…
3
votes
2 answers

Is OptaPlanner able to model stochastic programs?

At work, we are trying to optimize the number of goods produced to fulfil an uncertain demand. We know the probability distribution of the demand by analyzing the demand that occured before. In mathematical terms, this problem is a multi-staged…
3
votes
1 answer

Stochastic Differential Equations (SDE) in 2 dimensions

I am working on stochastic differential equations for the first time. I am looking to simulate and solve a stochastic differential equations in two dimensions. The model is as follows: dp=F(t,p)dt+G(t,p)dW(t) where: p is a 2-by-1 vector:…
David
  • 77
  • 8
3
votes
1 answer

How to run MCTS on a highly non-deterministic system?

I'm trying to implement a MCTS algorithm for the AI of a small game. The game is a rpg-simulation. The AI should decides what moves to play in battle. It's a turn base battle (FF6-7 style). There is no movement involved. I won't go into details but…
3
votes
2 answers

SAT-Solving: DPLL vs.?

right now I am writing about SAT-solving and I am stuck at a point. I am hoping that you can help me. I want to describe some methods to solve SAT-Problems. Right now I have three different ways: Bruteforce Random (naive) DPLL (with different…
noctua
  • 115
  • 10
3
votes
1 answer

How to add power law likelihood to Netlogo Model

I would like to add a likelihood of natural disaster in my environmantal ABM that follows the power law (often few damage, less often mediocre damage, rarely strong damage, very rarely complete damage). I coded so far the following: to environment…
Til Hund
  • 1,543
  • 5
  • 21
  • 37
3
votes
3 answers

generate random long user ID

I am writing an android app giving each client a long user ID through this formula: long userID = (long) (Math.random() * 2 * Long.MAX_VALUE - Long.MAX_VALUE); Am I utilizing MAX_VALUE correctly i.e. taking advantage of every possible long…
Ulli Schmid
  • 1,167
  • 1
  • 8
  • 16
2
votes
1 answer

Is stochastic raytracing inherently cache-unfriendly?

Specifically in the context of a real-time raytracer where view updates are frequent? The obvious answer would seem to be "yes" and yet I wonder if any methods have been found to accelerate Monte Carlo methods given their usefulness.
Engineer
  • 8,529
  • 7
  • 65
  • 105
2
votes
1 answer

Stochastic simulations of temporal model

I want to run stochastic simulations of a model which has a rate constant that is time dependent. I am not aware of any stochastic simulator that supports time-dependent rate constants. So far I have tried to use Python (stochpy and gillespy2) and…
2
votes
0 answers

How to solve a system of stochastic differential equations with time dependent parameters in R?

I am trying to solve this system of SDEs in R, dX = (-X*a + (Y-X)b + h)dt + g dW and dY = (-Ya + (X-Y)*b)dt for time [0,200], a=0.30, b=0.2, g=1 and h is 1 for time [50,70] and 0 otherwise. I have the following code for the system for constant…
14thTimeLord
  • 363
  • 1
  • 14
2
votes
2 answers

Simulate Stochastic Differential equation in Python

I am trying to solve SDE for Brownian particle and Langevein Dynamics. At first I tried to simulate 2D brownian motion with normal random number generator, The code is: import numpy as np import matplotlib.pyplot as plt %matplotlib inline dt = .001…
2
votes
1 answer

bitwise stochastic rounding

I have this piece of C code that does stochasting rounding of a binary64 value to a binary32. Problem is I don't quite fully understand the code. I know it operates directly on the bits of a floating-point number, but I can't grasp what's happening.…
2
votes
1 answer

Calculate expected value of variance using monte carlo simulation

So I have this probability distribution X = {0      probability 7/8}       {1/60 probability 1/8} James his car breaks down N times a year where N ~ Pois(2) and X the repair cost and Y is the total cost caused by James in…
FlubberBeer
  • 105
  • 11
2
votes
1 answer

R Shiny not responding inputs

I'm working with Shiny in RStudio and I've been trying to run this code: # Vamos a simular modelos poisson compuestos con diferentes # distribuciones de severidad. library(actuar) library(shiny) # Define UI for application that draws a…
2
votes
3 answers

Poisson Process algorithm in R (renewal processes perspective)

I have the following MATLAB code and I'm working to translating it to R: nproc=40 T=3 lambda=4 tarr = zeros(1, nproc); i = 1; while (min(tarr(i,:))<= T) tarr = [tarr; tarr(i, :)-log(rand(1, nproc))/lambda]; i =…
fina
  • 429
  • 4
  • 12
1 2
3
16 17