Search found 3808 matches

by tomfid
Mon Sep 12, 2016 9:10 pm
Forum: Vensim
Topic: Reordering a matrix
Replies: 3
Views: 2577

Re: Reordering a matrix

Transposing is easy - just do something like:

y[a,b] = x[b,a]
by tomfid
Mon Sep 12, 2016 7:59 pm
Forum: Vensim
Topic: the last value of a variable
Replies: 2
Views: 1955

Re: the last value of a variable

If you want the value in the immediately previous time step, you can store it in a stock, or use DELAY FIXED with a lag of TIME STEP. SMOOTH works too, as long as you're using Euler integration.
by tomfid
Mon Sep 12, 2016 2:58 pm
Forum: Vensim
Topic: Getting a string from a VDF
Replies: 9
Views: 9320

Re: Getting a string from a VDF

Could you encode the string information as numbers, or are they ad hoc and numerous?
by tomfid
Mon Sep 12, 2016 1:06 pm
Forum: Vensim
Topic: Long vector reordering
Replies: 3
Views: 2115

Re: Long vector reordering

Also, check the help - there's a sample model attached to the VECTOR SORT topic in the manual.
by tomfid
Sat Sep 10, 2016 2:43 pm
Forum: Vensim
Topic: capture daily values from excel
Replies: 18
Views: 8963

Re: capture daily values from excel

You can't initialize the internal state of a queue with that level of detail. How many sheep do you have? An array of individuals might be a viable alternative. (If you have a lot, Ventity might be even better.) For your inventory-age-labor example, that sounds like a classic aging chain, which coul...
by tomfid
Fri Sep 09, 2016 2:24 pm
Forum: Vensim
Topic: Linear Program
Replies: 14
Views: 7513

Re: Linear Program

Cool. When I first wrote the code, I had at least two ambitions that remain unrealized: - use the LP infrastructure to create some custom allocation functions. For example, the LP makes it easy to solve the many-to-many noncommodity allocation problem, with unique costs (e.g. shipping) for each supp...
by tomfid
Thu Sep 08, 2016 3:08 pm
Forum: Vensim
Topic: Linear Program
Replies: 14
Views: 7513

Re: Linear Program

I think the external lib may need to be complied with the flag DPMATH so that it's variable types are compatible with DP Vensim. I don't recall the details, but I'm hoping Tony does.
by tomfid
Thu Sep 08, 2016 2:39 pm
Forum: Vensim
Topic: documentation multicontext.dll
Replies: 3
Views: 2322

Re: documentation multicontext.dll

We're happy to supply a quote if you need it.

It actually is technically possible to create a client-side .dll for several platforms (Win, Mac, Linux, iOS); we don't have off-the-shelf licensing for those but could discuss it.
by tomfid
Wed Sep 07, 2016 11:53 pm
Forum: Ventity
Topic: September 27 - Ventity Beta E30
Replies: 0
Views: 4757

September 27 - Ventity Beta E30

The latest beta is #E30, September 27th. Get it at http://vensim.com/ventity-beta/ . We're preparing for commercial release, so this version is testing licensing infrastructure. For the moment, this could hardly be easier - just click the "Continue Evaluation" button when you start up the ...
by tomfid
Mon Sep 05, 2016 1:50 pm
Forum: Vensim
Topic: Vensim slow even after off-on
Replies: 2
Views: 2065

Re: Vensim slow even after off-on

Can you post or email us the model? It might just be size, not be a platform issue.
by tomfid
Mon Sep 05, 2016 1:49 pm
Forum: Vensim
Topic: Maximum and average
Replies: 11
Views: 5567

Re: Maximum and average

The reason you can't retrieve values of variables ahead of time in Vensim is that this creates an acausal model. No one can really look into the future; they have expectations of the future, not knowledge. Normally the right way to solve the problem is to model those expectations explicitly. If you ...
by tomfid
Mon Sep 05, 2016 1:44 pm
Forum: Vensim
Topic: Initialize from last run?
Replies: 7
Views: 4636

Re: Initialize from last run?

How have you changed the time parameters? If you use Model>Settings, you're changing the model. You can make runtime changes with via the various constant setting methods. For reuse, I would normally put the modified values in a .cin file that could be loaded as needed.
by tomfid
Mon Sep 05, 2016 1:41 pm
Forum: Vensim
Topic: How to use Vensim for programming a do-while loop
Replies: 7
Views: 4190

Re: How to use Vensim for programming a do-while loop

Create an array dimension for the projects, and use SUM(value[project!]) to add them up. https://www.vensim.com/documentation/fn_sum.htm Set the value to 0 for projects that are inactive. If you're not familiar with declarative languages like Vensim, you should probably work through the User Guide, ...
by tomfid
Mon Sep 05, 2016 1:36 pm
Forum: Vensim
Topic: the optimization of the share of electricity generation mix of UK
Replies: 6
Views: 3231

