330 likes | 444 Views
Sarah Waziruddin, University of Virginia David Brogan, University of Virginia Paul Reynolds, University of Virginia. The Process for Coercing Simulations. Motivation. Facilitate the reuse process Simulation reuse is highly desirable Reuse may occur:
E N D
Sarah Waziruddin, University of Virginia David Brogan, University of Virginia Paul Reynolds, University of Virginia The Process for Coercing Simulations
Motivation • Facilitate the reuse process • Simulation reuse is highly desirable • Reuse may occur: • Modify a simulation to achieve a different set of objectives • Perhaps change resolutions • Compose simulations to meet an arbitrary objective
Ernest Page, “Observations on the Complexity of Composable Simulation” In Proceedings of Winter Simulation Conference, December 1999 in Phoenix, AZ Issue: How do requirements relate to module functionality REQUIREMENTSCAPTURE (Translate user requirements into model requirements) “I have a need Issue: What should these modules contain SEARCH USER Module Repositories “I have a solution!” Selected modules CONSTRUCTION AND EVALUATION • Issue: • Interoperability • Constraints Options for Composed Models User Composability Concept of Operations If interoperability of selected modules is an issue, coercion offers a potential solution.
The Goals of Coercion • Increase efficiency of the reuse process • Provide tools that lead to new insight about the simulated phenomenon • Increase the practitioners' confidence in the model
P Coerced Simulation Simulation to reuse Requirements P: The Coercion Process Practitioners
Coerced Particle: Relatively Fast and Accurate Model P Particle: Faster and Less Accurate Model Bicyclist: Slower and More Accurate Model Trajectory Bicyclist Particle An Example
P: The Coercion Process P = [m*, o*]* Some Example Sequences: • m, o, m, o • o, o, m, m, o, m • m • o
Run optimizer or modify? Run optimizer or modify? o Optimize m Identify Flexible Elements Identify Flexible Elements Modify Identify Functionality to Modify Identify Functionality to Modify Set Constraints Set Constraints Make Modification Make Modification Define Objective Function Define Objective Function Select Optimization Technique Select Optimization Technique Run Optimizer Run Optimizer Evaluate Successful Coercion? Successful Coercion? No No Yes Yes Done Done P: The Coercion Process Explained
O: Optimization Step Identify Flexible Elements Need a human in the loop for the initial tasks Utilize optimization technology to automate coercion Set Constraints Define Objective Function Select Optimization Technique Run Optimizer
M: Modification Step • Modify or augment the existing algorithm of the simulation Identify Functionality to Modify Make Modification
Successful Coercion? Evaluation • The practitioner determines if coerced simulation meets requirement • The initial simulation’s output is encoded as a behavior: S0B0 • The coerced simulation’s output is encoded as a behavior: SnBn • The requirement is encoded as a behavior, Btarget
Bn Bn Btarget Btarget Bn Bn Evaluation Function • BtargetÍ Bn • An infinite Bn can satisfy this relationship
S0 Paths to Coercion SnBn Sn S0 Sn S0 . . . .
O M When successive optimizations fails to yield successful coercion Modification may be needed to eliminate non-linearities, discontinuities, etc. Possible Scenarios O O • The optimizer fails to converge • The optimizer gets stuck in a local minima • Discontinuity, non-linear, large search space
M M Optimization is too costly/impossible Possible Scenarios M O • Modification may lead to discovery of new flexible elements • The optimal values for the flexible elements may change due to the modification
An Example • S0 = f(x) = y = -0.25x + 0.5 • Requirement= g(x) = y = sine(x) • Define Btarget by specifying 16 sample points:
O O M O M O • First Iteration: Optimization • Motivation: We want as much automation as possible • Initial tasks: • Identify flexible elements: The slope and y-intercept • Set constraints: None • Define the objective function: • Choose an optimization technique: Linear regression
O O M O M O • Flexible elements: Slope and y-intercept have values of 0 • Objective function: Value of 0 (no error) but Btarget has not been met • Insight: Individual errors sum to 0 four have an error of zero, four have an error of , four have an error of , two have an error of one, and two have an error of negative one • Next Iteration: Modify objective function
O O M O M O • Second Iteration: Optimization • Motivation: Modify objective function to leverage automation • Initial tasks: • Identify flexible elements: The slope and y-intercept • Set constraints: None • Redefine the objective function: • Choose an optimization technique: Linear regression
O O M O M O • Flexible elements: Slope and y-intercept have values of 0 • Objective function: Value of • Insight: Line fragments track sine curve better than a line • Next Iteration: Modify the simulation to produce line fragments
O O M O M O • Third Iteration: Modification • Functionality to modify: Produce line fragments that span a parameter space of π • Fourth Iteration: Optimization • Motivation: Find optimal values for flexible elements in modified algorithm • Initial tasks: • Same as the second iteration of optimization
O O M O M O • Line fragments do not match sample points defined by Btarget • Objective function: Error value decreases from previous iteration • Insight: Smaller line fragments track sine curve better • Next Iteration: Modify the simulation to produce twice as many line fragments
O O M O M O • Fifth Iteration: Modification • Functionality to modify: Produce line fragments that span a parameter space of π/2 • Sixth Iteration: Optimization • Motivation: Find optimal values for flexible elements in modified algorithm • Initial tasks: • Same as the second iteration of optimization
O O M O M O • Line fragments match sample points defined by Btarget • Objective function: Error value is 0 • Practitioner verifies results using visualization tools • Btarget Bn; Coercion is successful! • Multiple sequences can succesfully coerce this simulation to Btarget
Tools available • SimEx: a tool in production to aid practitioners to coerce a simulation • Includes visualization, optimization and constraint specification modules
Ongoing Work • Is there a best coercion sequence? • Is there a best initial simulation? • Is there a best coerced simulation? • Tools: • Maximize human interaction in the process • Identify flexible elements • Visualization tools • Optimization tools
Conclusion Coercion • Formally specified a semi-automated reuse process • Greater insight on simulation code • Greater insight on simulated phenomenon • Insight leads to greater confidence in model
Acknowledgment • Defense Modeling and Simulation Office • Multi-Resolution Modeling group at the University of Virginia