Search found 2590 matches

by tomfid
Sun May 12, 2019 5:20 pm
Forum: Vensim
Topic: How-to batch-export custom graphs (using .cmd files)?
Replies: 6
Views: 190

Re: How-to batch-export custom graphs (using .cmd files)?

Hmm... I've never tried this. Will look again.

Another option: create a stack of views with pinned charts (as IO Objects) and use File>Print with All Views selected, directing the output to a PDF print driver.

But I assume what you really want is a stack of PNGs or similar.
by tomfid
Sun May 12, 2019 4:39 pm
Forum: Vensim
Topic: Running with Different Timesteps
Replies: 16
Views: 418

Re: Running with Different Timesteps

The units don't balance on previous farm balance because the time constant (1) needs to be a dimensioned parameter. I think the issue with the farm balance is that it should have units of Rs/ha, which means that income should be Rs/ha/day. Since income and yield are flow concepts, they should have t...
by tomfid
Sat May 11, 2019 8:10 pm
Forum: Vensim
Topic: demand and supply at price
Replies: 21
Views: 1450

Re: demand and supply at price

I think you could map the subrange to a distinct (full) subscript range of the same size, sort that, and then map back.
by tomfid
Sat May 11, 2019 8:05 pm
Forum: Vensim
Topic: Running with Different Timesteps
Replies: 16
Views: 418

Re: Running with Different Timesteps

Without units and longer variable names, it's hard to know how to interpret AET and PET here.
by tomfid
Tue May 07, 2019 3:01 pm
Forum: Vensim
Topic: Forecast
Replies: 8
Views: 260

Re: Forecast

