Class EquNetNeural

  • Direct Known Subclasses:
    EquNetNeuralFix, EquNetNeuralMov

    public abstract class EquNetNeural
    extends EquNet
    An EqualizationNet EquNetNeural model with transitions, places and their state. It is loaded from a net file. The time to browse is calculated with a neural network/IA. It is an abstract class which extends EquNet, its subclass are EquNetNeuralFix and EquNetNeuralMov.

    Neural Net class diagram

    • Field Detail

      • nnet

        public org.neuroph.core.NeuralNetwork nnet
    • Constructor Detail

      • EquNetNeural

        public EquNetNeural​(String fname)
                     throws FileNotFoundException
        instantiate EquNetNeural, set the input file path and load the neural network used as specified in the input file as neuralNet:pathInTheNeuralFolder
        Throws:
        FileNotFoundException
    • Method Detail

      • displayWeights

        public void displayWeights()
        display the weights of the connections of the neural network loaded in the console
      • setNeuralNetwork

        public void setNeuralNetwork​(org.neuroph.core.NeuralNetwork neuralNetwork)
        set the neural network to use as the regulation during the simulation
      • getNnet

        public org.neuroph.core.NeuralNetwork getNnet()
        get the neural network used as the regulation during the simulation
      • getNnetPath

        public String getNnetPath()
        get the path of the neural network used as the regulation during the simulation
      • saveNeuralNetwork

        public void saveNeuralNetwork​(String pathToData,
                                      int outOfTargetNb,
                                      float value,
                                      float averageSpeed,
                                      float time,
                                      boolean setNnet)
        save the current neural network and stats in pathToData they are in the neural folder
        Parameters:
        outOfTargetNb -
        averageSpeed -
        averageTimeElapsed -
        value - : timeElapsed + beta * |targetSpeed - averageSpeed|
      • reset

        public void reset​(boolean value)
        Description copied from class: PhysicalModel
        reset the network model to its initial status
        Overrides:
        reset in class EquNet
      • getTargetSpeed

        public int getTargetSpeed()
        get the target speed as specified in the input file as a line : targetSpeed:value it is used in statsAndTask.OptimizeNeuralNetTask in the MochyUi project where it is seeked to minimize (timeElapsed + beta * |targetSpeed - averageSpeed|)
      • getBeta

        public float getBeta()
        get the beta coefficient as specified in the input file as a line : beta:value it is used in statsAndTask.OptimizeNeuralNetTask in the MochyUi project where it is seeked to minimize (timeElapsed + beta * |targetSpeed - averageSpeed|)