GoalSeek
The GoalSeek function is part of the model object.
It's used to find the ideal value of one measurement to result in a particular value of another.
For example, you might have made a model that calculates the size of a balloon from a specific pressure of air.
Using GoalSeek, you can effectively 'reverse' that algorithm and find out how much pressure you need to reach a desired size.
Syntax
model.GoalSeek(To Change,To Watch,Goal)
Parameters
To Change: The value you want to calculate and the data point you'd like to change in order to get the To Watch value to reach the Goal. In the example above, pressure is the value we'd like to change.
To Watch: The value we're trying to make reach the Target. In the example, it would be the balloon size.
Goal: The numeric target - the function returns the value of the To Change parameter needed to make the To Watch parameter reach this number.
Adjusting Bounds
To help the algorithm run more efficiently, you should try to specify a minvalue and maxvalue to GoalSeek. These should be between the upper and lower possible limits for the value.
Notes
The goal-seeking algorithm runs the model with a variety of different values for To Change, narrowing in on the best match of To Watch with the Goal.
In some cases, it might not be possible to reach an answer. In these cases, it will often return the maxvalue parameter.
The GoalSeek function will only work if the two parameters (To Change and To Watch) are dependent. A change in first parameter must trigger some kind of change in the other.
If the system can't determine a relationship between the two, the function will fail.