Search found 3811 matches
- Tue Jul 18, 2023 4:28 pm
- Forum: Vensim
- Topic: Delay Function cannot shut off flow using a test for negative stock level.
- Replies: 18
- Views: 4215
Re: Delay Function cannot shut off flow using a test for negative stock level.
In this case, I think you can forget about my rigid and elastic pipe variants, and just use the classic aging chain. There are two options for this: - If the loss function is a simple fractional rate (uptake, or radioactive decay), you can use the DELAY CONVEYOR with leakage. There's an example inst...
Re: DBLPREC
I think this thread viewtopic.php?t=8116 established that the error is caused by a missing : at the beginning of a macro.
Re: DBLPREC
Rather than defining these in the code, you probably want to define them in the preprocessor, via /D "DBLPREC". In Visual Studio this is in project properties>C/C++>Preprocessor.
- Mon Jul 03, 2023 2:51 pm
- Forum: Vensim
- Topic: Active initial differences help
- Replies: 3
- Views: 790
Re: Active initial differences help
The warning arises because the random draw differs between the initialization step and the first dynamic time step. However, since this is not an ACTIVE INITIAL variable, I don't think it should be reporting this. I think the trigger is, as Admin suggests, that there's too much nesting in: Ingresos ...
- Mon Jul 03, 2023 2:40 pm
- Forum: Vensim
- Topic: Error when using 'check model'
- Replies: 3
- Views: 2149
Re: Error when using 'check model'
The precision of the dll has to match the precision of the Vensim version in use. All Vensim versions are now double precision.
- Fri Jun 30, 2023 8:32 pm
- Forum: Vensim
- Topic: SyntheSim doesn't work
- Replies: 2
- Views: 780
Re: SyntheSim doesn't work
There have been problems with cloud services locking files in the past, but I don't think OneDrive is likely to be the cause. I use it all the time without issues.
- Fri Jun 30, 2023 6:22 pm
- Forum: Vensim
- Topic: Delay Function cannot shut off flow using a test for negative stock level.
- Replies: 18
- Views: 4215
Re: Delay Function cannot shut off flow using a test for negative stock level.
A question: is the intestine really like a plug flow reactor? As I understand it, those take off material only at the end. What little I know about the intestine suggests that there's a lot of material exchange along the way. Also, it's elastic and has active transport, right? Anyway, here are some...
- Thu Jun 29, 2023 1:32 pm
- Forum: Vensim
- Topic: Delay Function cannot shut off flow using a test for negative stock level.
- Replies: 18
- Views: 4215
Re: Delay Function cannot shut off flow using a test for negative stock level.
Because the intestine might have complex dynamics for each segment, and it's central to the model, I'm going to suggest that you use arrays rather than delays. I'll post an example. A question: is the intestine really like a plug flow reactor? As I understand it, those take off material only at the ...
- Thu Jun 29, 2023 1:12 pm
- Forum: Vensim
- Topic: Customer satisfaction model (5 Service quality dimensions)
- Replies: 6
- Views: 1165
Re: Customer satisfaction model (5 Service quality dimensions)
For customers, your INTEG expression is, IF THEN ELSE((Number of Customers-Previous Customer)>=0, Customer Retention-Customer Turnover-Previous Customer*Customer Units,0) since previous customer = number of customers, this simplifies to just Customer Retention-Customer Turnover-Previous Customer*Cus...
- Thu Jun 29, 2023 1:51 am
- Forum: Vensim
- Topic: Customer satisfaction model (5 Service quality dimensions)
- Replies: 6
- Views: 1165
Re: Customer satisfaction model (5 Service quality dimensions)
There are two nonstandard uses of stocks here: the "previous" inputs to customer satisfaction and number of customers. I think you should revert to standard notation, where the only things affecting the integrations in stocks are flows (plus the initial state). For customer satisfaction, y...
- Wed Jun 28, 2023 7:34 pm
- Forum: Vensim
- Topic: optimization
- Replies: 12
- Views: 5747
Re: optimization
There are a couple other ways to solve this problem, closely related to VECTOR LOOKUP: https://metasd.com/2018/02/polynomials-interpolating-functions-decision-rules/ The reason you don't see this done much is that decision rules that are based on a vector of time points are not very general. They so...
- Mon Jun 26, 2023 3:24 pm
- Forum: Vensim
- Topic: Stock & Flow: Initial Value Issue
- Replies: 2
- Views: 721
Re: Stock & Flow: Initial Value Issue
Problem: When running the simulation, everything seems neat in "Year 0" based on the above values. However, when looking at "Year 1", it appears that Vensim carries over the initial value (here, "5000") to the next year and incorporates it into the result. I do not wan...
- Mon Jun 26, 2023 3:19 pm
- Forum: Vensim
- Topic: Customer satisfaction model (5 Service quality dimensions)
- Replies: 6
- Views: 1165
Re: Customer satisfaction model (5 Service quality dimensions)
This looks like a discrete oscillation from having processes in the model that are faster than TIME STEP. A quick fix might simply be to make TIME STEP smaller. Also, check your units, if you haven't already. That may reveal a conceptual issue.
- Sun Jun 25, 2023 5:28 pm
- Forum: Vensim
- Topic: optimization
- Replies: 12
- Views: 5747
Re: optimization
Maybe the VECTOR LOOKUP function? https://www.vensim.com/documentation/fn ... ookup.html
- Thu Jun 22, 2023 9:47 pm
- Forum: Vensim
- Topic: Which is the purpose of the _GAME function
- Replies: 5
- Views: 1030
Re: Which is the purpose of the _GAME function
I don't think you want to comment them out. You just want to change the right hand side of the equation to a number or a variable input of your choosing.
Or, get rid of the GAME() functions in Vensim before you translate the model.
Code: Select all
_myvariable = 3.1415926
- Wed Jun 21, 2023 8:20 pm
- Forum: Vensim
- Topic: Which is the purpose of the _GAME function
- Replies: 5
- Views: 1030
Re: Which is the purpose of the _GAME function
The GAME function is for user input when running in gaming mode within Vensim. You don't need it for normal simulations. I'd simply edit the code by hand, either in Vensim or the translation.
- Fri Jun 16, 2023 5:04 pm
- Forum: System Dynamics Discussion
- Topic: the SD application in the insurance industry under climate risks
- Replies: 1
- Views: 5030
Re: the SD application in the insurance industry under climate risks
Have you tried the SD conference archives?
https://metasd.com/2022/03/finding-sd-c ... ce-papers/
https://metasd.com/2022/03/finding-sd-c ... ce-papers/
- Thu Jun 15, 2023 5:13 pm
- Forum: Vensim
- Topic: summing subscripts
- Replies: 4
- Views: 839
Re: summing subscripts
There isn't anything special about subranges that should cause an :NA: value to occur. However, if the dimensions of your imported dataset aren't completely populated, there will be :NA: values in the model that you can't see in the source data. For example, if you have sub : a,b,c and the data defi...
- Thu Jun 15, 2023 3:58 pm
- Forum: Vensim
- Topic: PULSE TRAIN simulation stops after 24 periods
- Replies: 3
- Views: 727
Re: PULSE TRAIN simulation stops after 24 periods
Sight unseen, the only obvious cause for this would be that the end time is set < FINAL TIME.
You might check the sample model in the Help system.
You might check the sample model in the Help system.
- Tue Jun 13, 2023 2:54 pm
- Forum: Vensim
- Topic: summing subscripts
- Replies: 4
- Views: 839
Re: summing subscripts
There are two ways to get an :NA: value: - the data series has a missing point, and the interpolation type is :RAW: - the data is completely absent for the variable/element Since the first is not the default, the problem likely arises from the second. If you have a data model doing preprocessing, yo...
- Mon Jun 12, 2023 11:06 pm
- Forum: Vensim
- Topic: PySD and Vensim
- Replies: 1
- Views: 749
Re: PySD and Vensim
PySD isn't our masterpiece - it was created by James Houghton at MIT. https://github.com/SDXorg/pysd PySD can translate many models, and there are many test cases demonstrating fidelity. I don't know for sure, but I think it's likely that there are some unsupported functions, or functions for which ...
- Fri Jun 09, 2023 11:27 pm
- Forum: Vensim
- Topic: How can I turn an MDL or a VPMX file into a C/C++ file
- Replies: 6
- Views: 1134
Re: How can I turn an MDL or a VPMX file into a C/C++ file
The Vensim DSS publication to webassembly doesn't require any software after the initial publication. Your application runs in the client browser as pure html/javascript/wasm.
- Thu Jun 01, 2023 1:47 pm
- Forum: Vensim
- Topic: Discrete SQRT PULSE TRAIN
- Replies: 7
- Views: 2734
Re: Discrete SQRT PULSE TRAIN
You could use SAMPLE IF TRUE to freeze the value at each interval.
- Tue May 30, 2023 6:26 pm
- Forum: Vensim
- Topic: subscripts
- Replies: 3
- Views: 400
Re: subscripts
The mapping lets you write stuff like:
sales[fruit] = preference[fruitType]*supply[fruit]
sales[fruit] = preference[fruitType]*supply[fruit]
- Tue May 30, 2023 6:25 pm
- Forum: Vensim
- Topic: subscripts
- Replies: 3
- Views: 400
Re: subscripts
Your second equation has 6 elements on the left, and 2 instances of 3 elements on the right, so it can't work. You could do something like the following: oranges : mandarins, satsumas, easy peelers apples : granny smith, red delicious, pink lady fruit : oranges, apples ~ build the master list hierar...