Re: the optimization of the share of electricity generation mix of UK

There have been several recent threads on this. See http://www.ventanasystems.co.uk/forum/viewtopic.php?f=2&t=6388&p=22779&hilit=VECTOR+LOOKUP#p22779 and http://www.ventanasystems.co.uk/forum/viewtopic.php?f=2&t=6349 The optimizer only works on constants; you can use VECTOR LOOKUP to...
by tomfid
Wed Aug 31, 2016 2:35 pm
Forum: Vensim
Topic: Maximum and average
Replies: 11
Views: 5567

Re: Maximum and average

average x = SMOOTH(x,interval) gives an exponentially weighted moving average of x with mean horizon of interval.

If you need 0s in between, you can use something like:

avg or 0 = IF THEN ELSE( PULSE TRAIN(initial time, time step, interval, final time), average x, 0 )
by tomfid
Mon Aug 29, 2016 11:32 pm
Forum: Vensim
Topic: Saved Results vs TimeStep Results
Replies: 5
Views: 3494

Re: Saved Results vs TimeStep Results

The PULSE TRAIN(INITIAL TIME, TIME STEP, SAVEPER, FINAL TIME) creates a signal variable that is zero most of the time, and 1 at intervals equal to SAVEPER (assuming that SAVEPER=500). If you also want to capture a value only when IRE > 1, you can just add that to the condition with :AND:.
by tomfid
Mon Aug 29, 2016 8:10 pm
Forum: Vensim
Topic: Saved Results vs TimeStep Results
Replies: 5
Views: 3494

Re: Saved Results vs TimeStep Results

You could use SAMPLE IF TRUE to sample the value of the variable every 500 units. Something like:

saved x = SAMPLE IF TRUE( PULSE TRAIN(INITIAL TIME, TIME STEP, SAVEPER, FINAL TIME), actual x, actual x )
by tomfid
Mon Aug 29, 2016 8:06 pm
Forum: Ventity
Topic: cohort modeling examples
Replies: 21
Views: 15690

Re: cohort modeling examples

This turns out to be quite tricky. I ran the model with 5 and 10 year cohorts, and got quite different results. The difference emerges with births from the earliest created cohorts (not the preexisting ones in the data). Here's the sum of births: births.png The difference arises from the timing of t...
by tomfid
Mon Aug 29, 2016 3:17 pm
Forum: Ventity
Topic: cohort modeling examples
Replies: 21
Views: 15690

Re: cohort modeling examples

I think the answer probably has to do with the granularity of the input data, but I'll have to fire it up and take a look to be sure.
by tomfid
Mon Aug 29, 2016 3:07 pm
Forum: Vensim
Topic: Sensitivity Simulation Setup
Replies: 6
Views: 3592

Re: Sensitivity Simulation Setup

If you're using Grid with VECTOR, order won't matter, because the setup is nonrandom. The order of the simulations might vary, but the same set will be run. Exporting the run to view the data directly is a good check. Documentation is here https://www.vensim.com/documentation/sensitivity.htm Every d...
by tomfid
Mon Aug 29, 2016 2:55 pm
Forum: Vensim
Topic: Maximum and average
Replies: 11
Views: 5567

Re: Maximum and average

For the Max, see the first example in https://www.vensim.com/documentation/fn_sample_if_true.htm Also: http://www.ventanasystems.co.uk/forum/viewtopic.php?f=2&t=6366&hilit=SAMPLE+IF+TRUE For the moving average, you can build a structure like: average X = Sum X / Averaging Period Units: stuff...
by tomfid
Sat Aug 27, 2016 2:22 am
Forum: Vensim
Topic: optimization in vensim based on time
Replies: 6
Views: 4494

Re: optimization in vensim based on time

You need to specify:
0<=suppliers' Order Amount[supplier]<=70000
by tomfid
Fri Aug 26, 2016 11:31 pm
Forum: Vensim
Topic: The largest number vensim can calculate.
Replies: 2
Views: 1752

Re: The largest number vensim can calculate.

That's the special value for :NA:. https://www.vensim.com/documentation/index.html?na.htm

The largest ordinary value is about +/- 3 x 10^38.

In double precision Vensim DSS the largest value is about 2 x 10^308.
by tomfid
Fri Aug 26, 2016 10:38 pm
Forum: Vensim
Topic: Problem with INVERT MATRIX
Replies: 4
Views: 2608

Re: Problem with INVERT MATRIX

Can you post a sample model?

Have you tried double precision Vensim DSS?
by tomfid
Fri Aug 26, 2016 2:08 pm
Forum: Vensim
Topic: optimization in vensim based on time
Replies: 6
Views: 4494

Re: optimization in vensim based on time

You'll need to attach the .voc and .vpd files for a diagnosis.

If a variable is subscripted in the model, it must also be subscripted in the control files.