Difference between revisions of "Parameter Concept"

From SIMA wiki
Jump to: navigation, search
m (Herret moved page Personality Parameter to Parameter Concept without leaving a redirect)
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
To adjust the personality of the arsin we use personality parameter
+
__NOTOC__
== Define specific config file==
+
Within the function modules we use parameter to configure the modules. These parameters are called personality parameters and we can set them in config files located in Sim/config/personality_parameter.
It is possible to parameterize arsin using configuration files.  
 
  
 +
See also the attached presentation [[file:Persönlichkeits-_und_Körperparameter.pdf]]
 +
== Default configuration==
 
The default configuration and a description of these parameters is stored in  
 
The default configuration and a description of these parameters is stored in  
  
  
sim/config/personality _parameter/default.properties.  
+
sim/config/personality _parameter/default.properties.
  
  
To change the default configuration you can overwrite the default properties by an individual personality property file for each arsin. To do so overwrite the descision unit parameter to the name of the new property file.
+
If you decide to add a new personality parameter to a module add the default value and the description of the parameter to these default file.
 +
 
 +
== Overwrite the default parameter==
 +
 
 +
To change the default configuration you can overwrite the default properties by an individual personality property file for each arsin. To do so overwrite the decision unit parameter to the name of the new property file.
  
 
Add the following line to the scenario file to change the personality parameter for entitygroup 0:
 
Add the following line to the scenario file to change the personality parameter for entitygroup 0:
Line 17: Line 22:
  
  
At first the default.properties file is loaden. If a specific personality parameter file is set the values from the default file are overwritten by the values from the specified file.
+
At first the default.properties file is loaded. If a specific personality parameter file is set the values from the default file are overwritten by the values from the specified file. The not overwritten values from the default file are still valid.
  
In the tutorial scenario a specific personality parameter file for arsin 0 is set!  
+
In the tutorial scenario (Sim/config/scenarios/tutorial.properties) a specific personality parameter file for arsin 0 is set!  
  
 
==Define a Parameter within a Parameter File==
 
==Define a Parameter within a Parameter File==
 
If you define a new personality parameter you have to add two lines to the default.properties file. One for the default value and one for the description of the parameter.
 
If you define a new personality parameter you have to add two lines to the default.properties file. One for the default value and one for the description of the parameter.
  
<Module Name>.<Parameter Name>. value =  
+
F<Module Number>.<Parameter Name>. value =  
  
<Module Name>.<Parameter Name>. description =  
+
F<Module Number>.<Parameter Name>. description =  
  
 
e.g.:
 
e.g.:
Line 38: Line 43:
  
 
== How to load a defined parameter within a module==
 
== How to load a defined parameter within a module==
call the getPersonalityParameter(String ModuleName, String ParameterNumber) methode in the personalityParameterContainer of the arsin.
+
If no personality parameter is used within the module you must add the pesonalityParameterContainer to the constructor.
 +
To load the value call the getPersonalityParameter(String ModuleName, String ParameterNumber) methode of the personalityParameterContainer.
  
 
e.g.:
 
e.g.:
Line 45: Line 51:
  
 
for more information see Sim/config/personality_parameter/tutorial.properties
 
for more information see Sim/config/personality_parameter/tutorial.properties
 +
 +
==Personality Parameter Body==
 +
With the personality parameter concept it is also possible to configure the body of ARSIN. The body configuration files are in the sub-folder body. The concept is the same as the personality parameter for the decision unit.
 +
 +
Now with these body parameters it is possible to set different stomach and the rectum staring values for each ARSIN in each simulation. This concept is also expandable on other body values.
 +
 +
To set a parameter file for an ARSIN in a simulation overwrite the property
 +
 +
body.personality.parameter.file= <filename>
 +
 +
For further detail see the tutorial scenario file.
  
 
==Inspector==
 
==Inspector==
Brain Details -> Personality Paramater to show all personality parameters
+
There is also an inspector to show all personality parameters used in the actual simulation.
 +
#Double click the arsin
 +
#Brain Details
 +
#Choose the tab personality parameter
 +
All parameters grouped by the containing modules are shown

Latest revision as of 08:55, 4 July 2013

Within the function modules we use parameter to configure the modules. These parameters are called personality parameters and we can set them in config files located in Sim/config/personality_parameter.

See also the attached presentation File:Persönlichkeits- und Körperparameter.pdf

Default configuration

The default configuration and a description of these parameters is stored in


sim/config/personality _parameter/default.properties.


If you decide to add a new personality parameter to a module add the default value and the description of the parameter to these default file.

Overwrite the default parameter

To change the default configuration you can overwrite the default properties by an individual personality property file for each arsin. To do so overwrite the decision unit parameter to the name of the new property file.

Add the following line to the scenario file to change the personality parameter for entitygroup 0:


entitygroups.0.overwritedecisionunitdefaults.processor.psychicapparatus.personality.parameter.file=<file_name>


At first the default.properties file is loaded. If a specific personality parameter file is set the values from the default file are overwritten by the values from the specified file. The not overwritten values from the default file are still valid.

In the tutorial scenario (Sim/config/scenarios/tutorial.properties) a specific personality parameter file for arsin 0 is set!

Define a Parameter within a Parameter File

If you define a new personality parameter you have to add two lines to the default.properties file. One for the default value and one for the description of the parameter.

F<Module Number>.<Parameter Name>. value =

F<Module Number>.<Parameter Name>. description =

e.g.:

F07.SUPER_EGO_STRENGTH.value=0.5

F07.SUPER_EGO_STRENGTH.description= adjusts the strength of the super-ego

To overwrite the value defined in default.properties just add the fist line with the new value to a personality parameter file and define this file for your arsin.


How to load a defined parameter within a module

If no personality parameter is used within the module you must add the pesonalityParameterContainer to the constructor. To load the value call the getPersonalityParameter(String ModuleName, String ParameterNumber) methode of the personalityParameterContainer.

e.g.:

moPersonalityParameterContainer.getPersonalityParameter("F03","HOMEOSTASIS_RECTUM").getParameterDouble());

for more information see Sim/config/personality_parameter/tutorial.properties

Personality Parameter Body

With the personality parameter concept it is also possible to configure the body of ARSIN. The body configuration files are in the sub-folder body. The concept is the same as the personality parameter for the decision unit.

Now with these body parameters it is possible to set different stomach and the rectum staring values for each ARSIN in each simulation. This concept is also expandable on other body values.

To set a parameter file for an ARSIN in a simulation overwrite the property

body.personality.parameter.file= <filename>

For further detail see the tutorial scenario file.

Inspector

There is also an inspector to show all personality parameters used in the actual simulation.

  1. Double click the arsin
  2. Brain Details
  3. Choose the tab personality parameter

All parameters grouped by the containing modules are shown