IGLib
1.7.2
The IGLib base library for development of numerical, technical and business applications.
|
File manager for neural network approximation file client and server. More...
Public Member Functions | |
NeuraApproximationFileManager (string directoryPath) | |
Nonstruct a new file manager for neural approximation file client/server that operates in the specified directory. More... | |
string | GetPath (string fileOrDirectoryName) |
Returns full path of the file or directory with the specified relative path within the data directory of the current file server/client. More... | |
void | SetNeuralBusy () |
Sets the falg that indicates that the approximation server is busy. More... | |
void | ClearNeuralBusy () |
Clears the falg that indicates that the approximation server is busy. More... | |
bool | IsNeuralBusy () |
Returns value of the falg that indicates whether the approximation server is busy. More... | |
void | SetNeuralInputReady () |
Sets the falg that indicates that the approximation input data is ready. More... | |
void | ClearNeuralInputReady () |
Clears the falg that indicates that the approximation input data is ready. More... | |
bool | IsNeuralInputReady () |
Returns value of the falg that indicates whether the approximation input data is ready. More... | |
void | SetNeuralOutputReady () |
Sets the falg that indicates that the approximation output data is ready. More... | |
void | ClearNeuralOutputReady () |
Clears the falg that indicates that the approximation output data is ready. More... | |
bool | IsNeuralOutputReady () |
Returns value of the falg that indicates whether the approximation output data is ready. More... | |
void | ClearMessages () |
Clears all messages for neural approximation client and server. More... | |
virtual void | ReadNeuralInput (ref IVector inputParameters) |
Reads neural approximator input parameters form the file at standard location. More... | |
virtual void | WriteNeuralInput (IVector inputParameters) |
Writes neural approximator input parameters to standard location. More... | |
virtual void | ReadNeuralOutput (ref IVector outputValues) |
Reads neural approximator output values from the file at standard location. More... | |
virtual void | WriteNeuralOutput (IVector outputValues) |
Writes neural approximator outut values to the file at standard location. More... | |
virtual void | LoadNeuralNetwork (ref INeuralApproximator trainedNetwork) |
Loads the trained neural network approximator from the file at standard location. More... | |
virtual void | ClientWriteNeuralInput (IVector inputParameters) |
Client writes input parameters for calculation of neural network based approximated values. Messages are set nad clears appropriately. More... | |
virtual void | ClientReadNeuralOutput (ref IVector outputValues) |
Client reads the results of neural network-based approximation (output values). Messages are set and clears appropriately. More... | |
virtual void | ClientSendRequestCalculateApproximation () |
Performs request to the server for calculation of neural network based approximated values. More... | |
virtual void | ClientCalculateApproximation (IVector inputParameters, ref IVector outputValues) |
Calculates approximation by using the neural network approximation server. More... | |
virtual void | ClientTestCalculateApproximation (string inputFilePath, string outputFilePath) |
Performs client-side test calculation of neural network based approximation where input parameters are read from a specified JSON file, and calculated output values are written to the specified file. More... | |
virtual void | ServerCalculateApproximation () |
Performs neural network-based approximation at prescribed input parameters and saves results. Messages are set and cleared appropriately. This method read input parameters from standard location, loads trained neural network, calculates approximated outpur values and stores them to the standard location. More... | |
Protected Attributes | |
string | _dataDirectory = null |
Properties | |
object | Lock [get] |
This object's central lock object to be used by other object. Do not use this object for locking in class' methods, for this you should use InternalLock. More... | |
object | InternalLock [get] |
Used internally for locking access to internal fields. More... | |
string | DataDirectory [get, protected set] |
Directory for data and messages exchange through files. More... | |
string | NeuralNetworkPath [get, protected set] |
File path of the file where complete (usually trained) neural network is stored. Setter takes only pure file name, without path information. If set to null then file path is set to null and will be recalculated when getter is called. More... | |
string | NeuralDataDefinitionPath [get, protected set] |
File path of the input and output data definition file. Setter takes only pure file name, without path information. If set to null then file path is set to null and will be recalculated when getter is called. More... | |
string | SimulationDataDefinitionPath [get, protected set] |
File path of the input and output data definition file for simulator. Setter takes only pure file name, without path information. If set to null then file path is set to null and will be recalculated when getter is called. More... | |
string | NeuralVerificationDataPath [get, protected set] |
File path of the verification data file. Setter takes only pure file name, without path information. If set to null then file path is set to null and will be recalculated when getter is called. More... | |
string | NeuralTrainingDataPath [get, protected set] |
File path of the training data file. Setter takes only pure file name, without path information. If set to null then file path is set to null and will be recalculated when getter is called. More... | |
string | NeuralInputPath [get, protected set] |
File path of the file with input parameters. Setter takes only pure file name, without path information. If set to null then file path is set to null and will be recalculated when getter is called. More... | |
string | NeuralInputXmlPath [get, protected set] |
File path of the input parameters file in XML format. Setter takes only pure file name, without path information. If set to null then file path is set to null and will be recalculated when getter is called. More... | |
string | NeuralOutputPath [get, protected set] |
File path of the file for storing approximated output values. Setter takes only pure file name, without path information. If set to null then file path is set to null and will be recalculated when getter is called. More... | |
string | NeuralOutputeXmlPath [get, protected set] |
File path of the file for storing approximated output values in XML format. Setter takes only pure file name, without path information. If set to null then file path is set to null and will be recalculated when getter is called. More... | |
string | MsgNeuralBusyPath [get, protected set] |
File path of the message file indicating that approximator is busy by performing a job. Setter takes only pure file name, without path information. If set to null then file path is set to null and will be recalculated when getter is called. More... | |
string | MsgNeuralInputReadyPath [get, protected set] |
File path of the message file indicating taht input data is ready to be processed. Setter takes only pure file name, without path information. If set to null then file path is set to null and will be recalculated when getter is called. More... | |
string | MsgNeuralOutputReadyPath [get, protected set] |
File path of the message file indicating that the approximated output is ready to be read. Setter takes only pure file name, without path information. If set to null then file path is set to null and will be recalculated when getter is called. More... | |
Properties inherited from IG.Lib.ILockable | |
object | Lock [get] |
Private Member Functions | |
NeuraApproximationFileManager () | |
File manager for neural network approximation file client and server.
This class is modelled after the DragonFly optimization server.
$A Igor Apr11;
|
inlineprivate |
|
inline |
Nonstruct a new file manager for neural approximation file client/server that operates in the specified directory.
directoryPath | Operation directory for data and message exchange through files. |
|
inline |
Returns full path of the file or directory with the specified relative path within the data directory of the current file server/client.
fileOrDirectoryName | Relative path (with respect to data and messages exchange directory) |
|
inline |
Sets the falg that indicates that the approximation server is busy.
Referenced by IG.Neural.NeuralAllpicationCommands.CmdNeuralCalculateApproximationServer(), and IG.Neural.NeuralAllpicationCommands.CmdNeuralCalculateMappingApproximationServer().
|
inline |
Clears the falg that indicates that the approximation server is busy.
Referenced by IG.Neural.NeuralAllpicationCommands.CmdNeuralCalculateApproximationServer(), and IG.Neural.NeuralAllpicationCommands.CmdNeuralCalculateMappingApproximationServer().
|
inline |
Returns value of the falg that indicates whether the approximation server is busy.
|
inline |
Sets the falg that indicates that the approximation input data is ready.
Referenced by IG.Neural.NeuralAllpicationCommands.CmdNeuralCalculateApproximationServer(), and IG.Neural.NeuralAllpicationCommands.CmdNeuralCalculateMappingApproximationServer().
|
inline |
Clears the falg that indicates that the approximation input data is ready.
|
inline |
Returns value of the falg that indicates whether the approximation input data is ready.
|
inline |
Sets the falg that indicates that the approximation output data is ready.
|
inline |
Clears the falg that indicates that the approximation output data is ready.
Referenced by IG.Neural.NeuralAllpicationCommands.CmdNeuralCalculateApproximationServer(), and IG.Neural.NeuralAllpicationCommands.CmdNeuralCalculateMappingApproximationServer().
|
inline |
Returns value of the falg that indicates whether the approximation output data is ready.
|
inline |
Clears all messages for neural approximation client and server.
|
inlinevirtual |
Reads neural approximator input parameters form the file at standard location.
inputParameters | Object where parameters are stored. |
References IG.Num.VectorBase.LoadJson().
|
inlinevirtual |
Writes neural approximator input parameters to standard location.
inputParameters | Parameters to be written. |
References IG.Num.VectorBase.SaveJson().
|
inlinevirtual |
Reads neural approximator output values from the file at standard location.
outputValues | Object where the read outut values are stored. |
References IG.Num.VectorBase.LoadJson().
|
inlinevirtual |
Writes neural approximator outut values to the file at standard location.
outputValues | Output values that are written. |
References IG.Num.VectorBase.SaveJson().
|
inlinevirtual |
Loads the trained neural network approximator from the file at standard location.
trainedNetwork | Object where the loaded neural network approximator is stored. |
References IG.Num.NeuralApproximatorBase.LoadJson().
|
inlinevirtual |
Client writes input parameters for calculation of neural network based approximated values. Messages are set nad clears appropriately.
inputParameters | Parameters to be written. |
|
inlinevirtual |
Client reads the results of neural network-based approximation (output values). Messages are set and clears appropriately.
outputValues |
|
inlinevirtual |
Performs request to the server for calculation of neural network based approximated values.
|
inlinevirtual |
Calculates approximation by using the neural network approximation server.
inputParameters | Intput parameters for which approximation is calculated. |
outputValues | Vector where approximation output values are stored. |
|
inlinevirtual |
Performs client-side test calculation of neural network based approximation where input parameters are read from a specified JSON file, and calculated output values are written to the specified file.
inputFilePath | Path to the JSON file where input parameters are read from. The file pointed at must exist. |
outputFilePath | Path of a file where the calculated approximated values are written to. It can be null or empty string, in this case parameters are not written to a file (but they are still output on console). |
References IG.Num.VectorBase.LoadJson(), and IG.Num.VectorBase.SaveJson().
|
inlinevirtual |
Performs neural network-based approximation at prescribed input parameters and saves results. Messages are set and cleared appropriately. This method read input parameters from standard location, loads trained neural network, calculates approximated outpur values and stores them to the standard location.
|
private |
|
private |
|
protected |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
get |
This object's central lock object to be used by other object. Do not use this object for locking in class' methods, for this you should use InternalLock.
|
getprotected |
Used internally for locking access to internal fields.
|
getprotected set |
Directory for data and messages exchange through files.
|
getprotected set |
File path of the file where complete (usually trained) neural network is stored. Setter takes only pure file name, without path information. If set to null then file path is set to null and will be recalculated when getter is called.
|
getprotected set |
File path of the input and output data definition file. Setter takes only pure file name, without path information. If set to null then file path is set to null and will be recalculated when getter is called.
Referenced by IG.Script.LoadableScriptShellNeuralBase.PrintNeuralData().
|
getprotected set |
File path of the input and output data definition file for simulator. Setter takes only pure file name, without path information. If set to null then file path is set to null and will be recalculated when getter is called.
|
getprotected set |
File path of the verification data file. Setter takes only pure file name, without path information. If set to null then file path is set to null and will be recalculated when getter is called.
|
getprotected set |
File path of the training data file. Setter takes only pure file name, without path information. If set to null then file path is set to null and will be recalculated when getter is called.
|
getprotected set |
File path of the file with input parameters. Setter takes only pure file name, without path information. If set to null then file path is set to null and will be recalculated when getter is called.
|
getprotected set |
File path of the input parameters file in XML format. Setter takes only pure file name, without path information. If set to null then file path is set to null and will be recalculated when getter is called.
|
getprotected set |
File path of the file for storing approximated output values. Setter takes only pure file name, without path information. If set to null then file path is set to null and will be recalculated when getter is called.
|
getprotected set |
File path of the file for storing approximated output values in XML format. Setter takes only pure file name, without path information. If set to null then file path is set to null and will be recalculated when getter is called.
|
getprotected set |
File path of the message file indicating that approximator is busy by performing a job. Setter takes only pure file name, without path information. If set to null then file path is set to null and will be recalculated when getter is called.
|
getprotected set |
File path of the message file indicating taht input data is ready to be processed. Setter takes only pure file name, without path information. If set to null then file path is set to null and will be recalculated when getter is called.
|
getprotected set |
File path of the message file indicating that the approximated output is ready to be read. Setter takes only pure file name, without path information. If set to null then file path is set to null and will be recalculated when getter is called.