Package sfc_ft_c
Class Mapping_c
java.lang.Object
sfc_ft_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 VNFprivate int[]
avcap
available capacity(package private) int
cnodes
VNF nodes (cnodes)private double
fitness
fitness for this mappingprivate 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 objectMapping_c(int[] c)
initialize the object on given mappingMapping_c(int cnodes, int vnodes)
constructs random mapping objects, no constraints are consideredMapping_c(int f, int[] m)
initialize the object on given mapping and fitnessMapping_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 VNFMapping_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 mappingjava.lang.String[]
changem(int index, int value)
change values of the mapping and return mappingint[]
getavcap()
get available capacitydouble
getfitness()
get fitnessint[]
getmapping()
get mappingjava.lang.String[]
getstringmap()
mapping to stringvoid
randommapping()
generate random mapping, no constraints are consideredvoid
randommapping2()
generate random mapping, considering node available capacityvoid
setavcap(int ind, int c)
set available capacityvoid
setfitness(double newfit)
set fitnessvoid
setmapping(int[] ma)
set mappingvoid
stats()
mapping statisticsvoid
strtomap(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 vistrual 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_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
-