Package controller
Class Agent
java.lang.Object
controller.Agent
public class Agent
extends java.lang.Object
agent that runs on every node of the network
-
Field Summary
Fields Modifier and Type Field Description (package private) intcntcounter for the number of times a solution was computed(package private) booleancriterionComplexity reduction criterion.(package private) java.lang.Doublecumdemcumulative virtual node demands applied in all attempts to compute a valid mapping these include using trained models and training new models(package private) double[]currentmodel(package private) java.lang.Doublefitnessoutput fitness(package private) intinputsnumber of ANN input nodes(package private) nnetwork.ANNMainmArtificial Neural Network for machine learning algorithm(package private) java.lang.Doublemaxdemmaximum node demand(package private) intmaxsfcsizemaximum sfc size equals the output of the algorithm(package private) java.lang.Doublemindemminimum node demand(package private) java.util.ArrayList<java.lang.Double[]>nodescluster nodes(package private) java.util.ArrayList<java.lang.Double[]>nodessortcluster nodes sorted(package private) int[]outputalgorithm output(package private) double[]resmodel(package private) int[]solutionsolution(package private) inttem1number of cluster nodes inputted to ANN, this enables the nodes that the ANN accepts as input to be a subset of the cluster nodes(package private) int[]tempsoltemporary solution(package private) java.lang.Stringtypeagent type set "hypergraph" for single agent in multi-domain controller, "default" for other use(package private) java.util.ArrayList<java.lang.Double>vnfdemdemands of VNF virtual node(package private) intvnfsizeVNF-graph size -
Constructor Summary
-
Method Summary
Modifier and Type Method Description voidcompute(int mod)the computations executed by the agentvoidcompute_greedy()Compute distributed greedy algorithm.voidcompute_runNN()Run neural network.voidcompute_trainNN()Train neural network.voidflag0(java.lang.Double[] a)Flag0 of incoming messages.voidflag1(java.lang.Double[] a)Flag1 of incoming messages.voidflag2(int a)Flag2 of incoming messages.voidflag3()Flag3 of incoming messages.voidflag4(int a)Flag4 of incoming messages.nnetwork.ANNMaingetANNMain()intgetclustersize()Get cluster sized.double[]getcurrentmodel()Get current model.java.lang.Doublegetfitness()Get fitness of generated mapping.voidgetmessage(network.Message m)Messages from controller.int[]getnodes()Get nodes that the agent computes.voidgetnodessort(int index)Get the sorted nodes.voidgetnodew()Get the weight of the nodes that are computed.int[]getoutput()Get computation output.double[]getresmodel()Get solution model.voidsetmaxsfcsize(int s)Set maximum sfc size equals the output of the algorithm.voidstoredatainfile(java.lang.String dt)Store data in a file.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
type
java.lang.String typeagent type set "hypergraph" for single agent in multi-domain controller, "default" for other use -
nodes
java.util.ArrayList<java.lang.Double[]> nodescluster nodes -
nodessort
java.util.ArrayList<java.lang.Double[]> nodessortcluster nodes sorted -
vnfdem
java.util.ArrayList<java.lang.Double> vnfdemdemands of VNF virtual node -
tempsol
int[] tempsoltemporary solution -
solution
int[] solutionsolution -
output
int[] outputalgorithm output -
fitness
java.lang.Double fitnessoutput fitness -
mindem
java.lang.Double mindemminimum node demand -
maxdem
java.lang.Double maxdemmaximum node demand -
cumdem
java.lang.Double cumdemcumulative virtual node demands applied in all attempts to compute a valid mapping these include using trained models and training new models -
vnfsize
int vnfsizeVNF-graph size -
tem1
int tem1number of cluster nodes inputted to ANN, this enables the nodes that the ANN accepts as input to be a subset of the cluster nodes -
maxsfcsize
int maxsfcsizemaximum sfc size equals the output of the algorithm -
m
nnetwork.ANNMain mArtificial Neural Network for machine learning algorithm -
inputs
int inputsnumber of ANN input nodes -
cnt
int cntcounter for the number of times a solution was computed -
criterion
boolean criterionComplexity reduction criterion. -
resmodel
double[] resmodel -
currentmodel
double[] currentmodel
-
-
Constructor Details
-
Agent
public Agent() -
Agent
public Agent(java.lang.String type) -
Agent
public Agent(boolean criterion)
-
-
Method Details
-
compute
public void compute(int mod)the computations executed by the agent -
compute_runNN
public void compute_runNN()Run neural network. -
compute_trainNN
public void compute_trainNN()Train neural network. -
compute_greedy
public void compute_greedy()Compute distributed greedy algorithm. -
getresmodel
public double[] getresmodel()Get solution model. -
storedatainfile
public void storedatainfile(java.lang.String dt)Store data in a file. -
flag0
public void flag0(java.lang.Double[] a)Flag0 of incoming messages. -
flag1
public void flag1(java.lang.Double[] a)Flag1 of incoming messages. -
flag2
public void flag2(int a)Flag2 of incoming messages. -
flag3
public void flag3()Flag3 of incoming messages. -
flag4
public void flag4(int a)Flag4 of incoming messages. -
getoutput
public int[] getoutput()Get computation output. -
getfitness
public java.lang.Double getfitness()Get fitness of generated mapping. -
getcurrentmodel
public double[] getcurrentmodel()Get current model. -
getnodes
public int[] getnodes()Get nodes that the agent computes. -
getnodew
public void getnodew()Get the weight of the nodes that are computed. -
getnodessort
public void getnodessort(int index)Get the sorted nodes. -
getclustersize
public int getclustersize()Get cluster sized. -
getmessage
public void getmessage(network.Message m)Messages from controller. -
setmaxsfcsize
public void setmaxsfcsize(int s)Set maximum sfc size equals the output of the algorithm. -
getANNMain
public nnetwork.ANNMain getANNMain()
-