Difference between revisions of "Configuring and running FIA"

From Flametree Technologies
Jump to navigation Jump to search
Line 30: Line 30:
 
* Variables and data are initialized via calls to FIA_set_matrix, FIA_set_string, FIA_set_double, FIA_set_integer
 
* Variables and data are initialized via calls to FIA_set_matrix, FIA_set_string, FIA_set_double, FIA_set_integer
 
* FIA is run via a call to FIA_run()
 
* FIA is run via a call to FIA_run()
* Results are either written to disk as reports, or read back into a string_matrix structure via a call to FIA_get_matrix.
+
* Results are either written to disk as reports, or read back into a string_matrix structure via a call to FIA_get_matrix for subsequent use elsewhere.
  
 
===Languages supported===
 
===Languages supported===
Line 39: Line 39:
  
 
[[Calling FIA from Java|Calling FIA from Java]]
 
[[Calling FIA from Java|Calling FIA from Java]]
 +
 +
If the language you wish to use is not shown here, please contact Flametree support.
  
 
===Configuration constants===
 
===Configuration constants===
  
Values of the configuration constants are supplied in file FIA_API_CONSTANTS.py (for Python), FIA_API_CONSTANTS.cs (for C#), and FIA_API_CONSTANTS.java (for Java). These files are always supplied with the run-time files for FIA.
+
Values of the configuration constants are supplied in file <tt>FIA_API_CONSTANTS.py</tt> (for Python), <tt>FIA_API_CONSTANTS.cs</tt> (for C#), and <tt>FIA_API_CONSTANTS.java</tt> (for Java). These files are always supplied with the run-time files for FIA.
  
 
====Valid constants====
 
====Valid constants====

Revision as of 05:57, 20 August 2021

FIA can be configured in two ways, depending on how you want to call the program:

Calling FIA from the command line

To run FIA in stand-alone mode from the command prompt, you must supply data files and a configuration file.

Setting up data files

Setting up a configuration file

Configuration settings

Running FIA from Windows

Runng FIA from Linux

Calling FIA from code

To call FIA from code, the information required is almost exactly the same as for stand-alone mode. The main differences are

  • data must be supplied as in-memory arrays rather than CSV files;
  • configuration settings are carried out in code, rather than by assinging values in a configuration file.
  • Some code is required to pull everything together.

In general, a program that calls FIA has the following form:

  • Required modules are loaded
  • Data is assigned to string_matrix structures
  • The program is initialized, via a call to FIA_init(). This ensures that all variables are assigned appropriate default values if not set by the user.
  • Variables and data are initialized via calls to FIA_set_matrix, FIA_set_string, FIA_set_double, FIA_set_integer
  • FIA is run via a call to FIA_run()
  • Results are either written to disk as reports, or read back into a string_matrix structure via a call to FIA_get_matrix for subsequent use elsewhere.

Languages supported

Calling FIA from Python

Calling FIA from Java

Calling FIA from Java

If the language you wish to use is not shown here, please contact Flametree support.

Configuration constants

Values of the configuration constants are supplied in file FIA_API_CONSTANTS.py (for Python), FIA_API_CONSTANTS.cs (for C#), and FIA_API_CONSTANTS.java (for Java). These files are always supplied with the run-time files for FIA.

Valid constants

When using a set of constants, it is important to ensure that you are using the correct version. As FIA is developed and improved, the mapping of some constants can change and if you use an out-of-date file, the program may not work as intended.

The constants file therefore has a first line that reads as follows:

Auto-generated constants file for calling FIA from Python
DO NOT MODIFY THIS FILE
Version v2.4.0-9

Please ensure that the version number supplied on the third line matches the version of FIA that you are running. You can check this from the command line by typing

fia64 --version