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) int cnt
    counter for the number of times a solution was computed
    (package private) boolean criterion
    Complexity reduction criterion.
    (package private) java.lang.Double cumdem
    cumulative 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.Double fitness
    output fitness
    (package private) int inputs
    number of ANN input nodes
    (package private) nnetwork.ANNMain m
    Artificial Neural Network for machine learning algorithm
    (package private) java.lang.Double maxdem
    maximum node demand
    (package private) int maxsfcsize
    maximum sfc size equals the output of the algorithm
    (package private) java.lang.Double mindem
    minimum node demand
    (package private) java.util.ArrayList<java.lang.Double[]> nodes
    cluster nodes
    (package private) java.util.ArrayList<java.lang.Double[]> nodessort
    cluster nodes sorted
    (package private) int[] output
    algorithm output
    (package private) double[] resmodel  
    (package private) int[] solution
    solution
    (package private) int tem1
    number 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[] tempsol
    temporary solution
    (package private) java.lang.String type
    agent type set "hypergraph" for single agent in multi-domain controller, "default" for other use
    (package private) java.util.ArrayList<java.lang.Double> vnfdem
    demands of VNF virtual node
    (package private) int vnfsize
    VNF-graph size
  • Constructor Summary

    Constructors
    Constructor Description
    Agent()  
    Agent​(boolean criterion)  
    Agent​(java.lang.String type)  
  • Method Summary

    Modifier and Type Method Description
    void compute​(int mod)
    the computations executed by the agent
    void compute_greedy()
    Compute distributed greedy algorithm.
    void compute_runNN()
    Run neural network.
    void compute_trainNN()
    Train neural network.
    void flag0​(java.lang.Double[] a)
    Flag0 of incoming messages.
    void flag1​(java.lang.Double[] a)
    Flag1 of incoming messages.
    void flag2​(int a)
    Flag2 of incoming messages.
    void flag3()
    Flag3 of incoming messages.
    void flag4​(int a)
    Flag4 of incoming messages.
    nnetwork.ANNMain getANNMain()  
    int getclustersize()
    Get cluster sized.
    double[] getcurrentmodel()
    Get current model.
    java.lang.Double getfitness()
    Get fitness of generated mapping.
    void getmessage​(network.Message m)
    Messages from controller.
    int[] getnodes()
    Get nodes that the agent computes.
    void getnodessort​(int index)
    Get the sorted nodes.
    void getnodew()
    Get the weight of the nodes that are computed.
    int[] getoutput()
    Get computation output.
    double[] getresmodel()
    Get solution model.
    void setmaxsfcsize​(int s)
    Set maximum sfc size equals the output of the algorithm.
    void storedatainfile​(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 type
      agent type set "hypergraph" for single agent in multi-domain controller, "default" for other use
    • nodes

      java.util.ArrayList<java.lang.Double[]> nodes
      cluster nodes
    • nodessort

      java.util.ArrayList<java.lang.Double[]> nodessort
      cluster nodes sorted
    • vnfdem

      java.util.ArrayList<java.lang.Double> vnfdem
      demands of VNF virtual node
    • tempsol

      int[] tempsol
      temporary solution
    • solution

      int[] solution
      solution
    • output

      int[] output
      algorithm output
    • fitness

      java.lang.Double fitness
      output fitness
    • mindem

      java.lang.Double mindem
      minimum node demand
    • maxdem

      java.lang.Double maxdem
      maximum node demand
    • cumdem

      java.lang.Double cumdem
      cumulative virtual node demands applied in all attempts to compute a valid mapping these include using trained models and training new models
    • vnfsize

      int vnfsize
      VNF-graph size
    • tem1

      int tem1
      number 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 maxsfcsize
      maximum sfc size equals the output of the algorithm
    • m

      nnetwork.ANNMain m
      Artificial Neural Network for machine learning algorithm
    • inputs

      int inputs
      number of ANN input nodes
    • cnt

      int cnt
      counter for the number of times a solution was computed
    • criterion

      boolean criterion
      Complexity 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()