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) intbanddemanddefault bandwidth demand in case it is not defined(package private) Codeccodec(package private) intcpudemanddefault cpu demand in case it is not defined(package private) intdefedgewdefault edge weight in case it is not defined(package private) intdefnodewdefault node weight in case it is not definedintedgesnumber of edges(package private) int[]edgewedge weights(package private) java.lang.Stringfilenamename of file VNFgraph(package private) int[]graphgraph in Edge Vector format(package private) booleanhasspatialdoes it have spatial constraints?int[]mappingmapping to a datacenter as assigned by controllerintmaxacedgewmaximum accumulated edge weightintmaxedgewmaximum edge weightintmaxnodewmaximum node weightintminedgewminimum edge weightintminnodewminimum node weight(package private) int[]nodeacwnode accumulated weightsintnodesnumber of nodes(package private) int[]nodesortsorted nodes(package private) int[]nodewnode weights(package private) 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(package private) int[]segbandsbandwidth demands for links between partitions(package private) 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 partitionsint[]spatialspatial constraints, preferred domains -
Constructor Summary
-
Method Summary
Modifier and Type Method Description intcpugetdemand()get total capacity demandvoiddefspatial(int a)define spatial constraint in a single node of the substrate networkvoiddefspatial(int a, int v)define spatial constraint of a single virtual node in a single node of the substrate networkvoiddemands()updates minimum and maximum demand valuesvoidgengraph(int vnfs, int lowcap, int maxcap, int lowband, int maxband, int branchnum)generate random VNF-graphintgetbanddemand()get total bandwidth demandintgetedges()get number of edgesint[]getedgew()get bandwidth demands for all edgesint[]getgraph()get graph in Edge Vector formatint[]getmapping()get stored mappingintgetmaxacedgew()get maximum bandwidth demandintgetmaxnodew()get maximum capacity demandintgetminedgew()get minimum bandwidth demandsintgetminnodew()get minimum capacity demandint[]getnodeacw()computes the total bandwidth demands for all nodesintgetnodeacw(int i)get the total bandwidth demands form the links connected in given nodeintgetnodedem(int w)get demand for single virtual nodeintgetnodes()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 partitionsintgetsortednode(int i)get sorted nodesint[]getspatial()get spatial constraintsbooleanhasspatial()are there spatial constraints?voidloadEdgeVector()load graph from file in edge vector formatvoidloadedgew(java.lang.String filename)load edge demands from filevoidloadnodew(java.lang.String filename)load node demands from filevoidloadspatial(java.lang.String filename)load node spatial constraints determines the preferred domain for hosting the VNFvoidmakespatial(int[] a)voidnodeacw()computes the total bandwidth demands of all the virtual links connected on every VNFvoidnodedemsort()sorts nodes in ascending order based on their capacity demandsvoidremspatial()remove spatial constraintsvoidsetmapping(int[] a)set mapping as computed by the controllervoidsetpartitioning(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 graphvoidsetspatial()set spatial constraints on or offvoidsetspatialconstraint(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
-