Difference between revisions of "SkibUserMacros:SolveMalfunctions"
From Protoi Healing
(8 intermediate revisions by the same user not shown) | |||
Line 30: | Line 30: | ||
'''Description''' | '''Description''' | ||
− | :This is a sub-macro which implements a standard procedure to solve malfunctions. It is typically implemented as a THREAD in the calling macro. A calling macro should provide the two options {Use butterfly} and {Use solver}. Both, butterfly and solver, need very big resources. | + | :This is a sub-macro which implements a standard procedure to solve malfunctions. It is typically implemented as a THREAD in the calling macro. A calling macro should provide the two options {Use butterfly} and {Use solver}. Both, butterfly and solver, need very big resources. Some example: |
− | : | + | :First you start the sub-macro somewhere in the (beginning of the) main program: |
+ | {{Text|80}}<pre> | ||
+ | # THREAD-START <X> | ||
+ | </pre>{{EndText}} | ||
− | |||
− | |||
− | |||
− | |||
:Second you implement the THREAD to handle the malfunctions: | :Second you implement the THREAD to handle the malfunctions: | ||
− | {{Text| | + | {{Text|80}}<pre> |
# '''THREAD''' <X> {{Comment|Try to find solutions for the malfunctions}} | # '''THREAD''' <X> {{Comment|Try to find solutions for the malfunctions}} | ||
## '''IF''' option ''{Use solver}'' was not given, '''DO:''' | ## '''IF''' option ''{Use solver}'' was not given, '''DO:''' | ||
Line 48: | Line 47: | ||
# '''THREAD-END''' | # '''THREAD-END''' | ||
</pre>{{EndText}} | </pre>{{EndText}} | ||
+ | |||
'''{Use butterfly}''' | '''{Use butterfly}''' | ||
Line 57: | Line 57: | ||
# Use '''DATABASE''' 'Malfunction'. | # Use '''DATABASE''' 'Malfunction'. | ||
+ | # Use '''DATABASE''' 'Defend'. | ||
# 'Own actions' are defined as all actions done by the calling macro. | # 'Own actions' are defined as all actions done by the calling macro. | ||
# 'Counter actions' are defined as all counter actions done in the context of the calling macro. | # 'Counter actions' are defined as all counter actions done in the context of the calling macro. | ||
+ | # All things used by this macro always have to be optimal protected, if this got declared in the calling macro. | ||
# '''LOOP''' <T:15seconds> | # '''LOOP''' <T:15seconds> | ||
− | ## {{Method|Scan}} all context of the calling macro. | + | ## {{Method|Scan}} and {{Method|scan-off-grid}} all context of the calling macro and this sub-macro. |
− | ## '''TRY''' to {{Method|identify}} all 'own actions' and all 'counter actions' in all context of the calling macro. | + | ## '''TRY''' to {{Method|identify}} all 'own actions' and all 'counter actions' in all context of the calling macro and this sub-macro. |
## '''TRY''' to {{Method|trace}} all found 'own actions' and all 'counter actions'. | ## '''TRY''' to {{Method|trace}} all found 'own actions' and all 'counter actions'. | ||
− | ## '''TRY''' to {{Method|identify}} all 'malfunctions' in all context of the calling macro. | + | ## '''TRY''' to {{Method|identify}} all 'malfunctions' in all context of the calling macro and this sub-macro. |
## '''TRY''' to {{Method|trace}} all found 'malfunctions'. | ## '''TRY''' to {{Method|trace}} all found 'malfunctions'. | ||
## {{Method|Create}} an optimal solution for all 'malfunctions'. | ## {{Method|Create}} an optimal solution for all 'malfunctions'. | ||
## {{Method|Create}} optimal procedures for the solution. | ## {{Method|Create}} optimal procedures for the solution. | ||
+ | ## '''THREAD-START''' <1> | ||
+ | # '''LOOP-END''' | ||
+ | # '''THREAD''' <1> {{Comment|Apply the solution}} | ||
## '''TRY''' to apply the solution by using the optimal solution procedures. | ## '''TRY''' to apply the solution by using the optimal solution procedures. | ||
## '''IF''' the former solution or parts of the solution repeatedly failed and the option ''{Use butterfly}'' was given, '''DO''': | ## '''IF''' the former solution or parts of the solution repeatedly failed and the option ''{Use butterfly}'' was given, '''DO''': | ||
Line 73: | Line 78: | ||
## '''TRY''' to identify the success of the solution and procedure. | ## '''TRY''' to identify the success of the solution and procedure. | ||
## Store all successful parts of the solution and the procedure in the 'Malfunction' '''DATABASE'''. | ## Store all successful parts of the solution and the procedure in the 'Malfunction' '''DATABASE'''. | ||
− | # ''' | + | # '''THREAD-END''' |
{{EndBox}} | {{EndBox}} |
Latest revision as of 21:31, 9 February 2017
Name | SolveMalfunctions |
---|---|
Author | Frank |
Brief descr. | Tries to solve malfunctions. |
Status | public |
Terms | sub-macro only |
Resources for the UserMacro | |||||
---|---|---|---|---|---|
1 | 10 | 100 | |||
1k | 100k | 1kk | |||
10kk | Gmax | Omax | |||
Resources with butterfly option | |||||
1 | 10 | 100 | |||
1k | 100k | 1kk | |||
10kk | Gmax | Omax |
Command syntax
Description
- This is a sub-macro which implements a standard procedure to solve malfunctions. It is typically implemented as a THREAD in the calling macro. A calling macro should provide the two options {Use butterfly} and {Use solver}. Both, butterfly and solver, need very big resources. Some example:
- First you start the sub-macro somewhere in the (beginning of the) main program:
# THREAD-START <X>
- Second you implement the THREAD to handle the malfunctions:
# '''THREAD''' <X> {{Comment|Try to find solutions for the malfunctions}} ## '''IF''' option ''{Use solver}'' was not given, '''DO:''' ### '''THREAD-STOP''' <X>. ## '''IF-END''' ## '''SUBMACRO-START''' 'SolveMalfunctions' ''{Use butterfly}'' # '''THREAD-END'''
{Use butterfly}
- This option activates the use of the butterfly-method inside the macro algorithm. This gives much more power, but also needs a lot of resources from Skib. You should be aware of this!
Algorithm of User Macro
- Use DATABASE 'Malfunction'.
- Use DATABASE 'Defend'.
- 'Own actions' are defined as all actions done by the calling macro.
- 'Counter actions' are defined as all counter actions done in the context of the calling macro.
- All things used by this macro always have to be optimal protected, if this got declared in the calling macro.
- LOOP <T:15seconds>
- Scan and scan-off-grid all context of the calling macro and this sub-macro.
- TRY to identify all 'own actions' and all 'counter actions' in all context of the calling macro and this sub-macro.
- TRY to trace all found 'own actions' and all 'counter actions'.
- TRY to identify all 'malfunctions' in all context of the calling macro and this sub-macro.
- TRY to trace all found 'malfunctions'.
- Create an optimal solution for all 'malfunctions'.
- Create optimal procedures for the solution.
- THREAD-START <1>
- LOOP-END
- THREAD <1> Apply the solution
- TRY to apply the solution by using the optimal solution procedures.
- IF the former solution or parts of the solution repeatedly failed and the option {Use butterfly} was given, DO:
- Use butterfly-method for the solution.
- IF-END
- TRY to identify the success of the solution and procedure.
- Store all successful parts of the solution and the procedure in the 'Malfunction' DATABASE.
- THREAD-END