Package sfc_c

Class Mapping_c

java.lang.Object
sfc_c.Mapping_c

public class Mapping_c
extends java.lang.Object
the mapping between the VNF and the substrate network
  • Field Summary

    Fields
    Modifier and Type Field Description
    (package private) java.util.ArrayList<java.lang.Integer> availnodes
    available nodes, substrate nodes that have enough available capacity to host the minimum demand VNF
    private int[] avcap
    available capacity
    (package private) int cnodes
    VNF nodes (cnodes)
    private double fitness
    fitness for this mapping
    private int[] mapping
    stores the mapping, the value in mapping[i] is the ID of the substrate node that hosts vistrual node i
    (package private) int pnodes
    substrate network nodes (pnodes)
  • Constructor Summary

    Constructors
    Constructor Description
    Mapping_c()  
    Mapping_c​(int cnodes)
    constructs empty mapping object
    Mapping_c​(int[] c)
    initialize the object on given mapping
    Mapping_c​(int cnodes, int vnodes)
    constructs random mapping objects, no constraints are considered
    Mapping_c​(int f, int[] m)
    initialize the object on given mapping and fitness
    Mapping_c​(int cnodes, java.util.ArrayList<java.lang.Integer> availnodes)
    constructs random mapping objects using the nodes of the substrate network that have the available capacity to host the minimum demand VNF
    Mapping_c​(java.lang.String[] c)
    initialize object on given mapping
  • Method Summary

    Modifier and Type Method Description
    void change​(int index, int value)
    change values of the mapping
    java.lang.String[] changem​(int index, int value)
    change values of the mapping and return mapping
    int[] getavcap()
    get available capacity
    double getfitness()
    get fitness
    int[] getmapping()
    get mapping
    java.lang.String[] getstringmap()
    mapping to string
    void randommapping()
    generate random mapping, no constraints are considered
    void randommapping2()
    generate random mapping, considering node available capacity
    void setavcap​(int ind, int c)
    set available capacity
    void setfitness​(double newfit)
    set fitness
    void setmapping​(int[] ma)
    set mapping
    void stats()
    mapping statistics
    void strtomap​(java.lang.String[] c)
    string to map

    Methods inherited from class java.lang.Object

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

    • mapping

      private int[] mapping
      stores the mapping, the value in mapping[i] is the ID of the substrate node that hosts vistrual node i
    • cnodes

      int cnodes
      VNF nodes (cnodes)
    • pnodes

      int pnodes
      substrate network nodes (pnodes)
    • fitness

      private double fitness
      fitness for this mapping
    • avcap

      private int[] avcap
      available capacity
    • availnodes

      java.util.ArrayList<java.lang.Integer> availnodes
      available nodes, substrate nodes that have enough available capacity to host the minimum demand VNF
  • Constructor Details

    • Mapping_c

      public Mapping_c()
    • Mapping_c

      public Mapping_c​(int cnodes)
      constructs empty mapping object
    • Mapping_c

      public Mapping_c​(int cnodes, java.util.ArrayList<java.lang.Integer> availnodes)
      constructs random mapping objects using the nodes of the substrate network that have the available capacity to host the minimum demand VNF
    • Mapping_c

      public Mapping_c​(int cnodes, int vnodes)
      constructs random mapping objects, no constraints are considered
    • Mapping_c

      public Mapping_c​(int[] c)
      initialize the object on given mapping
    • Mapping_c

      public Mapping_c​(java.lang.String[] c)
      initialize object on given mapping
    • Mapping_c

      public Mapping_c​(int f, int[] m)
      initialize the object on given mapping and fitness
  • Method Details

    • stats

      public void stats()
      mapping statistics
    • strtomap

      public void strtomap​(java.lang.String[] c)
      string to map
    • randommapping

      public void randommapping()
      generate random mapping, no constraints are considered
    • randommapping2

      public void randommapping2()
      generate random mapping, considering node available capacity
    • setavcap

      public void setavcap​(int ind, int c)
      set available capacity
    • getavcap

      public int[] getavcap()
      get available capacity
    • setfitness

      public void setfitness​(double newfit)
      set fitness
    • getmapping

      public int[] getmapping()
      get mapping
    • getstringmap

      public java.lang.String[] getstringmap()
      mapping to string
    • setmapping

      public void setmapping​(int[] ma)
      set mapping
    • getfitness

      public double getfitness()
      get fitness
    • change

      public void change​(int index, int value)
      change values of the mapping
    • changem

      public java.lang.String[] changem​(int index, int value)
      change values of the mapping and return mapping