Equation

<< Click to Display Table of Contents >>

Navigation:  Analysis Modeling > Measures > Types of Measures >

Equation

The purpose of the Equation_icon Equation measure is to create advanced equation-based measures without writing code in a separate user DLL. The routine calculates a measurement value based on the equations specified in Equations tab.

 

***This new interface replaces the User DLL known as Measure Equation - dcsMeasEq (dcu_meas_eq.dll)***

 

Example Models:

C:\Users\Public\Documents\DCS\All Platforms_8_0_0_1\3DCS CAD & Example Models\Reference Models\Measures\Measure Equation

This model displays most of the basic operations used with the Measure Equation DLL and how they are written. The Basic_Math_Functions part uses: Add, Subtract, Multiplication and Division; Exponents, Absolute value, Square Root and Log.

 

This measure may produce incorrect Sensitivity or Geo Factor results (based on the calculation), see the Analysis Comparison & Assumptions and Linearity sections for more information.

 

MeasEqDll

 

 

Input Tabs:

Features: Points can be added to the Group1 and Group2 lists. They will be available as 'variables' under the Equations tab.

Equations: Here the users will define the equations used to calculate the measure's output. Users can add Keywords, Math Operators, Constants, other active measures, Points used in Group1/2 fields, etc.

Measures: Allows the user to add one or more measures to be used in an equation. The drop-down will list the measurements available in the current assembly but the user can click the Pick from tree... button to add other measurements.

Values: Allows the user to add one or more constant values to be used in an equation.

 

Output:

A single resultant value of the final equation (the Calculated Value is calculated based on the last string equation). The Calculated Value will be expressed in the same units as the units selected under the Model Settings in Preferences.

 


Procedure:

Choose Equation Measure from the Measures menu or from the RH-click on the Model Navigator/Add Measure list.

If you wish to use the coordinate, vector component, or radius value of a point, add the point to Group 1 or Group 2.

If you wish to use the value of another measure, select the measure in the Measures tab.

Go to Equations tab and enter an equation using the operators and variables above. You can type in the keywords or select them from the list.

Select [Add Equation...] and enter additional equations if desired. Use the [STR] variable to use the results of an earlier equation. The last equation in the String List is the output of the measure.

MeasEq_k-words

Double-Click on an equation to edit it.

Return to the Features tab and press the [Current] button to verify the nominal value of your equation.

Provide a name and description for the measure.

Press OK to save the measure.                

Check the DVTI_DCSLogFile 3DCS Log File and DVTI_dcsValidate Validate to check for errors.

Run Analysis and Validate the measure.


 

hmtoggle_arrow1 Keywords and Variables

 

hmtoggle_arrow1 Math Operators (Basic)

 

hmtoggle_arrow1 Math Operators (Advanced)

 

hmtoggle_arrow1 Conditional Operators/Other

 

Notes:

**** Entry length cannot be more than 400 characters **

Comment Line is supported in string array; a string starting with REM (case-insensitive) will be ignored.

Follows order of operations: first parentheses, then exponents, then multiplication or division, and finally addition or subtraction.

Math operators (sqrt, log, tan,...) must be in lower case.

Math operators (other than +,-,*,/,^)(sqrt, log, tan,...) require the variable to be in parentheses, e.g. sqrt([P1C:1]), log(5+[MS:2]).

All angle inputs (for sin, cos, tan) are expected in radians (not degrees.)  To convert degrees to radians use the deg2rad operator.

The log operator has base e, where e = 2.7182.  The log of x with base a equals log(x) / log(a).  

The min and max math operators assume that no entry can be another min or max operator.  

All Math Operators assume the measurement value is in millimeters.

Strings:

The equations are written as strings within the measure.

If the equation does not have a result, e.g. arcsin(10), the value defaults to zero and an error is written to the Log File.  No other warning is given.

If a math operator is not the first operator in an equation, it should be written in parentheses.

No equation can be more than 400 characters long.

Do not use an "=" sign.