170 likes | 335 Views
Optimization in GoldSim. Jason Lillywhite and Ryan Roper June 2012 Webinar. Agenda. Intro – Jason - 15 minutes Simple examples – Ryan – 30 minutes Submodel examples – Jason – 10 minutes Questions – 5 minutes. Why Optimization?. Finding best input values for a model
E N D
Optimization in GoldSim Jason Lillywhite and Ryan Roper June 2012 Webinar
Agenda • Intro – Jason - 15 minutes • Simple examples – Ryan – 30 minutes • Submodel examples – Jason – 10 minutes • Questions – 5 minutes
Why Optimization? • Finding best input values for a model • Selecting best option among alternatives • Safest, cheapest, most reliable, etc • Optimizing the timing of actions
GoldSim’s Optimization Feature • Box’s complex method • Box, M. J. (1965) “A new method of constrained optimization and comparison with other methods” • Start with initial “complex” (valid solutions) • Search the solution space iteratively • Replace least optimal solutions with more optimal ones • Iterate until convergence
Setting up an Optimization • Minimize/Maximize • Precision • Randomize optimization sequence? • Define your objective function • Required condition • Optimization variables
Precision • Low: 2N; F < 0.01 Ri or 100 solutions • Medium: 4N; F < 0.001 Ri or 1000 solutions • High: 10N; F < 0.00001 Ri or 1E4 solutions • Maximum: 10N; no longer improve result or 1E6 solutions N = number of optimization variables to generate the initial complex F = objective function Ri = initial range
Objective Function • Define your objective function • Minimize or maximize? • Model output • Final values only! • Examples: • Cumulative cost • Total number of events • Peak value during simulation
Required Condition • Add another boundary to the optimization search space • Examples: • Regulatory limit • Financial budget • Restrict unacceptable combination of variables
Optimization Variables • Data or Stochastic elements • Represent decision variables • Have direct control • Examples: • Pipe size • How much to spend? • When something occurs • Objective function dependent on ALL optimization variables!
Running an Optimization • Best Function Value vs. Iterations • Plot the optimal value per iteration • Top results • Table showing objective function and variables from the 10 most optimal iterations • Interrupts are ignored during optimization runs if continue or skip options are selected
Optimization of Complex Models • Multiple optima • Choice of bounds may be important • Convergence may not be possible • May converge on a local optimum • Randomize optimization helps search through multiple optimal outcomes
Potential Warnings • Unable to create a valid complex • Cannot find 2N valid solutions (N=opt. vars.) • Cannot improve the solution • Found a number of valid solutions but can’t find any better ones (stuck) • Convergence might be too strict • Examine the top results • Failure to converge • No convergence after many iterations • 100 for low, 1000 for medium, 10,000 for high precision
Optimization of a Probabilistic Model • Objective function must be a statistic • i.e. Minimize the mean or value at 95% • Must use a submodel