Package services
Class VNFgraph
java.lang.Object
services.VNFgraph
public class VNFgraph
extends java.lang.Object
VNF forwarding graph class
-
Field Summary
Fields Modifier and Type Field Description (package private) int
banddemand
default bandwidth demand in case it is not defined(package private) Codec
codec
(package private) int
cpudemand
default cpu demand in case it is not defined(package private) int
defedgew
default edge weight in case it is not defined(package private) int
defnodew
default node weight in case it is not definedint
edges
number of edges(package private) int[]
edgew
edge weights(package private) java.lang.String
filename
name of file VNFgraph(package private) int[]
graph
graph in Edge Vector format(package private) boolean
hasspatial
does it have spatial constraints?int[]
mapping
mapping to a datacenter as assigned by controllerint
maxacedgew
maximum accumulated edge weightint
maxedgew
maximum edge weightint
maxnodew
maximum node weightint
minedgew
minimum edge weightint
minnodew
minimum node weight(package private) int[]
nodeacw
node accumulated weightsint
nodes
number of nodes(package private) int[]
nodesort
sorted nodes(package private) int[]
nodew
node weights(package private) int[]
partitioning
maps this graph as a partition of a larger graph stores for every node of this graph, its place (node ID) in the larger graph(package private) int[]
segbands
bandwidth demands for links between partitions(package private) int[]
segflows
ingress and outgress data flows for subgraphs that are defined as partitions of a larger graph for every node in the partiion set 0 if the node is not part of an ingress or outgress data flow; set 1 for ingress flow; 2 for outgress flow; 3 for bidirectional flows with other partitionsint[]
spatial
spatial constraints, preferred domains -
Constructor Summary
-
Method Summary
Modifier and Type Method Description int
cpugetdemand()
get total capacity demandvoid
defspatial(int a)
define spatial constraint in a single node of the substrate networkvoid
defspatial(int a, int v)
define spatial constraint of a single virtual node in a single node of the substrate networkvoid
demands()
updates minimum and maximum demand valuesvoid
gengraph(int vnfs, int lowcap, int maxcap, int lowband, int maxband, int branchnum)
generate random VNF-graphint
getbanddemand()
get total bandwidth demandint
getedges()
get number of edgesint[]
getedgew()
get bandwidth demands for all edgesint[]
getgraph()
get graph in Edge Vector formatint[]
getmapping()
get stored mappingint
getmaxacedgew()
get maximum bandwidth demandint
getmaxnodew()
get maximum capacity demandint
getminedgew()
get minimum bandwidth demandsint
getminnodew()
get minimum capacity demandint[]
getnodeacw()
computes the total bandwidth demands for all nodesint
getnodeacw(int i)
get the total bandwidth demands form the links connected in given nodeint
getnodedem(int w)
get demand for single virtual nodeint
getnodes()
get number of nodesint[]
getnodew()
get capacity demands for all nodesint[]
getpartitioning()
when this VNFgraph object represents a partition of a larger VNF-graph get the partitioning array that maps the VNFs of this graph as nodes of the larger graphint[]
getsegbands()
get bandwidth demands between partitionsint[]
getsegflows()
get flows between partitionsint
getsortednode(int i)
get sorted nodesint[]
getspatial()
get spatial constraintsboolean
hasspatial()
are there spatial constraints?void
loadEdgeVector()
load graph from file in edge vector formatvoid
loadedgew(java.lang.String filename)
load edge demands from filevoid
loadnodew(java.lang.String filename)
load node demands from filevoid
loadspatial(java.lang.String filename)
load node spatial constraints determines the preferred domain for hosting the VNFvoid
makespatial(int[] a)
void
nodeacw()
computes the total bandwidth demands of all the virtual links connected on every VNFvoid
nodedemsort()
sorts nodes in ascending order based on their capacity demandsvoid
remspatial()
remove spatial constraintsvoid
setmapping(int[] a)
set mapping as computed by the controllervoid
setpartitioning(int[] apartitioning)
set partitioning array, used when this VNFgraph object represents a partition of a larger VNF-graph the partitioning array maps the VNFs of this graph as nodes of the larger graphvoid
setspatial()
set spatial constraints on or offvoid
setspatialconstraint(boolean b)
set spatial constraints on or offMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
graph
int[] graphgraph in Edge Vector format -
nodew
int[] nodewnode weights -
edgew
int[] edgewedge weights -
nodeacw
int[] nodeacwnode accumulated weights -
nodesort
int[] nodesortsorted nodes -
edges
public int edgesnumber of edges -
nodes
public int nodesnumber of nodes -
maxnodew
public int maxnodewmaximum node weight -
maxedgew
public int maxedgewmaximum edge weight -
maxacedgew
public int maxacedgewmaximum accumulated edge weight -
minnodew
public int minnodewminimum node weight -
minedgew
public int minedgewminimum edge weight -
spatial
public int[] spatialspatial constraints, preferred domains -
mapping
public int[] mappingmapping to a datacenter as assigned by controller -
hasspatial
boolean hasspatialdoes it have spatial constraints? -
defnodew
int defnodewdefault node weight in case it is not defined -
defedgew
int defedgewdefault edge weight in case it is not defined -
cpudemand
int cpudemanddefault cpu demand in case it is not defined -
banddemand
int banddemanddefault bandwidth demand in case it is not defined -
filename
java.lang.String filenamename of file VNFgraph -
codec
Codec codec -
partitioning
int[] partitioningmaps this graph as a partition of a larger graph stores for every node of this graph, its place (node ID) in the larger graph -
segflows
int[] segflowsingress and outgress data flows for subgraphs that are defined as partitions of a larger graph for every node in the partiion set 0 if the node is not part of an ingress or outgress data flow; set 1 for ingress flow; 2 for outgress flow; 3 for bidirectional flows with other partitions -
segbands
int[] segbandsbandwidth demands for links between partitions
-
-
Constructor Details
-
VNFgraph
public VNFgraph(java.lang.String filename) -
VNFgraph
public VNFgraph(int vnfs, int lowcap, int maxcap, int lowband, int maxband, int branchnum) -
VNFgraph
public VNFgraph(int[] graph, int[] nodew, int[] edgew, int[] spatial, int[] partitioning, int[] segflows, int[] segbands)
-
-
Method Details
-
nodedemsort
public void nodedemsort()sorts nodes in ascending order based on their capacity demands -
demands
public void demands()updates minimum and maximum demand values -
nodeacw
public void nodeacw()computes the total bandwidth demands of all the virtual links connected on every VNF -
gengraph
public void gengraph(int vnfs, int lowcap, int maxcap, int lowband, int maxband, int branchnum)generate random VNF-graph -
loadEdgeVector
public void loadEdgeVector()load graph from file in edge vector format -
loadnodew
public void loadnodew(java.lang.String filename)load node demands from file -
loadspatial
public void loadspatial(java.lang.String filename)load node spatial constraints determines the preferred domain for hosting the VNF -
loadedgew
public void loadedgew(java.lang.String filename)load edge demands from file -
makespatial
public void makespatial(int[] a) -
setspatial
public void setspatial()set spatial constraints on or off -
defspatial
public void defspatial(int a)define spatial constraint in a single node of the substrate network -
defspatial
public void defspatial(int a, int v)define spatial constraint of a single virtual node in a single node of the substrate network -
setspatialconstraint
public void setspatialconstraint(boolean b)set spatial constraints on or off -
remspatial
public void remspatial()remove spatial constraints -
hasspatial
public boolean hasspatial()are there spatial constraints? -
setpartitioning
public void setpartitioning(int[] apartitioning)set partitioning array, used when this VNFgraph object represents a partition of a larger VNF-graph the partitioning array maps the VNFs of this graph as nodes of the larger graph -
setmapping
public void setmapping(int[] a)set mapping as computed by the controller -
getmapping
public int[] getmapping()get stored mapping -
getpartitioning
public int[] getpartitioning()when this VNFgraph object represents a partition of a larger VNF-graph get the partitioning array that maps the VNFs of this graph as nodes of the larger graph -
getspatial
public int[] getspatial()get spatial constraints -
getedges
public int getedges()get number of edges -
getnodes
public int getnodes()get number of nodes -
getmaxnodew
public int getmaxnodew()get maximum capacity demand -
getmaxacedgew
public int getmaxacedgew()get maximum bandwidth demand -
getminnodew
public int getminnodew()get minimum capacity demand -
getminedgew
public int getminedgew()get minimum bandwidth demands -
getgraph
public int[] getgraph()get graph in Edge Vector format -
getnodew
public int[] getnodew()get capacity demands for all nodes -
getedgew
public int[] getedgew()get bandwidth demands for all edges -
getnodedem
public int getnodedem(int w)get demand for single virtual node -
getnodeacw
public int getnodeacw(int i)get the total bandwidth demands form the links connected in given node -
getnodeacw
public int[] getnodeacw()computes the total bandwidth demands for all nodes -
cpugetdemand
public int cpugetdemand()get total capacity demand -
getbanddemand
public int getbanddemand()get total bandwidth demand -
getsortednode
public int getsortednode(int i)get sorted nodes -
getsegflows
public int[] getsegflows()get flows between partitions -
getsegbands
public int[] getsegbands()get bandwidth demands between partitions
-