the design of xml-based model and experiment description languages for network simulation
DESCRIPTION
The Design of XML-Based Model and Experiment Description Languages for Network Simulation. Andrew Hallagan Bucknell University Dept. of Computer Science Luiz Felipe Perrone , Advisor April 26, 2011. 3 General Network Types. Clockwise from top: hardwired, wireless, and ad-hoc networks. - PowerPoint PPT PresentationTRANSCRIPT
1
The Design of XML-Based Model and Experiment Description
Languages for Network Simulation
Andrew HallaganBucknell University
Dept. of Computer ScienceLuiz Felipe Perrone, Advisor
April 26, 2011
8
Ways to Study a SystemSource: Averill M. Law, Simulation, Modeling & Analysis
Physicalmodel
Experiment with the
actual system
Experiment with a model of the
system
System
Mathematicalmodel
Analytical solution Simulation
9
Physicalmodel
Experiment with the
actual system
Experiment with a model of the
system
System
Mathematicalmodel
Analytical solution Simulation
Ways to Study a SystemSource: Averill M. Law, Simulation, Modeling & Analysis
Costly, disruptive
10
Physicalmodel
Experiment with the
actual system
Experiment with a model of the
system
System
Mathematicalmodel
Analytical solution Simulation
Ways to Study a SystemSource: Averill M. Law, Simulation, Modeling & Analysis
Costly, disruptive
Not applicable
11
Physicalmodel
Experiment with the
actual system
Experiment with a model of the
system
System
Mathematicalmodel
Analytical solution Simulation
Ways to Study a SystemSource: Averill M. Law, Simulation, Modeling & Analysis
Costly, disruptive
Not applicable
d = v∙t
13
Physicalmodel
Experiment with the
actual system
Experiment with a model of the
system
System
Mathematicalmodel
Analytical solution Simulation
Ways to Study a SystemSource: Averill M. Law, Simulation, Modeling & Analysis
Costly, disruptive
Not applicable
Difficult, if not impossible
15
A Simple Mobility ModelThe horizontal and vertical positions of the node are a function of SPEED and ANGLE, which are random variables distributed Normally and Uniformly, respectively.
X-position = f(SPEED, ANGLE)Y-position = g(SPEED, ANGLE)SPEED ~ N(SPEED_MEAN, 3.0)ANGLE ~ U(0, ANGLE_BOUND)
Model Inputs• SPEED_MEAN• ANGLE_BOUND
16
A Simple Mobility ModelThe horizontal and vertical positions of the node are a function of SPEED and ANGLE, which are random variables distributed Normally and Uniformly, respectively.
X-position = f(SPEED, ANGLE)Y-position = g(SPEED, ANGLE)SPEED ~ N(SPEED_MEAN, 3.0)ANGLE ~ U(0, ANGLE_BOUND)
Model Inputs• SPEED_MEAN• ANGLE_BOUND
ModelDescription
19
Design Matrix
ANGLE_BOUND151515303030454545606060
SPEED_MEAN2.03.04.02.03.04.02.03.04.02.03.04.0
designpoint
21
Design Matrix
ANGLE_BOUND151515303030454545606060
SPEED_MEAN2.03.04.02.03.04.02.03.04.02.03.04.0
Experiment Description
26
Various simulator enginesResearchers have a number of simulator engines to choose from, including ns-2, ns-3, OPNET, CSIM, GloMoSim and MATLAB.
27
Various simulator enginesResearchers have a number of simulator engines to choose from, including ns-2, ns-3, OPNET, CSIM, GloMoSim and MATLAB.
ns-2
28
Various simulator enginesResearchers have a number of simulator engines to choose from, including ns-2, ns-3, OPNET, CSIM, GloMoSim and MATLAB.
ns-2
ns-3
29
Various simulator enginesResearchers have a number of simulator engines to choose from, including ns-2, ns-3, OPNET, CSIM, GloMoSim and MATLAB.
ns-2
ns-3
30
Various simulator enginesResearchers have a number of simulator engines to choose from, including ns-2, ns-3, OPNET, CSIM, GloMoSim and MATLAB.
ns-2
ns-3
GloMoSim
31
Various simulator enginesResearchers have a number of simulator engines to choose from, including ns-2, ns-3, OPNET, CSIM, GloMoSim and MATLAB.
ns-2
ns-3
CSIM
GloMoSim
32
Various simulator enginesResearchers have a number of simulator engines to choose from, including ns-2, ns-3, OPNET, CSIM, GloMoSim and MATLAB.
ns-2
ns-3
CSIM
GloMoSim
SWAN
33
Various simulator enginesResearchers have a number of simulator engines to choose from, including ns-2, ns-3, OPNET, CSIM, GloMoSim and MATLAB.
ns-2
ns-3
CSIM
GloMoSim MATLAB
SWAN
34
Recap
• Networks are complex.• Modeling is difficult.• Experimentation isn’t straight-
forward.• Mistakes in this process have led to
credibility issues in network simulation.
35
Solution: Automation
• Automation provides guidance that helps increase credibility of published research.
• Automate the modeling and experiment design processes.
• Validate experiments at multiple levels.
36
Motivation for Network Simulation ResearchSource: J. M. Brase and D. L. Brown, Modeling, Simulation and Analysis of Complex Networked Systems. White paper.
“[The Department of Energy] must continue the development of next generation complex networked
systems that are more secure, less brittle to unexpected events, and more
controllable. For these emerging efforts to be successful, it is essential that a firm intellectual foundation be
provided for understanding and simulating large-scale networks.”
38
Various simulator enginesResearchers have a number of simulator engines to choose from, including ns-2, ns-3, OPNET, CSIM, GloMoSim and MATLAB.
ns-2 CSIM
GloMoSim MATLAB
SWAN
ns-3
39
High-level view of the SAFE architecture.My work is concerned with the Model Description and Experiment Description inputs to this framework (in the yellow boxes).
40
High-level view of the SAFE architecture.My work is concerned with the Model Description and Experiment Description inputs to this framework (in the yellow boxes).
41
An HTML “anchor” element.This piece of HTML is valid XML. It is an a tag with an attribute href. The value of the href attribute is a URL string and the content of the a tag is the “Link to Google” string.
<html:a href="http://www.google.com">Link to Google</a>
Opening tag
Attribute Attribut
evalue
Element content
Closing tagNamespaceprefix
47
A NEDL “factorlist” elementThe “factorlist” element lists all of the factor names referenced throughout the rest of the NEDL document.
<nedl:factorlist><nedl:factor>SPEED_MEAN</nedl:factor><nedl:factor>ANGLE_BOUND</nedl:factor>
</nedl:factorlist>
48
NEDL FunctionalityProvide ways to list associated level values for each factor.
ANGLE_BOUND15304560
SPEED_MEAN2.03.04.0
49
NEDL FunctionalityProvide ways to list associated level values for each factor.
ANGLE_BOUND15304560
SPEED_MEAN2.03.04.0“Use the
values 3, 17, and 9.”
50
A NEDL “memberof” elementThe “memberof” element associates a factor with a list of level values. The name was inspired by the terminology used to describe mathematical sets.
<nedl:memberof><nedl:factor>SPEED_MEAN</nedl:factor><nedl:listid>speed-values</nedl:listid>
</nedl:memberof><nedl:levellist id="speed-values">
<nedl:level>3</nedl:level><nedl:level>17</nedl:level><nedl:level>9</nedl:level>
</nedl:levellist>
55
NEDL FunctionalityProvide ways to list associated level values for each factor.
ANGLE_BOUND15304560
SPEED_MEAN2.03.04.0
“Use values of the form 5∙x +
2,where 0 ≤ x ≤
9”
56
A NEDL “sequence” elementThe “sequence” element associates a factor with a sequence of level values. The sequence expression is built up using constants, variables, and further expression elements.
<nedl:sequence><nedl:factor>SPEED_MEAN</
nedl:factor><nedl:test>EQUALS</nedl:test><nedl:lconst>2</nedl:lconst><nedl:op>PLUS</nedl:op><nedl:rexpr>
<nedl:lconst>5</nedl:lconst><nedl:op>MULT</nedl:op><nedl:rvar>x</nedl:rvar>
</nedl:rexpr><nedl:where>
<nedl:range><nedl:var>x</nedl:var><nedl:lo>0</nedl:lo><nedl:hi>9</nedl:hi><nedl:delta>1</
nedl:delta></nedl:range>
</nedl:where></nedl:sequence>
57
NEDL FunctionalityProvide ways to “prune” design points from the experiment space.
ANGLE_BOUND151515303030454545606060
SPEED_MEAN2.03.04.02.03.04.02.03.04.02.03.04.0
58
NEDL FunctionalityProvide ways to “prune” design points from the experiment space.
ANGLE_BOUND151515303030454545606060
SPEED_MEAN2.03.04.02.03.04.02.03.04.02.03.04.0
“Remove the specific design
point where ANGLE_BOUND =
15and
SPEED_MEAN = 3.0.”
59
A NEDL “exclusionrestriction” elementThe “exclusionrestriction” element specifies a whole or partial design point which should not be included in the final experiment space.
<nedl:exclusionrestriction><nedl:setting factor="ANGLE_BOUND" level="15"/><nedl:setting factor="SPEED_MEAN" level="3"/>
</nedl:exclusionrestriction>
60
NEDL FunctionalityProvide ways to “prune” design points from the experiment space.
ANGLE_BOUND151515303030454545606060
SPEED_MEAN2.03.04.02.03.04.02.03.04.02.03.04.0
“Remove any design points
where SPEED_MEAN =
4.0.”
61
A NEDL “exclusionrestriction” elementThe “exclusionrestriction” element specifies a whole or partial design point which should not be included in the final experiment space.
<nedl:exclusionrestriction><nedl:setting factor="SPEED_MEAN" level=“4"/>
</nedl:exclusionrestriction>
62
NEDL FunctionalityProvide ways to “prune” design points from the experiment space.
ANGLE_BOUND151515303030454545606060
SPEED_MEAN2.03.04.02.03.04.02.03.04.02.03.04.0
“Link the factors ANGLE_BOUND
and SPEED_MEAN.”
63
NEDL FunctionalityProvide ways to “prune” design points from the experiment space.
ANGLE_BOUND151515303030454545606060
SPEED_MEAN2.03.04.02.03.04.02.03.04.02.03.04.0
“Link the factors ANGLE_BOUND
and SPEED_MEAN.”
ANGLE_BOUND15304560
SPEED_MEAN2.03.04.0
64
A NEDL “linkingrestriction” elementThe “linkingrestriction” element specifies factors which should be “linked” when creating design points.
<nedl:linkingrestriction><nedl:factor>SPEED_MEAN</nedl:factor><nedl:factor>ANGLE_BOUND</nedl:factor>
</nedl:linkingrestriction>
67
Creating an ns-3 script template.One can create an ns-3 script simply by removing certain hard-coded values and inserting special markers that correspond to the factors listed in a NEDL file.
// A bunch of ns-3 code before….norm = ns3.RandomVariable(“Normal”, 2.0, 3.0)unif = ns3.RandomVariable(“Uniform”, 0, 90)node.setSpeed(norm)node.setAngle(unif)// A bunch of ns-3 code after…
68
Creating an ns-3 script template.One can create an ns-3 script simply by removing certain hard-coded values and inserting special markers that correspond to the factors listed in a NEDL file.
// A bunch of ns-3 code before….norm = ns3.RandomVariable(“Normal”, $SPEED_MEAN$, 3.0)unif = ns3.RandomVariable(“Uniform”, 0, $ANGLE_BOUND$)node.setSpeed(norm)node.setAngle(unif)// A bunch of ns-3 code after…
69
Creating an ns-3 script template.Using the block element in NSTL, one can specify interchangeable code blocks to swap in an ns-3 script. Since two block elements are used, two scripts will be generated.
// A bunch of ns-3 code before…<nstl:block>norm = ns3.RandomVariable(“Normal”, $SPEED_MEAN$, 3.0)unif = ns3.RandomVariable(“Uniform”, 0, $ANGLE_BOUND$)node.setSpeed(norm)node.setAngle(unif)</nstl:block>
<nstl:block>norm = ns3.RandomVariable(“Normal”, $SPEED_MEAN$, 3.0)node.setSpeed(norm)node.setAngle(ns3.Constant(270))</nstl:block>// A bunch of ns-3 code after…
70
Creating an ns-3 script template.Using the block element in NSTL, one can specify interchangeable code blocks to swap in an ns-3 script. The two different scripts are boxed in blue.
// A bunch of ns-3 code before…norm = ns3.RandomVariable(“Normal”, 5.0, 3.0)unif = ns3.RandomVariable(“Uniform”, 0, 30)node.setSpeed(norm)node.setAngle(unif)// A bunch of ns-3 code after…
// A bunch of ns-3 code before…norm = ns3.RandomVariable(“Normal”, 5.0, 3.0)node.setSpeed(norm)node.setAngle(ns3.Constant(270))// A bunch of ns-3 code after…
SPEED_MEAN = 5.0 ANGLE_BOUND = 30
DesignPoint
72
Concluding Thoughts
• NEDL and NSTL are markup languages; supporting modules can evolve.
• NEDL and NSTL not necessarily tied to ns-3.
• Working code generation a great benefit.
74
Future Work
• GUIs for constructing NEDL documents.
• Repository of NSTL files created by experts.