Search found 2544 matches

by tomfid
Wed May 22, 2019 1:51 pm
Forum: Vensim
Topic: Replicate optimization
Replies: 6
Views: 11

Re: Replicate optimization

Order matters, though in a sense that's a bad sign - it means there are many optima and you haven't found the global max. Using the RRandom multiple start helps somewhat because it varies the search order.

The random seed for the optimizer is another factor.
by tomfid
Tue May 14, 2019 2:17 pm
Forum: Vensim
Topic: Running with Different Timesteps
Replies: 16
Views: 142

Re: Running with Different Timesteps

My inclination would be to ignore such details - just make every year 365.25 days.

Otherwise, you could create a schedule of leap years in a lookup.
by tomfid
Tue May 14, 2019 1:38 pm
Forum: Vensim
Topic: Running with Different Timesteps
Replies: 16
Views: 142

Re: Running with Different Timesteps

Combining these, I think you want something like the following: crops.png Growth will be a continuous process, something like: Growth = Effect of Water Availability * Crops * Normal Growth Rate * (1 - Crops/Max Crops) Then Harvest is a discrete event: Harvest Trigger = PULSE TRAIN( ... ) Harvest = H...
by tomfid
Tue May 14, 2019 1:35 pm
Forum: Vensim
Topic: Running with Different Timesteps
Replies: 16
Views: 142

Re: Running with Different Timesteps

Two issues here: 1. I think the model would be clearer with more physical variable names and concepts. For example, "yield reduction" is not a thing. You want to model the physical state, which is - I think - the amount of crops in the field. 2. I'm not sure why TIME STEP is in the denominator for Y...
by tomfid
Sun May 12, 2019 5:20 pm
Forum: Vensim
Topic: How-to batch-export custom graphs (using .cmd files)?
Replies: 6
Views: 47

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: 142

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: 16
Views: 1175

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: 142

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: 65

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: 65

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: 16
Views: 1175

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: 16
Views: 1175

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: 16
Views: 1175

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: 16
Views: 1175

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: 47

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: 34

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: 34

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: 36

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: 50

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: 34

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: 29

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: 29

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: 47

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: 735

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 ...