User Input
|
|
I'm building out a sim where a user needs to input 3 price inputs per week for 4 weeks (I'm considering this one step within the simulation). The simulation takes these 12 prices and computes profitability, etc. Right now I have 12 input fields, each referenced by it's own forio variable. Is there a) an easier way to input these 12 price fields and b) can I utilize an array so I don't have to keep track of 12 prices and perform operations on all to get a 4 week summary result? Any examples you can point me to?
Thanks, Tom |
|
|
Hi Thomas,
A Forio array is perfect for this. Define a range R pricesegment = 1..12 Then define decisions and variables that will be automatically repeated over that range D Price Input[pricesegment] = 100 V Sales[pricesegment] = 1000 V Revenue[pricesegment] = Price * Sales All of the above have 12 different values. For more info, see http://forio.com/broadcast/docs/writing_models/modeling_with_arrays.htm |
|
|
Hey,
I have built for you a good example sim which you can copy from. This model uses an array, and then 2 range controllers (1 for each range) and a decision input to set all 12 decisions http://forio.com/simulate/billy/array-demo/run/ Billy |
|
|
Billy's example can be copied into your own account from here:
http://forio.com/simulate/billy/array-demo/copy |
|
|
Hey,
Let me know how it goes, or if you need anything else. Billy |
Please log in to reply to topics.