Page 7 - Demo
P. 7


                                    Interface to C/C++%uf09f %uf09f RCP Consult 2023-2026 Page 7Finally, for special purposes, the following set of STRUREL information variables will be also definedStrurelMode0 %u2013 initial state of evaluation having global vector state as mean values1 %u2013 intermediate state of evaluation of global vector during run2 %u2013 final state after run having global vector state at %u00df-pointStrurelRun Integer counter of calls of state functionStrurelName Literal value %u2018STRUREL%u2019StrurelModule Literal value %u2018COMREL-TI%u2019 or %u2018COMREL-TV%u2019 or %u2018SYSREL%u2019 or %u2018COSTREL%u2019StrurelVersion Literal value %u20182026%u2019 or corresponding value for future versionsStrurelIMET Literal value with description of method of probaility integrationStrurelIOPT Literal value with description of optimizer for %u00df-point searchStrurelBeta Real value of reliability index %u00df at final stateStrurelPf Real value of failure probability Pf at final stateStrurelEngine Literal value with information about compiler used in Buildout Add-onStrurelPlot Logical variable to switch on/off postprocessing facilitiesStrurelPlotName Literal value for a base name of file for plot drawn in interface engineStrurelPlotType Literal value for an extension of file for plot drawn in interface engineStrurelPlotMode1 %u2013 shows a generated plot in a separate window2 %u2013 saves a generated plot in a file with format defined by an plot extension3 %u2013 combines mode 1 and mode 2StrurelPlotCount Integer counter of plots drawn on run. Default is 0The assigned global vectors, global names and information variables can be explicitly used in definition of any export function in a source file.To illustrate how the Stochastic Model data of STRUREL must be used in communication with the C/C++ Interface the following well known example will be taken (User Manual: Stone example):The assigned global names will have the very same names as in the Stochastic Model: Load, Strength, Diameter, PAR1, PAR2 and corresponding values. Each global vector will have 5 elements with corresponding values as ordered above.The state functions and user defined functions for this example can be expressed in the Symbolic language of STRUREL as shown below. // 1. Use vector input in C/C++ source file FLIM(1){Stone: Circular cross section} = FUNC(1)DEFFUNC(1,CPP,CppStone,\// 2. Use global names in C++ source file FLIM(2){Stone: Circular cross section} = FUNC(2)DEFFUNC(2,CPP,CppStone,\// 3. Use explicit arguments in C++ source fileFLIM(3){Stone: Circular cross section} = FUNC(3)(Load,Strength,Diameter,PAR1,PAR2,PI)DEFFUNC(3,CPP,CppStone,\rFA
                                
   1   2   3   4   5   6   7   8   9   10   11