FC_DistanceTwoPolytopes - General Information
Type: |
Function |
Available as of: |
V1.0.3.0 |
Versions: |
Current version |
Calculates the distance between two convex polytopes.
Calculates the distance between the convex polytopes iq_stPolytope1 and iq_stPolytope2. For this purpose, an iteration process is used.
Input |
Data type |
Description |
---|---|---|
i_lrAccuracy |
LREAL |
Maximum permissible error for the calculated distance. The iteration process aborts if the calculated distance of the polytopes deviates from the exact distance by less than this value. The lower this value is, the more exact is the result and the higher the number of the necessary iteration steps. Value range: > 0.0 |
Output |
Data type |
Description |
---|---|---|
q_etDiag |
General library-independent statement on the diagnostic. A value not equal to ET_Diag.Ok corresponds to an diagnostic message. |
|
q_etDiagExt |
POU-specific output on the diagnostic. q_etDiag = ET_Diag.Ok -> Status message q_etDiag <> ET_Diag.Ok -> Diagnostic message |
|
q_lrDistance |
LREAL |
Calculated distance between iq_stPolytope1 and iq_stPolytope2. This deviates by maximally i_lrAccuracy from the distance. |
q_diNumberOfIterations |
DINT |
Number of iteration steps which were required for the distance calculations. |
Input/Output |
Data type |
Description |
---|---|---|
iq_stPolytope1 |
Convex polytope 1 |
|
iq_stPolytope2 |
Convex polytope 2 |
q_etDiag |
q_etDiagExt |
Enumeration value |
Description |
---|---|---|---|
OK |
0 |
Ok |
|
ExecutionAborted |
96 |
The maximum number of iteration steps has been exceeded. |
|
InputParameterInvalid |
118 |
Accuracy is outside the valid range. |
|
InputParameterInvalid |
56 |
NumberOfVertices of polytope 1 is outside the valid range. |
|
InputParameterInvalid |
57 |
NumberOfVertices of polytope 2 is outside the valid range. |
|
UnexpectedProgramBehavior |
2 |
The POU is in an undefined state. |
Enumeration name: |
AccuracyRange |
Enumeration value: |
118 |
Description: |
Accuracy is outside the valid range. |
Issue |
Cause |
Solution |
---|---|---|
- |
At the input i_lrAccuracy, a number smaller than Gc_lrZeroTolerance has been applied. |
A value greater than zero has to be specified. |
Enumeration name: |
MaxNumberOfIterationsExceeded |
Enumeration value: |
96 |
Description: |
The maximum number of iteration steps has been exceeded. |
Issue |
Cause |
Solution |
---|---|---|
- |
i_lrAccuracy has been chosen too small. The numerical approximation method converges to such an exact result in not less than Gc_diMaxNumberOfIterations iteration steps. |
A higher value must be chosen for i_lrAccuracy. |
NumberOfVerticesPolytope1Range
Enumeration name: |
NumberOfVerticesPolytope1Range |
Enumeration value: |
56 |
Description: |
NumberOfVertices of polytope 1 is outside the valid range. |
Issue |
Cause |
Solution |
---|---|---|
- |
At the input iq_stPolytope1.diNumberOfVertices, a value smaller than 1 or greater than Gc_diMaxNumberOfVertices has been applied. |
For iq_stPolytope1.diNumberOfVertices, a value between 1 and Gc_diMaxNumberOfVertices must be chosen. |
NumberOfVerticesPolytope2Range
Enumeration name: |
NumberOfVerticesPolytope2Range |
Enumeration value: |
57 |
Description: |
NumberOfVertices of polytope 2 is outside the valid range. |
Issue |
Cause |
Solution |
---|---|---|
- |
At the input iq_stPolytope2.diNumberOfVertices, a value smaller than 1 or greater than Gc_diMaxNumberOfVertices has been applied. |
For iq_stPolytope2.diNumberOfVertices, a value between 1 and Gc_diMaxNumberOfVertices must be chosen. |
Enumeration name: |
Ok |
Enumeration value: |
0 |
Description: |
Ok |
The distance has been calculated successfully.
Enumeration name: |
UnknownState |
Enumeration value: |
2 |
Description: |
The POU is in an undefined state. |
Issue |
Cause |
Solution |
---|---|---|
- |
The internal state of the POU is indeterminable. |
Please inform your Schneider Electric representative about this detected error. |