Page 7 - Demo
P. 7


                                    Interface to C/C++%uf09f%uf09fRCPConsult2023-2025Page 7Finally, for special purposes, the following set of STRUREL information variableswill be also definedStrurelMode0 initial state ofevaluation having global vector state as mean values1 %u2013intermediate state of evaluation of global vector during run2 final state after runhaving global vector state at %u00dfpointStrurelRunInteger counter of calls of state functionStrurelNameLiteral value %u2018STRUREL%u2019StrurelModuleLiteral value %u2018COMREL-TI%u2019 or %u2018COMREL-TV%u2019 or %u2018SYSREL%u2019 or %u2018COSTREL%u2019StrurelVersionLiteral value %u20182025%u2019 or corresponding value for future versionsStrurelIMETLiteral value with description of method of probaility integrationStrurelIOPTLiteral value with description of optimizer for %u00df-point searchStrurelBetaReal value of reliability index %u00dfat final stateStrurelPfReal value of failure probability Pfat final stateStrurelEngineLiteral value with information about compiler used inBuildout Add-onStrurelPlotLogical variable to switch on/off postprocessing facilitiesStrurelPlotNameLiteral value for a base name of file for plot drawn in interface engineStrurelPlotTypeLiteral value for an extension of file for plot drawn in interface engineStrurelPlotMode1 %u2013shows a generated plot in a separate window2 savesa generated plot in a file with format defined by an plot extension3 %u2013combines mode 1 and mode 2StrurelPlotCountInteger counter of plots drawn on run. Default is 0The assigned global vectors, global namesand 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 theC/C++Interface the following well known example will be taken (User Manual: Stone example):The assigned global nameswill have the very same names as in the Stochastic Model: Load, Strength, Diameter, PAR1, PAR2and corresponding values. Eachglobal vectorwill have 5 elements with corresponding values as ordered above.The state functions and user defined functionsfor this example can be expressed in the Symboliclanguage 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,\_Circular.cpp\// 2. Use global names in C++ source file FLIM(2){Stone: Circular cross section}= FUNC(2)DEFFUNC(2,CPP,CppStone,\_Circular.cpp\// 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,\_Circular.cpp\
                                
   1   2   3   4   5   6   7   8   9   10   11