Package sfc_ft_a
Class Mapping
java.lang.Object
sfc_ft_a.Mapping
public class Mapping
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>availnodesavailable nodes, substrate nodes that have enough available capacity to host the minimum demand VNFprivate int[]avcapavailable capacity(package private) intcnodesVNF nodes (cnodes)private doublefitnessfitness for this mappingprivate int[]mappingstores the mapping, the value in mapping[i] is the ID of the substrate node that hosts virtual node i(package private) intpnodessubstrate network nodes (pnodes) -
Constructor Summary
Constructors Constructor Description Mapping()Mapping(double f, int[] m)initialize the object on given mapping and fitnessMapping(int cnodes)constructs empty mapping objectMapping(int[] c)initialize the object on given mappingMapping(int cnodes, int vnodes)constructs random mapping objects, no constraints are consideredMapping(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 VNFMapping(java.lang.String[] c)initialize object on given mapping -
Method Summary
Modifier and Type Method Description voidchange(int index, int value)change values of the mappingjava.lang.String[]changem(int index, int value)change values of the mapping and return mappingint[]getavcap()get available capacitydoublegetfitness()get fitnessint[]getmapping()get mappingintgetmnode(int index)get mapped nodejava.lang.String[]getstringmap()mapping to stringvoidrandommapping()generate random mapping, no constraints are consideredvoidrandommapping2()generate random mapping, considering node available capacityvoidsetavcap(int ind, int c)set avialable capacityvoidsetfitness(double newfit)set fitnessvoidsetmapping(int[] ma)set mappingvoidstats()mapping statisticsvoidstrtomap(java.lang.String[] c)string to mapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
mapping
private int[] mappingstores the mapping, the value in mapping[i] is the ID of the substrate node that hosts virtual node i -
cnodes
int cnodesVNF nodes (cnodes) -
pnodes
int pnodessubstrate network nodes (pnodes) -
fitness
private double fitnessfitness for this mapping -
avcap
private int[] avcapavailable capacity -
availnodes
java.util.ArrayList<java.lang.Integer> availnodesavailable nodes, substrate nodes that have enough available capacity to host the minimum demand VNF
-
-
Constructor Details
-
Mapping
public Mapping() -
Mapping
public Mapping(int cnodes)constructs empty mapping object -
Mapping
public Mapping(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
public Mapping(int cnodes, int vnodes)constructs random mapping objects, no constraints are considered -
Mapping
public Mapping(int[] c)initialize the object on given mapping -
Mapping
public Mapping(java.lang.String[] c)initialize object on given mapping -
Mapping
public Mapping(double 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 avialable 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 -
getmnode
public int getmnode(int index)get mapped node -
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
-