UIPF / kernel interfacing during development
In theory, after compiling the calculation engine kernel.exe
for a specific process (with the Visual Studio solution or with meson
), in order to control that kernel via the UIPF user interface, you should package the installer and install it.
For convenience the model developer, during the development cycle, can force the UIPF she may have already installed for a different kernel, to point to the kernel in development. This is for “internal” use, only for developers.
To do so, open regedit (Windows+R, type regedit
, ENTER, accept the amministrative rights access) and browse to the key HKEY_LOCAL_MACHINE\Software\libpf.com\LIBPF 1.0
or HKEY_CURRENT_USER\Software\libpf.com\LIBPF 1.0
, the relevant values are:
-
kernel_path
: this is the root of all folders that may contain the various kernels, by default:C:/Programmi/LIBPF
orC:/Program Files/LIBPF
(note: the path is written with forward slashes/
and not backslashes\
, à la Qt); if you are compiling with VC, you should set it to something likeC:/Users/MySelf/LIBPF/mykernel
-
active_kernel
: this should point to the folder where the executable is located; for example, if you are building in Release configuration with VC, this could be set toRelease
-
kernel_name
: the actual name of the executable e.g.kernel.exe
The file $kernel_path/$active_kernel/$kernel_name
must therefore exist, i.e. with the above sample settings: C:/Users/MySelf/LIBPF/mykernel/Release/kernel.exe
.
Finally create a types.txt
file in the folder pointed to by active_kernel
; this file makes the UIPF user interface aware of what types of flowsheets, user-defined reactions, and other models the current computation kernel implements.
The file types.txt
must have 3 rows for each flowsheet class, with each group of 3 rows separated with a blank line:
-
the name of the class (e.g.
MyFlowsheet
) -
a descriptive text
-
the string
FlowSheet<ZeroZero>
For example:
MyFlowsheet
Gasifier con reaction scheme B
FlowSheet<ZeroZero>
NOTE: The types.txt
file is parsed by UIPF at startup; if you change it, to make sure the changhes are picked up yu need to qui and restart UIPF.