Post on 17-Dec-2015
transcript
Simulation Adaptation, Composition and Reuse
Paul F. Reynolds, Jr.Paul F. Reynolds, Jr.reynolds@virginia.edureynolds@virginia.edu 434 924-1039 434 924-1039
David Brogan,David Brogan, Rob Bartholet, Joe Carnahan, Xinyu Liu, Ross Gore, Lingjia Tang, Rob Bartholet, Joe Carnahan, Xinyu Liu, Ross Gore, Lingjia Tang, Yannick LoitiYannick Loitièère, Michael Spiegel, Chris Whitere, Michael Spiegel, Chris White
Modeling and Simulation Technology Research Initiative
Computer Science DepartmentComputer Science Department
University of Virginia, USAUniversity of Virginia, USA
http://www.cs.virginia.edu/~MaSTRI/
Designing for Change:
What Are Key M&S Challenges?
Multi-resolution modeling – Multi-resolution modeling – Simulating over-Simulating over-lapping phenomena at two or more levels of lapping phenomena at two or more levels of (spatial/temporal) resolution concurrently.(spatial/temporal) resolution concurrently.
Composition – Composition – Constructing a (larger) simulation from two or more existing simulations.
Interoperability – Interoperability – When two or more simulations can execute together meaningfully.
Reuse – Reuse – Using a simulation for a purpose other than that for which it was originally intended.
Multi-resolution modeling – Multi-resolution modeling – Simulating over-Simulating over-lapping phenomena at two or more levels of lapping phenomena at two or more levels of (spatial/temporal) resolution concurrently.(spatial/temporal) resolution concurrently.
Composition – Composition – Constructing a (larger) simulation from two or more existing simulations.
Interoperability – Interoperability – When two or more simulations can execute together meaningfully.
Reuse – Reuse – Using a simulation for a purpose other than that for which it was originally intended.Adaptin
g for r
euse
Adapting fo
r reu
se
Modeling and Simulation Technology Research Initiative
Simulation design and Simulation design and semi-automatedsemi-automated adaptation for reuseadaptation for reuse
• COERCECOERCE
–CoercibilityCoercibility: the practices and methods for capturing : the practices and methods for capturing designer knowledge in softwaredesigner knowledge in software
–CoercionCoercion:: a user-guided, semi-automated software a user-guided, semi-automated software adaptation processadaptation process
• ComposabilityComposability
–Reusing components, possibly with acceptable amounts of Reusing components, possibly with acceptable amounts of revision, to meet new requirementsrevision, to meet new requirements
Simulation design and Simulation design and semi-automatedsemi-automated adaptation for reuseadaptation for reuse
• COERCECOERCE
–CoercibilityCoercibility: the practices and methods for capturing : the practices and methods for capturing designer knowledge in softwaredesigner knowledge in software
–CoercionCoercion:: a user-guided, semi-automated software a user-guided, semi-automated software adaptation processadaptation process
• ComposabilityComposability
–Reusing components, possibly with acceptable amounts of Reusing components, possibly with acceptable amounts of revision, to meet new requirementsrevision, to meet new requirements
Simulation
Flexible Points
Sensitivity AnalysesDesign-timeprovidedinsights
Expansion Opportunities
Metadataforcoercing
Coercibility
Flexible PointsSensitivity AnalysesExpansion Opportunities
Simulation
Modify? (solid insight)
Newrequirements
visualiz
e
Coercion metadata
Optimize? (need to explore)
Coercion
coerce(model) what-I-want
Full physics bicyclistFull physics bicyclist
2D point mass2D point mass
Collaborators at UVa
• Aerospace engineeringAerospace engineering (thermo-acoustic coupling)(thermo-acoustic coupling)
• High-energy physicsHigh-energy physics (quark-gluon plasma)(quark-gluon plasma)
• NeuroscienceNeuroscience (multi-scale model of hippocampus)(multi-scale model of hippocampus)
• Earth ScienceEarth Science (forest respiration) (forest respiration)
• Biomedical ScienceBiomedical Science (proposal: cell/tissue MRM) (proposal: cell/tissue MRM)
• Aerospace engineeringAerospace engineering (thermo-acoustic coupling)(thermo-acoustic coupling)
• High-energy physicsHigh-energy physics (quark-gluon plasma)(quark-gluon plasma)
• NeuroscienceNeuroscience (multi-scale model of hippocampus)(multi-scale model of hippocampus)
• Earth ScienceEarth Science (forest respiration) (forest respiration)
• Biomedical ScienceBiomedical Science (proposal: cell/tissue MRM) (proposal: cell/tissue MRM)
Outline of talk
CoercibilityCoercibility
ComposabilityComposability
CoercionCoercion
CoercibilityCoercibility
ComposabilityComposability
CoercionCoercion
Capturing and encoding the nature of Capturing and encoding the nature of alternative conditions (not specifics)alternative conditions (not specifics)
• Stipulate when simulation can/cannot be usedStipulate when simulation can/cannot be used
• State when/how it can be changedState when/how it can be changed
• Identify critical dependenciesIdentify critical dependencies
Capturing and encoding the nature of Capturing and encoding the nature of alternative conditions (not specifics)alternative conditions (not specifics)
• Stipulate when simulation can/cannot be usedStipulate when simulation can/cannot be used
• State when/how it can be changedState when/how it can be changed
• Identify critical dependenciesIdentify critical dependencies
Coercibility
Designing for change
Build upon simplifying assumptionsBuild upon simplifying assumptions• Frequently hiddenFrequently hidden
• Small changes can invalidate simulationSmall changes can invalidate simulation
• Examples:Examples:
– Bounding the space and time of the simulationBounding the space and time of the simulation
– Selecting equations to represent phenomenaSelecting equations to represent phenomena
– Knowing 4Knowing 4thth order Runge Kutta is good enough order Runge Kutta is good enough
Build upon simplifying assumptionsBuild upon simplifying assumptions• Frequently hiddenFrequently hidden
• Small changes can invalidate simulationSmall changes can invalidate simulation
• Examples:Examples:
– Bounding the space and time of the simulationBounding the space and time of the simulation
– Selecting equations to represent phenomenaSelecting equations to represent phenomena
– Knowing 4Knowing 4thth order Runge Kutta is good enough order Runge Kutta is good enough
Case study
Defining a simulation’s contextDefining a simulation’s context
• Articulate the assumptions in Articulate the assumptions in Falling Body ModelFalling Body Model
– A sphere falls to earth…A sphere falls to earth…
– 10 people listed assumptions10 people listed assumptions
– 29 assumptions were ultimately identified29 assumptions were ultimately identified
The top three people only found 21, 19, and 16 The top three people only found 21, 19, and 16
Defining a simulation’s contextDefining a simulation’s context
• Articulate the assumptions in Articulate the assumptions in Falling Body ModelFalling Body Model
– A sphere falls to earth…A sphere falls to earth…
– 10 people listed assumptions10 people listed assumptions
– 29 assumptions were ultimately identified29 assumptions were ultimately identified
The top three people only found 21, 19, and 16 The top three people only found 21, 19, and 16
Spiegel et al., WSC 2005
Capturing Insight
Flexible Points Flexible Points
• Any element of the model or simulation that can be Any element of the model or simulation that can be manipulated in meaningful and effective ways to direct manipulated in meaningful and effective ways to direct a simulation’s behaviora simulation’s behavior
• Examples:Examples:
– Value substitution for constants/parametersValue substitution for constants/parameters
– Replacing abstraction assumptionsReplacing abstraction assumptions
– Modifying stochastic elementsModifying stochastic elements
– Tuning logical time componentsTuning logical time components
Flexible Points Flexible Points
• Any element of the model or simulation that can be Any element of the model or simulation that can be manipulated in meaningful and effective ways to direct manipulated in meaningful and effective ways to direct a simulation’s behaviora simulation’s behavior
• Examples:Examples:
– Value substitution for constants/parametersValue substitution for constants/parameters
– Replacing abstraction assumptionsReplacing abstraction assumptions
– Modifying stochastic elementsModifying stochastic elements
– Tuning logical time componentsTuning logical time components
Clarifying Flexible Points
Pragmatic definition, emphasis on semi-Pragmatic definition, emphasis on semi-automated transformationautomated transformation
Contrast withContrast with• Simulation parametersSimulation parameters
• Design decisionsDesign decisions
Pragmatic definition, emphasis on semi-Pragmatic definition, emphasis on semi-automated transformationautomated transformation
Contrast withContrast with• Simulation parametersSimulation parameters
• Design decisionsDesign decisions
Parameters
Design decisions
Flexible points
Carnahan et al. Fall SIW 2004Carnahan et al., WSC 2005
“Assembly of parts into a whole without modifying the parts.” (Szyperski 2002)
“The capability to select and assemble simu-lation components in various combinations into valid simulation systems to satisfy specific user requirements.” (Petty and Weisel 2003)
“Assembly of parts into a whole without modifying the parts.” (Szyperski 2002)
“The capability to select and assemble simu-lation components in various combinations into valid simulation systems to satisfy specific user requirements.” (Petty and Weisel 2003)
Composability
We advocate semi-automated adaptation of components tosupport composability. --practical and realistic
Composability
It’s hard to build component repositoriesIt’s hard to build component repositories
• Size of componentsSize of components
• Component interfacesComponent interfaces
• Classifying semanticsClassifying semantics
It’s hard to build compositionsIt’s hard to build compositions
• Some theoretical results, few practicalSome theoretical results, few practical
It’s hard to build component repositoriesIt’s hard to build component repositories
• Size of componentsSize of components
• Component interfacesComponent interfaces
• Classifying semanticsClassifying semantics
It’s hard to build compositionsIt’s hard to build compositions
• Some theoretical results, few practicalSome theoretical results, few practical
r1
r3
r4
r2
r5r6
Rx1
x3
x4
x8
x2
x6x7
x5
r8r7
X
CS: Is there a subset of X of cardinality k or less that covers R?
Example instance when k = 3
REQUIREMENTSCOMPONENTS
Component Selection (CS)
Component Selection
CS is NP-completeCS is NP-complete
• Reduction from SAT (Page and Opper 1999)Reduction from SAT (Page and Opper 1999)
• Reduction from MSC (Petty et al. 2003)Reduction from MSC (Petty et al. 2003)
Approximate solutions to CS are possibleApproximate solutions to CS are possible
• Limit the amount of emergenceLimit the amount of emergence
• Use Greedy algorithmUse Greedy algorithm
CS is NP-completeCS is NP-complete
• Reduction from SAT (Page and Opper 1999)Reduction from SAT (Page and Opper 1999)
• Reduction from MSC (Petty et al. 2003)Reduction from MSC (Petty et al. 2003)
Approximate solutions to CS are possibleApproximate solutions to CS are possible
• Limit the amount of emergenceLimit the amount of emergence
• Use Greedy algorithmUse Greedy algorithm
Fox et al. WSC 2004
Applied Simulation Component Reuse (ASCR)
Critical New AssumptionCritical New Assumption: Any component : Any component can be adapted to satisfy any requirementcan be adapted to satisfy any requirement
Critical New AssumptionCritical New Assumption: Any component : Any component can be adapted to satisfy any requirementcan be adapted to satisfy any requirement
What does this buy us?What does this buy us?
• We no longer have to assume the existence of a We no longer have to assume the existence of a master set of components.master set of components.
• We can more flexibly react to changing We can more flexibly react to changing requirements.requirements.
But…But…We now have to account for the cost or utility of adapting a component!
ASCR
A formal model and analysis of component A formal model and analysis of component selection with selection with adaptableadaptable components components
• What is utility and cost of adapting component to What is utility and cost of adapting component to satisfy additional requirements?satisfy additional requirements?
• What is value of incomplete satisfaction?What is value of incomplete satisfaction?
A formal model and analysis of component A formal model and analysis of component selection with selection with adaptableadaptable components components
• What is utility and cost of adapting component to What is utility and cost of adapting component to satisfy additional requirements?satisfy additional requirements?
• What is value of incomplete satisfaction?What is value of incomplete satisfaction?
Results
Proven: Proven: Exact cover by three sets (X3C) Exact cover by three sets (X3C) reduces toreduces to ASCRASCR
• brings flexibility to component selection, but the brings flexibility to component selection, but the problem remains intractable (NP-Hard)problem remains intractable (NP-Hard)
Ongoing work:Ongoing work:
• Discovering scalable methods, algorithms, and Discovering scalable methods, algorithms, and heuristics for component selectionheuristics for component selection
• Encoding adaptability into the componentEncoding adaptability into the component
Proven: Proven: Exact cover by three sets (X3C) Exact cover by three sets (X3C) reduces toreduces to ASCRASCR
• brings flexibility to component selection, but the brings flexibility to component selection, but the problem remains intractable (NP-Hard)problem remains intractable (NP-Hard)
Ongoing work:Ongoing work:
• Discovering scalable methods, algorithms, and Discovering scalable methods, algorithms, and heuristics for component selectionheuristics for component selection
• Encoding adaptability into the componentEncoding adaptability into the component
Bartholet et al., WSC 2005
Efficient Adaptation of a simulation for Efficient Adaptation of a simulation for reuse and component selectionreuse and component selection
• Flexible pointsFlexible points
• Language toolsLanguage tools
• Automatic visualizationAutomatic visualization
• Sensitivity AnalysisSensitivity Analysis
• OptimizationOptimization
Efficient Adaptation of a simulation for Efficient Adaptation of a simulation for reuse and component selectionreuse and component selection
• Flexible pointsFlexible points
• Language toolsLanguage tools
• Automatic visualizationAutomatic visualization
• Sensitivity AnalysisSensitivity Analysis
• OptimizationOptimization
Support userSupport user
seeking insightseeking insight
Coercion
Optimization
Traditionally used to find best parameter Traditionally used to find best parameter valuesvalues
Generates additional insightGenerates additional insight• Identify sensitive/brittle systemsIdentify sensitive/brittle systems
• Explore novel circumstancesExplore novel circumstances
• Detect correlationsDetect correlations
• Discover constraintsDiscover constraints
• Bound search spaceBound search space
Traditionally used to find best parameter Traditionally used to find best parameter valuesvalues
Generates additional insightGenerates additional insight• Identify sensitive/brittle systemsIdentify sensitive/brittle systems
• Explore novel circumstancesExplore novel circumstances
• Detect correlationsDetect correlations
• Discover constraintsDiscover constraints
• Bound search spaceBound search space
S0 S?
P: The Coercion Process
Btarget?
S?
S?
.
.
P: The Coercion Process
S0 P SnSatisfiesBtarget?
Modify
Run optimizeror modify?
Optimize
Yes
No
Btarget
Paths to Coercion
S0 P S?SnS0
Dangerous Divergence
SnS0
Distance Function
S0
Si
Distance Function
Btarget Ii
D(SD(Sii, I, Iii)) Insight is
vital!Coercion converges on solution when D(Sn, In)==0
The Convergence of Coercion
How can we guarantee coercion will How can we guarantee coercion will terminate?terminate?
• We benefit from our successesWe benefit from our successes
–Better satisfy BBetter satisfy Btargettarget with good transformations with good transformations
• We learn from our mistakesWe learn from our mistakes
–Gain insight from bad transformationsGain insight from bad transformations
How can we guarantee coercion will How can we guarantee coercion will terminate?terminate?
• We benefit from our successesWe benefit from our successes
–Better satisfy BBetter satisfy Btargettarget with good transformations with good transformations
• We learn from our mistakesWe learn from our mistakes
–Gain insight from bad transformationsGain insight from bad transformations
Focus on User Interaction with Optimization Tools
Explore what you don’t know and exploit what you do Explore what you don’t know and exploit what you do knowknow
Explore what you don’t know and exploit what you do Explore what you don’t know and exploit what you do knowknow
ExploreUnknown
Exploit Insight
Code Modification
Random Code Generation
Simulated Annealing
Genetic AlgorithmsGradient-Based Search
Response Surface Methodology
Running Example
GlobalMinimum
Simulated Annealing
GlobalMinimum
Simulated Annealing
ExploreUnknown
Exploit Insight
Simulated Annealing
Insight:
• Perturbation func.
• Cooling schedule
Genetic Algorithms
Genetic Algorithms
ExploreUnknown
Exploit Insight
Genetic Algorithms
Insight:
• Mutation func.
• Crossover func.
Gradient-Based Search
Gradient-Based Search
ExploreUnknown
Exploit Insight
Gradient-Based Search
Insight:
• Initial guess
Response Surface Methodology
Response Surface Methodology
ExploreUnknown
Exploit Insight
Response Surface Methodology
Insight:
• What to inspect
• Where to inspect
• What to infer
Optimization Techniques
Explore
Unknown
Exploit Insight
Simulated Annealing
Genetic Algorithms
Gradient-Based Search
Response Surface Methodology
Waziruddin et al. Fall SIW 2004
Identify/classify best practices for optimization in coercion
Set-up timeSet-up time
Computation timeComputation time
Technique preemptionTechnique preemption
Set-up timeSet-up time
Computation timeComputation time
Technique preemptionTechnique preemption
Set-up Time
Explore
Unknown
Exploit Insight
Simulated Annealing
Genetic Algorithms
Gradient-Based Search
Response Surface Methodology
More Set-up Time
Computation Time
Explore
Unknown
Exploit Insight
Simulated Annealing
Genetic Algorithms
Gradient-Based Search
Response Surface Methodology
More Computation Time
Explore
Unknown
Exploit Insight
Simulated Annealing
Genetic Algorithms
Gradient-Based Search
Response Surface Methodology
More Preemption
Technique Preemption
Summary
• Efficient simulation adaptation appears viable for simulation reuse
• Currently funded under NSF (ITR) DDDAS program: dynamic adaptation
• Quite interested in collaborations with application experts.
reynolds@cs.virginia.edu dbrogan@cs.virginia.edu