Difference between revisions of "SkibUserMacros:SolveMalfunctions"

From Protoi Healing

Jump to: navigation, search
 
Line 31: Line 31:
 
'''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. Some example:
 
: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}}
  
  

Latest revision as of 21:31, 9 February 2017

Skib User Macro
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

SolveMalfunctions {Use butterfly}






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

  1. Use DATABASE 'Malfunction'.
  2. Use DATABASE 'Defend'.
  3. 'Own actions' are defined as all actions done by the calling macro.
  4. 'Counter actions' are defined as all counter actions done in the context of the calling macro.
  5. All things used by this macro always have to be optimal protected, if this got declared in the calling macro.
  6. LOOP <T:15seconds>
    1. Scan and scan-off-grid all context of the calling macro and this sub-macro.
    2. TRY to identify all 'own actions' and all 'counter actions' in all context of the calling macro and this sub-macro.
    3. TRY to trace all found 'own actions' and all 'counter actions'.
    4. TRY to identify all 'malfunctions' in all context of the calling macro and this sub-macro.
    5. TRY to trace all found 'malfunctions'.
    6. Create an optimal solution for all 'malfunctions'.
    7. Create optimal procedures for the solution.
    8. THREAD-START <1>
  7. LOOP-END
  8. THREAD <1> Apply the solution
    1. TRY to apply the solution by using the optimal solution procedures.
    2. IF the former solution or parts of the solution repeatedly failed and the option {Use butterfly} was given, DO:
      1. Use butterfly-method for the solution.
    3. IF-END
    4. TRY to identify the success of the solution and procedure.
    5. Store all successful parts of the solution and the procedure in the 'Malfunction' DATABASE.
  9. THREAD-END