NeurApp 1.1
NeurApp - software for exploring approximation by artificial neural networks on functions of one or two variables.
|
Loadable script base class for the shell application that includes tols for definition of optiimization problems, definition of vector response functions, a couple of interfaces with simulation programs, etc. AGREEMENTS: The first argument to initialization and executable method is working directory where data between different applications is exchanged. If overrigding the InitializeThis(...) method, call the base class' method first, and keep the agreement that the first argument must be the working directory. When implementing the executable (RunThis(...)) method, its first argument should also be the working directory (the same as for initialization). This is to enable use of the class in scenarios where initialization and execution arguments must be the same. More...
Classes | |
class | StoredScriptSettings |
In methods of this class you will find all the settings that apply to this script. More... | |
Public Member Functions | |
LoadableScriptShellBase () | |
virtual void | InitSimCastingRobert (string rootDirectory, string projectName, string simulationName) |
Initializes the data for casting simulation interface. | |
virtual void | InitSimConvectionRobert (string rootDirectory, string projectName, string simulationName) |
Initializes the data for Convection simulation interface. | |
virtual bool | RepairSimulationParameters (IVector parameters) |
Repairs simulation parameters, if necessary, in such a way that values are consistent with simuation data (e.g. spacing of nodes). | |
virtual void | SimulatorCalculateResponse (IResponseEvaluatorVectorSimple simulator, IVector inputParameters, ref IVector outputValues) |
Calculates vector response by the specified simulator, and stores output values to the specified vector variable. | |
void | SimulatorCalculateResponse (IVector parameters, ref IVector outputValues) |
Calculates vector response by the main simulator of the script, and stores output values to the specified vector variable. | |
Protected Member Functions | |
override void | InitializeThis (string[] arguments) |
Inializes the current script object. | |
virtual void | CreateNewSimulator (string simulatorPath, ref IResponseEvaluatorVectorSimple simulator) |
Creates a new simulator that uses the specified simulator directory, and stores it to the specified variable. This method always creates simulator anew, regardless of whether the variable to hold it is already assigned. | |
Protected Attributes | |
string | _simCastingRobertRootDirectory |
string | _simCastingRobertProjectName |
SimCastingRobertFileManager | _simCastingRobertFM |
string | _simConvectionRobertRootDirectory |
string | _simConvectionRobertProjectName |
ConvectionRobertFileManager | _simConvectionRobertFM |
ConvectionRev1RobertFileManager | _simConvectionRev1RobertFM |
string | _simKosecDirectoryRelativePath = "Code" |
string | _simKosecDirectory = null |
SimKosecFileManagerBase | _simKosecFM |
IResponseEvaluatorVectorSimple | _simulator |
string | _projectName |
string | _simulationName |
Properties | |
virtual string | SimCastingRobertRootDirectory [get, set] |
Root directory for casting simulator. | |
virtual string | SimCastingRobertProjectName [get, set] |
Project name for interfacing Robert Vertnik's casting simulator. | |
virtual string | SimCastingRobertSimulationName [get, set] |
Simulation name for interfacing Robert Vertnik's casting simulator. | |
virtual SimCastingRobertFileManager | SimCastingRobertFM [get, set] |
File manager for interfacing Robert Vertnik's casting simulator. Lazy evaluation: The object is created when first accessed, if possible. For this, ProjectName, SimulationName and SimCastingRobertRootDirectory must be defined. | |
virtual string | SimConvectionRobertRootDirectory [get, set] |
Root directory for Convection simulator. | |
virtual string | SimConvectionRobertProjectName [get, set] |
Project name for interfacing Robert Vertnik's Convection simulator. | |
virtual string | SimConvectionRobertSimulationName [get, set] |
Simulation name for interfacing Robert Vertnik's Convection simulator. | |
virtual ConvectionRobertFileManager | SimConvectionRobertFM [get, set] |
File manager for interfacing Robert Vertnik's casting simulator. Lazy evaluation: The object is created when first accessed, if possible. For this, ProjectName, SimulationName and SimCastingRobertRootDirectory must be defined. | |
virtual ConvectionRev1RobertFileManager | SimConvectionRev1RobertFM [get, set] |
File manager for interfacing Robert Vertnik's casting simulator. Lazy evaluation: The object is created when first accessed, if possible. For this, ProjectName, SimulationName and SimCastingRobertRootDirectory must be defined. | |
virtual string | SimKosecDirectoryRelativePath [get, set] |
Relative path of the directory that contains Kosec' simulation data, with respect to optimization directory. | |
string | SimKosecDirectory [get, set] |
Path so directory containing Kosec' simulator data. | |
virtual SimKosecFileManagerBase | SimKosecFM [get, set] |
File manager of simulatior of Gregor Kosec. | |
abstract IResponseEvaluatorVectorSimple | Simulator [get, set] |
Simulator that is used to calculate vector response. | |
virtual bool | SimulatorSuppressOutput [get, set] |
A flag indicating whether simulators should suppress output or not, default is false. Current value of this flag affects newly created simulators (usually this is implemented in the CreateNewSimulator method).Not all simulator interfaces support suppressing output, therefore for some simulator this flag has no effect. | |
virtual string | ProjectName [get, set] |
Name of the current project, used in some simulation and other interfaces. | |
virtual string | SimulationName [get, set] |
Name of the current simulation, used in some simulation and other interfaces. | |
Private Attributes | |
string | _simCastingRobertSimulationName |
string | _simConvectionRobertSimulationName |
bool | _simulatorSuppressOutput = false |
Loadable script base class for the shell application that includes tols for definition of optiimization problems, definition of vector response functions, a couple of interfaces with simulation programs, etc. AGREEMENTS: The first argument to initialization and executable method is working directory where data between different applications is exchanged. If overrigding the InitializeThis(...) method, call the base class' method first, and keep the agreement that the first argument must be the working directory. When implementing the executable (RunThis(...)) method, its first argument should also be the working directory (the same as for initialization). This is to enable use of the class in scenarios where initialization and execution arguments must be the same.
$A Igor Aug11;
IG::Lib::LoadableScriptShellBase::LoadableScriptShellBase | ( | ) | [inline] |
override void IG::Lib::LoadableScriptShellBase::InitializeThis | ( | string[] | arguments | ) | [inline, protected] |
Inializes the current script object.
arguments | Initialization arguments. The first argument must be the working directory path. |
Reimplemented in IG::Script::LoadableScriptShellNeuralIT, IG::Script::LoadableScriptShellNeuralITOriginal, IG::Script::LoadableScriptShellNeuralITOriginalBase, IG::Script::LoadableScriptShellNeural, and IG::Script::LoadableScriptShellNeuralBase.
virtual void IG::Lib::LoadableScriptShellBase::InitSimCastingRobert | ( | string | rootDirectory, |
string | projectName, | ||
string | simulationName | ||
) | [inline, virtual] |
Initializes the data for casting simulation interface.
rootDirectory | Root directory of the simulator. |
projectName | Simulator's project name. |
simulationName | Simulation name. |
virtual void IG::Lib::LoadableScriptShellBase::InitSimConvectionRobert | ( | string | rootDirectory, |
string | projectName, | ||
string | simulationName | ||
) | [inline, virtual] |
Initializes the data for Convection simulation interface.
rootDirectory | Root directory of the simulator. |
projectName | Simulator's project name. |
simulationName | Simulation name. |
virtual void IG::Lib::LoadableScriptShellBase::CreateNewSimulator | ( | string | simulatorPath, |
ref IResponseEvaluatorVectorSimple | simulator | ||
) | [inline, protected, virtual] |
Creates a new simulator that uses the specified simulator directory, and stores it to the specified variable. This method always creates simulator anew, regardless of whether the variable to hold it is already assigned.
simulatorPath | Path to the simulator directory. |
simuator | Variable where the created simulator is stored. |
In many scripts, it is this method that sould be overridden in order to sort out everything with respect to simulator creation.
virtual bool IG::Lib::LoadableScriptShellBase::RepairSimulationParameters | ( | IVector | parameters | ) | [inline, virtual] |
Repairs simulation parameters, if necessary, in such a way that values are consistent with simuation data (e.g. spacing of nodes).
parameters | Vector of parameters to be repaired. Repaired values are stored in the same vector. |
This method should be overridden in the derived classes, in the case that reparation can actual take place. The base class method does nothing (it only returns false).
virtual void IG::Lib::LoadableScriptShellBase::SimulatorCalculateResponse | ( | IResponseEvaluatorVectorSimple | simulator, |
IVector | inputParameters, | ||
ref IVector | outputValues | ||
) | [inline, virtual] |
Calculates vector response by the specified simulator, and stores output values to the specified vector variable.
simulator | Simulator used to calculate the response. |
inputParameters | Vector of input parameters.<paramparam name="outputValues">Variable where the calculated response (output values) is stored.</paramparam> |
This method is seldom overridden in derived classes because it does everything it is expected to do. The method calls the RepairSimulationParameters method, which is often overridden in derived classes. Warning message is written to console if vectr of input parameters had to be repaired.
void IG::Lib::LoadableScriptShellBase::SimulatorCalculateResponse | ( | IVector | parameters, |
ref IVector | outputValues | ||
) | [inline] |
Calculates vector response by the main simulator of the script, and stores output values to the specified vector variable.
inputParameters | Vector of input parameters.<paramparam name="outputValues">Variable where the calculated response (output values) is stored.</paramparam> |
This method can not be overridden in derived classes, but its overload where simulator is an argument, can be overridden.
string IG::Lib::LoadableScriptShellBase::_simCastingRobertRootDirectory [protected] |
string IG::Lib::LoadableScriptShellBase::_simCastingRobertProjectName [protected] |
string IG::Lib::LoadableScriptShellBase::_simCastingRobertSimulationName [private] |
string IG::Lib::LoadableScriptShellBase::_simConvectionRobertRootDirectory [protected] |
string IG::Lib::LoadableScriptShellBase::_simConvectionRobertProjectName [protected] |
string IG::Lib::LoadableScriptShellBase::_simConvectionRobertSimulationName [private] |
ConvectionRev1RobertFileManager IG::Lib::LoadableScriptShellBase::_simConvectionRev1RobertFM [protected] |
string IG::Lib::LoadableScriptShellBase::_simKosecDirectoryRelativePath = "Code" [protected] |
string IG::Lib::LoadableScriptShellBase::_simKosecDirectory = null [protected] |
SimKosecFileManagerBase IG::Lib::LoadableScriptShellBase::_simKosecFM [protected] |
IResponseEvaluatorVectorSimple IG::Lib::LoadableScriptShellBase::_simulator [protected] |
bool IG::Lib::LoadableScriptShellBase::_simulatorSuppressOutput = false [private] |
string IG::Lib::LoadableScriptShellBase::_projectName [protected] |
string IG::Lib::LoadableScriptShellBase::_simulationName [protected] |
virtual string IG::Lib::LoadableScriptShellBase::SimCastingRobertRootDirectory [get, set] |
Root directory for casting simulator.
virtual string IG::Lib::LoadableScriptShellBase::SimCastingRobertProjectName [get, set] |
Project name for interfacing Robert Vertnik's casting simulator.
virtual string IG::Lib::LoadableScriptShellBase::SimCastingRobertSimulationName [get, set] |
Simulation name for interfacing Robert Vertnik's casting simulator.
virtual SimCastingRobertFileManager IG::Lib::LoadableScriptShellBase::SimCastingRobertFM [get, set] |
File manager for interfacing Robert Vertnik's casting simulator. Lazy evaluation: The object is created when first accessed, if possible. For this, ProjectName, SimulationName and SimCastingRobertRootDirectory must be defined.
virtual string IG::Lib::LoadableScriptShellBase::SimConvectionRobertRootDirectory [get, set] |
Root directory for Convection simulator.
virtual string IG::Lib::LoadableScriptShellBase::SimConvectionRobertProjectName [get, set] |
Project name for interfacing Robert Vertnik's Convection simulator.
virtual string IG::Lib::LoadableScriptShellBase::SimConvectionRobertSimulationName [get, set] |
Simulation name for interfacing Robert Vertnik's Convection simulator.
virtual ConvectionRobertFileManager IG::Lib::LoadableScriptShellBase::SimConvectionRobertFM [get, set] |
File manager for interfacing Robert Vertnik's casting simulator. Lazy evaluation: The object is created when first accessed, if possible. For this, ProjectName, SimulationName and SimCastingRobertRootDirectory must be defined.
virtual ConvectionRev1RobertFileManager IG::Lib::LoadableScriptShellBase::SimConvectionRev1RobertFM [get, set] |
File manager for interfacing Robert Vertnik's casting simulator. Lazy evaluation: The object is created when first accessed, if possible. For this, ProjectName, SimulationName and SimCastingRobertRootDirectory must be defined.
virtual string IG::Lib::LoadableScriptShellBase::SimKosecDirectoryRelativePath [get, set] |
Relative path of the directory that contains Kosec' simulation data, with respect to optimization directory.
string IG::Lib::LoadableScriptShellBase::SimKosecDirectory [get, set] |
Path so directory containing Kosec' simulator data.
virtual SimKosecFileManagerBase IG::Lib::LoadableScriptShellBase::SimKosecFM [get, set] |
File manager of simulatior of Gregor Kosec.
abstract IResponseEvaluatorVectorSimple IG::Lib::LoadableScriptShellBase::Simulator [get, set] |
Simulator that is used to calculate vector response.
Reimplemented in IG::Script::LoadableScriptShellNeuralITOriginal, and IG::Script::LoadableScriptShellNeural.
virtual bool IG::Lib::LoadableScriptShellBase::SimulatorSuppressOutput [get, set] |
A flag indicating whether simulators should suppress output or not, default is false. Current value of this flag affects newly created simulators (usually this is implemented in the CreateNewSimulator method).Not all simulator interfaces support suppressing output, therefore for some simulator this flag has no effect.
virtual string IG::Lib::LoadableScriptShellBase::ProjectName [get, set] |
Name of the current project, used in some simulation and other interfaces.
virtual string IG::Lib::LoadableScriptShellBase::SimulationName [get, set] |
Name of the current simulation, used in some simulation and other interfaces.