BH.oM.Verification.Conditions.FormulaCondition¶
Condition that verifies an object based on a given formula.
Class structure¶
Implemented interfaces and base types¶
The FormulaCondition is inheriting from the following base type(s) and implements the following interfaces:
- BH.oM.Verification.Conditions.ICondition
- BH.oM.Base.IObject
Properties¶
Defining properties¶
The following properties are defined on the class
Name | Type | Description | Quantity |
---|---|---|---|
Inputs | Dictionary<string, IValueSource> | Initial values to be extracted from the verified object. Keys are the names of variables to be used in the calculations. Values are value sources to extract the values from. |
- |
CalculationFormulae | Dictionary<string, Formula> | Formulae to calculate the variables to be verified in the verification formula. Formulae can be chained, i.e. one calculated variable can be derived from the previously calculated ones. Keys are the names of variables to be used in the calculations. Values are the formulae correspondent to each given variable name. |
- |
VerificationFormula | Formula | Final formula to verify, needs to return a Boolean value, e.g. 'a > b'. | - |
Derived properties¶
The following properties are defined as extension methods in one of the BHoM_Engines
Name | Type | Description | Quantity | Engine |
---|---|---|---|---|
INestedConditions | IEnumerable<ICondition> | Extracts the conditions nested inside a given condition, e.g. conditions nested inside logical conditions. | - | Verification_Engine |
Code and Schema¶
C# implementation¶
Assembly: Verification_oM.dll
The C# class definition is available on github:
All history and changes of the class can be found by inspection the history.
JSON Schema implementation¶
The object is defined as a JSON schema. You can validate a JSON instance against this schema by reference. To do this, use the schema reference below in a validator like this one.
JSON Schema
{
"$ref" : "https://raw.githubusercontent.com/BHoM/BHoM_JSONSchema/develop/Verification_oM/Conditions/FormulaCondition.json"
}
The JSON Schema is available on github here: