- java.lang.Object
-
- fr.inria.mochy.core.abstractClass.PhysicalModel
-
- fr.inria.mochy.core.equalization.EquNet
-
- fr.inria.mochy.core.equalization.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.
-
-
Field Summary
Fields Modifier and Type Field Description org.neuroph.core.NeuralNetwork
nnet
-
Fields inherited from class fr.inria.mochy.core.equalization.EquNet
blocked, enabled, fireable, garage, initialState, places, transitions
-
Fields inherited from class fr.inria.mochy.core.abstractClass.PhysicalModel
discreteStep, fname, nbDiscreteSteps, nbTokens, startLogs, stepsNb, timeElapsed, tokens
-
-
Constructor Summary
Constructors Constructor Description EquNetNeural(String fname)
instantiate EquNetNeural, set the input file path and load the neural network used as specified in the input file as neuralNet:pathInTheNeuralFolder
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
displayWeights()
display the weights of the connections of the neural network loaded in the consolefloat
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|)org.neuroph.core.NeuralNetwork
getNnet()
get the neural network used as the regulation during the simulationString
getNnetPath()
get the path of the neural network used as the regulation during the simulationint
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|)String
loadFile()
called to load the input model filevoid
reset(boolean value)
reset the network model to its initial statusvoid
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 foldervoid
setNeuralNetwork(org.neuroph.core.NeuralNetwork neuralNetwork)
set the neural network to use as the regulation during the simulation-
Methods inherited from class fr.inria.mochy.core.equalization.EquNet
addInFlow, addOutFlow, addToken, discreteMove, discreteMove, drop, dropConfig, findPlace, findTransition, findTransition, fireableTransition, getALPHA, getAverage, getAvgSpeed, getClock, getControlPlace, getControlPlaces, getCurrentAvgSpeed, getCurrentMaxSpeed, getCurrentMinSpeed, getDistanceInNetwork, getDistanceInPlace, getEnabled, getFirable, getLastTokenSpeed, getLastTokenTtb, getNbDiscreteSteps, getPlaces, getRANGE_NOISE, getSpeed, getStandardDeviation, getStandardDeviation, getTimeElapsed, getTimeToBrowse, getTokens, getTotalDistance, getTransitionClock, getTransitions, getWeibullCoef, handleLine, insertToken, isBlocked, isDiscreteMove, isGaussian, isWeibull, maxAllowedTimedMove, multipleSteps, numberBlocked, numberFireable, resetSpeedData, setALPHA, setBunchingState, setRANGE_NOISE
-
Methods inherited from class fr.inria.mochy.core.abstractClass.PhysicalModel
discreteMove, getStepsNb, isDiscreteStep, minimumClock, progressTime
-
-
-
-
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
-
loadFile
public String loadFile()
Description copied from class:PhysicalModel
called to load the input model file
-
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
-
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|)
-
-