All Questions
Tagged with python simulation
8 questions
0
votes
5
answers
284
views
Should I "modularize" my configuration file into different files?
I have a simulation in Python which reads its configuration from a toml file. Since I have tons of parameters, the toml file can grow quite large.
This is an example file, similar in structure to my ...
-1
votes
3
answers
586
views
Birthday Paradox, Analytical and Monte Carlo solutions give two systemically slightly different results [closed]
I was doing a Monte Carlo implementation of the Birthday Paradox in Python and I wanted to check if the results where the same as in the analytical implementation of the same problem (As they should ...
3
votes
2
answers
623
views
Best practices for testing settings file with many parameters in simulation code
I'm conflicted as to what is the best way to approach this problem.
I am writing a simulation in Python, which is parametrized by ~ 50 parameters. I have a JSON file where these parameters are set, ...
0
votes
1
answer
213
views
Passing messages through a chain of containers in python
When I write python code for simulations, I often end up with the following situation: I have a class describing the general environment which contains a list of instances of a class that describes ...
1
vote
1
answer
76
views
Displaying periodic simulations via web interface
The gist of my problem is that I'm trying to make a basic simulation for periodically collected data.
More specifically, given the position of a radio antenna, the RF patterns would be simulated ...
-1
votes
1
answer
133
views
How should I represent an object whose instances share the same set of member function identifiers, but those identifiers specify different behaviors?
I'm attempting to develop an open-source Python module for modeling task networks for discrete event simulation. The most fundamental component is the task object, which includes various data such as ...
0
votes
1
answer
92
views
No repeated coordinates in random walker ensemble
i'm simulating an ensemble of random walkers in 2D in python, I set [x,y] coordinates of my walkers to be gaussian in a 2D grid, then use a rand array of -1 and +1 to move up down left right:
N=20 #...
3
votes
1
answer
1k
views
Shuffling algorithm with no "self-mapping"?
To randomly shuffle an array, with no bias towards any particular permutation, there is the Knuth Fischer-Yeats algorithm. In Python:
#!/usr/bin/env python
import sys
from random import randrange
...