Title: Chapter 11 Variable Structure Models and Networks
1Chapter 11 Variable Structure Models and Networks
- DEVS Classes Extensions
- Dynamic Workflow Architectures
- Using Variable Structure in Cell Spaces
- Dynamic System Entity Structure
- Example Hierarchical Variable Structure Network
2DEVS Classes Extended with Variable Structure
BasicDevs
IODevs
IOBasic
Devs
IOBasic
Devs
addInport(String portName) addOutport(String
portName) removeInport(String portName) removeOutp
ort(String portName)
MessageHandler
Atomic
Devs
Coupled
Devs
addCoupling(Pair src, Pair dest) removeCoupling(Pa
ir src, Pair dest)
devs
AtomicInterface
Coupled
addCoupling(String src, String port, String dest,
String port) removeCoupling(String src, String
port, String dest, String port) addModel(IODevs
iod) removeModel(String modelName) addInport(Strin
g modelName, String port) addOutport(String
modelName, String port) removeInport(String
modelName, String port) removeOutport(String
modelName, String port)
addCoupling(String src, String port, String dest,
String port) removeCoupling(String src, String
port, String dest, String port) removeModelCouplin
g(String modelName)
atomic
digraph
friendlyAtomic Interface
friendlyA
tomic
friendly
D
igraph
friendlyDigraph Interface
public interface friendlyDigraphInterface
public void doAllToAllCoupling() public void
coupleAllTo(String sourcePt,devs d,String
destinPt) public void coupleOneToAll(devs
d,String sourcePt,String destinPt) public void
coupleAllToExcept(String sourcePt,devs d, String
destinPt ,devs other)
public interface friendlyAtomicInterface extends
AtomicInterface public boolean
somethingOnPort(message x,String port) public
entity getEntityOnPort(message x,String port)
public int getIntValueOnPort(message x,String
port) public double getRealValueOnPort(message
x,String port) public double sumValuesOnPort(mess
age x,String port) public String
getNameOnPort(message x,String port) public
message outputNameOnPort(String nm,String port)
public message outputNameOnPort(message m,String
nm,String port) public message
outputIntOnPort(int r,String port) public
message outputRealOnPort(message m,int r,String
port) public message outputRealOnPort(double
r,String port) public message outputRealOnPort(me
ssage m,double r,String port)
scalable
A
tomic
scalable
Digraph
scalableAtomic Interface
scalableDigraph Interface
addNewModel() removeOldModel()
addNewModel() removeOldModel(String modelName)
ViewableAtomic
ViewableDigraph
3Dynamic Workflow Architectures
efpVS is a variable structure version of efp in
SimpArc. As the simulation proceeds variable
structuring allows different architectures to be
substituted into the same interface with the
experimental frame.
We add a timed controller, tc to replace an
existing architecture with a new one every so
often.
tc makes decisions about when to remove and add a
processor and its coupling to the experimental
frame
Note when a model is added during simulation,
its initial state is determined by its
initialize() method.
public void changeProcessor() if (time lt 100)
sp new proc("proc",25) else if (time lt200)
sp new DandC3("d",29) ,,, else if (time
lt800) sp new multiServer("m",40,4) else
public void addProcessor() addModel(sp)
addCoupling("ExpFrame","out",sp.getName(),"in")
addCoupling(sp.getName(),"out","ExpFrame","in")
public void removeProcessor() if (sp
null)return removeModel(sp.getName()) removeCoup
ling("ExpFrame","out",sp.getName(),"in") removeCo
upling(sp.getName(),"out","ExpFrame","in")
SimpArc efpVS
architecture replacement can be either atomic or
coupled
4Variable Structure Example Pulse Pipeline One
Dimensional Cell Space
2
3
4
6
7
8
1
0
5
initialize the cell space with first, second and
last cells
oneDCell zero addCell(0,new pulseCell( 0,
fireDelay )) oneDCell one addCell(1,new
pulseCell( 1, fireDelay )) oneDCell last
addCell(numCells-1,new pulseCell( numCells-1,
fireDelay )) addCoupling( this, "in", zero,
"in" ) addCoupling(last, "out", this, "out" )
addCoupling(zero, "out",one,"in")
The advantage of VS is that we do not have to
load all of the cells at initialization --
important for large numbers
public void addPipeNeighbor() addNeighbor(1,new
pulseCell(id1,10)) addNeighborCoupling(1,"out",
"in")
add a call in deltext to create a neighbor and
its couplings
add neighbor cells as they become active
public void deltext( double e, message x )
addPipeNeighbor() Continue( e )
if ( phaseIs( "passive" ) somethingOnPort( x,
"in" ) ) holdIn( "fire", rg.expon(
fireDelay ) )
oneDimCellSpace. pipeLineRand
5 Implementation of Dynamic System Entity Structure
ViewableAtomic
ViewableDigraph
specAsp can hold specEnt and other specAsp objects
Note hierarchical properties of SES are
automatically derived from this representation.
specAsp
specEntity
Dynamic SES implementation of SES in which the
individual models in the family are successively
enumerated
6Example Dynamic System Entity Structure
efpSES ilustrates the ability to employ variable
structure to dynamically enumerate the system
entity structure (SES). It employs an instance of
class specAsp to control the successive
substitution of alternatives for a processor and
an experimental frame..
The specEntities and their specialized entity
contents are shown.
The user adds an instance of the specialization
and tells it which component it relates to.
class procSpec extends specEntity public
procSpec(IODevs sp) super("procSpec",sp)//the
first addSpec(new DandC3("dc",29))
addSpec(new proc("proc",25)) addSpec(new
procQ("pq",30)) addSpec(new pipeLine("pip",30,3)
)
public class efpSES extends specAsp public
efpSES () super("efpSES,100)//switchTime
double observeTime 20 ViewableDigraph
expf new ef("ef10",10,observeTime)
add(expf) specEntity es new
efSpec(expf,observeTime) add(es)
ViewableAtomic sp new proc("proc",15)
add(sp) addCoupling(expf,"out",sp,"in")
addCoupling(sp,"out",expf,"in")
specEntity as new procSpec(sp) add(as)
The user defines a subclass of specEnttity and
provides the first and subsequent specialization
entities.
SimpArc efpSES
7efpSES
Implementation of Dynamic SES more detail
specAsp handles two or more specializations --
cycles through all combinations
efSpec
procSpec
efSpec and procSpec are shown unhidden to reveal
the couplings that are constructed automatically.
8Dynamic SES Hierarchical Example
hierEfpaSES
each yellow node extends specAsp
hierProc
efSpec
procSpec2
procSpec1
proc
pip
proc
pip
SimpArc hierEfpSES
9Example Variable GPT Model
Models can be added/removed at the same
digraph level and levels underneath it, but they
cant be added to the parent level or from one
digraph model into another digraph model at the
peer-level.
10Hierarchical Networks Top Level Network
- The figure on the right displays the
- Topmost hierarchy in the network
- Architecture. It is composed of
- Network Generator
- Network Controller
- Network Manager
- Grid Allocation Manager
- And numerous networks that are
- Part of this architecture. In this
- this number is three.
11Level 1 Network
Top Level Network
Resizeable Network
This figure displays the expanded view of one of
the composed networks. The network itself
consists of an internal network-allocation
manager that allocates resources to each of the
entities in the network. Each basic entity has an
intrinsic rate on the basis of which it is
allocated the resources.
12Basic entity
Each basic network entity comes tightly coupled
with a dedicated rate estimator that keeps track
of its processing rate. The rate estimator tells
the basic entity what its current rate is, when
it needs to process and send an output and when
it needs to stall. Each basic entity receives its
max rate from the allocation manager and reports
its actual rate.
Sample Code provided by Dr. Zeigler