Questions tagged [systemdynamics]
38 questions
4
votes
1 answer
Anylogic System Dynamics : Stock capacity
Stock initial value is 1
Flow rate is 0.1
Stock1 initial value is 0.
When i run the simulation, i realized that the value of stock get lower than 0 (getting a negative value). How to stop the flow when the value of Stock reaches to zero.

Hello-experts
- 113
- 1
- 1
- 10
4
votes
0 answers
Determining type in a functional language
In a small Program users insert multiple typed formulas and wire them together in order to create a system of simultaneous equations. And I'd like to introduce runtime type checking, so as to report an error if dimensions do not match
Basical the…

Jack Shade
- 491
- 5
- 13
3
votes
1 answer
Converting a series of xarray.DataArrays to a numpy array
I am using a package called PySD for system dynamics modelling. PySD converts models from Vensim (a system dynamics modelling package) into python and allows the user to replace various equations with more complex routines than Vensim is capable of.…

Kingle
- 496
- 1
- 6
- 20
2
votes
1 answer
How do you implement a system dynamics style pipeline delay in deSolve (R)?
I'm attempting to model a pipeline delay with deSolve in R. I have one stock (worktodo) that has a constant input (work_arrival) and I want a pipeline delay execution (work_rate) where the stock goes down by the same arrival rate with a 3 step…

JD Caddell
- 383
- 2
- 10
1
vote
2 answers
Writing an AnyLogic if-then statements - System Dynamics (stocks + flows)
New to AnyLogic and trying to create conditional, if-then equations within flow elements.
For example, I would like the flow of ‘police_graduates’ to be 10, on the condition that the stock of ‘Police’ is less than 7500; if the stock surpasses 7500,…

Alex
- 33
- 4
1
vote
1 answer
Anylogic: Behavioural Experiment using Anylogic
I would like to do an online experiment with human participants backed up by simulation. In the experiment, participants need to change the parameters and run simulations based on their changed parameters. Their changes need to be saved for data…

Rach_L
- 13
- 3
1
vote
1 answer
Agents instead of dimensions in system dynamics stocks
Currently I have a stock of Grade 1 learners. The stock is arrayed so that Gr1_learners[..] = {10,10} means that there are 10 high performing learners and 10 low performing learners in this stock. These learners progress to Grade 2 so that…

Lieschen Venter
- 13
- 3
1
vote
1 answer
Anylogic: Aggregation function applied to subdimension of System Dynamics array
Is it possible in Anylogic to use a system dynamics array aggregation function to sum just over a subdimension (i.e. not the whole index)?
For example if I have a SD array people with dimension Age which describes age by single year and I have…

Steffen
- 13
- 3
1
vote
1 answer
Anylogic: Time depending stock in-flow with table functions
I would like to simulate a stock (array with six different dimensions) and its changes over the years in Anylogic. The initial values of the stock are given as well as the changes over the years (Excel table format). I think the values of the stock…

David
- 11
- 1
1
vote
0 answers
NetLogo: more than one boolean in ifelse-value
for one variable in my System Dynamics Model in NetLogo i would like to have more than one boolean in my ifelse-value.
I tried it with the following code that I used as the expression for the variable.
(ifelse-value
quality = 100 [ 1.1 ]
…

loet23
- 21
- 2
1
vote
0 answers
NetLogo: use value of 'stock' in SDM as input for ABM
I made two simple models; one System Dynamics Model and one Agent Based Model in NetLogo. The SDM has a stock 'tourists' and its value depends on the in- and outflow. The value is re-calculated each tick. The tourists are sprouted in the ABM each…

loet23
- 21
- 2
1
vote
1 answer
different time steps in Vensim do not have the same result, how can this be solved?
I am making a simple model in Vensim.
the model consists of a stock and an out-flow variable:
stock:
equations
= INTEG (-"out-flow"), initial value: 2.5
out-flow:
equations
= IF THEN ELSE( stock>0, MIN(stock, 1), 0)
simulation runs for 5 years…

ehsun
- 137
- 9
1
vote
0 answers
Is there a way to implement a pipeline (discrete) delay using ODE solver in desolve package in R?
As part of trying to implement a system dynamics model in R using the DeSolve package, I would like to know if there is a way to build a pipeline (discrete delay) into my model.
An example of a pipeline delay could be a distribution process e.g.…

D_S
- 11
- 3
1
vote
0 answers
Error in Tabonuco-Yagrumo-Hybrid Netlogo model?
I am working through how Netlogo's Tabonuco-Yagrumo-Hybrid model (http://ccl.northwestern.edu/netlogo/models/TabonucoYagrumoHybrid) integrates system dynamics and agent-based modelling. As I understand it, the model replaces the traditional 'flows'…

user_15
- 151
- 9
1
vote
0 answers
Moving Average of deSolve output in R
I'm new to R, yet keen to learn it.
I've just build a fairly complex system dynamics stocks and flow model I'd like to run using R's deSolve package.
To simplify the problem. I'd like to make a sales forecast depending on the sales of the last 12…

Jan Ph We
- 11
- 2