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 defined
    int 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 controller
    int maxacedgew
    maximum accumulated edge weight
    int maxedgew
    maximum edge weight
    int maxnodew
    maximum node weight
    int minedgew
    minimum edge weight
    int minnodew
    minimum node weight
    (package private) int[] nodeacw
    node accumulated weights
    int 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 partitions
    int[] spatial
    spatial constraints, preferred domains
  • Constructor Summary

    Constructors
    Constructor Description
    VNFgraph​(int[] graph, int[] nodew, int[] edgew, int[] spatial, int[] partitioning, int[] segflows, int[] segbands)  
    VNFgraph​(int vnfs, int lowcap, int maxcap, int lowband, int maxband, int branchnum)  
    VNFgraph​(java.lang.String filename)  
  • Method Summary

    Modifier and Type Method Description
    int cpugetdemand()
    get total capacity demand
    void defspatial​(int a)
    define spatial constraint in a single node of the substrate network
    void defspatial​(int a, int v)
    define spatial constraint of a single virtual node in a single node of the substrate network
    void demands()
    updates minimum and maximum demand values
    void gengraph​(int vnfs, int lowcap, int maxcap, int lowband, int maxband, int branchnum)
    generate random VNF-graph
    int getbanddemand()
    get total bandwidth demand
    int getedges()
    get number of edges
    int[] getedgew()
    get bandwidth demands for all edges
    int[] getgraph()
    get graph in Edge Vector format
    int[] getmapping()
    get stored mapping
    int getmaxacedgew()
    get maximum bandwidth demand
    int getmaxnodew()
    get maximum capacity demand
    int getminedgew()
    get minimum bandwidth demands
    int getminnodew()
    get minimum capacity demand
    int[] getnodeacw()
    computes the total bandwidth demands for all nodes
    int getnodeacw​(int i)
    get the total bandwidth demands form the links connected in given node
    int getnodedem​(int w)
    get demand for single virtual node
    int getnodes()
    get number of nodes
    int[] getnodew()
    get capacity demands for all nodes
    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
    int[] getsegbands()
    get bandwidth demands between partitions
    int[] getsegflows()
    get flows between partitions
    int getsortednode​(int i)
    get sorted nodes
    int[] getspatial()
    get spatial constraints
    boolean hasspatial()
    are there spatial constraints?
    void loadEdgeVector()
    load graph from file in edge vector format
    void loadedgew​(java.lang.String filename)
    load edge demands from file
    void loadnodew​(java.lang.String filename)
    load node demands from file
    void loadspatial​(java.lang.String filename)
    load node spatial constraints determines the preferred domain for hosting the VNF
    void makespatial​(int[] a)  
    void nodeacw()
    computes the total bandwidth demands of all the virtual links connected on every VNF
    void nodedemsort()
    sorts nodes in ascending order based on their capacity demands
    void remspatial()
    remove spatial constraints
    void setmapping​(int[] a)
    set mapping as computed by the controller
    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
    void setspatial()
    set spatial constraints on or off
    void setspatialconstraint​(boolean b)
    set spatial constraints on or off

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • graph

      int[] graph
      graph in Edge Vector format
    • nodew

      int[] nodew
      node weights
    • edgew

      int[] edgew
      edge weights
    • nodeacw

      int[] nodeacw
      node accumulated weights
    • nodesort

      int[] nodesort
      sorted nodes
    • edges

      public int edges
      number of edges
    • nodes

      public int nodes
      number of nodes
    • maxnodew

      public int maxnodew
      maximum node weight
    • maxedgew

      public int maxedgew
      maximum edge weight
    • maxacedgew

      public int maxacedgew
      maximum accumulated edge weight
    • minnodew

      public int minnodew
      minimum node weight
    • minedgew

      public int minedgew
      minimum edge weight
    • spatial

      public int[] spatial
      spatial constraints, preferred domains
    • mapping

      public int[] mapping
      mapping to a datacenter as assigned by controller
    • hasspatial

      boolean hasspatial
      does it have spatial constraints?
    • defnodew

      int defnodew
      default node weight in case it is not defined
    • defedgew

      int defedgew
      default edge weight in case it is not defined
    • cpudemand

      int cpudemand
      default cpu demand in case it is not defined
    • banddemand

      int banddemand
      default bandwidth demand in case it is not defined
    • filename

      java.lang.String filename
      name of file VNFgraph
    • codec

      Codec codec
    • partitioning

      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
    • segflows

      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 partitions
    • segbands

      int[] segbands
      bandwidth 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