I think you want something like the following: historic order rate = order cycle(time) last historic order rate = order cycle(switch time) future order trend = ... {this could be a constant, or estimated from the lookup} future order rate = last historic order rate + future order trend*MAX(0,time-sw...
by tomfid
Tue May 07, 2019 2:07 pm
Forum: Vensim
Topic: Forecast
Replies: 8
Views: 260

Re: Forecast

In your FORECAST(Actual Order Cycle, 10 , 20 ) equation, the 10 and 20 should be made into named parameters, both for dimensional consistency and to expose them to sensitivity testing and make the model structure more portable.
by tomfid
Mon May 06, 2019 5:56 pm
Forum: Vensim
Topic: demand and supply at price
Replies: 21
Views: 1450

Re: demand and supply at price

I'd have to see the relevant equations.
by tomfid
Mon May 06, 2019 4:05 pm
Forum: Vensim
Topic: demand and supply at price
Replies: 21
Views: 1450

Re: demand and supply at price

You could use a stock or SAMPLE IF TRUE to identify the winner and set their quantity to 0, or priority very low, for future auctions.
by tomfid
Mon May 06, 2019 2:59 pm
Forum: Vensim
Topic: demand and supply at price
Replies: 21
Views: 1450

Re: demand and supply at price

It sounds like we need something like an "ALLOC IF" function that's switchable, so it only executes when a flag is true.
by tomfid
Fri May 03, 2019 3:13 pm
Forum: Vensim
Topic: demand and supply at price
Replies: 21
Views: 1450

Re: demand and supply at price

Yes, that kind of thing can be done. You can also use FIND ZERO for a more general solution to simultaneous problems. There's a sample model for each included in the Help system.
by tomfid
Fri May 03, 2019 2:35 pm
Forum: Vensim
Topic: Defination of an equation
Replies: 1
Views: 129

Re: Defination of an equation

Yes - you just need to use a stock to store the previous value. If you're using Euler integration, you can use previous input = SMOOTH( input, TIME STEP ) Otherwise it may be better to use DELAY FIXED. In a continuous time model "previous cycle" may not have a useful meaning, because model behavior ...
by tomfid
Fri May 03, 2019 2:26 pm
Forum: Vensim
Topic: How to obtain weights used in policy optimization?
Replies: 6
Views: 167

Re: How to obtain weights used in policy optimization?

Optimization is extremely useful for coming up with a benchmark policy that maximizes the objective function. However, in real game play situations, people can't plausibly optimize, because that would imply that they were fully informed about the system structure and parameters and could accurately ...
by tomfid
Fri May 03, 2019 2:10 pm
Forum: Vensim
Topic: How to obtain weights used in policy optimization?
Replies: 6
Views: 167

Re: How to obtain weights used in policy optimization?

It's one thing to say that participants know of the existence of delays. It's quite a different thing to suggest that they can correctly mentally simulate the outcome of those delays and any other model structure. The dynamic decision making literature shows pretty clearly that they can't, even on s...
by tomfid
Thu May 02, 2019 3:21 pm
Forum: Vensim
Topic: Specific case question
Replies: 5
Views: 141

Re: Specific case question

In the Bass diffusion model, typically there's a contact rate parameter which is in units of people contacted per person doing the contacting per unit time. The people cancel out, leaving 1/time, though it's often clearer to preserve them as people/person/time.
by tomfid
Thu May 02, 2019 3:19 pm
Forum: Vensim
Topic: Demand Pattern
Replies: 4
Views: 165

Re: Demand Pattern

You can use the FORECAST function to extrapolate. If that's not too your liking (it can be noise-sensitive) there are a lot of ways to modify it.
by tomfid
Thu May 02, 2019 3:16 pm
Forum: Vensim
Topic: How to obtain weights used in policy optimization?
Replies: 6
Views: 167

Re: How to obtain weights used in policy optimization?

You can make the weights parameters in your calibration. If they have to sum to 1, the optimizer won't respect that, but you can normalize. Using "w" for weight and "p" for priority: optimizer chooses p1, p2, p3 w1 = p1/(p1+p2+p3) etc. If people are making decisions over time (as in gaming mode), th...
by tomfid
Wed May 01, 2019 9:17 pm
Forum: Vensim
Topic: how to weigh newer data more heavily in calibration?
Replies: 2
Views: 117

Re: how to weigh newer data more heavily in calibration?

For example, I might do the following: dataVar = GET XLS ... errorSD = dataVar * estFracError estFracError = base error frac + data age * error slope error slope = ... parameter describing how fast the data gets worse with age data age = max(0,last data time - time) last data time = INITIAL( GET DAT...
by tomfid
Wed May 01, 2019 9:13 pm
Forum: Vensim
Topic: how to weigh newer data more heavily in calibration?
Replies: 2
Views: 117

Re: how to weigh newer data more heavily in calibration?

Hi Max - This is possible. As you say, a SMOOTH creates an exponentially-weighted moving average, valuing the most recent data most, though that doesn't really help with optimization. The key idea in calibration is that the weight or scale parameter for each data/model comparison can be a variable r...
by tomfid
Tue Apr 30, 2019 3:49 pm
Forum: Vensim
Topic: How-to batch-export custom graphs (using .cmd files)?
Replies: 6
Views: 190

Re: How-to batch-export custom graphs (using .cmd files)?

I think you could potentially write a Venapp that would run through all the graphs and export them using http://vensim.com/documentation/24990.htm
by tomfid
Tue Apr 30, 2019 3:47 pm
Forum: Vensim
Topic: Floating error
Replies: 7
Views: 875

Re: Floating error

Another common possibility is overflow from a runaway positive feedback loop or EXP(something big). You should be looking at the variable that is reported as the failure at runtime. The table tool is often the easiest way to debug - set it to show causes, and you can easily see the problem variable ...
by tomfid
Mon Apr 29, 2019 4:20 pm
Forum: Vensim
Topic: Capacity Constraint
Replies: 6
Views: 172

Re: Capacity Constraint

Nice to see balanced units in your model. The basic idea, I think, is that you need to limit production starts, so that the inventory and WIP constraints are not exceeded. This means you need an additional term in the production starts equation, creating a negative feedback loop that slows or stops ...
by tomfid
Mon Apr 29, 2019 2:45 pm
Forum: Vensim
Topic: Capacity Constraint
Replies: 6
Views: 172

Re: Capacity Constraint

Something like this:

WIP = INTEG( production start rate - completion rate, initial WIP )
completion rate = WIP/completion time
max WIP = 1000
production start rate = MIN( desired production start rate, max production start rate )
max production start rate = MAX(0,max WIP-WIP)/TIME STEP
by tomfid
Mon Apr 29, 2019 2:42 pm
Forum: Vensim
Topic: Using Time Steps
Replies: 5
Views: 171

Re: Using Time Steps

How about: Is First Run = 0 ~ dmnl ~ switch indicating whether or not this is a first run Defined value var 1 = ... ~ something Initial var 2 = ... ~ something Var 2 = IF THEN ELSE( is first run, Initial var 2, functionOf(Defined value var 1) ) If you tell us something about the problem you're tryin...
by tomfid
Sat Apr 27, 2019 1:17 pm
Forum: Vensim
Topic: Running with Different Timesteps
Replies: 16
Views: 418

Re: Running with Different Timesteps

You don't need different time steps. Run daily, and accumulate the results for annual reporting. See viewtopic.php?f=2&t=7199