ɊɈɋɋɂɃɋɄȺə ȺɄȺȾȿɆɂə ɇȺɍɄ ɋɂȻɂɊɋɄɈȿ ɈɌȾȿɅȿɇɂȿ ȼɕɑɂɋɅɂɌȿɅɖɇɕɃ ɐȿɇɌɊ (ɝ. Ʉɪɚɫɧɨɹɪɫɤ)
ɇȿɃɊɈɄɈɆɉɖɘɌȿɊ ɉɊɈȿɄɌ ɋɌȺɇȾȺɊɌȺ
Ɉɬɜɟ...
55 downloads
241 Views
3MB Size
Report
This content was uploaded by our users and we assume good faith they have the permission to share this book. If you own the copyright to this book and it is wrongfully on our website, we offer a simple DMCA procedure to remove your content from our site. Start by pressing the button below!
Report copyright / DMCA form
ɊɈɋɋɂɃɋɄȺə ȺɄȺȾȿɆɂə ɇȺɍɄ ɋɂȻɂɊɋɄɈȿ ɈɌȾȿɅȿɇɂȿ ȼɕɑɂɋɅɂɌȿɅɖɇɕɃ ɐȿɇɌɊ (ɝ. Ʉɪɚɫɧɨɹɪɫɤ)
ɇȿɃɊɈɄɈɆɉɖɘɌȿɊ ɉɊɈȿɄɌ ɋɌȺɇȾȺɊɌȺ
Ɉɬɜɟɬɫɬɜɟɧɧɵɣ ɪɟɞɚɤɬɨɪ ɞɨɤɬɨɪ ɮɢɡɢɤɨ-ɦɚɬɟɦɚɬɢɱɟɫɤɢɯ ɧɚɭɤ ȼ.Ʌ.Ⱦɭɧɢɧ-Ȼɚɪɤɨɜɫɤɢɣ
ɇɨɜɨɫɢɛɢɪɫɤ «ɇɚɭɤɚ» ɋɢɛɢɪɫɤɚɹ ɢɡɞɚɬɟɥɶɫɤɚɹ ɮɢɪɦɚ ɊȺɇ 1998
ɇɟɣɪɨɤɨɦɩɶɸɬɟɪ. ɉɪɨɟɤɬ ɫɬɚɧɞɚɪɬɚ /
ȿ.Ɇ.Ɇɢɪɤɟɫ – ɇɨɜɨɫɢɛɢɪɫɤ: ɇɚɭɤɚ, ɋɢɛɢɪɫɤɚɹ ɢɡɞɚ-
ɬɟɥɶɫɤɚɹ ɮɢɪɦɚ ɊȺɇ, 1998. Ɇɧɨɝɨɥɟɬɧɢɟ ɭɫɢɥɢɹ ɦɧɨɝɢɯ ɢɫɫɥɟɞɨɜɚɬɟɥɶɫɤɢɯ ɝɪɭɩɩ ɩɪɢɜɟɥɢ ɤ ɬɨɦɭ, ɱɬɨ ɤ ɧɚɫɬɨɹɳɟɦɭ ɦɨɦɟɧɬɭ ɧɚɤɨɩɥɟɧɨ ɛɨɥɶɲɨɟ ɱɢɫɥɨ ɪɚɡɥɢɱɧɵɯ «ɩɪɚɜɢɥ ɨɛɭɱɟɧɢɹ» ɢ ɚɪɯɢɬɟɤɬɭɪ ɧɟɣɪɨɧɧɵɯ ɫɟɬɟɣ, ɫɩɨɫɨɛɨɜ ɨɰɟɧɢɜɚɬɶ ɢ ɢɧɬɟɪɩɪɟɬɢɪɨɜɚɬɶ ɢɯ ɪɚɛɨɬɭ, ɩɪɢɟɦɨɜ ɢɫɩɨɥɶɡɨɜɚɧɢɹ ɧɟɣɪɨɧɧɵɯ ɫɟɬɟɣ ɞɥɹ ɪɟɲɟɧɢɹ ɩɪɢɤɥɚɞɧɵɯ ɡɚɞɚɱ. ȼ ɤɧɢɝɟ ɩɪɟɞɩɪɢɧɹɬɚ ɩɨɩɵɬɤɚ ɨɩɢɫɚɬɶ ɪɚɡɥɢɱɧɵɟ ɫɟɬɢ, ɚɥɝɨɪɢɬɦɵ ɨɛɭɱɟɧɢɹ ɢ ɞɪɭɝɢɟ ɤɨɦɩɨɧɟɧɬɵ ɢɞɟɚɥɶɧɨɝɨ ɧɟɣɪɨɤɨɦɩɶɸɬɟɪɚ ɧɚ ɟɞɢɧɨɦ ɹɡɵɤɟ. Ɍɚɤɨɣ ɩɨɞɯɨɞ ɩɪɟɫɥɟɞɭɟɬ ɞɜɟ ɰɟɥɢ. ȼɨ-ɩɟɪɜɵɯ ɫɞɟɥɚɬɶ ɧɟɣɪɨɫɟɬɟɜɵɟ ɩɪɨɝɪɚɦɦɵ ɫɨɜɦɟɫɬɢɦɵɦɢ ɩɨ ɫɩɨɫɨɛɭ ɨɩɢɫɚɧɢɹ ɧɟɣɪɨɧɧɵɯ ɫɟɬɟɣ ɢ ɫɨɩɭɬɫɬɜɭɸɳɢɯ ɤɨɦɩɨɧɟɧɬ, ɱɬɨ ɫɢɥɶɧɨ ɭɩɪɨɫɬɢɬ ɠɢɡɧɶ ɩɨɥɶɡɨɜɚɬɟɥɹɦ ɧɟɣɪɨɫɟɬɟɜɵɯ ɩɪɢɥɨɠɟɧɢɣ. ȼɨ-ɜɬɨɪɵɯ ɟɞɢɧɵɣ ɩɨɞɯɨɞ ɤ ɨɩɢɫɚɧɢɸ ɩɨɡɜɨɥɹɟɬ ɤɨɪɪɟɤɬɧɨ ɫɪɚɜɧɢɜɚɬɶ ɦɟɠɞɭ ɫɨɛɨɣ ɪɚɡɥɢɱɧɵɟ ɚɪɯɢɬɟɤɬɭɪɵ ɧɟɣɪɨɧɧɵɯ ɫɟɬɟɣ ɢ ɚɥɝɨɪɢɬɦɨɜ ɨɛɭɱɟɧɢɹ. ȼɨɡɦɨɠɧɨɫɬɶ ɫɪɚɜɧɟɧɢɹ, ɜ ɫɜɨɸ ɨɱɟɪɟɞɶ, ɩɨɡɜɨɥɢɬ ɩɪɢɫɬɭɩɢɬɶ ɤ ɩɨɫɬɪɨɟɧɢɸ ɟɞɢɧɨɣ ɬɟɨɪɢɢ ɧɟɣɪɨɧɧɵɯ ɫɟɬɟɣ. Ⱦɥɹ ɫɩɟɰɢɚɥɢɫɬɨɜ ɩɨ ɧɟɣɪɨɢɧɮɨɪɦɚɬɢɤɟ, ɷɤɫɩɟɪɬɧɵɦ ɫɢɫɬɟɦɚɦ, ɪɚɡɪɚɛɨɬɱɢɤɨɜ ɩɪɨɝɪɚɦɦɧɨɝɨ ɨɛɟɫɩɟɱɟɧɢɹ, ɚ ɬɚɤɠɟ ɞɥɹ ɲɢɪɨɤɨɝɨ ɤɪɭɝɚ ɩɨɥɶɡɨɜɚɬɟɥɟɣ, ɢɧɬɟɪɟɫɭɸɳɢɯɫɹ ɧɟɣɪɨɧɧɵɦɢ ɫɟɬɹɦɢ.
ɍɬɜɟɪɠɞɟɧɨ ɤ ɩɟɱɚɬɢ ȼɵɱɢɫɥɢɬɟɥɶɧɵɦ ɰɟɧɬɪɨɦ ɋɈ ɊȺɇ (ɝ. Ʉɪɚɫɧɨɹɪɫɤ)
Ʉɧɢɝɚ ɢɡɞɚɧɚ ɩɪɢ ɮɢɧɚɧɫɨɜɨɣ ɩɨɞɞɟɪɠɤɟ ɋɢɛɢɪɫɤɨɝɨ ɨɬɞɟɥɟɧɢɹ ɊȺɇ, Ʉɪɚɫɧɨɹɪɫɤɨɝɨ ɤɪɚɟɜɨɝɨ ɮɨɧɞɚ ɧɚɭɤɢ ɢ ɁȺɈ «ɋɢɛɢɪɫɤɚɹ Ⱥɭɞɢɬɨɪɫɤɚɹ Ʉɨɦɩɚɧɢɹ»
CHAP0.DOC
2
ȼɜɟɞɟɧɢɟ Ɇɧɨɝɨɥɟɬɧɢɟ ɭɫɢɥɢɹ ɦɧɨɝɢɯ ɢɫɫɥɟɞɨɜɚɬɟɥɶɫɤɢɯ ɝɪɭɩɩ ɩɪɢɜɟɥɢ ɤ ɬɨɦɭ, ɱɬɨ ɤ ɧɚɫɬɨɹɳɟɦɭ ɦɨɦɟɧɬɭ ɧɚɤɨɩɥɟɧɨ ɛɨɥɶɲɨɟ ɱɢɫɥɨ ɪɚɡɥɢɱɧɵɯ «ɩɪɚɜɢɥ ɨɛɭɱɟɧɢɹ» ɢ ɚɪɯɢɬɟɤɬɭɪ ɧɟɣɪɨɧɧɵɯ ɫɟɬɟɣ, ɫɩɨɫɨɛɨɜ ɨɰɟɧɢɜɚɬɶ ɢ ɢɧɬɟɪɩɪɟɬɢɪɨɜɚɬɶ ɢɯ ɪɚɛɨɬɭ, ɩɪɢɟɦɨɜ ɢɫɩɨɥɶɡɨɜɚɧɢɹ ɧɟɣɪɨɧɧɵɯ ɫɟɬɟɣ ɞɥɹ ɪɟɲɟɧɢɹ ɩɪɢɤɥɚɞɧɵɯ ɡɚɞɚɱ. Ⱦɨ ɫɢɯ ɩɨɪ ɷɬɢ ɩɪɚɜɢɥɚ, ɚɪɯɢɬɟɤɬɭɪɵ, ɫɢɫɬɟɦɵ ɨɰɟɧɤɢ ɢ ɢɧɬɟɪɩɪɟɬɚɰɢɢ, ɩɪɢɟɦɵ ɢɫɩɨɥɶɡɨɜɚɧɢɹ ɢ ɞɪɭɝɢɟ ɢɧɬɟɥɥɟɤɬɭɚɥɶɧɵɟ ɧɚɯɨɞɤɢ ɫɭɳɟɫɬɜɭɸɬ ɜ ɜɢɞɟ «ɡɨɨɩɚɪɤɚ» ɫɟɬɟɣ. Ʉɚɠɞɚɹ ɫɟɬɶ ɢɡ ɡɨɨɩɚɪɤɚ ɢɦɟɟɬ ɫɜɨɸ ɚɪɯɢɬɟɤɬɭɪɭ, ɩɪɚɜɢɥɨ ɨɛɭɱɟɧɢɹ ɢ ɪɟɲɚɟɬ ɤɨɧɤɪɟɬɧɵɣ ɧɚɛɨɪ ɡɚɞɚɱ. Ɇɵ ɩɪɟɞɥɚɝɚɟɦ ɫɢɫɬɟɦɚɬɢɡɢɪɨɜɚɬɶ «ɡɨɨɩɚɪɤ». Ⱦɥɹ ɷɬɨɝɨ ɩɨɥɟɡɟɧ ɬɚɤɨɣ ɩɨɞɯɨɞ: ɤɚɠɞɚɹ ɧɟɣɪɨɧɧɚɹ ɫɟɬɶ ɢɡ ɡɨɨɩɚɪɤɚ ɞɨɥɠɧɚ ɛɵɬɶ ɩɪɟɞɫɬɚɜɥɟɧɚ ɤɚɤ ɪɟɚɥɢɡɨɜɚɧɧɚɹ ɧɚ ɢɞɟɚɥɶɧɨɦ ɧɟɣɪɨɤɨɦɩɶɸɬɟɪɟ, ɢɦɟɸɳɟɦ ɡɚɞɚɧɧɭɸ ɫɬɪɭɤɬɭɪɭ. ɇɟɫɨɦɧɟɧɧɨ, ɫɬɪɭɤɬɭɪɚ ɷɬɨɝɨ ɢɞɟɚɥɶɧɨɝɨ ɧɟɣɪɨɤɨɦɩɶɸɬɟɪɚ ɫɨ ɜɪɟɦɟɧɟɦ ɛɭɞɟɬ ɷɜɨɥɸɰɢɨɧɢɪɨɜɚɬɶ. Ɉɞɧɚɤɨ ɩɪɟɢɦɭɳɟɫɬɜɚ ɞɚɠɟ ɨɬ ɩɟɪɜɵɯ ɲɚɝɨɜ ɫɬɚɧɞɚɪɬɢɡɚɰɢɢ ɧɟɫɨɦɧɟɧɧɵ. ȼ ɷɬɨɦ ɧɚɫ ɭɛɟɠɞɚɟɬ ɫɨɛɫɬɜɟɧɧɵɣ ɨɩɵɬ ɜɨɫɶɦɢɥɟɬɧɟɣ ɪɚɛɨɬɵ ɩɨ ɢɫɩɨɥɶɡɨɜɚɧɢɸ ɧɟɣɪɨɧɧɵɯ ɫɟɬɟɣ ɜ ɪɚɡɥɢɱɧɵɯ ɡɚɞɚɱɚɯ: ɪɚɫɩɨɡɧɚɜɚɧɢɹ ɨɛɪɚɡɨɜ [64, 290, 285], ɦɟɞɢɰɢɧɫɤɨɣ ɞɢɚɝɧɨɫɬɢɤɢ [18, 49 – 52, 72, 90, 91, 160, 161, 165, 182 – 187, 190 – 208, 255, 295 – 298, 316, 317, 341 – 345, 351, 361], ɩɪɨɝɧɨɡɚ [299 – 301, 364] ɢ ɞɪ. Ƚɪɭɩɩɚ ɇɟɣɪɨɄɨɦɩ ɜ ɬɟɱɟɧɢɟ ɞɜɟɧɚɞɰɚɬɢ ɥɟɬ ɨɬɪɚɛɚɬɵɜɚɥɚ ɩɪɢɧɰɢɩɵ ɨɪɝɚɧɢɡɚɰɢɢ ɧɟɣɪɨɧɧɵɯ ɜɵɱɢɫɥɟɧɢɣ. Ɋɚɡɥɢɱɧɵɟ ɜɚɪɢɚɧɬɵ ɷɬɢɯ ɩɪɢɧɰɢɩɨɜ ɛɵɥɢ ɪɟɚɥɢɡɨɜɚɧɵ ɜ ɫɟɪɢɢ ɩɪɨɝɪɚɦɦɧɟɣɪɨɢɦɢɬɚɬɨɪɨɜ. ȼɨɡɦɨɠɧɨɫɬɶ ɮɨɪɦɢɪɨɜɚɧɢɹ ɛɨɥɶɲɢɧɫɬɜɚ ɚɪɯɢɬɟɤɬɭɪ, ɚɥɝɨɪɢɬɦɨɜ ɢ ɫɩɨɫɨɛɨɜ ɢɫɩɨɥɶɡɨɜɚɧɢɹ ɧɟɣɪɨɧɧɵɯ ɫɟɬɟɣ ɧɚ ɨɫɧɨɜɟ ɧɟɛɨɥɶɲɨɝɨ ɱɢɫɥɚ ɫɬɚɧɞɚɪɬɧɵɯ ɛɥɨɤɨɜ ɫɭɳɟɫɬɜɟɧɧɨ ɨɛɥɟɝɱɚɟɬ ɫɨɡɞɚɧɢɟ ɩɪɨɝɪɚɦɦɧɨɝɨ ɨɛɟɫɩɟɱɟɧɢɹ. ȼ ɞɚɧɧɨɣ ɪɚɛɨɬɟ ɨɩɢɫɚɧɚ ɮɭɧɤɰɢɨɧɚɥɶɧɚɹ ɫɬɪɭɤɬɭɪɚ ɢɞɟɚɥɶɧɨɝɨ ɧɟɣɪɨɤɨɦɩɶɸɬɟɪɚ ɞɥɹ ɪɟɚɥɢɡɚɰɢɢ ɛɨɥɶɲɢɧɫɬɜɚ ɧɟɣɪɨɧɧɵɯ ɫɟɬɟɣ ɨɞɧɨɝɨ ɢɡ ɤɪɭɩɧɵɯ ɨɬɞɟɥɨɜ «ɡɨɨɩɚɪɤɚ». Ɋɟɱɶ ɢɞɟɬ ɨ ɫɟɬɹɯ, ɫɜɹɡɚɧɧɵɯ ɫ ɦɟɬɨɞɨɦ ɨɛɪɚɬɧɨɝɨ ɪɚɫɩɪɨɫɬɪɚɧɟɧɢɹ ɨɲɢɛɤɢ - ɷɬɨ ɦɨɳɧɚɹ ɢ ɲɢɪɨɤɨ ɩɪɢɦɟɧɹɟɦɚɹ ɬɟɯɧɨɥɨɝɢɹ ɨɛɭɱɟɧɢɹ ɧɟɣɪɨɧɧɵɯ ɫɟɬɟɣ. Ʉ ɫɨɠɚɥɟɧɢɸ, ɨɧɚ ɩɨɥɭɱɢɥɚ ɪɚɫɩɪɨɫɬɪɚɧɟɧɢɟ ɜ ɜɢɞɟ ɚɥɝɨɪɢɬɦɚ, ɚ ɧɟ ɜ ɜɢɞɟ ɫɩɨɫɨɛɚ ɩɨɫɬɪɨɟɧɢɹ ɚɥɝɨɪɢɬɦɨɜ. Ȼɨɥɟɟ ɨɛɳɚɹ ɬɟɨɪɢɹ ɨɛɭɱɟɧɢɹ ɧɟɣɪɨɧɧɵɯ ɫɟɬɟɣ - ɩɪɢɧɰɢɩ ɞɜɨɣɫɬɜɟɧɧɨɫɬɢ [64, 250, 290, 283] - ɦɚɥɨ ɢɡɜɟɫɬɧɚ. ɇɚ ɞɚɧɧɵɣ ɦɨɦɟɧɬ ɜ ɥɢɬɟɪɚɬɭɪɟ ɜɫɬɪɟɱɚɟɬɫɹ ɨɩɢɫɚɧɢɟ ɛɨɥɟɟ ɱɟɦ ɞɜɭɯ ɞɟɫɹɬɤɨɜ ɪɚɡɥɢɱɧɵɯ ɚɥɝɨɪɢɬɦɨɜ ɨɛɭɱɟɧɢɹ ɧɟɣɪɨɧɧɵɯ ɫɟɬɟɣ ɩɨ ɦɟɬɨɞɭ ɨɛɪɚɬɧɨɝɨ ɪɚɫɩɪɨɫɬɪɚɧɟɧɢɹ ɨɲɢɛɤɢ. ɉɪɟɞɥɚɝɚɟɦɵɣ ɜ ɷɬɨɣ ɪɚɛɨɬɟ ɩɪɨɟɤɬ ɫɬɚɧɞɚɪɬɚ ɨɪɢɟɧɬɢɪɨɜɚɧ ɜ ɩɟɪɜɭɸ ɨɱɟɪɟɞɶ ɧɚ ɫɟɬɢ, ɨɛɭɱɚɟɦɵɟ ɩɨ ɦɟɬɨɞɭ ɨɛɪɚɬɧɨɝɨ ɪɚɫɩɪɨɫɬɪɚɧɟɧɢɹ ɨɲɢɛɤɢ, ɧɨ ɜ ɩɪɢɜɟɞɟɧɧɵɯ ɩɪɢɦɟɪɚɯ ɩɨɤɚɡɚɧɚ ɩɪɢɦɟɧɢɦɨɫɬɶ ɷɬɨɝɨ ɫɬɚɧɞɚɪɬɚ ɢ ɞɥɹ ɞɪɭɝɢɯ ɬɢɩɨɜ ɧɟɣɪɨɧɧɵɯ ɫɟɬɟɣ – ɫɟɬɟɣ ɚɫɫɨɰɢɚɬɢɜɧɨɣ ɩɚɦɹɬɢ (ɏɨɩɮɢɥɞ) ɢ ɫɟɬɟɣ, ɨɛɭɱɚɸɳɢɯɫɹ ɛɟɡ ɭɱɢɬɟɥɹ (Ʉɨɯɨɧɟɧ). ɉɨɫɥɟ ɬɳɚɬɟɥɶɧɨɝɨ ɚɧɚɥɢɡɚ ɨɩɢɫɚɧɢɹ ɜɫɟɯ ɞɨɫɬɭɩɧɵɯ ɢɡ ɥɢɬɟɪɚɬɭɪɵ ɚɥɝɨɪɢɬɦɨɜ ɨɛɭɱɟɧɢɹ ɧɟɣɪɨɧɧɵɯ ɫɟɬɟɣ, ɨɩɢɪɚɹɫɶ ɧɚ ɩɪɢɧɰɢɩ ɞɜɨɣɫɬɜɟɧɧɨɫɬɢ ɜ ɨɛɭɱɟɧɢɢ ɧɟɣɪɨɧɧɵɯ ɫɟɬɟɣ ɢ ɧɚ ɫɜɨɣ ɞɜɟɧɚɞɰɚɬɢɥɟɬɧɢɣ ɨɩɵɬ, ɧɚɦ ɭɞɚɥɨɫɶ ɫɮɨɪɦɭɥɢɪɨɜɚɬɶ ɩɪɢɧɰɢɩɵ ɫɬɪɭɤɬɭɪɧɨ-ɮɭɧɤɰɢɨɧɚɥɶɧɨɣ ɨɪɝɚɧɢɡɚɰɢɢ ɧɟɣɪɨɤɨɦɩɶɸɬɟɪɨɜ. ȼ ɞɚɧɧɨɣ ɪɚɛɨɬɟ ɩɪɟɞɥɚɝɚɟɬɫɹ ɞɜɚ ɭɪɨɜɧɹ ɫɬɚɧɞɚɪɬɢɡɚɰɢɢ. ɉɟɪɜɵɣ ɭɪɨɜɟɧɶ ɫɨɫɬɨɢɬ ɜ ɫɨɡɞɚɧɢɢ ɟɞɢɧɨɝɨ ɹɡɵɤɚ ɨɩɢɫɚɧɢɹ ɮɭɧɤɰɢɨɧɚɥɶɧɵɯ ɤɨɦɩɨɧɟɧɬ ɧɟɣɪɨɤɨɦɩɶɸɬɟɪɚ. ɉɪɢ ɷɬɨɦ ɧɟ ɜɚɠɧɨ ɤɟɦ ɢ ɞɥɹ ɤɚɤɢɯ ɤɨɦɩɶɸɬɟɪɨɜ ɛɵɥ ɪɚɡɪɚɛɨɬɚɧ ɩɪɨɝɪɚɦɦɧɵɣ ɢɦɢɬɚɬɨɪ. ȼɨɡɦɨɠɧɨɫɬɶ ɢɦɟɬɶ ɜɧɟɲɧɟɟ, ɩɨ ɨɬɧɨɲɟɧɢɸ ɤ ɩɪɨɝɪɚɦɦɧɨɦɭ ɢɦɢɬɚɬɨɪɭ, ɨɩɢɫɚɧɢɟ ɜɫɟɯ ɨɫɧɨɜɧɵɯ ɤɨɦɩɨɧɟɧɬ ɧɟɣɪɨɤɨɦɩɶɸɬɟɪɚ ɩɪɢɡɜɚɧɚ ɨɛɥɟɝɱɢɬɶ ɪɚɡɪɚɛɨɬɤɭ ɢ ɪɚɫɩɪɨɫɬɪɚɧɟɧɢɟ ɚɪɯɢɬɟɤɬɭɪ ɧɟɣɪɨɧɧɵɯ ɫɟɬɟɣ, ɩɪɚɜɢɥ ɢɧɬɟɪɩɪɟɬɚɰɢɢ ɨɬɜɟɬɨɜ ɢ ɢɯ ɨɰɟɧɤɢ, ɚɥɝɨɪɢɬɦɨɜ ɨɛɭɱɟɧɢɹ, ɦɟɬɨɞɨɜ ɤɨɧɬɪɚɫɬɢɪɨɜɚɧɢɹ (ɫɤɟɥɟɬɨɧɢɡɚɰɢɢ) ɢ ɬ.ɞ. ɉɪɢ ɷɬɨɦ ɪɟɡɭɥɶɬɚɬ ɫɬɚɧɨɜɢɬɫɹ ɧɟ ɡɚɜɢɫɹɳɢɦ ɨɬ ɩɪɨɝɪɚɦɦɵ, ɩɪɢ ɩɨɦɨɳɢ ɤɨɬɨɪɨɣ ɨɧ ɛɵɥ ɩɨɥɭɱɟɧ, ɢ ɜɨɫɩɪɨɢɡɜɨɞɢɦɵɦ ɞɪɭɝɢɦɢ ɢɫɫɥɟɞɨɜɚɬɟɥɹɦɢ. ȼɬɨɪɨɣ ɭɪɨɜɟɧɶ ɩɪɟɞɥɚɝɚɟɦɨɝɨ ɩɪɨɟɤɬɚ ɫɬɚɧɞɚɪɬɚ ɩɪɟɞɭɫɦɚɬɪɢɜɚɟɬ ɜɨɡɦɨɠɧɨɫɬɶ ɜɡɚɢɦɨɡɚɦɟɧɵ ɪɚɡɥɢɱɧɵɯ ɤɨɦɩɨɧɟɧɬ ɜ ɩɪɟɞɟɥɚɯ ɨɞɧɨɣ ɩɪɨɝɪɚɦɦɵ. ɉɪɟɞɩɨɥɚɝɚɟɬɫɹ, ɱɬɨ ɜɨɡɦɨɠɧɨ ɢɫɩɨɥɶɡɨɜɚɧɢɟ ɤɨɦɩɨɧɟɧɬ ɨɞɧɨɝɨ ɪɚɡɪɚɛɨɬɱɢɤɚ ɩɪɨɝɪɚɦɦ ɫɨɜɦɟɫɬɧɨ ɫ ɤɨɦɩɨɧɟɧɬɚɦɢ, ɪɚɡɪɚɛɨɬɚɧɧɵɦɢ ɞɪɭɝɢɦɢ ɪɚɡɪɚɛɨɬɱɢɤɚɦɢ. ɗɬɨɬ ɫɬɚɧɞɚɪɬ ɩɨ ɫɜɨɟɦɭ ɩɪɢɦɟɧɟɧɢɸ ɫɭɳɟɫɬɜɟɧɧɨ ɭɠɟ ɩɟɪɜɨɝɨ, ɩɨɫɤɨɥɶɤɭ ɜɨɡɦɨɠɧɨɫɬɢ ɩɟɪɟɧɨɫɚ ɪɚɡɪɚɛɨɬɨɤ ɦɟɠɞɭ ɪɚɡɥɢɱɧɵɦɢ ɜɵɱɢɫɥɢɬɟɥɶɧɵɦɢ ɩɥɚɬɮɨɪɦɚɦɢ ɫɢɥɶɧɨ ɨɝɪɚɧɢɱɟɧɵ. ɇɟɫɤɨɥɶɤɨ ɫɥɨɜ ɨ ɫɬɪɭɤɬɭɪɟ ɤɧɢɝɢ. ȼ ɩɟɪɜɨɣ ɝɥɚɜɟ ɜɵɞɟɥɹɸɬɫɹ ɨɫɧɨɜɧɵɟ ɤɨɦɩɨɧɟɧɬɵ ɧɟɣɪɨɤɨɦɩɶɸɬɟɪɚ ɩɨ ɫɥɟɞɭɸɳɢɦ ɩɪɢɡɧɚɤɚɦ. 1. Ɉɬɧɨɫɢɬɟɥɶɧɚɹ ɮɭɧɤɰɢɨɧɚɥɶɧɚɹ ɨɛɨɫɨɛɥɟɧɧɨɫɬɶ: ɤɚɠɞɵɣ ɤɨɦɩɨɧɟɧɬ ɢɦɟɟɬ ɱɟɬɤɢɣ ɧɚɛɨɪ ɮɭɧɤɰɢɣ. ȿɝɨ ɜɡɚɢɦɨɞɟɣɫɬɜɢɟ ɫ ɞɪɭɝɢɦɢ ɤɨɦɩɨɧɟɧɬɚɦɢ ɦɨɠɟɬ ɛɵɬɶ ɨɩɢɫɚɧɨ ɜ ɜɢɞɟ ɧɟɛɨɥɶɲɨɝɨ ɱɢɫɥɚ ɡɚɩɪɨɫɨɜ. 2. ȼɨɡɦɨɠɧɨɫɬɶ ɪɟɚɥɢɡɚɰɢɢ ɛɨɥɶɲɢɧɫɬɜɚ ɢɫɩɨɥɶɡɭɟɦɵɯ ɚɥɝɨɪɢɬɦɨɜ. 3. ȼɨɡɦɨɠɧɨɫɬɶ ɜɡɚɢɦɨɡɚɦɟɧɵ ɪɚɡɥɢɱɧɵɯ ɪɟɚɥɢɡɚɰɢɣ ɥɸɛɨɝɨ ɤɨɦɩɨɧɟɧɬɚ ɛɟɡ ɢɡɦɟɧɟɧɢɹ ɞɪɭɝɢɯ ɤɨɦɩɨɧɟɧɬɨɜ.
CHAP0.DOC
3
ȼɨ ɜɬɨɪɨɣ ɝɥɚɜɟ ɨɩɢɫɚɧɵ ɫɬɚɧɞɚɪɬɵ ɬɢɩɨɜ ɞɚɧɧɵɯ ɢ ɨɛɳɢɣ ɛɚɡɢɫ ɹɡɵɤɚ ɨɩɢɫɚɧɢɹ ɪɚɡɥɢɱɧɵɯ ɤɨɦɩɨɧɟɧɬɨɜ ɧɟɣɪɨɤɨɦɩɶɸɬɟɪɚ. ȼ ɧɟɣ ɬɚɤɠɟ ɩɪɢɜɟɞɟɧɨ ɨɩɢɫɚɧɢɟ ɡɚɩɪɨɫɨɜ, ɢɫɩɨɥɧɹɟɦɵɯ ɜɫɟɦɢ ɢɥɢ ɛɨɥɶɲɢɧɫɬɜɨɦ ɤɨɦɩɨɧɟɧɬ. Ʉɪɨɦɟ ɬɨɝɨ, ɜ ɷɬɨɣ ɝɥɚɜɟ ɩɪɢɜɟɞɟɧɵ ɫɩɨɫɨɛɵ ɪɚɛɨɬɵ ɫ ɧɟɫɬɚɧɞɚɪɬɧɵɦɢ ɬɢɩɚɦɢ ɞɚɧɧɵɯ, ɬɚɤɢɦɢ ɤɚɤ «ɰɜɟɬ» ɩɪɢɦɟɪɚ ɜ ɨɛɭɱɚɸɳɟɣ ɜɵɛɨɪɤɟ ɢ ɞɪ. Ʉɚɠɞɚɹ ɢɡ ɨɫɬɚɥɶɧɵɯ ɝɥɚɜ ɩɨɫɜɹɳɟɧɚ ɨɩɢɫɚɧɢɸ ɨɞɧɨɝɨ ɢɥɢ ɧɟɫɤɨɥɶɤɢɯ ɬɟɫɧɨ ɫɜɹɡɚɧɧɵɯ ɦɟɠɞɭ ɫɨɛɨɣ ɤɨɦɩɨɧɟɧɬɨɜ ɧɟɣɪɨɤɨɦɩɶɸɬɟɪɚ. Ƚɥɚɜɵ ɮɚɤɬɢɱɟɫɤɢ ɫɚɦɨɫɬɨɹɬɟɥɶɧɵ. ȿɫɥɢ ɜɨɡɧɢɤɚɟɬ ɧɟɨɛɯɨɞɢɦɨɫɬɶ ɩɪɢɜɥɟɱɟɧɢɹ ɦɚɬɟɪɢɚɥɚ ɞɪɭɝɢɯ ɝɥɚɜ, ɬɨ ɞɚɟɬɫɹ ɬɨɱɧɚɹ ɫɫɵɥɤɚ ɧɚ ɪɚɡɞɟɥ, ɜ ɤɨɬɨɪɨɦ ɩɪɢɜɨɞɢɬɫɹ ɧɭɠɧɵɣ ɦɚɬɟɪɢɚɥ. Ʉɚɠɞɚɹ ɢɡ ɷɬɢɯ ɝɥɚɜ, ɫɨɫɬɨɢɬ ɢɡ ɬɪɟɯ ɱɚɫɬɟɣ. ȼ ɩɟɪɜɨɣ ɱɚɫɬɢ ɩɪɢɜɨɞɢɬɫɹ ɨɛɫɭɠɞɟɧɢɟ ɪɚɫɫɦɚɬɪɢɜɚɟɦɨɝɨ ɤɨɦɩɨɧɟɧɬɚ ɧɟɣɪɨɤɨɦɩɶɸɬɟɪɚ, ɩɪɢɜɨɞɹɬɫɹ ɩɪɢɦɟɪɵ. ȼɨ ɜɬɨɪɨɣ ɱɚɫɬɢ ɝɥɚɜɵ ɨɩɢɫɵɜɚɟɬɫɹ ɩɪɟɞɥɚɝɚɟɦɵɣ ɫɬɚɧɞɚɪɬ ɹɡɵɤɚ ɨɩɢɫɚɧɢɹ ɤɨɦɩɨɧɟɧɬɵ, ɚ ɜ ɬɪɟɬɶɟɣ – ɨɩɢɫɚɧɢɟ ɡɚɩɪɨɫɨɜ, ɢɫɩɨɥɧɹɟɦɵɯ ɷɬɢɦ ɤɨɦɩɨɧɟɧɬɨɦ. Ȼɥɚɝɨɞɚɪɧɨɫɬɢ. ɂɞɟɹ ɧɚɩɢɫɚɧɢɹ ɷɬɨɣ ɤɧɢɝɢ ɪɨɞɢɥɚɫɶ ɧɚ ɨɫɧɨɜɟ ɞɜɟɧɚɞɰɚɬɢɥɟɬɧɟɣ ɪɚɛɨɬɵ Ʉɪɚɫɧɨɹɪɫɤɨɣ ɝɪɭɩɩɵ ɇɟɣɪɨɄɨɦɩ. Ɍɚɤ ɜɵɞɟɥɟɧɢɟ ɮɭɧɤɰɢɨɧɚɥɶɧɵɯ ɤɨɦɩɨɧɟɧɬ ɹɜɢɥɨɫɶ ɪɟɡɭɥɶɬɚɬɨɦ ɪɚɡɪɚɛɨɬɤɢ ɪɹɞɚ ɧɟɣɪɨɫɟɬɟɜɵɯ ɩɪɨɝɪɚɦɦ Ƚɢɥɟɜɵɦ ɋ.ȿ., Ʉɨɱɟɧɨɜɵɦ Ⱦ.Ⱥ., Ɋɨɫɫɢɟɜɵɦ Ⱦ.Ⱥ, ɢ ɚɜɬɨɪɨɦ. Ⱥɜɬɨɪ ɛɥɚɝɨɞɚɪɟɧ Ƚɢɥɟɜɭ ɋ.ȿ, Ⱦɨɪɪɟɪɭ Ɇ.Ƚ., Ʉɨɱɟɧɨɜɭ Ⱦ.Ⱥ., ɇɨɜɨɯɨɞɶɤɨ Ⱥ.ɘ., Ɋɨɫɫɢɟɜɭ Ⱦ.Ⱥ., ɋɢɪɨɬɢɧɢɧɨɣ ɇ.ɘ., ɐɚɪɟɝɨɪɨɞɰɟɜɭ ȼ.Ƚ. ɢ ɑɟɪɬɵɤɨɜɭ ɉ.ȼ. ɡɚ ɧɟɨɞɧɨɤɪɚɬɧɵɟ ɢ ɨɱɟɧɶ ɩɨɥɟɡɧɵɟ ɨɛɫɭɠɞɟɧɢɹ ɩɪɟɞɥɚɝɚɟɦɵɯ ɜ ɤɧɢɝɟ ɫɬɚɧɞɚɪɬɨɜ. Ⱥɜɬɨɪ ɛɥɚɝɨɞɚɪɟɧ ɞɢɪɟɤɬɨɪɭ ɮɢɪɦɵ «ȺɁȺ» ɂ.Ƚ.ɋɭɥɶɤɢɫɭ, ɞɢɪɟɤɬɨɪɭ Ʉɪɚɫɧɨɹɪɫɤɨɝɨ ɜɵɫɲɟɝɨ ɤɨɥɥɟɞɠɚ ɢɧɮɨɪɦɚɬɢɤɢ Ƚ.Ɇ.ɐɢɛɭɥɶɫɤɨɦɭ ɢ ɞɢɪɟɤɬɨɪɭ ɂȼɆ ɋɈ ɊȺɇ ȼ.ȼ.ɒɚɣɞɭɪɨɜɭ ɡɚ ɧɟɨɰɟɧɢɦɭɸ ɨɪɝɚɧɢɡɚɰɢɨɧɧɭɸ ɩɨɞɞɟɪɠɤɭ. Ɉɫɨɛɭɸ ɛɥɚɝɨɞɚɪɧɨɫɬɶ ɚɜɬɨɪ ɜɵɪɚɠɚɟɬ ɫɜɨɟɦɭ ɭɱɢɬɟɥɸ, ɪɭɤɨɜɨɞɢɬɟɥɸ ɝɪɭɩɩɵ ɇɟɣɪɨɄɨɦɩ Ⱥ.ɇ.Ƚɨɪɛɚɧɸ. Ɋɚɛɨɬɚ ɧɚɞ ɤɧɢɝɨɣ ɛɵɥɚ ɩɨɞɞɟɪɠɚɧɚ Ʉɪɚɫɧɨɹɪɫɤɢɦ ɤɪɚɟɜɵɦ ɮɨɧɞɨɦ ɧɚɭɤɢ (ɝɪɚɧɬ ???)
CHAP0.DOC
4
1. Ɏɭɧɤɰɢɨɧɚɥɶɧɵɟ ɤɨɦɩɨɧɟɧɬɵ ɗɬɚ ɝɥɚɜɚ ɩɨɫɜɹɳɟɧɚ ɜɵɞɟɥɟɧɢɸ ɮɭɧɤɰɢɨɧɚɥɶɧɵɯ ɤɨɦɩɨɧɟɧɬɨɜ, ɫɨɫɬɚɜɥɹɸɳɢɯ ɭɧɢɜɟɪɫɚɥɶɧɵɣ ɧɟɣɪɨɤɨɦɩɶɸɬɟɪ. Ɉɫɧɨɜɧɵɟ ɤɨɦɩɨɧɟɧɬɵ ɧɟɣɪɨɤɨɦɩɶɸɬɟɪɚ ɜɵɞɟɥɹɸɬɫɹ ɩɨ ɫɥɟɞɭɸɳɢɦ ɩɪɢɡɧɚɤɚɦ: 1. Ɉɬɧɨɫɢɬɟɥɶɧɚɹ ɮɭɧɤɰɢɨɧɚɥɶɧɚɹ ɨɛɨɫɨɛɥɟɧɧɨɫɬɶ: ɤɚɠɞɵɣ ɤɨɦɩɨɧɟɧɬ ɢɦɟɟɬ ɱɟɬɤɢɣ ɧɚɛɨɪ ɮɭɧɤɰɢɣ. ȿɝɨ ɜɡɚɢɦɨɞɟɣɫɬɜɢɟ ɫ ɞɪɭɝɢɦɢ ɤɨɦɩɨɧɟɧɬɚɦɢ ɦɨɠɟɬ ɛɵɬɶ ɨɩɢɫɚɧɨ ɜ ɜɢɞɟ ɧɟɛɨɥɶɲɨɝɨ ɱɢɫɥɚ ɡɚɩɪɨɫɨɜ. 2. ȼɨɡɦɨɠɧɨɫɬɶ ɪɟɚɥɢɡɚɰɢɢ ɛɨɥɶɲɢɧɫɬɜɚ ɢɫɩɨɥɶɡɭɟɦɵɯ ɚɥɝɨɪɢɬɦɨɜ. 3. ȼɨɡɦɨɠɧɨɫɬɶ ɜɡɚɢɦɨɡɚɦɟɧɵ ɪɚɡɥɢɱɧɵɯ ɪɟɚɥɢɡɚɰɢɣ ɥɸɛɨɝɨ ɤɨɦɩɨɧɟɧɬɚ ɛɟɡ ɢɡɦɟɧɟɧɢɹ ɞɪɭɝɢɯ ɤɨɦɩɨɧɟɧɬɨɜ. Ɉɞɧɚɤɨ, ɩɪɟɠɞɟ ɱɟɦ ɩɪɢɫɬɭɩɚɬɶ ɤ ɜɵɞɟɥɟɧɢɸ ɤɨɦɩɨɧɟɧɬ, ɨɩɢɲɟɦ ɪɚɫɫɦɚɬɪɢɜɚɟɦɵɣ ɧɚɛɨɪ ɧɟɣɪɨɧɧɵɯ ɫɟɬɟɣ ɢ ɩɪɨɰɟɫɫ ɢɯ ɨɛɭɱɟɧɢɹ.
1.1 Ʉɪɚɬɤɢɣ ɨɛɡɨɪ ɧɟɣɪɨɧɧɵɯ ɫɟɬɟɣ Ɇɨɠɧɨ ɩɨ ɪɚɡɧɨɦɭ ɨɩɢɫɵɜɚɬɶ «ɡɨɨɩɚɪɤ» ɧɟɣɪɨɧɧɵɯ ɫɟɬɟɣ. ɉɪɢɜɟɞɟɦ ɤɥɚɫɫɢɮɢɤɚɰɢɸ ɧɟɣɪɨɧɧɵɯ ɫɟɬɟɣ ɩɨ ɪɟɲɚɟɦɵɦ ɢɦɢ ɡɚɞɚɱɚɦ. 1. Ʉɥɚɫɫɢɮɢɤɚɰɢɹ ɛɟɡ ɭɱɢɬɟɥɹ ɢɥɢ ɩɨɢɫɤ ɡɚɤɨɧɨɦɟɪɧɨɫɬɟɣ ɜ ɞɚɧɧɵɯ. ɇɚɢɛɨɥɟɟ ɢɡɜɟɫɬɧɵɦ ɩɪɟɞɫɬɚɜɢɬɟɥɟɦ ɷɬɨɝɨ ɤɥɚɫɫɚ ɫɟɬɟɣ ɹɜɥɹɟɬɫɹ ɫɟɬɶ Ʉɨɯɨɧɟɧɚ, ɪɟɚɥɢɡɭɸɳɚɹ ɩɪɨɫɬɟɣɲɢɣ ɜɚɪɢɚɧɬ ɪɟɲɟɧɢɹ ɷɬɨɣ ɡɚɞɚɱɢ. ɇɚɢɛɨɥɟɟ ɨɛɳɢɣ ɜɚɪɢɚɧɬ ɪɟɲɟɧɢɹ ɷɬɨɣ ɡɚɞɚɱɢ ɢɡɜɟɫɬɟɧ ɤɚɤ ɦɟɬɨɞ ɞɢɧɚɦɢɱɟɫɤɢɯ ɹɞɟɪ [223, 261]. 2. Ⱥɫɫɨɰɢɚɬɢɜɧɚɹ ɩɚɦɹɬɶ. ɇɚɢɛɨɥɟɟ ɢɡɜɟɫɬɧɵɣ ɩɪɟɞɫɬɚɜɢɬɟɥɶ – ɫɟɬɢ ɏɨɩɮɢɥɞɚ. ɗɬɚ ɡɚɞɚɱɚ ɬɚɤɠɟ ɩɨɡɜɨɥɹɟɬ ɫɬɪɨɢɬɶ ɨɛɨɛɳɟɧɢɹ. ɇɚɢɛɨɥɟɟ ɨɛɳɢɣ ɜɚɪɢɚɧɬ ɨɩɢɫɚɧ ɜ [77 – 79]. 3. Ⱥɩɩɪɨɤɫɢɦɚɰɢɹ ɮɭɧɤɰɢɣ, ɡɚɞɚɧɧɵɯ ɜ ɤɨɧɟɱɧɨɦ ɱɢɫɥɟ ɬɨɱɟɤ. Ʉ ɫɟɬɹɦ, ɪɟɲɚɸɳɢɦ ɷɬɭ ɡɚɞɚɱɭ, ɨɬɧɨɫɹɬɫɹ ɩɟɪɫɟɩɬɪɨɧɵ, ɫɟɬɢ ɨɛɪɚɬɧɨɝɨ ɪɚɫɩɪɨɫɬɪɚɧɟɧɢɹ. ȼ ɰɟɧɬɪɟ ɧɚɲɟɝɨ ɜɧɢɦɚɧɢɹ ɛɭɞɭɬ ɫɟɬɢ, ɩɪɟɞɧɚɡɧɚɱɟɧɧɵɟ ɞɥɹ ɪɟɲɟɧɢɹ ɬɪɟɬɶɟɣ ɡɚɞɚɱɢ, ɨɞɧɚɤɨ ɩɪɟɞɥɚɝɚɟɦɵɣ ɜɚɪɢɚɧɬ ɫɬɚɧɞɚɪɬɚ ɩɨɡɜɨɥɹɟɬ ɨɩɢɫɚɬɶ ɥɸɛɭɸ ɫɟɬɶ. Ʉɨɧɟɱɧɨ, ɧɟɜɨɡɦɨɠɧɨ ɢɫɩɨɥɶɡɨɜɚɬɶ ɭɱɢɬɟɥɶ, ɩɪɟɞɧɚɡɧɚɱɟɧɧɵɣ ɞɥɹ ɩɨɫɬɪɨɟɧɢɹ ɚɫɫɨɰɢɚɬɢɜɧɨɣ ɩɚɦɹɬɢ, ɞɥɹ ɪɟɲɟɧɢɹ ɡɚɞɚɱɢ ɤɥɚɫɫɢɮɢɤɚɰɢɢ ɛɟɡ ɭɱɢɬɟɥɹ ɢ ɧɚɨɛɨɪɨɬ. ɋɪɟɞɢ ɫɟɬɟɣ, ɚɩɩɪɨɤɫɢɦɢɪɭɸɳɢɯ ɮɭɧɤɰɢɢ, ɧɟɨɛɯɨɞɢɦɨ ɜɵɞɟɥɢɬɶ ɟɳɟ ɞɜɚ ɬɢɩɚ ɫɟɬɟɣ – ɫ ɞɢɮɮɟɪɟɧɰɢɪɭɟɦɨɣ ɢ ɩɨɪɨɝɨɜɨɣ ɯɚɪɚɤɬɟɪɢɫɬɢɱɟɫɤɨɣ ɮɭɧɤɰɢɟɣ. Ⱦɢɮɮɟɪɟɧɰɢɪɭɟɦɨɣ ɛɭɞɟɦ ɧɚɡɵɜɚɬɶ ɫɟɬɶ, ɤɚɠɞɵɣ ɷɥɟɦɟɧɬ ɤɨɬɨɪɨɣ ɪɟɚɥɢɡɭɟɬ ɞɢɮɮɟɪɟɧɰɢɪɭɟɦɭɸ ɮɭɧɤɰɢɸ (ɬɨɱɧɟɟ, ɧɟɩɪɟɪɵɜɧɨ ɞɢɮɮɟɪɟɧɰɢɪɭɟɦɭɸ). ȼɨɨɛɳɟ ɝɨɜɨɪɹ, ɚɥɶɬɟɪɧɚɬɢɜɨɣ ɞɢɮɮɟɪɟɧɰɢɪɭɟɦɨɣ ɫɟɬɢ ɹɜɥɹɟɬɫɹ ɧɟɞɢɮɮɟɪɟɧɰɢɪɭɟɦɚɹ, ɚ ɧɟ ɩɨɪɨɝɨɜɚɹ, ɧɨ ɧɚ ɩɪɚɤɬɢɤɟ, ɤɚɤ ɩɪɚɜɢɥɨ, ɜɫɟ ɧɟɞɢɮɮɟɪɟɧɰɢɪɭɟɦɵɟ ɫɟɬɢ ɹɜɥɹɸɬɫɹ ɩɨɪɨɝɨɜɵɦɢ. Ɉɬɦɟɬɢɦ, ɱɬɨ ɞɥɹ ɬɨɝɨ, ɱɬɨɛɵ ɫɟɬɶ ɛɵɥɚ ɩɨɪɨɝɨɜɨɣ, ɞɨɫɬɚɬɨɱɧɨ ɜɫɬɚɜɢɬɶ ɜ ɧɟɟ ɨɞɢɧ ɩɨɪɨɝɨɜɵɣ ɷɥɟɦɟɧɬ. Ɉɫɧɨɜɧɨɟ ɪɚɡɥɢɱɢɟ ɦɟɠɞɭ ɞɢɮɮɟɪɟɧɰɢɪɭɟɦɵɦɢ ɢ ɩɨɪɨɝɨɜɵɦɢ ɫɟɬɹɦɢ ɫɨɫɬɨɢɬ ɜ ɫɩɨɫɨɛɟ ɨɛɭɱɟɧɢɹ. Ⱦɥɹ ɞɢɮɮɟɪɟɧɰɢɪɭɟɦɵɯ ɫɟɬɟɣ ɟɫɬɶ ɤɨɧɫɬɪɭɤɬɢɜɧɚɹ ɩɪɨɰɟɞɭɪɚ ɨɛɭɱɟɧɢɹ, ɝɚɪɚɧɬɢɪɭɸɳɚɹ ɪɟɡɭɥɶɬɚɬ, ɟɫɥɢ ɨɧ ɞɨɫɬɢɠɢɦ – ɦɟɬɨɞ ɞɜɨɣɫɬɜɟɧɧɨɝɨ ɨɛɭɱɟɧɢɹ (ɨɛɪɚɬɧɨɝɨ ɪɚɫɩɪɨɫɬɪɚɧɟɧɢɹ ɨɲɢɛɤɢ). Ⱦɥɹ ɨɛɭɱɟɧɢɹ ɩɨɪɨɝɨɜɵɯ ɫɟɬɟɣ ɢɫɩɨɥɶɡɭɸɬ ɩɪɚɜɢɥɨ ɏɟɛɛɚ ɢɥɢ ɟɝɨ ɦɨɞɢɮɢɤɚɰɢɢ. Ɉɞɧɚɤɨ, ɞɥɹ ɦɧɨɝɨɫɥɨɣɧɵɯ ɫɟɬɟɣ ɫ ɩɨɪɨɝɨɜɵɦɢ ɷɥɟɦɟɧɬɚɦɢ ɩɪɚɜɢɥɨ ɏɟɛɛɚ ɧɟ ɝɚɪɚɧɬɢɪɭɟɬ ɨɛɭɱɟɧɢɹ. (ȼ ɫɥɭɱɚɟ ɨɞɧɨɫɥɨɣɧɵɯ ɫɟɬɟɣ – ɩɟɪɫɟɩɬɪɨɧɨɜ, ɞɨɤɚɡɚɧɚ ɬɟɨɪɟɦɚ ɨ ɞɨɫɬɢɠɟɧɢɢ ɪɟɡɭɥɶɬɚɬɚ ɜ ɫɥɭɱɚɟ ɟɝɨ ɩɪɢɧɰɢɩɢɚɥɶɧɨɣ ɞɨɫɬɢɠɢɦɨɫɬɢ). ɋ ɞɪɭɝɨɣ ɫɬɨɪɨɧɵ, ɜ ɪɚɛɨɬɟ [145] ɞɨɤɚɡɚɧɨ, ɱɬɨ ɦɧɨɝɨɫɥɨɣɧɵɟ ɫɟɬɢ ɫ ɩɨɪɨɝɨɜɵɦɢ ɧɟɣɪɨɧɚɦɢ ɦɨɠɧɨ ɡɚɦɟɧɢɬɶ ɷɤɜɢɜɚɥɟɧɬɧɵɦɢ ɨɞɧɨɫɥɨɣɧɵɦɢ.
1.2 ȼɵɞɟɥɟɧɢɟ ɤɨɦɩɨɧɟɧɬ ɉɟɪɜɵɦ ɨɫɧɨɜɧɵɦ ɤɨɦɩɨɧɟɧɬɨɦ ɧɟɣɪɨɤɨɦɩɶɸɬɟɪɚ ɹɜɥɹɟɬɫɹ ɧɟɣɪɨɧɧɚɹ ɫɟɬɶ. Ɉɬɧɨɫɢɬɟɥɶɧɨ ɚɪɯɢɬɟɤɬɭɪɵ ɫɟɬɢ ɩɪɢɧɰɢɩ ɞɜɨɣɫɬɜɟɧɧɨɫɬɢ ɩɪɟɞɩɨɥɚɝɚɟɬ ɬɨɥɶɤɨ ɨɞɧɨ – ɜɫɟ ɷɥɟɦɟɧɬɵ ɫɟɬɢ ɪɟɚɥɢɡɭɸɬ ɩɪɢ 1 ɩɪɹɦɨɦ ɮɭɧɤɰɢɨɧɢɪɨɜɚɧɢɢ ɯɚɪɚɤɬɟɪɢɫɬɢɱɟɫɤɢɟ ɮɭɧɤɰɢɢ ɢɡ ɤɥɚɫɫɚ C E (ɧɟɩɪɟɪɵɜɧɨ ɞɢɮɮɟɪɟɧɰɢ-
( )
ɪɭɟɦɵɟ ɧɚ ɨɛɥɚɫɬɢ ɨɩɪɟɞɟɥɟɧɢɹ E , ɤɨɬɨɪɨɣ, ɤɚɤ ɩɪɚɜɢɥɨ, ɹɜɥɹɟɬɫɹ ɜɫɹ ɱɢɫɥɨɜɚɹ ɨɫɶ). Ⱦɥɹ ɨɛɭɱɟɧɢɹ ɧɟɣɪɨɧɧɨɣ ɫɟɬɢ ɧɟɨɛɯɨɞɢɦɨ ɧɚɥɢɱɢɟ ɡɚɞɚɱɧɢɤɚ. Ɉɞɧɚɤɨ ɱɚɳɟ ɜɫɟɝɨ, ɨɛɭɱɟɧɢɟ ɩɪɨɢɡɜɨɞɢɬɫɹ ɧɟ ɩɨ ɜɫɟɦɭ ɡɚɞɚɱɧɢɤɭ, ɚ ɩɨ ɧɟɤɨɬɨɪɨɣ ɟɝɨ ɱɚɫɬɢ. Ɍɭ ɱɚɫɬɶ ɡɚɞɚɱɧɢɤɚ, ɩɨ ɤɨɬɨɪɨɣ ɜ ɞɚɧɧɵɣ ɦɨɦɟɧɬ ɩɪɨɢɡɜɨɞɢɬɫɹ ɨɛɭɱɟɧɢɟ, ɛɭɞɟɦ ɧɚɡɵɜɚɬɶ ɨɛɭɱɚɸɳɟɣ ɜɵɛɨɪɤɨɣ. Ⱦɥɹ ɦɧɨɝɢɯ ɡɚɞɚɱ ɨɛɭɱɚɸɳɚɹ ɜɵɛɨɪɤɚ ɢɦɟɟɬ ɛɨɥɶɲɢɟ ɪɚɡɦɟɪɵ (ɨɬ ɧɟɫɤɨɥɶɤɢɯ ɫɨɬ ɞɨ ɧɟɫɤɨɥɶɤɢɯ ɞɟɫɹɬɤɨɜ ɬɵɫɹɱ ɩɪɢɦɟɪɨɜ). ɉɪɢ ɨɛɭɱɟɧɢɢ ɫ ɢɫɩɨɥɶɡɨɜɚɧɢɟɦ ɫɤɨɪɨɫɬɧɵɯ ɦɟɬɨɞɨɜ ɨɛɭɱɟɧɢɹ (ɢɯ ɫɤɨɪɨɫɬɶ ɧɚ ɬɪɢ-ɱɟɬɵɪɟ ɩɨɪɹɞɤɚ ɩɪɟɜɵɲɚɟɬ ɫɤɨɪɨɫɬɶ ɨɛɭɱɟɧɢɹ ɩɨ ɤɥɚɫɫɢɱɟɫɤɨɦɭ ɦɟɬɨɞɭ ɨɛɪɚɬɧɨɝɨ ɪɚɫɩɪɨɫɬɪɚɧɟɧɢɹ ɨɲɢɛɤɢ) ɩɪɢɯɨɞɢɬɫɹ ɛɵɫɬɪɨ ɫɦɟɧɹɬɶ ɩɪɢɦɟɪɵ. Ɍɚɤɢɦ ɨɛɪɚɡɨɦ, ɫɤɨɪɨɫɬɶ ɨɛɪɚɛɨɬɤɢ ɨɛɭɱɚɸɳɟɣ ɜɵɛɨɪɤɢ ɦɨɠɟɬ ɫɭɳɟɫɬɜɟɧɧɨ ɜɥɢɹɬɶ ɧɚ ɫɤɨɪɨɫɬɶ ɨɛɭɱɟɧɢɹ ɧɟɣɪɨɤɨɦɩɶɸɬɟɪɚ. Ʉ ɫɨɠɚɥɟɧɢɸ, ɛɨɥɶɲɢɧɫɬɜɨ ɪɚɡɪɚɛɨɬɱɢɤɨɜ ɚɩɩɚɪɚɬɧɵɯ ɫɪɟɞɫɬɜ
CHAP1.DOC
5
ɧɟ ɩɪɟɞɭɫɦɚɬɪɢɜɚɟɬ ɫɪɟɞɫɬɜ ɞɥɹ ɛɵɫɬɪɨɣ ɫɦɟɧɵ ɩɪɢɦɟɪɨɜ. Ɍɚɤɢɦ ɨɛɪɚɡɨɦ, ɡɚɞɚɱɧɢɤ ɜɵɞɟɥɟɧ ɜ ɨɬɞɟɥɶɧɵɣ ɤɨɦɩɨɧɟɧɬ ɧɟɣɪɨɤɨɦɩɶɸɬɟɪɚ. ɉɪɢ ɪɚɛɨɬɟ ɫ ɨɛɭɱɚɸɳɟɣ ɜɵɛɨɪɤɨɣ ɭɞɨɛɧɨ ɢɫɩɨɥɶɡɨɜɚɬɶ ɩɪɢɜɵɱɧɵɣ ɞɥɹ ɩɨɥɶɡɨɜɚɬɟɥɹ ɮɨɪɦɚɬ ɞɚɧɧɵɯ. Ɉɞɧɚɤɨ, ɷɬɨɬ ɮɨɪɦɚɬ ɱɚɳɟ ɜɫɟɝɨ ɧɟɩɪɢɝɨɞɟɧ ɞɥɹ ɢɫɩɨɥɶɡɨɜɚɧɢɹ ɧɟɣɪɨɫɟɬɶɸ. Ɍɚɤɢɦ ɨɛɪɚɡɨɦ, ɦɟɠɞɭ ɨɛɭɱɚɸɳɟɣ ɜɵɛɨɪɤɨɣ ɢ ɧɟɣɪɨɫɟɬɶɸ ɜɨɡɧɢɤɚɟɬ ɞɨɩɨɥɧɢɬɟɥɶɧɵɣ ɤɨɦɩɨɧɟɧɬ ɧɟɣɪɨɤɨɦɩɶɸɬɟɪɚ – ɩɪɟɞɨɛɪɚɛɨɬɱɢɤ . ɂɡ ɥɢɬɟɪɚɬɭɪɧɵɯ ɢɫɬɨɱɧɢɤɨɜ ɫɥɟɞɭɟɬ, ɱɬɨ ɪɚɡɪɚɛɨɬɤɚ ɷɮɮɟɤɬɢɜɧɵɯ ɩɪɟɞɨɛɪɚɛɨɬɱɢɤɨɜ ɞɥɹ ɧɟɣɪɨɤɨɦɩɶɸɬɟɪɨɜ ɹɜɥɹɟɬɫɹ ɧɨɜɨɣ, ɩɨɱɬɢ ɫɨɜɫɟɦ ɧɟ ɢɫɫɥɟɞɨɜɚɧɧɨɣ ɨɛɥɚɫɬɶɸ. Ȼɨɥɶɲɢɧɫɬɜɨ ɪɚɡɪɚɛɨɬɱɢɤɨɜ ɩɪɨɝɪɚɦɦɧɨɝɨ ɨɛɟɫɩɟɱɟɧɢɹ ɞɥɹ ɧɟɣɪɨɤɨɦɩɶɸɬɟɪɨɜ ɫɤɥɨɧɧɨ ɜɨɡɥɚɝɚɬɶ ɮɭɧɤɰɢɢ ɩɪɟɞɨɛɪɚɛɨɬɤɢ ɜɯɨɞɧɵɯ ɞɚɧɧɵɯ ɧɚ ɨɛɭɱɚɸɳɭɸ ɜɵɛɨɪɤɭ ɢɥɢ ɜɨɨɛɳɟ ɩɟɪɟɤɥɚɞɵɜɚɸɬ ɟɟ ɧɚ ɩɨɥɶɡɨɜɚɬɟɥɹ. ɗɬɨ ɪɟɲɟɧɢɟ ɬɟɯɧɨɥɨɝɢɱɟɫɤɢ ɧɟɜɟɪɧɨ. Ⱦɟɥɨ ɜ ɬɨɦ, ɱɬɨ ɩɪɢ ɩɨɫɬɚɧɨɜɤɟ ɡɚɞɚɱɢ ɞɥɹ ɧɟɣɪɨɤɨɦɩɶɸɬɟɪɚ ɬɪɭɞɧɨ ɫɪɚɡɭ ɭɝɚɞɚɬɶ ɩɪɚɜɢɥɶɧɵɣ ɫɩɨɫɨɛ ɩɪɟɞɨɛɪɚɛɨɬɤɢ. Ⱦɥɹ ɟɝɨ ɩɨɞɛɨɪɚ ɩɪɨɜɨɞɢɬɫɹ ɫɟɪɢɹ ɷɤɫɩɟɪɢɦɟɧɬɨɜ. ȼ ɤɚɠɞɨɦ ɢɡ ɷɤɫɩɟɪɢɦɟɧɬɨɜ ɢɫɩɨɥɶɡɭɟɬɫɹ ɨɞɧɚ ɢ ɬɚ ɠɟ ɨɛɭɱɚɸɳɚɹ ɜɵɛɨɪɤɚ ɢ ɪɚɡɧɵɟ ɫɩɨɫɨɛɵ ɩɪɟɞɨɛɪɚɛɨɬɤɢ ɜɯɨɞɧɵɯ ɞɚɧɧɵɯ ɫɟɬɢ. Ɍɚɤɢɦ ɨɛɪɚɡɨɦ, ɜɵɞɟɥɟɧ ɬɪɟɬɢɣ ɜɚɠɧɵɣ ɤɨɦɩɨɧɟɧɬ ɧɟɣɪɨɤɨɦɩɶɸɬɟɪɚ – ɩɪɟɞɨɛɪɚɛɨɬɱɢɤ ɜɯɨɞɧɵɯ ɞɚɧɧɵɯ. Ɂɚɦɟɬɢɦ, ɱɬɨ ɟɫɥɢ ɩɪɢɜɵɱɧɵɣ ɞɥɹ ɱɟɥɨɜɟɤɚ ɫɩɨɫɨɛ ɩɪɟɞɫɬɚɜɥɟɧɢɹ ɜɯɨɞɧɵɯ ɞɚɧɧɵɯ ɧɟɩɪɢɝɨɞɟɧ ɞɥɹ ɧɟɣɪɨɧɧɨɣ ɫɟɬɢ, ɬɨ ɢ ɮɨɪɦɚɬ ɨɬɜɟɬɨɜ ɧɟɣɪɨɧɧɨɣ ɫɟɬɢ ɱɚɫɬɨ ɦɚɥɨɩɪɢɝɨɞɟɧ ɞɥɹ ɱɟɥɨɜɟɤɚ. ɇɟɨɛɯɨɞɢɦɨ ɢɧɬɟɪɩɪɟɬɢɪɨɜɚɬɶ ɨɬɜɟɬɵ ɧɟɣɪɨɧɧɨɣ ɫɟɬɢ. ɂɧɬɟɪɩɪɟɬɚɰɢɹ ɡɚɜɢɫɢɬ ɨɬ ɜɢɞɚ ɨɬɜɟɬɚ. Ɍɚɤ, ɟɫɥɢ ɨɬɜɟɬɨɦ ɧɟɣɪɨɧɧɨɣ ɫɟɬɢ ɹɜɥɹɟɬɫɹ ɞɟɣɫɬɜɢɬɟɥɶɧɨɟ ɱɢɫɥɨ, ɬɨ ɟɝɨ, ɤɚɤ ɩɪɚɜɢɥɨ, ɩɪɢɯɨɞɢɬɫɹ ɦɚɫɲɬɚɛɢɪɨɜɚɬɶ ɢ ɫɞɜɢɝɚɬɶ ɞɥɹ ɩɨɩɚɞɚɧɢɹ ɜ ɧɭɠɧɵɣ ɞɢɚɩɚɡɨɧ ɨɬɜɟɬɨɜ. ȿɫɥɢ ɫɟɬɶ ɢɫɩɨɥɶɡɭɟɬɫɹ ɤɚɤ ɤɥɚɫɫɢɮɢɤɚɬɨɪ, ɬɨ ɜɵɛɨɪ ɢɧɬɟɪɩɪɟɬɚɬɨɪɨɜ ɟɳɟ ɲɢɪɟ. Ȼɨɥɶɲɨɟ ɪɚɡɧɨɨɛɪɚɡɢɟ ɢɧɬɟɪɩɪɟɬɚɬɨɪɨɜ ɩɪɢ ɧɟɜɨɡɦɨɠɧɨɫɬɢ ɪɟɲɢɬɶ ɪɚɡ ɢ ɧɚɜɫɟɝɞɚ ɜɨɩɪɨɫ ɨ ɩɪɟɢɦɭɳɟɫɬɜɚɯ ɨɞɧɨɝɨ ɢɡ ɧɢɯ ɧɚɞ ɞɪɭɝɢɦɢ ɩɪɢɜɨɞɢɬ ɤ ɧɟɨɛɯɨɞɢɦɨɫɬɢ ɜɵɞɟɥɟɧɢɹ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ ɨɬɜɟɬɚ ɧɟɣɪɨɧɧɨɣ ɫɟɬɢ ɜ ɨɬɞɟɥɶɧɵɣ ɤɨɦɩɨɧɟɧɬ ɧɟɣɪɨɤɨɦɩɶɸɬɟɪɚ. ɋ ɢɧɬɟɪɩɪɟɬɚɬɨɪɨɦ ɨɬɜɟɬɚ ɬɟɫɧɨ ɫɜɹɡɚɧ ɟɳɟ ɨɞɢɧ ɨɛɹɡɚɬɟɥɶɧɵɣ ɤɨɦɩɨɧɟɧɬ ɧɟɣɪɨɤɨɦɩɶɸɬɟɪɚ – ɨɰɟɧɤɚ. ɇɟɜɧɢɦɚɧɢɟ ɤ ɷɬɨɦɭ ɤɨɦɩɨɧɟɧɬɭ ɜɵɡɜɚɧɨ ɩɪɚɤɬɢɤɨɣ ɪɚɫɫɦɚɬɪɢɜɚɬɶ ɦɟɬɨɞ ɨɛɪɚɬɧɨɝɨ ɪɚɫɩɪɨɫɬɪɚɧɟɧɢɹ ɨɲɢɛɤɢ ɜ ɜɢɞɟ ɚɥɝɨɪɢɬɦɚ. Ⱦɨɦɢɧɢɪɨɜɚɧɢɟ ɬɚɤɨɣ ɬɨɱɤɢ ɡɪɟɧɢɹ ɩɪɢɜɟɥɨ ɤ ɬɨɦɭ, ɱɬɨ, ɫɭɞɹ ɩɨ ɩɭɛɥɢɤɚɰɢɹɦ, ɛɨɥɶɲɢɧɫɬɜɨ ɢɫɫɥɟɞɨɜɚɬɟɥɟɣ ɞɚɠɟ ɧɟ ɩɨɞɨɡɪɟɜɚɟɬ ɨ ɬɨɦ, ɱɬɨ «ɭɤɥɨɧɟɧɢɟ ɨɬ ɩɪɚɜɢɥɶɧɨɝɨ ɨɬɜɟɬɚ», ɩɨɞɚɜɚɟɦɨɟ ɧɚ ɜɯɨɞ ɫɟɬɢ ɩɪɢ ɨɛɪɚɬɧɨɦ ɮɭɧɤɰɢɨɧɢɪɨɜɚɧɢɢ, ɟɫɬɶ ɧɢ ɱɬɨ ɢɧɨɟ, ɤɚɤ ɩɪɨɢɡɜɨɞɧɚɹ ɮɭɧɤɰɢɢ ɨɰɟɧɤɢ ɩɨ ɜɵɯɨɞɧɨɦɭ ɫɢɝɧɚɥɭ ɫɟɬɢ (ɟɫɥɢ ɮɭɧɤɰɢɹ ɨɰɟɧɤɢ ɹɜɥɹɟɬɫɹ ɫɭɦɦɨɣ ɤɜɚɞɪɚɬɨɜ ɭɤɥɨɧɟɧɢɣ). ȼɨɡɦɨɠɧɨ (ɢ ɢɧɨɝɞɚ ɨɱɟɧɶ ɩɨɥɟɡɧɨ) ɤɨɧɫɬɪɭɢɪɨɜɚɬɶ ɞɪɭɝɢɟ ɨɰɟɧɤɢ (ɫɦ. ɝɥɚɜɭ «Ɉɰɟɧɤɚ ɢ ɢɧɬɟɪɩɪɟɬɚɬɨɪ ɨɬɜɟɬɚ»). ɇɚɲɟɣ ɝɪɭɩɩɨɣ ɜ ɯɨɞɟ ɱɢɫɥɟɧɧɵɯ ɷɤɫɩɟɪɢɦɟɧɬɨɜ ɛɵɥɨ ɜɵɹɫɧɟɧɨ, ɱɬɨ ɞɥɹ ɨɛɭɱɟɧɢɹ ɫɟɬɟɣɤɥɚɫɫɢɮɢɤɚɬɨɪɨɜ ɮɭɧɤɰɢɹ ɨɰɟɧɤɢ ɜɢɞɚ ɫɭɦɦɵ ɤɜɚɞɪɚɬɨɜ, ɩɨɠɚɥɭɣ, ɧɚɢɛɨɥɟɟ ɩɥɨɯɚ. ɂɫɩɨɥɶɡɨɜɚɧɢɟ ɚɥɶɬɟɪɧɚɬɢɜɧɵɯ ɮɭɧɤɰɢɣ ɨɰɟɧɤɢ ɩɨɡɜɨɥɹɟɬ ɜ ɧɟɫɤɨɥɶɤɨ ɪɚɡ ɭɫɤɨɪɢɬɶ ɨɛɭɱɟɧɢɟ ɧɟɣɪɨɧɧɨɣ ɫɟɬɢ. ɒɟɫɬɵɦ ɧɟɨɛɯɨɞɢɦɵɦ ɤɨɦɩɨɧɟɧɬɨɦ ɧɟɣɪɨɤɨɦɩɶɸɬɟɪɚ ɹɜɥɹɟɬɫɹ ɭɱɢɬɟɥɶ. ɗɬɨɬ ɤɨɦɩɨɧɟɧɬ ɦɨɠɟɬ ɦɟɬɶ ɦɧɨɠɟɫɬɜɨ ɪɟɚɥɢɡɚɰɢɣ. Ɉɛɡɨɪ ɧɚɢɛɨɥɟɟ ɱɚɫɬɨ ɭɩɨɬɪɟɛɥɹɟɦɵɯ ɢ ɧɚɢɛɨɥɟɟ ɷɮɮɟɤɬɢɜɧɵɯ ɭɱɢɬɟɥɟɣ ɩɪɢɜɨɞɢɬɫɹ ɜ ɝɥɚɜɟ «ɍɱɢɬɟɥɶ». ɉɪɢɧɰɢɩ ɨɬɧɨɫɢɬɟɥɶɧɨɣ ɮɭɧɤɰɢɨɧɚɥɶɧɨɣ ɨɛɨɫɨɛɥɟɧɧɨɫɬɢ ɬɪɟɛɭɟɬ ɜɵɞɟɥɟɧɢɹ ɟɳɟ ɨɞɧɨɝɨ ɤɨɦɩɨɧɟɧɬɚ, ɧɚɡɜɚɧɧɨɝɨ ɢɫɩɨɥɧɢɬɟɥɟɦ ɡɚɩɪɨɫɨɜ ɭɱɢɬɟɥɹ ɢɥɢ ɩɪɨɫɬɨ ɢɫɩɨɥɧɢɬɟɥɟɦ. ɇɚɡɧɚɱɟɧɢɟ ɷɬɨɝɨ ɤɨɦɩɨɧɟɧɬɚ ɧɟ ɬɚɤ ɨɱɟɜɢɞɧɨ, ɤɚɤ ɜɫɟɯ ɩɪɟɞɵɞɭɳɢɯ. Ɂɚɦɟɬɢɦ, ɱɬɨ ɞɥɹ ɜɫɟɯ ɭɱɢɬɟɥɟɣ, ɨɛɭɱɚɸɳɢɯ ɫɟɬɢ ɩɨ ɦɟɬɨɞɭ ɨɛɪɚɬɧɨɝɨ ɪɚɫɩɪɨɫɬɪɚɧɟɧɢɹ ɨɲɢɛɤɢ, ɢ ɩɪɢ ɬɟɫɬɢɪɨɜɚɧɢɢ ɫɟɬɢ ɯɚɪɚɤɬɟɪɟɧ ɫɥɟɞɭɸɳɢɣ ɧɚɛɨɪ ɨɩɟɪɚɰɢɣ ɫ ɤɚɠɞɵɦ ɩɪɢɦɟɪɨɦ ɨɛɭɱɚɸɳɟɣ ɜɵɛɨɪɤɢ: 1. Ɍɟɫɬɢɪɨɜɚɧɢɟ ɪɟɲɟɧɢɹ ɩɪɢɦɟɪɚ 1.1. ȼɡɹɬɶ ɩɪɢɦɟɪ ɭ ɡɚɞɚɱɧɢɤɚ. 1.2. ɉɪɟɞɴɹɜɢɬɶ ɟɝɨ ɫɟɬɢ ɞɥɹ ɪɟɲɟɧɢɹ. 1.3. ɉɪɟɞɴɹɜɢɬɶ ɪɟɡɭɥɶɬɚɬ ɢɧɬɟɪɩɪɟɬɚɬɨɪɭ ɨɬɜɟɬɚ. 2. Ɉɰɟɧɢɜɚɧɢɟ ɪɟɲɟɧɢɹ ɩɪɢɦɟɪɚ 2.1. ȼɡɹɬɶ ɩɪɢɦɟɪ ɭ ɡɚɞɚɱɧɢɤɚ. 2.2. ɉɪɟɞɴɹɜɢɬɶ ɟɝɨ ɫɟɬɢ ɞɥɹ ɪɟɲɟɧɢɹ. 2.3. ɉɪɟɞɴɹɜɢɬɶ ɪɟɡɭɥɶɬɚɬ ɨɰɟɧɤɟ. 3. Ɉɰɟɧɢɜɚɧɢɟ ɪɟɲɟɧɢɹ ɩɪɢɦɟɪɚ ɫ ɜɵɱɢɫɥɟɧɢɟɦ ɝɪɚɞɢɟɧɬɚ. 3.1. ȼɡɹɬɶ ɩɪɢɦɟɪ ɭ ɡɚɞɚɱɧɢɤɚ. 3.2. ɉɪɟɞɴɹɜɢɬɶ ɟɝɨ ɫɟɬɢ ɞɥɹ ɪɟɲɟɧɢɹ. 3.3. ɉɪɟɞɴɹɜɢɬɶ ɪɟɡɭɥɶɬɚɬ ɨɰɟɧɤɟ ɫ ɜɵɱɢɫɥɟɧɢɟɦ ɩɪɨɢɡɜɨɞɧɵɯ. 3.4. ɉɪɟɞɴɹɜɢɬɶ ɪɟɡɭɥɶɬɚɬ ɪɚɛɨɬɵ ɨɰɟɧɤɢ ɫɟɬɢ ɞɥɹ ɜɵɱɢɫɥɟɧɢɹ ɝɪɚɞɢɟɧɬɚ. 4. Ɉɰɟɧɢɜɚɧɢɟ ɢ ɬɟɫɬɢɪɨɜɚɧɢɟ ɪɟɲɟɧɢɹ ɩɪɢɦɟɪɚ. 4.1. ȼɡɹɬɶ ɩɪɢɦɟɪ ɭ ɡɚɞɚɱɧɢɤɚ. 4.2. ɉɪɟɞɴɹɜɢɬɶ ɟɝɨ ɫɟɬɢ ɞɥɹ ɪɟɲɟɧɢɹ. 4.3. ɉɪɟɞɴɹɜɢɬɶ ɪɟɡɭɥɶɬɚɬ ɨɰɟɧɤɟ. 4.4. ɉɪɟɞɴɹɜɢɬɶ ɪɟɡɭɥɶɬɚɬ ɢɧɬɟɪɩɪɟɬɚɬɨɪɭ ɨɬɜɟɬɚ.
CHAP1.DOC
6
Ɂɚɦɟɬɢɦ, ɱɬɨ ɜɫɟ ɱɟɬɵɪɟ ɜɚɪɢɚɧɬɚ ɪɚɛɨɬɵ ɫ ɫɟɬɶɸ, ɡɚɞɚɱɧɢɤɨɦ, ɢɧɬɟɪɩɪɟɬɚɬɨɪɨɦ ɨɬɜɟɬɚ ɢ ɨɰɟɧɤɨɣ ɥɟɝɤɨ ɨɛɴɟɞɢɧɢɬɶ ɜ ɨɞɢɧ ɡɚɩɪɨɫ, ɩɚɪɚɦɟɬɪɵ ɤɨɬɨɪɨɝɨ ɩɨɡɜɨɥɹɸɬ ɭɤɚɡɚɬɶ ɩɨɫɥɟɞɨɜɚɬɟɥɶɧɨɫɬɶ ɞɟɣɫɬɜɢɣ. Ɍɚɤɢɦ ɨɛɪɚɡɨɦ, ɢɫɩɨɥɧɢɬɟɥɶ ɢɫɩɨɥɧɹɟɬ ɜɫɟɝɨ ɨɞɢɧ ɡɚɩɪɨɫ – ɨɛɪɚɛɨɬɚɬɶ ɩɪɢɦɟɪ. Ɉɞɧɚɤɨ ɜɵɞɟɥɟɧɢɟ ɷɬɨɝɨ ɤɨɦɩɨɧɟɧɬɚ ɩɨɡɜɨɥɹɟɬ ɢɫɤɥɸɱɢɬɶ ɧɟɨɛɯɨɞɢɦɨɫɬɶ ɜ ɩɪɹɦɵɯ ɫɜɹɡɹɯ ɬɚɤɢɯ ɤɨɦɩɨɧɟɧɬɨɜ, ɤɚɤ ɤɨɧɬɪɚɫɬɟɪ ɢ ɭɱɢɬɟɥɶ, ɫ ɤɨɦɩɨɧɟɧɬɚɦɢ ɨɰɟɧɤɚ ɢ ɢɧɬɟɪɩɪɟɬɚɬɨɪ ɨɬɜɟɬɚ, ɚ ɢɯ ɜɡɚɢɦɨɞɟɣɫɬɜɢɟ ɫ ɤɨɦɩɨɧɟɧɬɨɦ ɫɟɬɶ ɫɜɟɫɬɢ ɢɫɤɥɸɱɢɬɟɥɶɧɨ ɤ ɡɚɩɪɨɫɚɦ ɫɜɹɡɚɧɧɵɦ ɫ ɦɨɞɢɮɢɤɚɰɢɟɣ ɨɛɭɱɚɟɦɵɯ ɩɚɪɚɦɟɬɪɨɜ ɫɟɬɢ. ɉɨɫɥɟɞɧɢɦ ɤɨɦɩɨɧɟɧɬɨɦ, ɤɨɬɨɪɨɝɨ ɧɟɨɛɯɨɞɢɦɨ ɜɵɞɟɥɢɬɶ, ɹɜɥɹɟɬɫɹ ɤɨɧɬɪɚɫɬɟɪ ɧɟɣɪɨɧɧɨɣ ɫɟɬɢ. ɗɬɨɬ ɤɨɦɩɨɧɟɧɬ ɹɜɥɹɟɬɫɹ ɧɚɞɫɬɪɨɣɤɨɣ ɧɚɞ ɭɱɢɬɟɥɟɦ. ȿɝɨ ɧɚɡɧɚɱɟɧɢɟ – ɫɜɨɞɢɬɶ ɱɢɫɥɨ ɫɜɹɡɟɣ ɫɟɬɢ ɞɨ ɦɢɧɢɦɚɥɶɧɨ ɧɟɨɛɯɨɞɢɦɨɝɨ ɢɥɢ ɞɨ «ɪɚɡɭɦɧɨɝɨ» ɦɢɧɢɦɭɦɚ (ɫɬɟɩɟɧɶ ɪɚɡɭɦɧɨɫɬɢ ɦɢɧɢɦɭɦɚ ɨɩɪɟɞɟɥɹɟɬɫɹ ɩɨɥɶɡɨɜɚɬɟɥɟɦ). Ʉɪɨɦɟ ɬɨɝɨ, ɤɨɧɬɪɚɫɬɟɪ, ɤɚɤ ɩɪɚɜɢɥɨ, ɩɨɡɜɨɥɹɟɬ ɫɜɟɫɬɢ ɦɧɨɠɟɫɬɜɨ ɜɟɥɢɱɢɧ ɜɟɫɨɜ ɫɜɹɡɟɣ ɤ 2-4, ɪɟɠɟ ɤ 8 ɜɵɞɟɥɟɧɧɵɦ ɩɨɥɶɡɨɜɚɬɟɥɟɦ ɡɧɚɱɟɧɢɹɦ. ɇɚɢɛɨɥɟɟ ɜɚɠɧɵɦ ɫɥɟɞɫɬɜɢɟɦ ɩɪɢɦɟɧɟɧɢɹ ɩɪɨɰɟɞɭɪɵ ɤɨɧɬɪɚɫɬɢɪɨɜɚɧɢɹ ɹɜɥɹɟɬɫɹ ɩɨɥɭɱɟɧɢɟ ɥɨɝɢɱɟɫɤɢ ɩɪɨɡɪɚɱɧɵɯ ɫɟɬɟɣ – ɫɟɬɟɣ, ɪɚɛɨɬɭ ɤɨɬɨɪɵɯ ɥɟɝɤɨ ɨɩɢɫɚɬɶ ɢ ɩɨɧɹɬɶ ɧɚ ɹɡɵɤɟ ɥɨɝɢɤɢ [75, 82]. Ⱦɥɹ ɤɨɨɪɞɢɧɚɰɢɢ ɪɚɛɨɬɵ ɜɫɟɯ ɤɨɦɩɨɧɟɧɬ ɧɟɣɪɨɤɨɦɩɶɸɬɟɪɚ ɜɜɨɞɢɬɫɹ ɦɚɤɪɨɤɨɦɩɨɧɟɧɬɚ ɇɟɣɪɨɤɨɦɩɶɸɬɟɪ . Ɉɫɧɨɜɧɚɹ ɡɚɞɚɱɚ ɷɬɨɝɨ ɤɨɦɩɨɧɟɧɬɚ – ɨɪɝɚɧɢɡɚɰɢɹ ɢɧɬɟɪɮɟɣɫɚ ɫ ɩɨɥɶɡɨɜɚɬɟɥɟɦ ɢ ɤɨɨɪɞɢɧɚɰɢɹ ɞɟɣɫɬɜɢɣ ɜɫɟɯ ɨɫɬɚɥɶɧɵɯ ɤɨɦɩɨɧɟɧɬɨɜ.
1.3 Ɂɚɩɪɨɫɵ ɤɨɦɩɨɧɟɧɬɨɜ ɧɟɣɪɨɤɨɦɩɶɸɬɟɪɚ ȼ ɷɬɨɦ ɪɚɡɞɟɥɟ ɩɪɢɜɨɞɢɬɫɹ ɨɫɧɨɜɧɨɣ ɫɩɢɫɨɤ ɡɚɩɪɨɫɨɜ, ɤɨɬɨɪɵɟ ɨɛɟɫɩɟɱɢɜɚɸɬ ɮɭɧɤɰɢɨɧɢɪɨɜɚɧɢɟ ɧɟɣɪɨɤɨɦɩɶɸɬɟɪɚ. Ɂɚ ɪɟɞɤɢɦ ɢɫɤɥɸɱɟɧɢɟɦ ɩɪɢɜɨɞɹɬɫɹ ɬɨɥɶɤɨ ɡɚɩɪɨɫɵ, ɤɨɬɨɪɵɟ ɝɟɧɟɪɢɪɭɸɬɫɹ ɤɨɦɩɨɧɟɧɬɚɦɢ ɧɟɣɪɨɤɨɦɩɶɸɬɟɪɚ (ɧɟɤɨɬɨɪɵɟ ɢɡ ɷɬɢɯ ɡɚɩɪɨɫɨɜ ɦɨɝɭɬ ɩɨɫɬɭɩɚɬɶ ɜ ɧɟɣɪɨɤɨɦɩɶɸɬɟɪ ɨɬ ɩɨɥɶɡɨɜɚɬɟɥɹ). ɍɱɢɬɟɥɶ Ʉɨɧɬɪɚɫɬɟɪ Ɂɞɟɫɶ ɪɚɫɫɦɚɬɪɢɜɚɟɬɫɹ ɬɨɥɶɤɨ ɮɨɪɦɚ ɡɚɩɪɨɫɚ ɢ ɟɝɨ ɫɦɵɫɥ. ɉɨɥɧɵɣ ɫɩɢɫɨɤ ɡɚɩɪɨɫɨɜ ɤɚɠɞɨɝɨ ɤɨɦɩɨɧɟɧɬɚ, ɞɟɬɚɥɢ ɢɯ ɢɫɩɨɥɧɟɧɢɹ ɢ ɮɨɪɦɚɬɵ ɞɚɧɧɵɯ ɪɚɫɋɟɬɶ Ɂɚɞɚɱɧɢɤ ɂɫɩɨɥɧɢɬɟɥɶ ɫɦɚɬɪɢɜɚɸɬɫɹ ɜ ɫɨɨɬɜɟɬɫɬɜɭɸɳɢɯ ɝɥɚɜɚɯ, ɜ ɪɚɡɞɟɥɚɯ «ɋɬɚɧɞɚɪɬ ɜɬɨɪɨɝɨ ɭɪɨɜɧɹ ɤɨɦɩɨɧɟɧɬɚ ... «. ɇɚ ɪɢɫ. 1. ɩɪɢɜɟɞɟɧɚ ɫɯɟɦɚ ɡɚɂɧɬɟɪɩɪɟɬɚɬɨɪ ɩɪɨɫɨɜ ɜ ɧɟɣɪɨɤɨɦɩɶɸɬɟɪɟ. ɉɪɢ ɩɨɈɰɟɧɤɚ ɉɪɟɞɨɛɪɚɛɨɬɱɢɤ ɨɬɜɟɬɚ ɫɬɪɨɟɧɢɢ ɫɯɟɦɵ ɩɪɟɞɩɨɥɚɝɚɟɬɫɹ, ɱɬɨ ɧɚ ɤɚɠɞɵɣ ɡɚɩɪɨɫ ɩɪɢɯɨɞɢɬ ɨɬɜɟɬ. ȼɢɞ ɨɬɜɟɬɚ ɨɩɢɫɚɧ ɩɪɢ ɨɩɢɫɚɧɢɢ ɡɚɩɪɨɫɨɜ. ɋɬɪɟɥɤɢ, ɢɡɨɛɪɚɠɚɸɳɢɟ ɡɚɩɪɨɫɵ, ɢɞɭɬ ɨɬ ɨɛɴɟɤɬɚ, ɢɧɢɰɢɢɪɭɸɳɟɝɨ ɡɚɩɪɨɫ, ɤ ɨɛɴɟɤɬɭ ɟɝɨ ɢɫɩɨɥɧɹɸɳɟɦɭ.
Ɋɢɫ 1. ɋɯɟɦɚ ɡɚɩɪɨɫɨɜ ɜ ɧɟɣɪɨɤɨɦɩɶɸɬɟɪɟ
1.3.1 Ɂɚɩɪɨɫɵ ɤ ɡɚɞɚɱɧɢɤɭ Ɂɚɩɪɨɫɵ ɤ ɡɚɞɚɱɧɢɤɭ ɩɨɡɜɨɥɹɸɬ ɩɨɫɥɟɞɨɜɚɬɟɥɶɧɨ ɩɟɪɟɛɢɪɚɬɶ ɜɫɟ ɩɪɢɦɟɪɵ ɨɛɭɱɚɸɳɟɣ ɜɵɛɨɪɤɢ, ɨɛɪɚɳɚɬɶɫɹ ɧɟɩɨɫɪɟɞɫɬɜɟɧɧɨ ɤ ɥɸɛɨɦɭ ɩɪɢɦɟɪɭ ɡɚɞɚɱɧɢɤɚ ɢ ɢɡɦɟɧɹɬɶ ɨɛɭɱɚɸɳɭɸ ɜɵɛɨɪɤɭ. Ɉɛɭɱɚɸɳɚɹ ɜɵɛɨɪɤɚ ɜɵɞɟɥɹɟɬɫɹ ɩɭɬɟɦ «ɪɚɫɤɪɚɲɢɜɚɧɢɹ» ɩɪɢɦɟɪɨɜ ɡɚɞɚɱɧɢɤɚ ɜ ɪɚɡɥɢɱɧɵɟ «ɰɜɟɬɚ». ɉɨɧɹɬɢɟ ɰɜɟɬɚ ɢ ɫɩɨɫɨɛ ɪɚɛɨɬɵ ɫ ɰɜɟɬɚɦɢ ɨɩɢɫɚɧɵ ɜ ɪɚɡɞɟɥɟ «ɉɟɪɟɦɟɧɧɵɟ ɬɢɩɚ ɰɜɟɬ ɢ ɨɩɟɪɚɰɢɢ ɫ ɰɜɟɬɚɦɢ». Ɂɚɩɪɨɫɵ ɩɨɫɥɟɞɨɜɚɬɟɥɶɧɨɝɨ ɩɟɪɟɛɨɪɚ ɨɛɭɱɚɸɳɟɣ ɜɵɛɨɪɤɢ: «ɂɧɢɰɢɢɪɨɜɚɬɶ ɜɵɞɚɱɭ ɩɪɢɦɟɪɨɜ ɰɜɟɬɚ Ʉ». ɉɨ ɷɬɨɦɭ ɡɚɩɪɨɫɭ ɩɪɨɢɫɯɨɞɢɬ ɢɧɢɰɢɚɰɢɹ ɜɵɞɚɱɢ ɩɪɢɦɟɪɨɜ Ʉ-ɝɨ ɰɜɟɬɚ. «Ⱦɚɬɶ ɨɱɟɪɟɞɧɨɣ ɩɪɢɦɟɪ». ɉɨ ɷɬɨɦɭ ɡɚɩɪɨɫɭ ɡɚɞɚɱɧɢɤ ɜɨɡɜɪɚɳɚɟɬ ɩɪɟɞɨɛɪɚɛɨɬɚɧɧɵɟ ɞɚɧɧɵɟ ɨɱɟɪɟɞɧɨɝɨ ɩɪɢɦɟɪɚ ɢ, ɩɪɢ ɧɟɨɛɯɨɞɢɦɨɫɬɢ, ɩɪɚɜɢɥɶɧɵɟ ɨɬɜɟɬɵ, ɭɪɨɜɟɧɶ ɞɨɫɬɨɜɟɪɧɨɫɬɢ ɢ ɞɪɭɝɢɟ ɞɚɧɧɵɟ ɷɬɨɝɨ ɩɪɢɦɟɪɚ. «ɋɥɟɞɭɸɳɢɣ ɩɪɢɦɟɪ». ɉɨ ɷɬɨɦɭ ɡɚɩɪɨɫɭ ɡɚɞɚɱɧɢɤ ɩɟɪɟɯɨɞɢɬ ɤ ɫɥɟɞɭɸɳɟɦɭ ɩɪɢɦɟɪɭ ɨɛɭɱɚɸɳɟɣ ɜɵɛɨɪɤɢ. ȿɫɥɢ ɬɚɤɨɝɨ ɩɪɢɦɟɪɚ ɧɟɬ, ɬɨ ɜɨɡɜɪɚɳɚɟɬɫɹ ɩɪɢɡɧɚɤ ɨɬɫɭɬɫɬɜɢɹ ɨɱɟɪɟɞɧɨɝɨ ɩɪɢɦɟɪɚ. Ⱦɥɹ ɧɟɩɨɫɪɟɞɫɬɜɟɧɧɨɝɨ ɞɨɫɬɭɩɚ ɤ ɩɪɢɦɟɪɚɦ ɡɚɞɚɱɧɢɤɚ ɫɥɭɠɢɬ ɡɚɩɪɨɫ «Ⱦɚɬɶ ɩɪɢɦɟɪ ɧɨɦɟɪ N». Ⱦɟɣɫɬɜɢɹ ɡɚɞɚɱɧɢɤɚ ɜ ɷɬɨɦ ɫɥɭɱɚɟ ɚɧɚɥɨɝɢɱɧɵ ɜɵɩɨɥɧɟɧɢɸ ɡɚɩɪɨɫɚ «Ⱦɚɬɶ ɨɱɟɪɟɞɧɨɣ ɩɪɢɦɟɪ». Ⱦɥɹ ɢɡɦɟɧɟɧɢɹ ɨɛɭɱɚɸɳɟɣ ɜɵɛɨɪɤɢ ɫɥɭɠɢɬ ɡɚɩɪɨɫ «Ɉɤɪɚɫɢɬɶ ɩɪɢɦɟɪɵ ɜ ɰɜɟɬ Ʉ». ɗɬɨɬ ɡɚɩɪɨɫ ɢɫɩɨɥɶɡɭɟɬɫɹ ɪɟɞɤɨ, ɩɨɫɤɨɥɶɤɭ ɢɡɦɟɧɟɧɢɟ ɨɛɭɱɚɸɳɟɣ ɜɵɛɨɪɤɢ, ɤɚɤ ɩɪɚɜɢɥɨ, ɨɫɭɳɟɫɬɜɥɹɟɬɫɹ ɩɨɥɶɡɨɜɚɬɟɥɟɦ ɩɪɢ ɪɟɞɚɤɬɢɪɨɜɚɧɢɢ ɡɚɞɚɱɧɢɤɚ.
CHAP1.DOC
7
1.3.2 Ɂɚɩɪɨɫ ɤ ɩɪɟɞɨɛɪɚɛɨɬɱɢɤɭ ɉɪɟɞɨɛɪɚɛɨɬɱɢɤ ɫɚɦ ɧɢɤɚɤɢɯ ɡɚɩɪɨɫɨɜ ɧɟ ɝɟɧɟɪɢɪɭɟɬ. ȿɞɢɧɫɬɜɟɧɧɵɣ ɡɚɩɪɨɫ ɤ ɩɪɟɞɨɛɪɚɛɨɬɱɢɤɭ – «ɉɪɟɞɨɛɪɚɛɨɬɚɬɶ ɩɪɢɦɟɪ» ɦɨɠɟɬ ɛɵɬɶ ɜɵɞɚɧ ɬɨɥɶɤɨ ɡɚɞɚɱɧɢɤɨɦ.
1.3.3 Ɂɚɩɪɨɫ ɤ ɢɫɩɨɥɧɢɬɟɥɸ «Ɉɛɪɚɛɨɬɚɬɶ ɨɱɟɪɟɞɧɨɣ ɩɪɢɦɟɪ». ȼɢɞ ɨɬɜɟɬɚ ɡɚɜɢɫɢɬ ɨɬ ɩɚɪɚɦɟɬɪɨɜ ɡɚɩɪɨɫɚ.
1.3.4 Ɂɚɩɪɨɫɵ ɤ ɭɱɢɬɟɥɸ «ɇɚɱɚɬɶ ɨɛɭɱɟɧɢɟ ɫɟɬɢ». ɉɨ ɷɬɨɦɭ ɡɚɩɪɨɫɭ ɭɱɢɬɟɥɶ ɧɚɱɢɧɚɟɬ ɩɪɨɰɟɫɫ ɨɛɭɱɟɧɢɹ ɫɟɬɢ. «ɉɪɟɪɜɚɬɶ ɨɛɭɱɟɧɢɟ ɫɟɬɢ». ɗɬɨɬ ɡɚɩɪɨɫ ɩɪɢɜɨɞɢɬ ɤ ɩɪɟɤɪɚɳɟɧɢɸ ɩɪɨɰɟɫɫɚ ɨɛɭɱɟɧɢɹ ɫɟɬɢ. ɗɬɨɬ ɡɚɩɪɨɫ ɬɪɟɛɭɟɬɫɹ ɜ ɫɥɭɱɚɟ ɧɟɨɛɯɨɞɢɦɨɫɬɢ ɨɫɬɚɧɨɜɢɬɶ ɨɛɭɱɟɧɢɟ ɫɟɬɢ ɞɨ ɬɨɝɨ, ɤɚɤ ɛɭɞɟɬ ɭɞɨɜɥɟɬɜɨɪɟɧ ɤɪɢɬɟɪɢɣ ɨɫɬɚɧɨɜɤɢ ɨɛɭɱɟɧɢɹ, ɩɪɟɞɭɫɦɨɬɪɟɧɧɵɣ ɜ ɭɱɢɬɟɥɟ. «ɉɪɨɜɟɫɬɢ N ɲɚɝɨɜ ɨɛɭɱɟɧɢɹ» – ɤɚɤ ɩɪɚɜɢɥɨ, ɜɵɞɚɟɬɫɹ ɤɨɧɬɪɚɫɬɟɪɨɦ, ɧɟɨɛɯɨɞɢɦ ɞɥɹ ɧɚɤɨɩɥɟɧɢɹ ɩɨɤɚɡɚɬɟɥɟɣ ɱɭɜɫɬɜɢɬɟɥɶɧɨɫɬɢ.
1.3.5 Ɂɚɩɪɨɫ ɤ ɤɨɧɬɪɚɫɬɟɪɭ «Ɉɬɤɨɧɬɪɚɫɬɢɪɨɜɚɬɶ ɫɟɬɶ». Ɉɬɜɟɬɨɦ ɹɜɥɹɟɬɫɹ ɤɨɞ ɡɚɜɟɪɲɟɧɢɹ ɨɩɟɪɚɰɢɢ ɤɨɧɬɪɚɫɬɢɪɨɜɚɧɢɹ.
1.3.6 Ɂɚɩɪɨɫ ɤ ɨɰɟɧɤɟ Ɉɰɟɧɤɚ ɧɟ ɝɟɧɟɪɢɪɭɟɬ ɧɢɤɚɤɢɯ ɡɚɩɪɨɫɨɜ. Ɉɧɚ ɜɵɩɨɥɧɹɟɬ ɬɨɥɶɤɨ ɨɞɢɧ ɡɚɩɪɨɫ – «Ɉɰɟɧɢɬɶ ɩɪɢɦɟɪ». Ɋɟɡɭɥɶɬɚɬɨɦ ɜɵɩɨɥɧɟɧɢɹ ɡɚɩɪɨɫɚ ɹɜɥɹɟɬɫɹ ɨɰɟɧɤɚ ɩɪɢɦɟɪɚ ɢ, ɩɪɢ ɧɟɨɛɯɨɞɢɦɨɫɬɢ, ɜɟɤɬɨɪ ɩɪɨɢɡɜɨɞɧɵɯ ɨɰɟɧɤɢ ɩɨ ɜɵɯɨɞɧɵɦ ɫɢɝɧɚɥɚɦ ɫɟɬɢ.
1.3.7 Ɂɚɩɪɨɫ ɤ ɢɧɬɟɪɩɪɟɬɚɬɨɪɭ ɨɬɜɟɬɚ ɂɧɬɟɪɩɪɟɬɚɬɨɪ ɨɬɜɟɬɚ ɧɟ ɝɟɧɟɪɢɪɭɟɬ ɧɢɤɚɤɢɯ ɡɚɩɪɨɫɨɜ. Ɉɧ ɜɵɩɨɥɧɹɟɬ ɬɨɥɶɤɨ ɨɞɢɧ ɡɚɩɪɨɫ – «ɂɧɬɟɪɩɪɟɬɢɪɨɜɚɬɶ ɨɬɜɟɬ». Ɉɬɜɟɬɨɦ ɹɜɥɹɟɬɫɹ ɪɟɡɭɥɶɬɚɬ ɢɧɬɟɪɩɪɟɬɚɰɢɢ.
1.3.8 Ɂɚɩɪɨɫɵ ɤ ɫɟɬɢ ɋɟɬɶ ɧɟ ɝɟɧɟɪɢɪɭɟɬ ɧɢɤɚɤɢɯ ɡɚɩɪɨɫɨɜ. ɇɚɛɨɪ ɢɫɩɨɥɧɹɟɦɵɯ ɫɟɬɶɸ ɡɚɩɪɨɫɨɜ ɦɨɠɧɨ ɪɚɡɛɢɬɶ ɧɚ ɬɪɢ ɝɪɭɩɩɵ. Ɂɚɩɪɨɫ, ɨɛɟɫɩɟɱɢɜɚɸɳɢɣ ɬɟɫɬɢɪɨɜɚɧɢɟ. «ɉɪɨɜɟɫɬɢ ɩɪɹɦɨɟ ɮɭɧɤɰɢɨɧɢɪɨɜɚɧɢɟ». ɇɚ ɜɯɨɞ ɫɟɬɢ ɩɨɞɚɸɬɫɹ ɞɚɧɧɵɟ ɩɪɢɦɟɪɚ. ɇɚ ɜɵɯɨɞɟ ɫɟɬɢ ɜɵɱɢɫɥɹɟɬɫɹ ɨɬɜɟɬ ɫɟɬɢ, ɩɨɞɥɟɠɚɳɢɣ ɨɰɟɧɢɜɚɧɢɸ ɢɥɢ ɢɧɬɟɪɩɪɟɬɚɰɢɢ. Ɂɚɩɪɨɫɵ, ɨɛɟɫɩɟɱɢɜɚɸɳɢɟ ɨɛɭɱɟɧɢɟ ɫɟɬɢ. «Ɉɛɧɭɥɢɬɶ ɝɪɚɞɢɟɧɬ». ɉɪɢ ɢɫɩɨɥɧɟɧɢɢ ɷɬɨɝɨ ɡɚɩɪɨɫɚ ɝɪɚɞɢɟɧɬ ɨɰɟɧɤɢ ɩɨ ɨɛɭɱɚɟɦɵɦ ɩɚɪɚɦɟɬɪɚɦ ɫɟɬɢ ɤɥɚɞɟɬɫɹ ɪɚɜɧɵɦ ɧɭɥɸ. ɗɬɨɬ ɡɚɩɪɨɫ ɧɟɨɛɯɨɞɢɦ, ɩɨɫɤɨɥɶɤɭ ɩɪɢ ɜɵɱɢɫɥɟɧɢɢ ɝɪɚɞɢɟɧɬɚ ɩɨ ɨɱɟɪɟɞɧɨɦɭ ɩɪɢɦɟɪɭ ɫɟɬɶ ɞɨɛɚɜɥɹɟɬ ɟɝɨ ɤ ɪɚɧɟɟ ɜɵɱɢɫɥɟɧɧɨɦɭ ɝɪɚɞɢɟɧɬɭ ɩɨ ɫɭɦɦɟ ɞɪɭɝɢɯ ɩɪɢɦɟɪɨɜ. «ȼɵɱɢɫɥɢɬɶ ɝɪɚɞɢɟɧɬ ɩɨ ɩɪɢɦɟɪɭ». ɉɪɨɜɨɞɢɬɫɹ ɨɛɪɚɬɧɨɟ ɮɭɧɤɰɢɨɧɢɪɨɜɚɧɢɟ ɫɟɬɢ. ȼɵɱɢɫɥɟɧɧɵɣ ɝɪɚɞɢɟɧɬ ɞɨɛɚɜɥɹɟɬɫɹ ɤ ɪɚɧɟɟ ɜɵɱɢɫɥɟɧɧɨɦɭ ɝɪɚɞɢɟɧɬɭ ɩɨ ɫɭɦɦɟ ɞɪɭɝɢɯ ɩɪɢɦɟɪɨɜ. «ɂɡɦɟɧɢɬɶ ɤɚɪɬɭ ɫ ɲɚɝɚɦɢ ɇ1 ɢ H2». Ƚɟɧɟɪɢɪɭɟɬɫɹ ɭɱɢɬɟɥɟɦ ɜɨ ɜɪɟɦɹ ɨɛɭɱɟɧɢɹ. Ɂɚɩɪɨɫ, ɨɛɟɫɩɟɱɢɜɚɸɳɢɟ ɤɨɧɬɪɚɫɬɢɪɨɜɚɧɢɟ. «ɂɡɦɟɧɢɬɶ ɤɚɪɬɭ ɩɨ ɨɛɪɚɡɰɭ». Ƚɟɧɟɪɢɪɭɟɬɫɹ ɤɨɧɬɪɚɫɬɟɪɨɦ ɩɪɢ ɤɨɧɬɪɚɫɬɢɪɨɜɚɧɢɢ ɫɟɬɢ. Ɍɚɤɢɦ ɨɛɪɚɡɨɦ, ɜɵɞɟɥɟɧɨ ɫɟɦɶ ɨɫɧɨɜɧɵɯ ɤɨɦɩɨɧɟɧɬ ɧɟɣɪɨɤɨɦɩɶɸɬɟɪɚ, ɨɩɪɟɞɟɥɟɧɵ ɢɯ ɮɭɧɤɰɢɢ ɢ ɨɫɧɨɜɧɵɟ ɢɫɩɨɥɧɹɟɦɵɟ ɢɦɢ ɡɚɩɪɨɫɵ.
CHAP1.DOC
8
2. Ɉɛɳɢɣ ɫɬɚɧɞɚɪɬ ɗɬɚ ɝɥɚɜɚ ɩɨɫɜɹɳɟɧɚ ɨɩɢɫɚɧɢɸ ɷɥɟɦɟɧɬɨɜ ɫɬɚɧɞɚɪɬɚ, ɨɛɳɢɯ ɞɥɹ ɜɫɟɯ ɤɨɦɩɨɧɟɧɬɨɜ ɧɟɣɪɨɤɨɦɩɶɸɬɟɪɚ.
2.1 ɋɬɚɧɞɚɪɬ ɬɢɩɨɜ ɞɚɧɧɵɯ ɉɪɢ ɨɩɢɫɚɧɢɢ ɡɚɩɪɨɫɨɜ, ɫɬɪɭɤɬɭɪ ɞɚɧɧɵɯ, ɫɬɚɧɞɚɪɬɨɜ ɤɨɦɩɨɧɟɧɬɨɜ ɧɟɣɪɨɤɨɦɩɶɸɬɟɪɚ ɧɟɨɛɯɨɞɢɦɨ ɢɫɩɨɥɶɡɨɜɚɬɶ ɧɚɛɨɪ ɩɟɪɜɢɱɧɵɯ ɬɢɩɨɜ ɞɚɧɧɵɯ. ɉɨɫɤɨɥɶɤɭ ɜ ɪɚɡɧɵɯ ɹɡɵɤɚɯ ɩɪɨɝɪɚɦɦɢɪɨɜɚɧɢɹ ɬɢɩɵ ɞɚɧɧɵɯ ɧɚɡɵɜɚɸɬɫɹ ɩɨ-ɪɚɡɧɨɦɭ, ɜɜɟɞɟɦ ɟɞɢɧɵɣ ɧɚɛɨɪ ɨɛɨɡɧɚɱɟɧɢɣ ɞɥɹ ɧɢɯ. Ɍɚɛɥɢɰɚ 1. Ɍɢɩɵ ɞɚɧɧɵɯ ɞɥɹ ɜɫɟɯ ɤɨɦɩɨɧɟɧɬɨɜ ɧɟɣɪɨɤɨɦɩɶɸɬɟɪɚ ɌɢɩȾɥɢɧɚɁɧɚɱɟɧɢɹɈɩɢɫɚɧɢɟ Real 4 ɛɚɣɬɚɨɬ 1.5 e- 45 Ⱦɟɣɫɬɜɢɬɟɥɶɧɨɟ ɱɢɫɥɨ. ȼɟɥɢɱɢɧɚ ɢɡ ɭɤɚɡɚɧɧɨɝɨ ɞɢɚɩɚɡɨɞɨ 3.4 e 38 ɧɚ. Ɂɧɚɤ ɩɪɨɢɡɜɨɥɶɧɵɣ. ȼ ɞɚɥɶɧɟɣɲɟɦ ɧɚɡɵɜɚɟɬɫɹ «ɞɟɣɫɬɜɢɬɟɥɶɧɨɟ». Integer 2 ɛɚɣɬɚɨɬ -32768 ɐɟɥɨɟ ɱɢɫɥɨ ɢɡ ɭɤɚɡɚɧɧɨɝɨ ɞɢɚɩɚɡɨɧɚ. ȼ ɞɚɥɶɧɟɣɲɟɦ ɧɚɞɨ 32767 ɡɵɜɚɟɬɫɹ «ɰɟɥɨɟ». Long 4 ɛɚɣɬɚɨɬ -2147483648 ɐɟɥɨɟ ɱɢɫɥɨ ɢɡ ɭɤɚɡɚɧɧɨɝɨ ɞɢɚɩɚɡɨɧɚ. ȼ ɞɚɥɶɧɟɣɲɟɦ ɧɚɞɨ 2147483647 ɡɵɜɚɟɬɫɹ «ɞɥɢɧɧɨɟ ɰɟɥɨɟ». RealArray 4*N ɛɚɣɬɆɚɫɫɢɜ ɞɟɣɫɬɜɢɬɟɥɶɧɵɯ ɱɢɫɟɥ. PRealArray 4 ɛɚɣɬɚɂɫɩɨɥɶɡɭɟɬɫɹ ɞɥɹ ɩɟɪɟɞɚɱɢ ɦɚɫɫɢɜɨɜ ɦɟɠɞɭ ɤɨɦɩɨɧɟɧɬɚɦɢ. ɂɦɟɟɬ ɡɧɚɱɟɧɢɟ ɚɞɪɟɫɚ ɦɚɫɫɢɜɚ ɞɟɣɫɬɜɢɬɟɥɶɧɵɯ ɱɢɫɟɥ. IntegerArray 2*N ɛɚɣɬɆɚɫɫɢɜ ɰɟɥɵɯ ɱɢɫɟɥ. PIntegerArray 4 ɛɚɣɬɚɂɫɩɨɥɶɡɭɟɬɫɹ ɞɥɹ ɩɟɪɟɞɚɱɢ ɦɚɫɫɢɜɨɜ ɦɟɠɞɭ ɤɨɦɩɨɧɟɧɬɚɦɢ. ɂɦɟɟɬ ɡɧɚɱɟɧɢɟ ɚɞɪɟɫɚ ɦɚɫɫɢɜɚ ɰɟɥɵɯ ɱɢɫɟɥ. LongArray 4*N ɛɚɣɬɆɚɫɫɢɜ ɞɥɢɧɧɵɯ ɰɟɥɵɯ ɱɢɫɟɥ. PLongArray 4 ɛɚɣɬɚɂɫɩɨɥɶɡɭɟɬɫɹ ɞɥɹ ɩɟɪɟɞɚɱɢ ɦɚɫɫɢɜɨɜ ɦɟɠɞɭ ɤɨɦɩɨɧɟɧɬɚɦɢ. ɂɦɟɟɬ ɡɧɚɱɟɧɢɟ ɚɞɪɟɫɚ ɦɚɫɫɢɜɚ ɞɥɢɧɧɵɯ ɰɟɥɵɯ ɱɢɫɟɥ. Logic 1 ɛɚɣɬ True, False Ʌɨɝɢɱɟɫɤɚɹ ɜɟɥɢɱɢɧɚ. Ⱦɚɥɟɟ ɧɚɡɵɜɚɟɬɫɹ «ɥɨɝɢɱɟɫɤɚɹ». LogicArray N ɛɚɣɬɆɚɫɫɢɜ ɥɨɝɢɱɟɫɤɢɯ ɩɟɪɟɦɟɧɧɵɯ. PLogicArray 4 ɛɚɣɬɚɂɫɩɨɥɶɡɭɟɬɫɹ ɞɥɹ ɩɟɪɟɞɚɱɢ ɦɚɫɫɢɜɨɜ ɦɟɠɞɭ ɤɨɦɩɨɧɟɧɬɚɦɢ. ɂɦɟɟɬ ɡɧɚɱɟɧɢɟ ɚɞɪɟɫɚ ɦɚɫɫɢɜɚ ɥɨɝɢɱɟɫɤɢɯ ɩɟɪɟɦɟɧɧɵɯ. Color 2 ɛɚɣɬɚɂɫɩɨɥɶɡɭɟɬɫɹ ɞɥɹ ɡɚɞɚɧɢɹ ɰɜɟɬɨɜ. əɜɥɹɟɬɫɹ ɫɨɜɨɤɭɩɧɨɫɬɶɸ ɢɡ 16 ɷɥɟɦɟɧɬɚɪɧɵɯ (ɛɢɬɨɜɵɯ) ɮɥɚɝɨɜ. ɋɦ. ɪɚɡɞɟɥ «ɐɜɟɬ ɢ ɨɩɟɪɚɰɢɢ ɫ ɰɜɟɬɚɦɢ». FuncType 4 ɛɚɣɬɚȺɞɪɟɫ ɮɭɧɤɰɢɢ. ɂɫɩɨɥɶɡɭɟɬɫɹ ɩɪɢ ɧɟɨɛɯɨɞɢɦɨɫɬɢ ɩɟɪɟɞɚɬɶ ɮɭɧɤɰɢɸ ɜ ɤɚɱɟɫɬɜɟ ɚɪɝɭɦɟɧɬɚ. String 256 ɛɚɣɬɋɬɪɨɤɚ ɫɢɦɜɨɥɨɜ. PString 4 ɛɚɣɬɚȺɞɪɟɫ ɫɬɪɨɤɢ ɫɢɦɜɨɥɨɜ. ɋɥɭɠɢɬ ɞɥɹ ɩɟɪɟɞɚɱɢ ɫɬɪɨɤ ɜ ɡɚɩɪɨɫɚɯ Visual 4 ɛɚɣɬɚɈɬɨɛɪɚɠɚɟɦɵɣ ɷɥɟɦɟɧɬ. ɋɥɭɠɢɬ ɞɥɹ ɚɞɪɟɫɚɰɢɢ ɨɬɨɛɪɚɠɚɟɦɵɯ ɷɥɟɦɟɧɬɨɜ ɜ ɢɧɬɟɪɮɟɣɫɧɵɯ ɮɭɧɤɰɢɹɯ. Ɍɢɩ ɡɧɚɱɟɧɢɣ ɡɚɜɢɫɢɬ ɨɬ ɪɟɚɥɢɡɚɰɢɢ ɛɢɛɥɢɨɬɟɤɢ ɢɧɬɟɪɮɟɣɫɧɵɯ ɮɭɧɤɰɢɣ ɢ ɧɟ ɦɨɠɟɬ ɢɡɦɟɧɹɬɶɫɹ ɩɨɥɶɡɨɜɚɬɟɥɟɦ ɢɧɚɱɟ, ɱɟɦ ɱɟɪɟɡ ɜɵɡɨɜ ɢɧɬɟɪɮɟɣɫɧɨɣ ɮɭɧɤɰɢɢ. Pointer 4 ɛɚɣɬɚɇɟ ɬɢɩɢɡɨɜɚɧɧɵɣ ɭɤɚɡɚɬɟɥɶ (ɚɞɪɟɫ). ɗɬɨɬ ɬɢɩ ɫɨɜɦɟɫɬɢɦ ɫ ɥɸɛɵɦ ɬɢɩɢɡɨɜɚɧɧɵɦ ɭɤɚɡɚɬɟɥɹɦ. ɑɢɫɥɨɜɵɟ ɬɢɩɵ ɞɚɧɧɵɯ Integer, Long ɢ Real ɩɪɟɞɧɚɡɧɚɱɟɧɵ ɞɥɹ ɯɪɚɧɟɧɢɹ ɪɚɡɥɢɱɧɵɯ ɱɢɫɟɥ. ɉɟɪɟɦɟɧɧɵɟ ɱɢɫɥɨɜɵɯ ɬɢɩɨɜ ɞɨɩɭɫɤɚɸɬɫɹ ɜ ɹɡɵɤɚɯ ɨɩɢɫɚɧɢɹ ɜɫɟɯ ɤɨɦɩɨɧɟɧɬɨɜ ɧɟɣɪɨɤɨɦɩɶɸɬɟɪɚ. ɉɪɢ ɧɟɨɛɯɨɞɢɦɨɫɬɢ ɡɚɩɢɫɚɬɶ ɜ ɨɞɢɧ ɦɚɫɫɢɜ ɱɢɫɥɨɜɵɟ ɩɟɪɟɦɟɧɧɵɟ ɪɚɡɥɢɱɧɨɝɨ ɬɢɩɚ ɫɥɟɞɭɟɬ ɢɫɩɨɥɶɡɨɜɚɬɶ ɮɭɧɤɰɢɢ ɩɪɢɜɟɞɟɧɢɹ ɬɢɩɨɜ, ɨɩɢɫɚɧɧɵɟ ɜ ɪɚɡɞɟɥɟ «ɉɪɢɜɟɞɟɧɢɟ ɬɢɩɨɜ» ɋɬɪɨɤɚ. ɋɢɦɜɨɥɶɧɵɣ ɬɢɩ ɞɚɧɧɵɯ ɩɪɟɞɧɚɡɧɚɱɟɧ ɞɥɹ ɯɪɚɧɟɧɢɹ ɤɨɦɦɟɧɬɚɪɢɟɜ, ɧɚɡɜɚɧɢɣ ɩɨɥɟɣ, ɢɦɟɧ ɫɟɬɟɣ, ɨɰɟɧɨɤ ɢ ɞɪɭɝɨɣ ɬɟɤɫɬɨɜɨɣ ɢɧɮɨɪɦɚɰɢɢ. ȼɫɟ ɫɬɪɨɤɨɜɵɟ ɩɟɪɟɦɟɧɧɵɟ ɡɚɧɢɦɚɸɬ 256 ɛɚɣɬ ɢ ɦɨɝɭɬ ɜɤɥɸɱɚɬɶ ɜ ɫɟɛɹ ɞɨ 255 ɫɢɦɜɨɥɨɜ. ɉɟɪɜɵɣ ɛɚɣɬ ɫɬɪɨɤɢ ɫɨɞɟɪɠɢɬ ɞɥɢɧɭ ɫɬɪɨɤɢ. ȼ ɩɟɪɟɦɟɧɧɵɯ ɬɢɩɚ
CHAP2.DOC
9
ɫɬɪɨɤɚ ɜɨɡɦɨɠɟɧ ɞɨɫɬɭɩ ɤ ɥɸɛɨɦɭ ɫɢɦɜɨɥɭ ɤɚɤ ɤ ɷɥɟɦɟɧɬɭ ɦɚɫɫɢɜɚ. ɉɪɢ ɷɬɨɦ ɞɥɢɧɚ ɢɦɟɟɬ ɢɧɞɟɤɫ ɧɨɥɶ, ɩɟɪɜɵɣ ɫɢɦɜɨɥ – 1 ɢ ɬ.ɞ. ɍɤɚɡɚɬɟɥɶ ɧɚ ɫɬɪɨɤɭ. ɉɪɢ ɩɟɪɟɞɚɱɟ ɞɚɧɧɵɯ ɦɟɠɞɭ ɤɨɦɩɨɧɟɧɬɚɦɢ ɫɟɬɢ ɢ ɩɪɨɰɟɞɭɪɚɦɢ ɜ ɩɪɟɞɟɥɚɯ ɨɞɧɨɝɨ ɤɨɦɩɨɧɟɧɬɚ ɭɞɨɛɧɨ ɜɦɟɫɬɨ ɫɬɪɨɤɢ ɩɟɪɟɞɚɜɚɬɶ ɭɤɚɡɚɬɟɥɶ ɧɚ ɫɬɪɨɤɭ, ɩɨɫɤɨɥɶɤɭ ɭɤɚɡɚɬɟɥɶ ɡɚɧɢɦɚɟɬ ɜɫɟɝɨ ɱɟɬɵɪɟ ɛɚɣɬɚ. Ⱦɥɹ ɷɬɨɣ ɰɟɥɢ ɫɥɭɠɢɬ ɬɢɩ ɭɤɚɡɚɬɟɥɶ ɧɚ ɫɬɪɨɤɭ. Ʌɨɝɢɱɟɫɤɢɣ ɬɢɩ ɢɫɩɨɥɶɡɭɟɬɫɹ ɞɥɹ ɯɪɚɧɟɧɢɹ ɥɨɝɢɱɟɫɤɢɯ ɡɧɚɱɟɧɢɣ. Ɂɧɚɱɟɧɢɟ ɢɫɬɢɧɚ ɡɚɞɚɟɬɫɹ ɩɪɟɞɨɩɪɟɞɟɥɟɧɧɨɣ ɤɨɧɫɬɚɧɬɨɣ True, ɡɧɚɱɟɧɢɟ ɥɨɠɶ – False. Ɇɚɫɫɢɜɵ. ȼ ɞɚɧɧɨɦ ɫɬɚɧɞɚɪɬɟ ɩɪɟɞɭɫɦɨɬɪɟɧɵ ɦɚɫɫɢɜɵ ɱɟɬɵɪɟɯ ɬɢɩɨɜ – ɥɨɝɢɱɟɫɤɢɯ, ɰɟɥɨɱɢɫɥɟɧɧɵɯ, ɞɥɢɧɧɵɯ ɰɟɥɵɯ ɢ ɞɟɣɫɬɜɢɬɟɥɶɧɵɯ ɩɟɪɟɦɟɧɧɵɯ. Ⱦɥɢɧɵ ɦɚɫɫɢɜɨɜ ɨɩɪɟɞɟɥɹɸɬɫɹ ɩɪɢ ɨɩɢɫɚɧɢɢ, ɧɨ ɜɫɟ ɦɚɫɫɢɜɵ ɩɟɪɟɦɟɧɧɵɯ ɨɞɧɨɝɨ ɬɢɩɚ ɨɬɧɨɫɹɬɫɹ ɤ ɨɞɧɨɦɭ ɬɢɩɭ, ɜ ɨɬɥɢɱɢɟ ɨɬ ɹɡɵɤɨɜ ɬɢɩɚ ɉɚɫɤɚɥɶ. ɂɫɩɨɥɶɡɨɜɚɧɢɟ ɮɭɧɤɰɢɣ ɩɪɢɜɟɞɟɧɢɹ ɢ ɩɪɟɨɛɪɚɡɨɜɚɧɢɹ ɬɢɩɨɜ ɩɨɡɜɨɥɹɸɬ ɩɨɥɭɱɚɬɶ ɢɡ ɷɬɢɯ ɦɚɫɫɢɜɨɜ ɫɬɪɭɤɬɭɪɵ ɩɪɨɢɡɜɨɥɶɧɨɣ ɫɥɨɠɧɨɫɬɢ. ɗɥɟɦɟɧɬɵ ɦɚɫɫɢɜɨɜ ɜɫɟɝɞɚ ɧɭɦɟɪɭɸɬɫɹ ɫ ɟɞɢɧɢɰɵ. ȼɧɟ ɡɚɜɢɫɢɦɨɫɬɢ ɨɬ ɬɢɩɚ ɦɚɫɫɢɜɚ ɧɭɥɟɜɨɣ ɷɥɟɦɟɧɬ ɦɚɫɫɢɜɚ ɢɦɟɟɬ ɬɢɩ Long ɢ ɫɨɞɟɪɠɢɬ ɞɥɢɧɭ ɦɚɫɫɢɜɚ ɜ ɷɥɟɦɟɧɬɚɯ. ɇɚ ɪɢɫ. 1 ɩɪɢɜɟɞɟɧɚ ɫɯɟɦɚ ɪɚɫɩɪɟɞɟɥɟɧɢɹ ɩɚɦɹɬɢ ɜɫɟɯ ɬɢɩɨɜ ɦɚɫɫɢɜɨɜ, ɤɚɠɞɵɣ ɢɡ ɤɨɬɨɪɵɯ ɫɨɞɟɪɠɢɬ ɲɟɫɬɶ ɷɥɟɦɟɧɬɨɜ.
ɚ) RealArray ɋɨɞɟɪɠɢɦɨɟ ɇɨɦɟɪɚ ɛɚɣɬ
03 01
00 02
00 03
00 04
01 05
Ⱥɞɪɟɫ ɦɚɫɫɢɜɚȺɞ
01 06
01 07
01 08
02 09
02 10
02 11
02 12
03 13
03 14
03 15
03 16
02 10
02 11
02 12
03 13
03 14
03 15
03 16
ɪɟɫ ɩɟɪɜɨɝɨ ɷɥɟɦɟɧɬɚ
ɛ) LongArray ɋɨɞɟɪɠɢɦɨɟ ɇɨɦɟɪɚ ɛɚɣɬ
03 01
00 02
00 03
00 04
Ⱥɞɪɟɫ ɦɚɫɫɢɜɚȺɞ
01 05
01 06
01 07
01 08
02 09
ɪɟɫ ɩɟɪɜɨɝɨ ɷɥɟɦɟɧɬɚ
ɜ) IntegerArray ɋɨɞɟɪɠɢɦɨɟ ɇɨɦɟɪɚ ɛɚɣɬ
03 01
00 02
00 03
00 04
Ⱥɞɪɟɫ ɦɚɫɫɢɜɚ ɝ) LogicArray ɋɨɞɟɪɠɢɦɨɟ ɇɨɦɟɪɚ ɛɚɣɬ
03 01
00 02
00 03
Ⱥɞɪɟɫ ɦɚɫɫɢɜɚ
00 04
01 01 02 02 03 03 05 06 07 08 09 10 Ⱥɞɪɟɫ ɩɟɪɜɨɝɨ ɷɥɟɦɟɧɬɚ Ɋɢɫ. 1. ɉɪɢɦɟɪ ɪɚɫɩɪɟɞɟɥɟɧɢɹ ɩɚɦɹɬɢ ɞɥɹ ɱɟɬɵɪɟɯ ɜɢɞɨɜ ɦɚɫɫɢɜɨɜ ɢɡ ɬɪɟɯ ɷɥɟɦɟɧɬɨɜ. 01 02 03 ɚ) Ɇɚɫɫɢɜ ɞɟɣɫɬɜɢɬɟɥɶɧɵɯ ɱɢɫɟɥ, ɡɚɧɢɦɚɟɬ 16 ɛɚɣɬ 05 06 07 ɛ) Ɇɚɫɫɢɜ ɞɥɢɧɧɵɯ ɰɟɥɵɯ ɱɢɫɟɥ, ɡɚɧɢɦɚɟɬ 16 ɛɚɣɬ Ⱥɞɪɟɫ ɩɟɪɜɨɝɨ ɜ) Ɇɚɫɫɢɜ ɰɟɥɵɯ ɱɢɫɟɥ, ɡɚɧɢɦɚɟɬ 10 ɛɚɣɬ ɷɥɟɦɟɧɬɚ ɝ) Ɇɚɫɫɢɜ ɥɨɝɢɱɟɫɤɢɯ ɜɟɥɢɱɢɧ, ɡɚɧɢɦɚɟɬ 7 ɛɚɣɬ
ȼɫɟ ɦɚɫɫɢɜɵ, ɤɚɤ ɩɪɚɜɢɥɨ, ɢɫɩɨɥɶɡɭɟɬɫɹ ɬɨɥɶɤɨ ɜ ɩɪɟɞɟɥɚɯ ɨɞɧɨɝɨ ɤɨɦɩɨɧɟɧɬɚ. ɉɪɢ ɩɟɪɟɞɚɱɟ ɦɚɫɫɢɜɨɜ ɦɟɠɞɭ ɤɨɦɩɨɧɟɧɬɚɦɢ ɢɥɢ ɦɟɠɞɭ ɩɪɨɰɟɞɭɪɚɦɢ ɜ ɩɪɟɞɟɥɚɯ ɨɞɧɨɝɨ ɤɨɦɩɨɧɟɧɬɚ ɢɫɩɨɥɶɡɭɸɬɫɹ ɭɤɚɡɚɬɟɥɢ ɧɚ ɦɚɫɫɢɜɵ. Ⱥɞɪɟɫ ɮɭɧɤɰɢɢ. ɗɬɨɬ ɬɢɩ ɢɫɩɨɥɶɡɭɟɬɫɹ ɞɥɹ ɩɟɪɟɞɚɱɢ ɮɭɧɤɰɢɢ ɜ ɤɚɱɟɫɬɜɟ ɚɪɝɭɦɟɧɬɚ. ɉɟɪɟɦɟɧɧɚɹ ɬɢɩɚ FuncType ɡɚɧɢɦɚɟɬ ɱɟɬɵɪɟ ɛɚɣɬɚ ɢ ɹɜɥɹɟɬɫɹ ɚɞɪɟɫɨɦ ɮɭɧɤɰɢɢ. ȼ ɡɚɜɢɫɢɦɨɫɬɢ ɨɬ ɪɟɚɥɢɡɚɰɢɢ ɩɨ ɷɬɨɦɭ ɚɞɪɟɫɭ ɦɨɠɟɬ ɥɟɠɚɬɶ ɥɢɛɨ ɧɚɱɚɥɨ ɦɚɲɢɧɧɨɝɨ ɤɨɞɚ ɮɭɧɤɰɢɢ, ɥɢɛɨ ɧɚɱɚɥɨ ɬɟɤɫɬɚ ɮɭɧɤɰɢɢ. ȼ ɫɥɭɱɚɟ ɩɟɪɟɞɚɱɢ ɬɟɤɫɬɚ ɮɭɧɤɰɢɢ ɩɟɪɜɵɟ ɜɨɫɟɦɶ ɛɚɣɬ ɩɨ ɩɟɪɟɞɚɧɧɨɦɭ ɚɞɪɟɫɭ ɫɨɞɟɪɠɚɬ ɫɥɨɜɨ «Function». Ɉɬɨɛɪɚɠɚɟɦɵɣ ɷɥɟɦɟɧɬ. ɉɟɪɟɦɟɧɧɵɟ ɬɢɩɚ Visual (ɨɬɨɛɪɚɠɚɟɦɵɣ ɷɥɟɦɟɧɬ) ɋɥɭɠɚɬ ɞɥɹ ɚɞɪɟɫɚɰɢɢ ɨɬɨɛɪɚɠɚɟɦɵɯ ɷɥɟɦɟɧɬɨɜ ɜ ɢɧɬɟɪɮɟɣɫɧɵɯ ɮɭɧɤɰɢɹɯ. Ɍɢɩ ɡɧɚɱɟɧɢɣ ɡɚɜɢɫɢɬ ɨɬ ɪɟɚɥɢɡɚɰɢɢ ɛɢɛɥɢɨɬɟɤɢ ɢɧɬɟɪɮɟɣɫɧɵɯ ɮɭɧɤɰɢɣ ɢ ɧɟ ɦɨɠɟɬ ɢɡɦɟɧɹɬɶɫɹ ɩɨɥɶɡɨɜɚɬɟɥɟɦ ɢɧɚɱɟ, ɱɟɦ ɱɟɪɟɡ ɜɵɡɨɜ ɢɧɬɟɪɮɟɣɫɧɨɣ ɮɭɧɤɰɢɢ. Ɉɫɨɛɨ ɫɥɟɞɭɟɬ ɨɬɦɟɬɢɬɶ, ɱɬɨ ɛɢɛɥɢɨɬɟɤɚ ɢɧɬɟɪɮɟɣɫɧɵɯ ɮɭɧɤɰɢɣ ɧɟ ɹɜɥɹɟɬɫɹ ɱɚɫɬɶɸ ɧɢ ɨɞɧɨɝɨ ɢɡ ɤɨɦɩɨɧɟɧɬɨɜ.
2.2 ɉɟɪɟɦɟɧɧɵɟ ɬɢɩɚ ɰɜɟɬ ɢ ɨɩɟɪɚɰɢɢ ɫ ɰɜɟɬɚɦɢ ɂɫɩɨɥɶɡɨɜɚɧɢɟ ɰɜɟɬɨɜ ɩɨɡɜɨɥɹɟɬ ɝɢɛɤɨ ɪɚɡɛɢɜɚɬɶ ɦɧɨɠɟɫɬɜɚ ɧɚ ɩɨɞɦɧɨɠɟɫɬɜɚ. ȼ ɧɟɣɪɨɤɨɦɩɶɸɬɟɪɟ ɜɨɡɧɢɤɚɟɬ ɧɟɨɛɯɨɞɢɦɨɫɬɶ ɜ ɪɚɡɛɢɟɧɢɢ ɧɚ ɩɨɞɦɧɨɠɟɫɬɜɚ (ɪɚɫɤɪɚɲɢɜɚɧɢɢ) ɡɚɞɚɱɧɢɤɚ. ȼ ɷɬɨɦ ɪɚɡɞɟɥɟ ɨɩɢɫɵɜɚɟɬɫɹ ɫɬɚɧɞɚɪɬ ɪɚɛɨɬɵ ɫ ɩɟɪɟɦɟɧɧɵɦɢ ɬɢɩɚ ɰɜɟɬ.
CHAP2.DOC
10
2.2.1 Ɂɧɚɱɟɧɢɟ ɩɟɪɟɦɟɧɧɨɣ ɬɢɩɚ ɰɜɟɬ (Color) ɉɟɪɟɦɟɧɧɚɹ ɬɢɩɚ ɰɜɟɬ ɩɪɟɞɫɬɚɜɥɹɟɬ ɫɨɛɨɣ ɞɜɭɯɛɚɣɬɨɜɨɟ ɛɟɡɡɧɚɤɨɜɨɟ ɰɟɥɨɟ. Ɉɞɧɚɤɨ ɨɫɧɨɜɧɨɟ ɢɫɩɨɥɶɡɨɜɚɧɢɟ ɩɪɟɞɩɨɥɚɝɚɟɬ ɪɚɛɨɬɭ ɧɟ ɤɚɤ ɫ ɰɟɥɵɦ ɱɢɫɥɨɦ, ɚ ɤɚɤ ɫ ɫɨɜɨɤɭɩɧɨɫɬɶɸ ɨɞɧɨɛɢɬɧɵɯ ɮɥɚɝɨɜ. ɉɪɢ ɡɚɩɢɫɢ ɧɚ ɞɢɫɤ ɢɫɩɨɥɶɡɭɟɬɫɹ ɫɢɦɜɨɥɶɧɨɟ ɩɪɟɞɫɬɚɜɥɟɧɢɟ ɞɜɨɢɱɧɨɣ ɡɚɩɢɫɢ ɱɢɫɥɚ ɫ ɜɟɞɭɳɢɦɢ ɧɭɥɹɦɢ ɢ ɪɚɡɛɢɟɧɢɟɦ ɧɚ ɱɟɬɜɟɪɤɢ ɫɢɦɜɨɥɨɦ «.» (ɬɨɱɤɚ), ɩɪɟɞɜɚɪɹɟɦɚɹ ɡɚɝɥɚɜɧɨɣ ɛɭɤɜɨɣ «B» ɥɚɬɢɧɫɤɨɝɨ ɚɥɮɚɜɢɬɚ, ɢɥɢ ɫɢɦɜɨɥɶɧɨɟ ɩɪɟɞɫɬɚɜɥɟɌɚɛɥɢɰɚ 2 ɧɢɟ ɲɟɫɬɧɚɞɰɚɬɟɪɢɱɧɨɣ ɇɭɦɟɪɚɰɢɹ ɮɥɚɝɨɜ (ɛɢɬ) ɩɟɪɟɦɟɧɧɨɣ ɬɢɩɚ Color ɡɚɩɢɫɢ ɱɢɫɥɚ ɫ ɜɟɞɭɳɢɦɢ ɇɨɦɟɪɒɟɫɬɧɚɞɰɚɬɢ Ⱦɟɫɹɬɢɱɧɚɹ Ⱦɜɨɢɱɧɚɹ ɡɚɩɢɫɶ ɧɭɥɹɦɢ, ɩɪɟɞɜɚɪɹɟɦɚɹ ɡɚɪɢɱɧɚɹ ɡɚɩɢɫɶ ɡɚɩɢɫɶ ɝɥɚɜɧɨɣ ɛɭɤɜɨɣ «H» ɥɚɬɢɧ0 H0001 1 B.0000.0000.0000.0001 ɫɤɨɝɨ ɚɥɮɚɜɢɬɚ. ȼ ɬɚɛɥɢɰɟ 2 ɩɪɢɜɟɞɟɧɚ ɧɭɦɟɪɚɰɢɹ ɮɥɚɝɨɜ 1 H0002 2 B.0000.0000.0000.0010 (ɛɢɬ) ɩɟɪɟɦɟɧɧɨɣ ɬɢɩɚ Color, 2 H0004 4 B.0000.0000.0000.0100 ɢɯ ɲɟɫɬɧɚɞɰɚɬɟɪɢɱɧɨɟ, ɞɟ3 H0008 8 B.0000.0000.0000.1000 ɫɹɬɢɱɧɨɟ ɢ ɞɜɨɢɱɧɨɟ ɡɧɚɱɟ4 H0010 16 B.0000.0000.0001.0000 ɧɢɟ. ɉɪɢ ɢɫɩɨɥɶɡɨɜɚɧɢɢ ɜ 5 H0020 32 B.0000.0000.0010.0000 ɭɱɢɬɟɥɟ ɢɥɢ ɞɪɭɝɢɯ ɤɨɦɩɨ6 H0040 64 B.0000.0000.0100.0000 ɧɟɧɬɚɯ ɦɨɠɟɬ ɜɨɡɧɢɤɧɭɬɶ 7 H0080 128 B.0000.0000.1000.0000 ɧɟɨɛɯɨɞɢɦɨɫɬɶ ɜ ɩɪɢɫɜɨɟɧɢɢ 8 H0100 256 B.0000.0001.0000.0000 ɧɟɤɨɬɨɪɵɦ ɢɡ ɮɥɚɝɨɜ ɢɥɢ ɢɯ 9 H0200 512 B.0000.0010.0000.0000 ɤɨɦɛɢɧɚɰɢɣ ɢɦɟɧ. ɇɚ ɬɚɤɨɟ 10 H0400 1024 B.0000.0100.0000.0000 ɢɦɟɧɨɜɚɧɢɟ ɧɟ ɧɚɤɥɚɞɵɜɚɟɬ11 H0800 2048 B.0000.1000.0000.0000 ɫɹ ɧɢɤɚɤɢɯ ɨɝɪɚɧɢɱɟɧɢɣ, 12 H1000 4096 B.0001.0000.0000.0000 ɯɨɬɹ ɜɨɡɦɨɠɧɨ ɛɭɞɟɬ ɜɵɪɚ13 H2000 8192 B.0010.0000.0000.0000 ɛɨɬɚɧ ɫɬɚɧɞɚɪɬ ɢ ɧɚ ɧɚɡɜɚɧɢɹ 14 H4000 16384 B.0100.0000.0000.0000 ɱɚɫɬɨ ɢɫɩɨɥɶɡɭɟɦɵɯ ɰɜɟɬɨɜ 15 H8000 32768 B.1000.0000.0000.0000 (ɦɚɫɨɤ, ɫɨɜɨɤɭɩɧɨɫɬɟɣ ɮɥɚɝɨɜ).
2.2.2 Ɉɩɟɪɚɰɢɢ ɫ ɩɟɪɟɦɟɧɧɵɦɢ ɬɢɩɚ ɰɜɟɬ (Color) ȼ ɬɚɛɥ. 3 ɩɪɢɜɟɞɟɧɵ ɨɩɟɪɚɰɢɢ ɫ ɩɟɪɟɦɟɧɧɵɦɢ ɬɢɩɚ Color. ɉɟɪɜɵɟ ɩɹɬɶ ɨɩɟɪɚɰɢɣ ɦɨɝɭɬ ɢɫɩɨɥɶɡɨɜɚɬɶɫɹ ɬɨɥɶɤɨ ɞɥɹ ɫɪɚɜɧɟɧɢɹ ɩɟɪɟɦɟɧɧɵɯ ɬɢɩɚ Color, ɚ ɨɫɬɚɥɶɧɵɟ ɱɟɬɵɪɟ ɨɩɟɪɚɰɢɢ – ɞɥɹ ɜɵɱɢɫɥɟɧɢɹ ɜɵɪɚɠɟɧɢɣ ɬɢɩɚ Color. Ɍɚɛɥɢɰɚ 3 ɉɪɟɞɨɩɪɟɞɟɥɟɧɧɵɟ ɤɨɧɫɬɚɧɬɵ ɨɩɟɪɚɰɢɣ ɫ ɩɟɪɟɦɟɧɧɵɦɢ ɬɢɩɚ ɐɜɟɬ (Color) ɄɨɞɈɛɨɡɧɚɱɟɧɢɟȼɵɱɢɫɥɹɟɦɨɟ ɜɵɪɚɠɟɧɢɟɌɢɩ ɪɟɡɭɥɶɬɚɬɚɉɨɹɫɧɟɧɢɟ 1 CEqual A=B Logic ɉɨɥɧɨɟ ɫɨɜɩɚɞɟɧɢɟ. 2 CIn A And B = A Logic A ɫɨɞɟɪɠɢɬɫɹ ɜ ȼ. 3 CInclude A And B = B Logic Ⱥ ɫɨɞɟɪɠɢɬ ȼ. 4 CExclude A And B = 0 Logic A ɢ ȼ ɜɡɚɢɦɨɢɫɤɥɸɱɚɸɳɢɟ. 5 CIntersect A And B 0 Logic Ⱥ ɢ ȼ ɩɟɪɟɫɟɤɚɸɬɫɹ. 6 COr A Or B ɋolor ɉɨɛɢɬɧɨɟ ɜɤɥɸɱɚɸɳɟɟ ɢɥɢ. 7 CAnd A And B Color ɉɨɛɢɬɧɨɟ ɢ. 8 CXor A Xor B Color ɉɨɛɢɬɧɨɟ ɢɫɤɥɸɱɚɸɳɟɟ ɢɥɢ 9 CNot Not A Color ɉɨɛɢɬɧɨɟ ɨɬɪɢɰɚɧɢɟ ȼ ɪɹɞɟ ɡɚɩɪɨɫɨɜ ɧɟɨɛɯɨɞɢɦɨ ɭɤɚɡɚɬɶ ɬɢɩ ɨɩɟɪɚɰɢɢ ɧɚɞ ɰɜɟɬɨɦ. Ⱦɥɹ ɩɟɪɟɞɚɱɢ ɬɚɤɢɯ ɩɚɪɚɦɟɬɪɨɜ ɢɫɩɨɥɶɡɭɟɬɫɹ ɩɟɪɟɦɟɧɧɚɹ ɬɢɩɚ Integer. ȼ ɤɚɱɟɫɬɜɟ ɡɧɚɱɟɧɢɣ ɩɟɪɟɞɚɟɬɫɹ ɫɨɞɟɪɠɢɦɨɟ ɫɨɨɬɜɟɬɫɬɜɭɸɳɟɣ ɹɱɟɣɤɢ ɫɬɨɥɛɰɚ ɤɨɞ ɬɚɛɥ. 3.
2.3 ɉɪɢɜɟɞɟɧɢɟ ɢ ɩɪɟɨɛɪɚɡɨɜɚɧɢɟ ɬɢɩɨɜ ȿɫɬɶ ɞɜɚ ɩɭɬɢ ɢɫɩɨɥɶɡɨɜɚɬɶ ɩɟɪɟɦɟɧɧɭɸ ɨɞɧɨɝɨ ɬɢɩɚ ɤɚɤ ɩɟɪɟɦɟɧɧɭɸ ɞɪɭɝɨɝɨ ɬɢɩɚ. ɉɟɪɜɵɣ ɩɭɬɶ ɫɨɫɬɨɢɬ ɜ ɩɪɟɨɛɪɚɡɨɜɚɧɢɢ ɡɧɚɱɟɧɢɹ ɤ ɡɚɞɚɧɧɨɦɭ ɬɢɩɭ. Ɍɚɤ, ɞɥɹ ɩɪɟɨɛɪɚɡɨɜɚɧɢɹ ɰɟɥɨɱɢɫɥɟɧɧɨɣ ɩɟɪɟɦɟɧɧɨɣ ɤ ɞɟɣɫɬɜɢɬɟɥɶɧɨɦɭ ɬɢɩɭ, ɞɨɫɬɚɬɨɱɧɨ ɩɪɨɫɬɨ ɩɪɢɫɜɨɢɬɶ ɩɟɪɟɦɟɧɧɨɣ ɞɟɣɫɬɜɢɬɟɥɶɧɨɝɨ ɬɢɩɚ ɰɟɥɨɱɢɫɥɟɧɧɨɟ ɡɧɚɱɟɧɢɟ. ɋ ɨɛɪɚɬɧɵɦ ɩɪɟɨɛɪɚɡɨɜɚɧɢɟɦ ɫɥɨɠɧɟɟ, ɩɨɫɤɨɥɶɤɭ ɧɟ ɹɫɧɨ ɱɬɨ ɞɟɥɚɬɶ ɫ ɞɪɨɛɧɨɣ ɱɚɫɬɶɸ. ȼ ɬɚɛɥ. 4 ɩɪɢɜɟɞɟɧɵ ɜɫɟ ɬɢɩɵ, ɤɨɬɨɪɵɟ ɦɨɠɧɨ ɩɪɟɨɛɪɚɡɨɜɚɬɶ ɩɪɢɫɜɚɢɜɚɧɢɟɦ ɩɟɪɟɦɟɧɧɨɣ ɞɪɭɝɨɝɨ ɬɢɩɚ. ȼ ɬɚɛɥ. 5 ɩɪɢɜɟɞɟɧɵ ɜɫɟ ɮɭɧɤɰɢɢ ɩɪɟɨɛɪɚɡɨɜɚɧɢɹ ɬɢɩɨɜ.
CHAP2.DOC
11
Ɍɢɩ ɩɟɪɟɦɟɧɧɨɣ, ɤɨɬɨɪɨɣ ɩɪɨɢɡɜɨɞɢɬɫɹ ɩɪɢɫɜɚɢɜɚɧɢɟ Real
Long
Integer
Ɍɚɛɥɢɰɚ 4 ɉɪɟɨɛɪɚɡɨɜɚɧɢɟ ɬɢɩɨɜ ɩɪɹɦɵɦ ɩɪɢɫɜɚɢɜɚɧɢɟɦ ɉɨɹɫɧɟɧɢɟ Ɍɢɩ ɜɵɪɚɠɟɧɢɹ, ɤɨɬɨɪɨɟ ɦɨɠɟɬ ɛɵɬɶ ɩɪɢɫɜɨɟɧɨ Real, Integer, Long Ɂɧɚɱɟɧɢɟ ɩɪɟɨɛɪɚɡɭɟɬɫɹ ɤ ɩɥɚɜɚɸɳɟɦɭ ɜɢɞɭ. ɉɪɢ ɩɪɟɨɛɪɚɡɨɜɚɧɢɢ ɡɧɚɱɟɧɢɹ ɜɵɪɚɠɟɧɢɹ ɬɢɩɚ Long ɜɨɡɦɨɠɧɚ ɩɨɬɟɪɹ ɬɨɱɧɨɫɬɢ. Integer, Long ɉɪɢ ɩɪɟɨɛɪɚɡɨɜɚɧɢɢ ɬɢɩɚ Integer, ɞɟɣɫɬɜɭɸɬ ɫɥɟɞɭɸɳɢɟ ɩɪɚɜɢɥɚ. Ɂɧɚɱɟɧɢɟ ɩɟɪɟɦɟɧɧɨɣ ɩɨɦɟɳɚɟɬɫɹ ɜ ɞɜɚ ɦɥɚɞɲɢɯ ɛɚɣɬɚ. ȿɫɥɢ ɡɧɚɱɟɧɢɟ ɜɵɪɚɠɟɧɢɹ ɛɨɥɶɲɟ ɥɢɛɨ ɪɚɜɧɨ ɧɨɥɸ, ɬɨ ɫɬɚɪɲɢɟ ɛɚɣɬɵ ɪɚɜɧɵ H0000, ɜ ɩɪɨɬɢɜɧɨɦ ɫɥɭɱɚɟ ɫɬɚɪɲɢɟ ɛɚɣɬɵ ɪɚɜɧɵ HFFFF. Integer, Long ɉɪɢ ɩɪɟɨɛɪɚɡɨɜɚɧɢɢ ɜɵɪɚɠɟɧɢɹ ɬɢɩɚ Long ɡɧɚɱɟɧɢɟ ɞɜɭɯ ɫɬɚɪɲɢɯ ɛɚɣɬ ɨɬɛɪɚɫɵɜɚɟɬɫɹ.
ɉɪɢ ɜɵɱɢɫɥɟɧɢɢ ɱɢɫɥɨɜɵɯ ɜɵɪɚɠɟɧɢɣ ɞɟɣɫɬɜɭɸɬ ɫɥɟɞɭɸɳɢɟ ɩɪɚɜɢɥɚ ɩɪɟɨɛɪɚɡɨɜɚɧɢɹ ɬɢɩɨɜ: ȼɵɪɚɠɟɧɢɹ ɜɵɱɢɫɥɹɸɬɫɹ ɫɥɟɜɚ ɧɚ ɩɪɚɜɨ. ȿɫɥɢ ɞɜɚ ɨɩɟɪɚɧɞɚ ɢɦɟɸɬ ɨɞɢɧ ɬɢɩ, ɬɨ ɪɟɡɭɥɶɬɚɬ ɢɦɟɟɬ ɬɨɬ ɠɟ ɬɢɩ. ȿɫɥɢ ɚɪɝɭɦɟɧɬɵ ɢɦɟɸɬ ɪɚɡɧɵɟ ɬɢɩɵ, ɬɨ ɜɵɪɚɠɟɧɢɟ ɢɦɟɟɬ ɫɬɚɪɲɢɣ ɢɡ ɞɜɭɯ ɬɢɩɨɜ. ɋɩɢɫɨɤ ɱɢɫɥɨɜɵɯ ɬɢɩɨɜ ɩɨ ɭɛɵɜɚɧɢɸ ɫɬɚɪɲɢɧɫɬɜɚ: Real, Long, Integer. 4. Ɋɟɡɭɥɶɬɚɬ ɨɩɟɪɚɰɢɢ ɞɟɥɟɧɢɹ ɞɟɣɫɬɜɢɬɟɥɶɧɵɯ ɱɢɫɟɥ (ɨɩɟɪɚɰɢɹ «/») ɜɫɟɝɞɚ ɢɦɟɟɬ ɬɢɩ Real, ɜɧɟ ɡɚɜɢɫɢɦɨɫɬɢ ɨɬ ɬɢɩɨɜ ɚɪɝɭɦɟɧɬɨɜ. ȼ ɨɬɥɢɱɢɟ ɨɬ ɩɪɟɨɛɪɚɡɨɜɚɧɢɹ ɬɢɩɨɜ ɩɪɢɜɟɞɟɧɢɟ ɬɢɩɨɜ ɩɨɡɜɨɥɹɟɬ ɩɨ-ɪɚɡɧɨɦɭ ɢɧɬɟɪɩɪɟɬɢɪɨɜɚɬɶ ɨɞɧɭ ɨɛɥɚɫɬɶ ɩɚɦɹɬɢ. Ɏɭɧɤɰɢɹ ɩɪɢɜɟɞɟɧɢɹ ɬɢɩɚ ɩɪɢɦɟɧɢɦɚ ɬɨɥɶɤɨ ɤ ɩɟɪɟɦɟɧɧɵɦ ɢɥɢ ɷɥɟɦɟɧɬɚɦ ɦɚɫɫɢɜɚ (ɩɪɟɨɛɪɚɡɨɜɚɧɢɟ ɬɢɩɨɜ ɩɪɢɦɟɧɢɦɨ ɢ ɤ ɜɵɪɚɠɟɧɢɹɦ). Ɋɟɤɨɦɟɧɞɭɟɬɫɹ ɢɫɩɨɥɶɡɨɜɚɬɶ ɩɪɢɜɟɞɟɧɢɟ ɬɢɩɨɜ ɬɨɥɶɤɨ ɞɥɹ ɬɢɩɨɜ, ɢɦɟɸɳɢɯ ɨɞɢɧɚɤɨɜɭɸ ɞɥɢɧɭ. ɇɚɩɪɢɦɟɪ, Integer ɢ Color ɢɥɢ Real ɢ Long. ɋɩɢɫɨɤ ɮɭɧɤɰɢɣ ɩɪɢɜɟɞɟɧɢɹ ɬɢɩɨɜ ɩɪɢɜɟɞɟɧ ɜ ɬɚɛɥ. 6. 1. 2. 3.
Ɍɚɛɥɢɰɚ 5 ɂɦɹ Ɍɢɩ ɮɭɧɤɰɢɢ ɚɪɝɭɦɟɧɬɚ Real Real, Integer, Long Integer Integer, Long Long Integer, Long Str Real, Integer, Long Round Real
Ɏɭɧɤɰɢɢ ɩɪɟɨɛɪɚɡɨɜɚɧɢɹ ɬɢɩɨɜ Ɉɩɢɫɚɧɢɟ
Ɍɢɩ ɪɟɡɭɥɶɬɚɬɚ Real Ⱥɧɚɥɨɝɢɱɧɨ ɩɪɹɦɨɦɭ ɩɪɢɫɜɚɢɜɚɧɢɸ
Ⱥɧɚɥɨɝɢɱɧɨ ɩɪɹɦɨɦɭ ɩɪɢɫɜɚɢɜɚɧɢɸ Ⱥɧɚɥɨɝɢɱɧɨ ɩɪɹɦɨɦɭ ɩɪɢɫɜɚɢɜɚɧɢɸ ɉɪɟɞɫɬɚɜɥɹɟɬ ɱɢɫɥɨɜɨɣ ɚɪɝɭɦɟɧɬ ɜ ɜɢɞɟ ɫɢɦɜɨɥɶɧɨɣ ɫɬɪɨɤɢ ɜ ɞɟɫɹɬɢɱɧɨɦ ɜɢɞɟ Long Ɉɤɪɭɝɥɹɟɬ ɞɟɣɫɬɜɢɬɟɥɶɧɨɟ ɡɧɚɱɟɧɢɟ ɞɨ ɛɥɢɠɚɣɲɟɝɨ ɞɥɢɧɧɨɝɨ ɰɟɥɨɝɨ. ȿɫɥɢ ɡɧɚɱɟɧɢɟ ɞɟɣɫɬɜɢɬɟɥɶɧɨɝɨ ɜɵɪɚɠɟɧɢɹ ɜɵɯɨɞɢɬ ɡɚ ɞɢɚɩɚɡɨɧ ɞɥɢɧɧɨɝɨ ɰɟɥɨɝɨ, ɬɨ ɪɟɡɭɥɶɬɚɬ ɪɚɜɟɧ ɧɭɥɸ. Truncate Real Long ɉɪɟɨɛɪɚɡɭɟɬ ɞɟɣɫɬɜɢɬɟɥɶɧɨɟ ɡɧɚɱɟɧɢɟ ɜ ɞɥɢɧɧɨɟ ɰɟɥɨɟ ɩɭɬɟɦ ɨɬɛɪɚɫɵɜɚɧɢɹ ɞɪɨɛɧɨɣ ɱɚɫɬɢ. ȿɫɥɢ ɡɧɚɱɟɧɢɟ ɞɟɣɫɬɜɢɬɟɥɶɧɨɝɨ ɜɵɪɚɠɟɧɢɹ ɜɵɯɨɞɢɬ ɡɚ ɞɢɚɩɚɡɨɧ ɞɥɢɧɧɨɝɨ ɰɟɥɨɝɨ, ɬɨ ɪɟɡɭɥɶɬɚɬ ɪɚɜɟɧ ɧɭɥɸ. LVal String Long ɉɪɟɨɛɪɚɡɭɟɬ ɞɥɢɧɧɨɟ ɰɟɥɨɟ ɢɡ ɫɢɦɜɨɥɶɧɨɝɨ ɩɪɟɞɫɬɚɜɥɟɧɢɹ ɜɨ ɜɧɭɬɪɟɧɧɟɟ. RVal String Real ɉɪɟɨɛɪɚɡɭɟɬ ɞɟɣɫɬɜɢɬɟɥɶɧɨɟ ɱɢɫɥɨ ɢɡ ɫɢɦɜɨɥɶɧɨɝɨ ɩɪɟɞɫɬɚɜɥɟɧɢɹ ɜɨ ɜɧɭɬɪɟɧɧɟɟ. StrColor Color String ɉɪɟɨɛɪɚɡɭɟɬ ɜɧɭɬɪɟɧɧɟɟ ɩɪɟɞɫɬɚɜɥɟɧɢɟ ɩɟɪɟɦɟɧɧɨɣ ɬɢɩɚ Color ɜ ɫɨɨɬɜɟɬɫɬɜɢɢ ɫ ɪɚɡɞ. «Ɂɧɚɱɟɧɢɟ ɩɟɪɟɦɟɧɧɨɣ ɬɢɩɚ ɰɜɟɬ» ValColor String Color ɉɪɟɨɛɪɚɡɭɟɬ ɫɢɦɜɨɥɶɧɨɟ ɩɪɟɞɫɬɚɜɥɟɧɢɟ ɩɟɪɟɦɟɧɧɨɣ ɬɢɩɚ Color ɜɨ ɜɧɭɬɪɟɧɧɟɟ. Color Integer Color ɂɧɬɟɪɩɪɟɬɢɪɭɟɬ ɰɟɥɨɟ ɱɢɫɥɨ ɤɚɤ ɡɧɚɱɟɧɢɟ ɬɢɩɚ Color. ɋɥɟɞɭɸɳɢɟ ɩɪɢɦɟɪɵ ɢɥɥɸɫɬɪɢɪɭɸɬ ɢɫɩɨɥɶɡɨɜɚɧɢɟ ɩɪɟɨɛɪɚɡɨɜɚɧɢɹ ɢ ɩɪɢɜɟɞɟɧɢɹ ɬɢɩɨɜ: ɉɪɢ ɜɵɱɢɫɥɟɧɢɢ ɫɥɟɞɭɸɳɢɯ ɱɟɬɵɪɟɯ ɜɵɪɚɠɟɧɢɣ, ɩɨɥɭɱɚɸɬɫɹ ɪɚɡɥɢɱɧɵɟ ɪɟɡɭɥɶɬɚɬɵ 4096*4096=0
CHAP2.DOC
Integer Long String
12
Ɍɚɛɥɢɰɚ 6 Ɏɭɧɤɰɢɢ ɩɪɢɜɟɞɟɧɢɹ ɬɢɩɨɜ ɇɚɡɜɚɧɢɟɌɢɩ ɪɟɡɭɥɶɬɚɬɚɈɩɢɫɚɧɢɟ TReal Real ɑɟɬɵɪɟ ɛɚɣɬɚ, ɚɞɪɟɫɭɟɦɵɟ ɩɪɢɜɨɞɢɦɨɣ ɩɟɪɟɦɟɧɧɨɣ, ɢɧɬɟɪɩɪɟɬɢɪɭɸɬɫɹ ɤɚɤ ɞɟɣɫɬɜɢɬɟɥɶɧɨɟ ɱɢɫɥɨ. TInteger Integer Ⱦɜɚ ɛɚɣɬɚ, ɚɞɪɟɫɭɟɦɵɟ ɩɪɢɜɨɞɢɦɨɣ ɩɟɪɟɦɟɧɧɨɣ, ɢɧɬɟɪɩɪɟɬɢɪɭɸɬɫɹ ɤɚɤ ɰɟɥɨɟ ɱɢɫɥɨ. TLong Long ɑɟɬɵɪɟ ɛɚɣɬɚ, ɚɞɪɟɫɭɟɦɵɟ ɩɪɢɜɨɞɢɦɨɣ ɩɟɪɟɦɟɧɧɨɣ, ɢɧɬɟɪɩɪɟɬɢɪɭɸɬɫɹ ɤɚɤ ɞɥɢɧɧɨɟ ɰɟɥɨɟ. TRealArray RealArray Ɉɛɥɚɫɬɶ ɩɚɦɹɬɢ, ɚɞɪɟɫɭɟɦɚɹ ɩɪɢɜɨɞɢɦɨɣ ɩɟɪɟɦɟɧɧɨɣ, ɢɧɬɟɪɩɪɟɬɢɪɭɸɬɫɹ ɤɚɤ ɦɚɫɫɢɜ ɞɟɣɫɬɜɢɬɟɥɶɧɵɯ ɱɢɫɟɥ. TPRealArray PRealArray ɑɟɬɵɪɟ ɛɚɣɬɚ, ɚɞɪɟɫɭɟɦɵɟ ɩɪɢɜɨɞɢɦɨɣ ɩɟɪɟɦɟɧɧɨɣ, ɢɧɬɟɪɩɪɟɬɢɪɭɸɬɫɹ ɤɚɤ ɭɤɚɡɚɬɟɥɶ ɧɚ ɦɚɫɫɢɜ ɞɟɣɫɬɜɢɬɟɥɶɧɵɯ ɱɢɫɟɥ. TIntegerArray IntegerArray Ɉɛɥɚɫɬɶ ɩɚɦɹɬɢ, ɚɞɪɟɫɭɟɦɚɹ ɩɪɢɜɨɞɢɦɨɣ ɩɟɪɟɦɟɧɧɨɣ, ɢɧɬɟɪɩɪɟɬɢɪɭɸɬɫɹ ɤɚɤ ɦɚɫɫɢɜ ɰɟɥɵɯ ɱɢɫɟɥ. TPIntegerArray PIntegerArray ɑɟɬɵɪɟ ɛɚɣɬɚ, ɚɞɪɟɫɭɟɦɵɟ ɩɪɢɜɨɞɢɦɨɣ ɩɟɪɟɦɟɧɧɨɣ, ɢɧɬɟɪɩɪɟɬɢɪɭɸɬɫɹ ɤɚɤ ɭɤɚɡɚɬɟɥɶ ɧɚ ɦɚɫɫɢɜ ɰɟɥɵɯ ɱɢɫɟɥ. TLongArray LongArray Ɉɛɥɚɫɬɶ ɩɚɦɹɬɢ, ɚɞɪɟɫɭɟɦɚɹ ɩɪɢɜɨɞɢɦɨɣ ɩɟɪɟɦɟɧɧɨɣ, ɢɧɬɟɪɩɪɟɬɢɪɭɸɬɫɹ ɤɚɤ ɦɚɫɫɢɜ ɞɥɢɧɧɵɯ ɰɟɥɵɯ. TPLongArray PLongArray ɑɟɬɵɪɟ ɛɚɣɬɚ, ɚɞɪɟɫɭɟɦɵɟ ɩɪɢɜɨɞɢɦɨɣ ɩɟɪɟɦɟɧɧɨɣ, ɢɧɬɟɪɩɪɟɬɢɪɭɸɬɫɹ ɤɚɤ ɭɤɚɡɚɬɟɥɶ ɧɚ ɦɚɫɫɢɜ ɞɥɢɧɧɵɯ ɰɟɥɵɯ. TLogic Logic Ⱥɞɪɟɫɭɟɦɵɣ ɩɪɢɜɨɞɢɦɨɣ ɩɟɪɟɦɟɧɧɨɣ ɛɚɣɬ ɢɧɬɟɪɩɪɟɬɢɪɭɸɬɫɹ ɤɚɤ ɥɨɝɢɱɟɫɤɚɹ ɩɟɪɟɦɟɧɧɚɹ. TLogicArray LogicArray Ɉɛɥɚɫɬɶ ɩɚɦɹɬɢ, ɚɞɪɟɫɭɟɦɚɹ ɩɪɢɜɨɞɢɦɨɣ ɩɟɪɟɦɟɧɧɨɣ, ɢɧɬɟɪɩɪɟɬɢɪɭɸɬɫɹ ɤɚɤ ɦɚɫɫɢɜ ɥɨɝɢɱɟɫɤɢɯ ɩɟɪɟɦɟɧɧɵɯ. TPLogicArray LogicArray ɑɟɬɵɪɟ ɛɚɣɬɚ, ɚɞɪɟɫɭɟɦɵɟ ɩɪɢɜɨɞɢɦɨɣ ɩɟɪɟɦɟɧɧɨɣ, ɢɧɬɟɪɩɪɟɬɢɪɭɸɬɫɹ ɤɚɤ ɭɤɚɡɚɬɟɥɶ ɧɚ ɦɚɫɫɢɜ ɥɨɝɢɱɟɫɤɢɯ ɩɟɪɟɦɟɧɧɵɯ. TColor Color Ⱦɜɚ ɛɚɣɬɚ, ɚɞɪɟɫɭɟɦɵɟ ɩɪɢɜɨɞɢɦɨɣ ɩɟɪɟɦɟɧɧɨɣ, ɢɧɬɟɪɩɪɟɬɢɪɭɸɬɫɹ ɤɚɤ ɩɟɪɟɦɟɧɧɚɹ ɬɢɩɚ ɰɜɟɬ. TFuncType FuncType ɑɟɬɵɪɟ ɛɚɣɬɚ, ɚɞɪɟɫɭɟɦɵɟ ɩɪɢɜɨɞɢɦɨɣ ɩɟɪɟɦɟɧɧɨɣ, ɢɧɬɟɪɩɪɟɬɢɪɭɸɬɫɹ ɤɚɤ ɚɞɪɟɫ ɮɭɧɤɰɢɢ. TString String 256 ɛɚɣ ɨɛɥɚɫɬɢ ɩɚɦɹɬɢ, ɚɞɪɟɫɭɟɦɨɣ ɩɪɢɜɨɞɢɦɨɣ ɩɟɪɟɦɟɧɧɨɣ, ɢɧɬɟɪɩɪɟɬɢɪɭɸɬɫɹ ɤɚɤ ɫɬɪɨɤɚ ɫɢɦɜɨɥɨɜ. TPString PString ɑɟɬɵɪɟ ɛɚɣɬɚ, ɚɞɪɟɫɭɟɦɵɟ ɩɪɢɜɨɞɢɦɨɣ ɩɟɪɟɦɟɧɧɨɣ, ɢɧɬɟɪɩɪɟɬɢɪɭɸɬɫɹ ɤɚɤ ɭɤɚɡɚɬɟɥɶ ɧɚ ɫɬɪɨɤɭ ɫɢɦɜɨɥɨɜ. TVisual Visual ɑɟɬɵɪɟ ɛɚɣɬɚ, ɚɞɪɟɫɭɟɦɵɟ ɩɪɢɜɨɞɢɦɨɣ ɩɟɪɟɦɟɧɧɨɣ, ɢɧɬɟɪɩɪɟɬɢɪɭɸɬɫɹ ɤɚɤ ɨɬɨɛɪɚɠɚɟɦɵɣ ɷɥɟɦɟɧɬ. TPointer Pointer ɑɟɬɵɪɟ ɛɚɣɬɚ, ɚɞɪɟɫɭɟɦɵɟ ɩɪɢɜɨɞɢɦɨɣ ɩɟɪɟɦɟɧɧɨɣ, ɢɧɬɟɪɩɪɟɬɢɪɭɸɬɫɹ ɤɚɤ ɚɞɪɟɫ. ɉɨɫɤɨɥɶɤɭ ɤɨɧɫɬɚɧɬɚ 4096 ɢɦɟɟɬ ɬɢɩ Integer, ɚ 4096*4096=16777216=256*65536 , ɬɨ ɟɫɬɶ ɦɥɚɞɲɢɟ ɞɜɚ ɛɚɣɬɚ ɪɟɡɭɥɶɬɚɬɚ ɪɚɜɧɵ ɧɭɥɸ. Long(4096*4096)=0 ɉɨɫɤɨɥɶɤɭ ɨɛɚ ɫɨɦɧɨɠɢɬɟɥɹ ɢɦɟɟɬ ɬɢɩ Integer, ɬɨ ɢ ɜɵɪɚɠɟɧɢɟ ɢɦɟɟɬ ɬɢɩ Integer. ɋɥɟɞɨɜɚɬɟɥɶɧɨ, ɪɟɡɭɥɶɬɚɬ ɭɦɧɨɠɟɧɢɹ ɪɚɜɟɧ ɧɭɥɸ, ɤɨɬɨɪɵɣ ɡɚɬɟɦ ɩɪɟɨɛɪɚɡɭɟɬɫɹ ɤ ɬɢɩɭ Long. Long(4096)*4096=16777216 ɉɨɫɤɨɥɶɤɭ ɩɟɪɜɵɣ ɫɨɦɧɨɠɢɬɟɥɶ ɢɦɟɟɬ ɬɢɩ ɞɥɢɧɧɨɟ ɰɟɥɨɟ, ɬɨ ɢ ɜɵɪɚɠɟɧɢɟ ɢɦɟɟɬ ɬɢɩ ɞɥɢɧɧɨɟ ɰɟɥɨɟ. 4096.0*4096=1.677722E+7 ɉɨɫɤɨɥɶɤɭ ɩɟɪɜɵɣ ɫɨɦɧɨɠɢɬɟɥɶ ɢɦɟɟɬ ɬɢɩ Real, ɬɨ ɢ ɜɵɪɚɠɟɧɢɟ ɢɦɟɟɬ ɬɢɩ Real. ɂɡ-ɡɚ ɧɟɞɨɫɬɚɬɤɚ ɬɨɱɧɨɫɬɢ ɩɪɨɢɡɨɲɥɚ ɩɨɬɟɪɹ ɬɨɱɧɨɫɬɢ ɜ ɫɟɞɶɦɨɦ ɡɧɚɤɟ. ȼ ɫɥɟɞɭɸɳɟɦ ɩɪɢɦɟɪɟ, ɢɫɩɨɥɶɡɭɹ ɩɪɢɜɟɞɟɧɢɟ ɬɢɩɨɜ, ɜ ɦɚɫɫɢɜ ɞɟɣɫɬɜɢɬɟɥɶɧɵɯ ɱɢɫɟɥ A ɪɚɡɦɟɪɨɦ ɜ 66 ɷɥɟɦɟɧɬɨɜ ɫɤɥɚɞɵɜɚɸɬɫɹ: ɞɟɣɫɬɜɢɬɟɥɶɧɨɟ ɱɢɫɥɨ ɜ ɩɟɪɜɵɣ ɷɥɟɦɟɧɬ ɦɚɫɫɢɜɚ; ɞɥɢɧɧɨɟ ɰɟɥɨɟ ɜɨ ɜɬɨɪɨɣ ɷɥɟɦɟɧɬ ɦɚɫɫɢɜɚ ɢ ɫɢɦɜɨɥɶɧɭɸ ɫɬɪɨɤɭ ɜ ɷɥɟɦɟɧɬɵ ɫ 3 ɩɨ 66. A[1]= 1.677722E+7 TLong(A[2])= 16777216 TString(A[3])=‘ɉɪɢɦɟɪ ɩɪɢɜɟɞɟɧɢɹ ɬɢɩɨɜ’
CHAP2.DOC
13
ɇɟɨɛɯɨɞɢɦɨ ɨɬɦɟɬɢɬɶ, ɱɬɨ ɷɥɟɦɟɧɬɵ ɦɚɫɫɢɜɚ A, ɧɚɱɢɧɚɹ ɫɨ ɜɬɨɪɨɝɨ, ɩɨɫɥɟ ɜɵɩɨɥɧɟɧɢɹ ɩɪɢɜɟɞɟɧɧɨɝɨ ɜɵɲɟ ɮɪɚɝɦɟɧɬɚ ɩɪɨɝɪɚɦɦɵ ɧɟ ɪɟɤɨɦɟɧɞɭɟɬɫɹ ɢɫɩɨɥɶɡɨɜɚɬɶ ɤɚɤ ɞɟɣɫɬɜɢɬɟɥɶɧɵɟ ɱɢɫɥɚ, ɩɨɫɤɨɥɶɤɭ ɷɥɟɦɟɧɬ A[2] ɫɨɞɟɪɠɢɬ ɡɧɚɱɟɧɢɟ 2.350988ȿ-38, ɚ ɷɥɟɦɟɧɬ A[5] – ɡɧɚɱɟɧɢɟ -4.577438ȿ-18. Ɂɧɚɱɟɧɢɟ ɷɥɟɦɟɧɬɨɜ, ɧɚɱɢɧɚɹ ɫ A[8] (ɫɢɦɜɨɥɶɧɚɹ ɫɬɪɨɤɚ ‘ɉɪɢɦɟɪ ɩɪɢɜɟɞɟɧɢɹ ɬɢɩɨɜ’ ɫɨɞɟɪɠɢɬ 23 ɫɢɦɜɨɥɚ ɢ ɡɚɧɢɦɚɟɬ 24 ɛɚɣɬɚ, ɬɨ ɟɫɬɶ ɲɟɫɬɶ ɷɥɟɦɟɧɬɨɜ ɦɚɫɫɢɜɚ) ɜɨɨɛɳɟ ɧɟ ɡɚɜɢɫɹɬ ɨɬ ɩɪɢɜɟɞɟɧɧɨɝɨ ɮɪɚɝɦɟɧɬɚ ɩɪɨɝɪɚɦɦɵ ɢ ɫɨɞɟɪɠɚɬ «ɦɭɫɨɪ», ɤɨɬɨɪɵɣ ɬɚɦ ɧɚɯɨɞɢɥɫɹ ɪɚɧɟɟ. ȼ ɫɩɢɫɤɟ ɬɢɩɨɜ ɨɩɪɟɞɟɥɟɧɵ ɬɨɥɶɤɨ ɨɞɧɨɦɟɪɧɵɟ ɦɚɫɫɢɜɵ. Ɉɞɧɚɤɨ, ɩɪɢ ɧɟɨɛɯɨɞɢɦɨɫɬɢ, ɜɨɡɦɨɠɧɨ ɢɫɩɨɥɶɡɨɜɚɧɢɟ ɞɜɭɦɟɪɧɵɯ ɦɚɫɫɢɜɨɜ. Ⱦɥɹ ɷɬɨɝɨ ɜ ɨɞɧɨɦɟɪɧɵɣ ɦɚɫɫɢɜ A ɧɟɨɛɯɨɞɢɦɨ ɩɨɦɟɫɬɢɬɶ ɭɤɚɡɚɬɟɥɢ ɧɚ ɨɞɧɨɦɟɪɧɵɟ ɦɚɫɫɢɜɵ. ɉɪɢ ɷɬɨɦ I,J-ɣ ɷɥɟɦɟɧɬ ɞɜɭɦɟɪɧɨɝɨ ɦɚɫɫɢɜɚ ɡɚɩɢɫɵɜɚɟɬɫɹ ɜ ɜɢɞɟ: TPRealArray(A[I])^[J] ȼ ɷɬɨɦ ɩɪɢɦɟɪɟ ɢɫɩɨɥɶɡɨɜɚɧɚ ɮɭɧɤɰɢɹ ɩɪɢɜɟɞɟɧɢɹ ɬɢɩɨɜ TPRealArray, ɭɤɚɡɵɜɚɸɳɚɹ, ɱɬɨ I-ɣ ɷɥɟɦɟɧɬ ɦɚɫɫɢɜɚ A ɧɭɠɧɨ ɢɧɬɟɪɩɪɟɬɢɪɨɜɚɬɶ ɤɚɤ ɭɤɚɡɚɬɟɥɶ ɧɚ ɨɞɧɨɦɟɪɧɵɣ ɦɚɫɫɢɜ ɞɟɣɫɬɜɢɬɟɥɶɧɵɯ ɱɢɫɟɥ, ɢ ɨɩɟɪɚɰɢɹ «^» ɭɤɚɡɵɜɚɸɳɚɹ, ɱɬɨ ɜɦɟɫɬɨ ɭɤɚɡɚɬɟɥɹ ɧɚ ɦɚɫɫɢɜ TPRealArray(A[I]) ɢɫɩɨɥɶɡɭɟɬɫɹ ɦɚɫɫɢɜ, ɧɚ ɤɨɬɨɪɵɣ ɨɧ ɭɤɚɡɵɜɚɟɬ. Ɍɚɤɢɦ ɨɛɪɚɡɨɦ, ɢɫɩɨɥɶɡɨɜɚɧɢɟ ɮɭɧɤɰɢɣ ɩɪɢɜɟɞɟɧɢɹ ɬɢɩɨɜ ɩɨɡɜɨɥɹɟɬ ɢɡ ɨɞɧɨɦɟɪɧɵɯ ɦɚɫɫɢɜɨɜ ɫɬɪɨɢɬɶ ɫɬɪɭɤɬɭɪɵ ɩɪɨɢɡɜɨɥɶɧɨɣ ɫɥɨɠɧɨɫɬɢ. ȼ ɹɡɵɤɚɯ ɩɪɨɝɪɚɦɦɢɪɨɜɚɧɢɹ, ɬɚɤɢɯ ɤɚɤ C ɢ ɉɚɫɤɚɥɶ, ɫɭɳɟɫɬɜɭɟɬ ɜɨɡɦɨɠɧɨɫɬɶ ɫɬɪɨɢɬɶ ɩɨɥɶɡɨɜɚɬɟɥɶɫɤɢɟ ɬɢɩɵ ɞɚɧɧɵɯ. ɉɪɢ ɪɚɡɪɚɛɨɬɤɟ ɫɬɚɧɞɚɪɬɚ ɷɬɢ ɜɨɡɦɨɠɧɨɫɬɢ ɛɵɥɢ ɢɫɤɥɸɱɟɧɵ, ɩɨɫɤɨɥɶɤɭ ɢɫɩɨɥɶɡɨɜɚɧɢɟ ɩɨɥɶɡɨɜɚɬɟɥɶɫɤɢɯ ɬɢɩɨɜ, ɨɛɥɟɝɱɚɹ ɧɚɩɢɫɚɧɢɟ ɩɪɨɝɪɚɦɦ, ɫɢɥɶɧɨ ɡɚɬɪɭɞɧɹɟɬ ɪɚɡɪɚɛɨɬɤɭ ɤɨɦɩɢɥɹɬɨɪɚ ɢɥɢ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ, ɚ ɩɪɢ ɢɫɩɨɥɶɡɨɜɚɧɢɢ ɷɬɨɝɨ ɹɡɵɤɚ ɞɥɹ ɨɩɢɫɚɧɢɹ ɤɨɦɩɨɧɟɧɬɨɜ ɧɟɣɪɨɤɨɦɩɶɸɬɟɪɚ ɧɟɨɛɯɨɞɢɦɨɫɬɶ ɜ ɩɨɥɶɡɨɜɚɬɟɥɶɫɤɢɯ ɬɢɩɚɯ ɞɚɧɧɵɯ ɜɨɡɧɢɤɚɟɬ ɱɪɟɡɜɵɱɚɣɧɨ ɪɟɞɤɨ. ɇɚɩɪɢɦɟɪ, ɩɪɢ ɨɩɢɫɚɧɢɢ ɩɪɢɦɟɪɨɜ ɜɫɟɯ ɤɨɦɩɨɧɟɧɬɨɜ, ɩɪɢɜɟɞɟɧɧɵɯ ɜ ɞɚɧɧɨɣ ɤɧɢɝɟ, ɬɚɤɚɹ ɧɟɨɛɯɨɞɢɦɨɫɬɶ ɧɢ ɪɚɡɭ ɧɟ ɜɨɡɧɢɤɥɚ.
2.4 Ɉɩɟɪɚɰɢɢ ȼ ɞɚɧɧɨɦ ɪɚɡɞɟɥɟ ɩɪɢɜɟɞɟɧɵ ɜɫɟ ɨɩɟɪɚɰɢɢ, ɤɨɬɨɪɵɟ ɦɨɝɭɬ ɛɵɬɶ ɢɫɩɨɥɶɡɨɜɚɧɵ ɩɪɢ ɩɨɫɬɪɨɟɧɢɢ ɜɵɪɚɠɟɧɢɣ ɪɚɡɥɢɱɧɨɝɨ ɬɢɩɚ. ȼ ɬɚɛɥ. 7 ɩɪɢɜɟɞɟɧɵ ɨɩɟɪɚɰɢɢ, ɤɨɬɨɪɵɟ ɞɨɩɭɫɬɢɦɵ ɜ ɰɟɥɨɱɢɫɥɟɧɧɵɯ ɜɵɪɚɠɟɧɢɹɯ (ɜɵɪɚɠɟɧɢɹɯ ɬɢɩɚ Integer ɢɥɢ Long). ȼ ɬɚɛɥ. 8 – ɫɩɢɫɨɤ, ɞɨɩɨɥɧɹɸɳɢɣ ɫɩɢɫɨɤ ɨɩɟɪɚɰɢɣ ɢɡ ɬɚɛɥ. 7 ɞɨ ɩɨɥɧɨɝɨ ɫɩɢɫɤɚ ɨɩɟɪɚɰɢɣ, ɞɨɩɭɫɬɢɦɵɯ ɜ ɜɵɪɚɠɟɧɢɹɯ ɞɟɣɫɬɜɢɬɟɥɶɧɨɝɨ ɬɢɩɚ. ȼ ɬɚɛɥ. 9 – ɨɩɟɪɚɰɢɢ, ɞɨɩɭɫɬɢɦɵɟ ɩɪɢ ɩɨɫɬɪɨɟɧɢɢ ɥɨɝɢɱɟɫɤɢɯ ɜɵɪɚɠɟɧɢɣ. ȼ ɬɚɛɥ. 10 –ɞɥɹ ɜɵɪɚɠɟɧɢɣ ɬɢɩɚ ɫɢɦɜɨɥɶɧɚɹ ɫɬɪɨɤɚ. ȼ ɬɚɛɥ. 3 – ɞɥɹ ɜɵɪɚɠɟɧɢɣ ɬɢɩɚ Color. Ɍɚɛɥɢɰɚ 7 Ɉɩɟɪɚɰɢɢ, ɞɨɩɭɫɬɢɦɵɟ ɜ ɰɟɥɨɱɢɫɥɟɧɧɵɯ ɜɵɪɚɠɟɧɢɹɯ ɍɪɨɜɟɧɶ ɈɛɨɡɧɚɌɢɩ 1-ɝɨ Ɍɢɩ 2-ɝɨ Ɍɢɩ ɇɚɡɜɚɧɢɟ ɨɩɟɪɚɰɢɢ ɩɪɢɨɪɢɬɟɬɚ ɱɟɧɢɟ ɨɩɟɪɚɧɞɚ ɨɩɟɪɚɧɞɚ ɪɟɡɭɥɶɬɚɬɚ 1 * Integer Integer Integer ɍɦɧɨɠɟɧɢɟ 1 * Long Integer Long ɍɦɧɨɠɟɧɢɟ 1 * Integer Long Long ɍɦɧɨɠɟɧɢɟ 1 * Long Long Long ɍɦɧɨɠɟɧɢɟ 1 Div Integer Integer Integer ɐɟɥɨɱɢɫɥɟɧɧɨɟ ɞɟɥɟɧɢɟ 1 Div Integer Long Long ɐɟɥɨɱɢɫɥɟɧɧɨɟ ɞɟɥɟɧɢɟ 1 Div Long Integer Long ɐɟɥɨɱɢɫɥɟɧɧɨɟ ɞɟɥɟɧɢɟ 1 Div Long Long Long ɐɟɥɨɱɢɫɥɟɧɧɨɟ ɞɟɥɟɧɢɟ 1 Mod Integer Integer Integer Ɉɫɬɚɬɨɤ ɨɬ ɞɟɥɟɧɢɹ 1 Mod Long Integer Long Ɉɫɬɚɬɨɤ ɨɬ ɞɟɥɟɧɢɹ 1 Mod Integer Long Long Ɉɫɬɚɬɨɤ ɨɬ ɞɟɥɟɧɢɹ 1 Mod Long Long Long Ɉɫɬɚɬɨɤ ɨɬ ɞɟɥɟɧɢɹ 2 + Integer Integer Integer ɋɥɨɠɟɧɢɟ 2 + Integer Long Long ɋɥɨɠɟɧɢɟ 2 + Long Integer Long ɋɥɨɠɟɧɢɟ 2 + Long Long Long ɋɥɨɠɟɧɢɟ 2 – Integer Integer Integer ȼɵɱɢɬɚɧɢɟ 2 – Integer Long Long ȼɵɱɢɬɚɧɢɟ 2 – Long Integer Long ȼɵɱɢɬɚɧɢɟ 2 – Long Long Long ȼɵɱɢɬɚɧɢɟ 3 And Integer Integer Integer ɉɨɛɢɬɧɨɟ ɂ 3 And Long Long Long ɉɨɛɢɬɧɨɟ ɂ 3 Or Integer Integer Integer ɉɨɛɢɬɧɨɟ ɜɤɥɸɱɚɸɳɟɟ ɂɅɂ
CHAP2.DOC
14
ɍɪɨɜɟɧɶ ɩɪɢɨɪɢɬɟɬɚ 3 3 3 3 3
Ɍɚɛɥɢɰɚ 7 Ɉɩɟɪɚɰɢɢ, ɞɨɩɭɫɬɢɦɵɟ ɜ ɰɟɥɨɱɢɫɥɟɧɧɵɯ ɜɵɪɚɠɟɧɢɹɯ (ɩɪɨɞɨɥɠɟɧɢɟ) ɈɛɨɡɧɚɌɢɩ 1-ɝɨ Ɍɢɩ 2-ɝɨ Ɍɢɩ ɇɚɡɜɚɧɢɟ ɨɩɟɪɚɰɢɢ ɱɟɧɢɟ ɨɩɟɪɚɧɞɚ ɨɩɟɪɚɧɞɚ ɪɟɡɭɥɶɬɚɬɚ Or Long Long Long ɉɨɛɢɬɧɨɟ ɜɤɥɸɱɚɸɳɟɟ ɂɅɂ Xor Integer Integer Integer ɉɨɛɢɬɧɨɟ ɢɫɤɥɸɱɚɸɳɟɟ ɂɅɂ Xor Long Long Long ɉɨɛɢɬɧɨɟ ɢɫɤɥɸɱɚɸɳɟɟ ɂɅɂ Not Integer Integer Integer ɉɨɛɢɬɧɨɟ ɨɬɪɢɰɚɧɢɟ Not Long Long Long ɉɨɛɢɬɧɨɟ ɨɬɪɢɰɚɧɢɟ
Ɍɚɛɥɢɰɚ 8 Ɉɩɟɪɚɰɢɢ, ɞɨɩɨɥɧɹɸɳɢɟ ɫɩɢɫɨɤ ɨɩɟɪɚɰɢɣ ɢɡ ɬɚɛɥ. 7 ɞɨ ɩɨɥɧɨɝɨ ɫɩɢɫɤɚ ɨɩɟɪɚɰɢɣ, ɞɨɩɭɫɬɢɦɵɯ ɜ ɜɵɪɚɠɟɧɢɹɯ ɞɟɣɫɬɜɢɬɟɥɶɧɨɝɨ ɬɢɩɚ. ɍɪɨɜɟɧɶ ɈɛɨɡɧɚɌɢɩ 1-ɝɨ Ɍɢɩ 2-ɝɨ Ɍɢɩ ɇɚɡɜɚɧɢɟ ɨɩɟɪɚɰɢɢ ɩɪɢɨɪɢɬɟɬɚ ɱɟɧɢɟ ɨɩɟɪɚɧɞɚ ɨɩɟɪɚɧɞɚ ɪɟɡɭɥɶɬɚɬɚ 1 * Real Integer, Real, Long Real ɍɦɧɨɠɟɧɢɟ 1 / Integer, Real, Long Integer, Real, Long Real Ⱦɟɥɟɧɢɟ 1 RMod Integer, Real, Long Integer, Real, Long Real Ɉɫɬɚɬɨɤ ɨɬ ɞɟɥɟɧɢɹ 2 + Real Integer, Real, Long Real ɋɥɨɠɟɧɢɟ 2 – Real Integer, Real, Long Real ȼɵɱɢɬɚɧɢɟ
ɍɪɨɜɟɧɶ ɩɪɢɨɪɢɬ. 1 1 1 1 1 1 2 2 2 2
Ɍɚɛɥɢɰɚ 9 Ɉɩɟɪɚɰɢɢ, ɞɨɩɭɫɬɢɦɵɟ ɩɪɢ ɩɨɫɬɪɨɟɧɢɢ ɥɨɝɢɱɟɫɤɢɯ ɜɵɪɚɠɟɧɢɣ ɈɛɨɡɧɚɌɢɩ 1-ɝɨ Ɍɢɩ 2-ɝɨ Ɍɢɩ ɇɚɡɜɚɧɢɟ ɨɩɟɪɚɰɢɢ ɱɟɧɢɟ ɨɩɟɪɚɧɞɚ ɨɩɟɪɚɧɞɚ ɪɟɡɭɥɶɬɚɬɚ > Integer, Real, Long Integer, Real, Long Logic Ȼɨɥɶɲɟ < Integer, Real, Long Integer, Real, Long Logic Ɇɟɧɶɲɟ >= Integer, Real, Long Integer, Real, Long Logic Ȼɨɥɶɲɟ ɢɥɢ ɪɚɜɧɨ ½ } ::= H ::= {0 ½ 1 ½ 2 ½ 3 ½ 4 ½ 5 ½ 6 ½ 7 ½ 8 ½ 9 ½ A ½ B ½ C ½ D ½ E ½ F } ::= “” ::= {True ½ False} – ɉɨɫɥɟɞɨɜɚɬɟɥɶɧɨɫɬɶ ɩɪɨɢɡɜɨɥɶɧɵɯ ɫɢɦɜɨɥɨɜ ɢɡ ɧɚɛɨɪɚ ANSI. ȼ ɷɬɨɣ ɩɨɫɥɟɞɨɜɚɬɟɥɶɧɨɫɬɢ ɞɨɩɭɫɤɚɸɬɫɹ ɫɢɦɜɨɥɵ ɧɚɰɢɨɧɚɥɶɧɵɯ ɚɥɮɚɜɢɬɨɜ. ɉɪɢ ɧɟɨɛɯɨɞɢɨɫɬɢ ɜɤɥɸɱɢɬɶ ɜ ɷɬɭ ɤɨɧɫɬɪɭɤɰɢɸ ɫɢɦɜɨɥ ɤɚɜɵɱɟɤ, ɨɧ ɞɨɥɠɟɧ ɛɵɬɶ ɭɞɜɨɟɧ. ::= {Long ½ Real ½ Integer ½ Color ½ Logic ½ String ½ PRealArray ½ PIntegerArray ½ PLongArray ½ PLogicArray ½ PString ½ Visual ½ Pointer ½ FuncType} ::= { RealArray ½ IntegerArray ½ LongArray ½ LogicArray} – ɤɨɧɫɬɚɧɬɚ ɢɦɟɸɳɚɹ ɬɢɩ Ɍɢɩ. ɋɩɢɫɨɤ ɫɢɧɬɚɤɫɢɱɟɫɤɢɯ ɤɨɧɫɬɪɭɤɰɢɣ ɞɥɹ ɮɨɪɦɚɥɶɧɵɯ ɚɪɝɭɦɟɧɬɨɜ: ::= [; ] ::= : ::= [,] ::= – ɨɞɧɨ ɢɡ ɫɥɟɞɭɸɳɢɯ ɩɨɧɹɬɢɣ: ɢɦɹ ɚɪɝɭɦɟɧɬɚ, ɤɨɬɨɪɵɣ ɩɪɢ ɨɩɢɫɚɧɢɢ ɮɨɪɦɚɥɶɧɵɯ ɚɪɝɭɦɟɧɬɨɜ ɢɦɟɥ ɬɢɩ Ɍɢɩ ɢɦɹ ɷɥɟɦɟɧɬɚ ɚɪɝɭɦɟɧɬɚ-ɦɚɫɫɢɜɚ, ɟɫɥɢ ɷɥɟɦɟɧɬɵ ɦɚɫɫɢɜɚ ɢɦɟɸɬ ɬɢɩ Ɍɢɩ ɪɟɡɭɥɶɬɚɬ ɩɪɢɜɟɞɟɧɢɹ ɩɪɨɢɡɜɨɥɶɧɨɝɨ ɚɪɝɭɦɟɧɬɚ ɢɥɢ ɷɥɟɦɟɧɬɚ ɚɪɝɭɦɟɧɬɚ-ɦɚɫɫɢɜɚ ɤ ɬɢɩɭ Ɍɢɩ. ɋɢɧɬɚɤɫɢɱɟɫɤɢɟ ɤɨɧɫɬɪɭɤɰɢɢ ɨɩɢɫɚɧɢɹ ɩɟɪɟɦɟɧɧɵɯ: ::= Var ::= ; [] ::= [, ] ::= ::= { ½ []} – ɨɞɧɨ ɢɡ ɫɥɟɞɭɸɳɢɯ ɩɨɧɹɬɢɣ: ɢɦɹ ɩɟɪɟɦɟɧɧɨɣ, ɤɨɬɨɪɚɹ ɩɪɢ ɨɩɢɫɚɧɢɢ ɩɟɪɟɦɟɧɧɵɯ ɢɦɟɥɚ ɬɢɩ Ɍɢɩ ɢɦɹ ɷɥɟɦɟɧɬɚ ɦɚɫɫɢɜɚ, ɟɫɥɢ ɷɥɟɦɟɧɬɵ ɦɚɫɫɢɜɚ ɢɦɟɸɬ ɬɢɩ Ɍɢɩ ɪɟɡɭɥɶɬɚɬ ɩɪɢɜɟɞɟɧɢɹ ɩɪɨɢɡɜɨɥɶɧɨɣ ɩɟɪɟɦɟɧɧɨɣ ɢɥɢ ɷɥɟɦɟɧɬɚ ɦɚɫɫɢɜɚ ɤ ɬɢɩɭ Ɍɢɩ.
CHAP2.DOC
26
ɋɢɧɬɚɤɫɢɱɟɫɤɚɹ ɤɨɧɫɬɪɭɤɰɢɹ ɨɩɢɫɚɧɢɹ ɝɥɨɛɚɥɶɧɵɯ ɩɟɪɟɦɟɧɧɵɯ (ɞɨɫɬɭɩɧɚ ɬɨɥɶɤɨ ɜ ɹɡɵɤɚɯ ɨɩɢɫɚɧɢɹ ɤɨɦɩɨɧɟɧɬɨɜ ɭɱɢɬɟɥɶ ɢ ɤɨɧɬɪɚɫɬɟɪ): ::= Global ɋɢɧɬɚɤɫɢɱɟɫɤɢɟ ɤɨɧɫɬɪɭɤɰɢɢ ɨɩɢɫɚɧɢɹ ɫɬɚɬɢɱɟɫɤɢɯ ɩɟɪɟɦɟɧɧɵɯ ɋɬɚɬɢɱɟɫɤɢɟ ɩɟɪɟɦɟɧɧɵɟ, ɤɚɤ ɩɪɚɜɢɥɨ, ɫɥɭɠɚɬ ɞɥɹ ɨɩɢɫɚɧɢɹ ɩɚɪɚɦɟɬɪɨɜ ɤɨɦɩɨɧɟɧɬɨɜ ɧɟɣɪɨɤɨɦɩɶɸɬɟɪɚ. ɂɫɩɨɥɶɡɨɜɚɧɢɟ ɜ ɢɦɟɧɚɯ ɩɟɪɟɦɟɧɧɵɯ ɬɨɥɶɤɨ ɫɢɦɜɨɥɨɜ ɥɚɬɢɧɫɤɨɝɨ ɚɥɮɚɜɢɬɚ ɢ ɰɢɮɪ ɞɟɥɚɟɬ ɢɞɟɧɬɢɮɢɤɚɬɨɪɵ ɭɧɢɜɟɪɫɚɥɶɧɵɦɢ, ɧɨ ɧɟɭɞɨɛɧɵɦɢ ɞɥɹ ɜɫɟɯ ɩɨɥɶɡɨɜɚɬɟɥɟɣ, ɤɪɨɦɟ ɚɧɝɥɨ-ɝɨɜɨɪɹɳɢɯ. Ⱦɥɹ ɭɞɨɛɫɬɜɚ ɜɫɟɯ ɨɫɬɚɥɶɧɵɯ ɩɨɥɶɡɨɜɚɬɟɥɟɣ ɜ ɨɩɢɫɚɧɢɢ ɫɬɚɬɢɱɟɫɤɢɯ ɩɟɪɟɦɟɧɧɵɯ ɩɪɟɞɭɫɦɨɬɪɟɧɚ ɜɨɡɦɨɠɧɨɫɬɶ ɢɫɩɨɥɶɡɨɜɚɬɶ ɞɨɩɨɥɧɢɬɟɥɶɧɵɟ ɢɦɟɧɚ ɞɥɹ ɫɬɚɬɢɱɟɫɤɢɯ ɩɟɪɟɦɟɧɧɵɯ. Ɉɞɧɚɤɨ ɷɬɢ ɢɦɟɧɚ ɫɥɭɠɚɬ ɬɨɥɶɤɨ ɞɥɹ ɩɨɫɬɪɨɟɧɢɹ ɢɧɬɟɪɮɟɣɫɚ ɢ ɧɟ ɦɨɝɭɬ ɛɵɬɶ ɢɫɩɨɥɶɡɨɜɚɧɵ ɜ ɨɩɢɫɚɧɢɢ ɬɟɥɚ ɫɨɨɬɜɟɬɫɬɜɭɸɳɟɝɨ ɤɨɦɩɨɧɟɧɬɚ. Ʉɪɨɦɟ ɬɨɝɨ, ɫɬɚɬɢɱɟɫɤɨɣ ɩɟɪɟɦɟɧɧɨɣ ɦɨɠɧɨ ɩɪɢ ɨɩɢɫɚɧɢɢ ɡɚɞɚɬɶ ɡɧɚɱɟɧɢɟ ɩɨ ɭɦɨɥɱɚɧɢɸ. ::= Static ::= ; [] ::= [Name ] [Default ] ::= ::= ɋɢɧɬɚɤɫɢɱɟɫɤɢɟ ɤɨɧɫɬɪɭɤɰɢɢ ɨɩɢɫɚɧɢɹ ɮɭɧɤɰɢɣ ::= [] ::= ::= Function [()] : ; ::= Label ; ::= [, ] ::= ::= Begin End; ::= [:] [; ] ::= { ½ ½ ½ ½ } ::= = ::= If Then [Else ] ::= { ½ } ::= For = To [By ] Do ::= While Do ::= GoTo ::= Begin End – ɮɭɧɤɰɢɹ, ɜɨɡɜɪɚɳɚɸɳɚɹ ɜɟɥɢɱɢɧɭ ɬɢɩɚ Ɍɢɩ. – ɞɨɩɭɫɬɢɦɨɣ ɩɟɪɟɦɟɧɧɨɣ ɹɜɥɹɸɬɫɹ ɜɫɟ ɩɟɪɟɦɟɧɧɵɟ, ɨɩɢɫɚɧɧɵɟ ɜ ɞɚɧɧɨɣ ɮɭɧɤɰɢɢ ɢɥɢ ɜ ɞɚɧɧɨɦ ɩɪɨɰɟɞɭɪɧɨɦ ɛɥɨɤɟ, ɝɥɨɛɚɥɶɧɵɟ ɩɟɪɟɦɟɧɧɵɟ ɞɚɧɧɨɝɨ ɤɨɦɩɨɧɟɧɬɚ. Ⱦɥɹ ɜɨɡɜɪɚɳɟɧɢɹ ɡɧɚɱɟɧɢɹ ɮɭɧɤɰɢɢ, ɜ ɥɟɜɨɣ ɱɚɫɬɢ ɨɩɟɪɚɬɨɪɚ ɩɪɢɫɜɚɢɜɚɧɢɹ ɞɨɥɠɧɨ ɫɬɨɹɬɶ ɢɦɹ ɮɭɧɤɰɢɢ. ɋɢɧɬɚɤɫɢɱɟɫɤɢɟ ɤɨɧɫɬɪɭɤɰɢɢ ɨɩɢɫɚɧɢɹ ɜɵɪɚɠɟɧɢɣ: ::= { ½ ½ ½ ½ ½ ½ } ::= { ½ } ::= [] [ ] ::= {+ ½ – ½ * ½ Div ½ Mod ½ And ½ Or ½ Xor} ::= {+ ½ – ½ * ½ / ½ RMod } ::= {+ ½ – ½ * ½ Div ½ Mod ½ And ½ Or ½ Xor} ::= {COr ½ CAnd ½ CXor}
CHAP2.DOC
27
::= {And ½ Or ½ Xor} ::= + ::= { – ½ Not } ::= – ::= { – ½ Not } ::= CNot ::= Not ::= ::= { ½ ½ () ½ ½ ½ ½ } ::= ( {> ½ < ½ >= ½ ɋɢɧɬɚɤɫɢɱɟɫɤɢɟ ɤɨɧɫɬɪɭɤɰɢɢ ɨɩɢɫɚɧɢɹ ɪɚɫɩɪɟɞɟɥɟɧɢɹ ɫɢɝɧɚɥɨɜ ɢɥɢ ɩɚɪɚɦɟɬɪɨɜ: Ⱦɚɧɧɚɹ ɤɨɧɫɬɪɭɤɰɢɹ ɢɦɟɟɬ ɱɟɬɵɪɟ ɚɪɝɭɦɟɧɬɚ, ɢɦɟɸɳɢɯ ɫɥɟɞɭɸɳɢɣ ɫɦɵɫɥ: Ⱦɚɧɧɨɟ – ɫɢɝɧɚɥ ɢɥɢ ɩɚɪɚɦɟɬɪ. Ɉɛɴɟɤɬ – ɩɪɟɞɨɛɪɚɛɨɬɱɢɤ, ɢɧɬɟɪɩɪɟɬɚɬɨɪ, ɨɰɟɧɤɚ, ɫɟɬɶ. ɉɨɞɨɛɴɟɤɬ – ɱɚɫɬɧɵɣ ɩɪɟɞɨɛɪɚɛɨɬɱɢɤ, ɱɚɫɬɧɵɣ ɢɧɬɟɪɩɪɟɬɚɬɨɪ, ɱɚɫɬɧɚɹ ɨɰɟɧɤɚ, ɩɨɞɫɟɬɶ. – ɨɞɧɨ ɢɡ ɤɥɸɱɟɜɵɯ ɫɥɨɜ Signals, Parameters, Data, InSignals, OutSignals. ::= Connections ::= [;] ::= { ½ }
CHAP2.DOC
28
::= [;] ::= { For = To [Step ] Do End ½ } ::= ::= [; ] ::= [[]]. [[]] ::= { ½ [+:] [.. [:]]} { ½ [+:] [.. [:]]} ::= [; ] ::= { For = To [Step ] Do End ½ } ::= [; ] ::= [[]]
2.8.4 Ʉɨɦɦɟɧɬɚɪɢɢ Ⱦɥɹ ɩɨɧɹɬɧɨɫɬɢ ɨɩɢɫɚɧɢɣ ɤɨɦɩɨɧɟɧɬɨɜ ɜ ɧɢɯ ɧɟɨɛɯɨɞɢɦɨ ɜɤɥɸɱɚɬɶ ɤɨɦɦɟɧɬɚɪɢɢ. Ʉɨɦɦɟɧɬɚɪɢɟɦ ɹɜɥɹɟɬɫɹ ɥɸɛɚɹ ɫɬɪɨɤɚ (ɢɥɢ ɧɟɫɤɨɥɶɤɨ ɫɬɪɨɤ) ɫɢɦɜɨɥɨɜ, ɡɚɤɥɸɱɟɧɧɵɯ ɜ ɮɢɝɭɪɧɵɟ ɫɤɨɛɤɢ. Ʉɨɦɦɟɧɬɚɪɢɣ ɦɨɠɟɬ ɧɚɯɨɞɢɬɶɫɹ ɜ ɥɸɛɨɦ ɦɟɫɬɟ ɨɩɢɫɚɧɢɹ ɤɨɦɩɨɧɟɧɬɚ. ɉɪɢ ɢɧɬɟɪɩɪɟɬɚɰɢɢ ɢɥɢ ɤɨɦɩɢɥɹɰɢɢ ɨɩɢɫɚɧɢɹ ɤɨɦɦɟɧɬɚɪɢɢ ɢɝɧɨɪɢɪɭɸɬɫɹ (ɢɫɤɥɸɱɚɸɬɫɹ ɢɡ ɬɟɤɫɬɚ).
2.8.5 Ɉɛɥɚɫɬɶ ɞɟɣɫɬɜɢɹ ɩɟɪɟɦɟɧɧɵɯ ȼɫɟ ɢɞɟɧɬɢɮɢɤɚɬɨɪɵ ɫɨɫɬɨɹɬ ɢɡ ɩɪɨɢɡɜɨɥɶɧɵɯ ɤɨɦɛɢɧɚɰɢɣ ɥɚɬɢɧɫɤɢɯ ɛɭɤɜ, ɰɢɮɪ ɢ ɩɨɞɱɟɪɤɨɜ. ɉɟɪɜɵɦ ɫɢɦɜɨɥɨɦ ɢɦɟɧɢ ɨɛɹɡɚɬɟɥɶɧɨ ɹɜɥɹɟɬɫɹ ɛɭɤɜɚ. ɂɫɩɨɥɶɡɨɜɚɧɢɟ ɛɭɤɜ ɬɨɥɶɤɨ ɥɚɬɢɧɫɤɨɝɨ ɚɥɮɚɜɢɬɚ ɫɜɹɡɚɧɨ ɫ ɬɟɦ, ɱɬɨ ɤɨɞɵ, ɢɫɩɨɥɶɡɭɟɦɵɟ ɛɨɥɶɲɢɧɫɬɜɨɦ ɤɨɦɩɶɸɬɟɪɨɜ, ɢɦɟɸɬ ɨɞɢɧɚɤɨɜɭɸ ɤɨɞɢɪɨɜɤɭ ɞɥɹ ɛɭɤɜ ɥɚɬɢɧɫɤɨɝɨ ɚɥɮɚɜɢɬɚ, ɬɨɝɞɚ ɤɚɤ ɞɥɹ ɛɭɤɜ ɧɚɰɢɨɧɚɥɶɧɵɯ ɚɥɮɚɜɢɬɨɜ ɞɪɭɝɢɯ ɫɬɪɚɧ ɤɨɞɢɪɨɜɤɚ ɪɚɡɥɢɱɧɚ ɧɟ ɬɨɥɶɤɨ ɨɬ ɤɨɦɩɶɸɬɟɪɚ ɤ ɤɨɦɩɶɸɬɟɪɭ ɧɨ ɢ ɨɬ ɨɞɧɨɣ ɨɩɟɪɚɰɢɨɧɧɨɣ ɫɢɫɬɟɦɵ ɤ ɞɪɭɝɨɣ. Ɂɚɝɥɚɜɧɵɟ ɢ ɩɪɨɩɢɫɧɵɟ ɛɭɤɜɵ ɧɟ ɪɚɡɥɢɱɚɸɬɫɹ ɧɢ ɜ ɢɦɟɧɚɯ, ɧɢ ɜ ɤɥɸɱɟɜɵɯ ɫɥɨɜɚɯ. əɡɵɤɢ ɨɩɢɫɚɧɢɹ ɧɟɤɨɬɨɪɵɯ ɤɨɦɩɨɧɟɧɬɨɜ ɩɨɡɜɨɥɹɸɬ ɨɩɢɫɵɜɚɬɶ ɝɥɨɛɚɥɶɧɵɟ ɩɟɪɟɦɟɧɧɵɟ. ɗɬɢ ɩɟɪɟɦɟɧɧɵɟ ɞɨɫɬɭɩɧɵ ɜɨ ɜɫɟɯ ɮɭɧɤɰɢɹɯ ɢ ɩɪɨɰɟɞɭɪɧɵɯ ɛɥɨɤɚɯ ɞɚɧɧɨɝɨ ɤɨɦɩɨɧɟɧɬɚ. Ɏɭɧɤɰɢɹɦ ɢ ɩɪɨɰɟɞɭɪɧɵɦ ɛɥɨɤɚɦ ɞɪɭɝɢɯ ɤɨɦɩɨɧɟɧɬɨɜ ɷɬɢ ɩɟɪɟɦɟɧɧɵɟ ɧɟɞɨɫɬɭɩɧɵ. ȼɫɟ ɨɫɬɚɥɶɧɵɟ ɩɟɪɟɦɟɧɧɵɟ (ɨɩɢɫɚɧɧɵɟ ɜ ɛɥɨɤɚɯ Var ɢ Static) ɹɜɥɹɸɬɫɹ ɥɨɤɚɥɶɧɵɦɢ ɢ ɞɨɫɬɭɩɧɵ ɬɨɥɶɤɨ ɜ ɩɪɟɞɟɥɚɯ ɬɨɣ ɮɭɧɤɰɢɢ ɢɥɢ ɩɪɨɰɟɞɭɪɧɨɝɨ ɛɥɨɤɚ, ɜ ɤɨɬɨɪɨɦ ɨɧɢ ɨɩɢɫɚɧɵ. ɋɬɚɬɢɱɟɫɤɢɟ ɩɟɪɟɦɟɧɧɵɟ ɫɨɯɪɚɧɹɸɬ ɫɜɨɟ ɡɧɚɱɟɧɢɟ ɦɟɠɞɭ ɜɵɡɨɜɚɦɢ ɮɭɧɤɰɢɣ ɢɥɢ ɩɪɨɰɟɞɭɪɧɵɯ ɛɥɨɤɨɜ, ɬɨɝɞɚ ɤɚɤ ɩɟɪɟɦɟɧɧɵɟ, ɨɩɢɫɚɧɧɵɟ ɜ ɛɥɨɤɚɯ Var ɧɟ ɫɨɯɪɚɧɹɸɬ. ȼ ɧɟɤɨɬɨɪɵɯ ɤɨɦɩɨɧɟɧɬɚɯ ɨɩɪɟɞɟɥɟɧɵ ɫɬɚɧɞɚɪɬɧɵɟ ɩɟɪɟɦɟɧɧɵɟ ɢ ɦɚɫɫɢɜɵ (ɫɦ. ɧɚɩɪɢɦɟɪ ɨɩɢɫɚɧɢɟ ɹɡɵɤɚ ɨɩɢɫɚɧɢɹ ɧɟɣɪɨɧɧɵɯ ɫɟɬɟɣ). ȼ ɬɚɤɢɯ ɪɚɡɞɟɥɚɯ ɨɛɥɚɫɬɶ ɞɨɫɬɭɩɧɨɫɬɢ ɩɪɟɞɨɩɪɟɞɟɥɟɧɧɵɯ ɩɟɪɟɦɟɧɧɵɯ ɨɝɨɜɚɪɢɜɚɟɬɫɹ ɨɬɞɟɥɶɧɨ. ɉɟɪɟɦɟɧɧɚɹ Error ɹɜɥɹɟɬɫɹ ɝɥɨɛɚɥɶɧɨɣ ɞɥɹ ɜɫɟɯ ɤɨɦɩɨɧɟɧɬɨɜ. Ƚɥɨɛɚɥɶɧɨɣ ɹɜɥɹɟɬɫɹ ɬɚɤɠɟ ɩɟɪɟɦɟɧɧɚɹ ErrorManager. Ɉɞɧɚɤɨ ɧɟ ɪɟɤɨɦɟɧɞɭɟɬɫɹ ɢɫɩɨɥɶɡɨɜɚɧɢɟ ɷɬɢɯ ɩɟɪɟɦɟɧɧɵɯ ɩɭɬɟɦ ɩɪɹɦɨɝɨ ɨɛɪɚɳɟɧɢɹ ɤ ɧɢɦ. Ⱦɥɹ ɩɨɥɭɱɟɧɢɹ ɡɧɚɱɟɧɢɹ ɩɟɪɟɦɟɧɧɨɣ Error ɫɥɭɠɢɬ ɡɚɩɪɨɫ GetError, ɢɫɩɨɥɧɹɟɦɵɣ ɦɚɤɪɨɤɨɦɩɨɧɟɧɬɨɦ ɧɟɣɪɨɤɨɦɩɶɸɬɟɪ.
2.8.6 Ɉɫɧɨɜɧɵɟ ɨɩɟɪɚɬɨɪɵ Ɉɩɟɪɚɬɨɪ ɩɪɢɫɜɚɢɜɚɧɢɹ ɫɨɫɬɨɢɬ ɢɡ ɞɜɭɯ ɱɚɫɬɟɣ, ɪɚɡɞɟɥɟɧɧɵɯ ɡɧɚɤɨɦ “=“. ȼ ɥɟɜɨɣ ɱɚɫɬɢ ɨɩɟɪɚɬɨɪɚ ɩɪɢɫɜɚɢɜɚɧɢɹ ɦɨɝɭɬ ɭɱɚɫɬɜɨɜɚɬɶ ɢɦɟɧɚ ɥɸɛɵɯ ɩɟɪɟɦɟɧɧɵɯ. ȼ ɜɵɪɚɠɟɧɢɢ, ɫɬɨɹɳɟɦ ɜ ɩɪɚɜɨɣ ɱɚɫɬɢ ɨɩɟɪɚɬɨɪɚ ɩɪɢɫɜɚɢɜɚɧɢɹ ɦɨɝɭɬ ɭɱɚɫɬɜɨɜɚɬɶ ɥɸɛɵɟ ɩɟɪɟɦɟɧɧɵɟ, ɚɪɝɭɦɟɧɬɵ ɩɪɨɰɟɞɭɪɧɨɝɨ ɛɥɨɤɚ ɢ ɤɨɧɫɬɚɧɬɵ. ȼ ɫɥɭɱɚɟ ɧɟɫɨɨɬɜɟɬɫɬɜɢɹ ɬɢɩɚ ɜɵɪɚɠɟɧɢɹ ɜ ɩɪɚɜɨɣ ɱɚɫɬɢ ɢ ɬɢɩɚ ɩɟɪɟɦɟɧɧɨɣ ɜ ɥɟɜɨɣ ɱɚɫɬɢ ɨɩɟɪɚɬɨɪɚ ɩɪɢɫɜɚɢɜɚɧɢɹ ɩɪɨɢɡɜɨɞɢɬɫɹ ɩɪɢɜɟɞɟɧɢɟ ɬɢɩɚ. ȼɫɟ ɜɵɪɚɠɟɧɢɹ ɜɵɱɢɫɥɹɸɬɫɹ ɫɥɟɜɚ ɧɚ ɩɪɚɜɨ ɫ ɭɱɟɬɨɦ ɫɬɚɪɲɢɧɫɬɜɚ ɨɩɟɪɚɰɢɣ. Ɉɩɟɪɚɬɨɪ ɜɟɬɜɥɟɧɢɹ. Ɉɩɟɪɚɬɨɪ ɜɟɬɜɥɟɧɢɹ ɫɨɫɬɨɢɬ ɢɡ ɬɪɟɯ ɱɚɫɬɟɣ, ɤɚɠɞɚɹ ɢɡ ɤɨɬɨɪɵɯ ɧɚɱɢɧɚɟɬɫɹ ɫɨɨɬɜɟɬɫɬɜɭɸɳɢɦ ɤɥɸɱɟɜɵɦ ɫɥɨɜɨɦ. ɉɟɪɜɚɹ ɱɚɫɬɶ – ɭɫɥɨɜɢɟ, ɧɚɱɢɧɚɟɬɫɹ ɫ ɤɥɸɱɟɜɨɝɨ ɫɥɨɜɚ If ɢ ɫɨɞɟɪɠɢɬ ɥɨɝɢɱɟɫɤɨɟ ɜɵɪɚɠɟɧɢɟ. ȼ ɡɚɜɢɫɢɦɨɫɬɢ ɨɬ ɡɧɚɱɟɧɢɹ ɜɵɱɢɫɥɟɧɧɨɝɨ ɥɨɝɢɱɟɫɤɨɝɨ ɜɵɪɚɠɟɧɢɹ ɜɵɩɨɥɧɹɟɬɫɹ Then ɱɚɫɬɶ (ɢɫɬɢɧɚ) ɢɥɢ Else ɱɚɫɬɶ (ɥɨɠɶ). Ɍɪɟɬɶɹ (Else) ɱɚɫɬɶ ɨɩɟɪɚɬɨɪɚ ɦɨɠɟɬ ɛɵɬɶ ɨɩɭɳɟɧɚ. Ʉɚɠɞɚɹ ɢɡ ɜɵɩɨɥɧɹɟɦɵɯ ɱɚɫɬɟɣ ɫɨɫɬɨɢɬ ɢɡ ɤɥɸɱɟɜɨɝɨ ɫɥɨɜɚ ɢ ɨɩɟɪɚɬɨɪɚ. ɉɪɢ ɧɟɨɛɯɨɞɢɦɨɫɬɢ ɜɵɩɨɥɧɢɬɶ ɧɟɫɤɨɥɶɤɨ ɨɩɟɪɚɬɨɪɨɜ, ɧɟɨɛɯɨɞɢɦɨ ɢɫɩɨɥɶɡɨɜɚɬɶ ɨɩɟɪɚɬɨɪɧɵɟ ɫɤɨɛɤɢ Begin End. ɐɢɤɥ For ɢɦɟɟɬ ɫɥɟɞɭɸɳɢɣ ɜɢɞ: For ɉɟɪɟɦɟɧɧɚɹ_ɰɢɤɥɚ = ɇɚɱɚɥɶɧɨɟ_ɡɧɚɱɟɧɢɟ To Ʉɨɧɟɱɧɨɟ_ɡɧɚɱɟɧɢɟ [By ɒɚɝ] Do
CHAP2.DOC
29
ɉɟɪɟɦɟɧɧɚɹ ɰɢɤɥɚ ɞɨɥɠɧɚ ɛɵɬɶ ɨɞɧɨɝɨ ɢɡ ɰɟɥɨɱɢɫɥɟɧɧɵɯ ɬɢɩɨɜ. ȼ ɯɨɞɟ ɜɵɩɨɥɧɟɧɢɹ ɨɩɟɪɚɬɨɪɚ ɨɧɚ ɩɪɨɛɟɝɚɟɬ ɡɧɚɱɟɧɢɹ ɨɬ ɇɚɱɚɥɶɧɨɟ_ɡɧɚɱɟɧɢɟ ɞɨ Ʉɨɧɟɱɧɨɟ_ɡɧɚɱɟɧɢɟ ɫ ɲɚɝɨɦ ɒɚɝ. ȿɫɥɢ ɨɩɢɫɚɧɢɟ ɲɚɝɚ ɨɩɭɳɟɧɨ, ɬɨ ɲɚɝ ɪɚɜɟɧ ɟɞɢɧɢɰɟ. ɉɪɢ ɤɚɠɞɨɦ ɡɧɚɱɟɧɢɢ ɩɟɪɟɦɟɧɧɨɣ ɰɢɤɥɚ ɢɡ ɞɢɚɩɚɡɨɧɚ ɜɵɩɨɥɧɹɟɬɫɹ ɨɩɟɪɚɬɨɪ, ɹɜɥɹɸɳɢɣɫɹ ɬɟɥɨɦ ɰɢɤɥɚ. ȿɫɥɢ ɜ ɬɟɥɟ ɰɢɤɥɚ ɧɟɨɛɯɨɞɢɦɨ ɜɵɩɨɥɧɢɬɶ ɧɟɫɤɨɥɶɤɨ ɨɩɟɪɚɬɨɪɨɜ, ɬɨ ɧɟɨɛɯɨɞɢɦɨ ɜɨɫɩɨɥɶɡɨɜɚɬɶɫɹ ɨɩɟɪɚɬɨɪɧɵɦɢ ɫɤɨɛɤɚɦɢ. Ⱦɨɩɭɫɤɚɟɬɫɹ ɥɸɛɨɟ ɱɢɫɥɨ ɜɥɨɠɟɧɧɵɯ ɰɢɤɥɨɜ. ȼɵɩɨɥɧɟɧɢɟ ɰɢɤɥɚ ɜ ɡɚɜɢɫɢɦɨɫɬɢ ɨɬ ɫɨɨɬɧɨɲɟɧɢɹ ɦɟɠɞɭ ɡɧɚɱɟɧɢɹɦɢ ɇɚɱɚɥɶɧɨɟ_ɡɧɚɱɟɧɢɟ, Ʉɨɧɟɱɧɨɟ_ɡɧɚɱɟɧɢɟ ɢ ɒɚɝ ɩɪɢɜɟɞɟɧɨ ɜ ɬɚɛɥ. 14. Ɍɚɛɥɢɰɚ 14. ɋɩɨɫɨɛ ɜɵɩɨɥɧɟɧɢɹ ɰɢɤɥɚ ɜ ɡɚɜɢɫɢɦɨɫɬɢ ɨɬ ɡɧɚɱɟɧɢɣ ɩɚɪɚɦɟɬɪɨɜ ɰɢɤɥɚ. Ʉɨɧɟɱɧɨɟ ɡɧɚɱɟɧɢɟɒɚɝɋɩɨɫɨɛ ɜɵɩɨɥɧɟɧɢɹ >ɇɚɱɚɥɶɧɨɝɨ ɡɧɚɱɟɧɢɹ >0 ɐɢɤɥ ɜɵɩɨɥɧɹɟɬɫɹ ɩɨɤɚ ɩɟɪɟɦɟɧɧɚɹ ɰɢɤɥɚ £ Ʉɨɧɟɱɧɨɝɨ ɡɧɚɱɟɧɢɹ 0 Ɍɟɥɨ ɰɢɤɥɚ ɧɟ ɜɵɩɨɥɧɹɟɬɫɹ =ɇɚɱɚɥɶɧɨɦɭ ɡɧɚɱɟɧɢɸ ¹0 Ɍɟɥɨ ɰɢɤɥɚ ɜɵɩɨɥɧɹɟɬɫɹ ɨɞɢɧ ɪɚɡ >ɇɚɱɚɥɶɧɨɝɨ ɡɧɚɱɟɧɢɹ 0 Then OutSignals[1] = 1 Else OutSignals[1] = 0 End Back Begin
{ɉɪɨɡɪɚɱɧɵɣ ɩɨɪɨɝɨɜɵɣ ɷɥɟɦɟɧɬ} {Ɉɞɢɧ ɜɯɨɞɧɨɣ ɫɢɝɧɚɥ} {Ɉɞɢɧ ɜɵɯɨɞɧɨɣ ɫɢɝɧɚɥ} {ɇɚɱɚɥɨ ɨɩɢɫɚɧɢɹ ɩɪɹɦɨɝɨ ɮɭɧɤɰɢɨɧɢɪɨɜɚɧɢɹ } {ȼɵɯɨɞɧɨɣ ɫɢɝɧɚɥ ɪɚɜɟɧ 1, ɟɫɥɢ ɜɯɨɞɧɨɣ ɫɢɝɧɚɥ} {ɛɨɥɶɲɟ ɧɭɥɹ, ɢ ɧɭɥɸ ɜ ɩɪɨɬɢɜɧɨɦ ɫɥɭɱɚɟ} {Ʉɨɧɟɰ ɨɩɢɫɚɧɢɹ ɩɪɹɦɨɝɨ ɮɭɧɤɰɢɨɧɢɪɨɜɚɧɢɹ} {ɇɚɱɚɥɨ ɨɩɢɫɚɧɢɹ ɨɛɪɚɬɧɨɝɨ ɮɭɧɤɰɢɨɧɢɪɨɜɚɧɢɹ}
{ɉɨɩɪɚɜɤɚ ɤ ɜɯɨɞɧɨɦɭ ɫɢɝɧɚɥɭ ɪɚɜɧɚ ɩɨɩɪɚɜɤɟ ɤ ɜɵɯɨɞɧɨɦɭ ɫɢɝɧɚɥɭ} Back.InSignals[1] = Back.OutSignals[1]; End {Ʉɨɧɟɰ ɨɩɢɫɚɧɢɹ ɨɛɪɚɬɧɨɝɨ ɮɭɧɤɰɢɨɧɢɪɨɜɚɧɢɹ} End Sign_Easy {Ʉɨɧɟɰ ɨɩɢɫɚɧɢɹ ɩɪɨɡɪɚɱɧɨɝɨ ɩɨɪɨɝɨɜɨɝɨ ɷɥɟɦɟɧɬɚ}
CHAP5-3.DOC
94
Element Adaptiv_Sum( N : Long) InSignals N OutSignals 1 Parameters N
{Ⱥɞɚɩɬɢɜɧɵɣ ɫɭɦɦɚɬɨɪ ɧɚ N ɜɯɨɞɨɜ} {N ɜɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ} {Ɉɞɢɧ ɜɵɯɨɞɧɨɣ ɫɢɝɧɚɥ} {N ɩɚɪɚɦɟɬɪɨɜ – ɜɟɫɨɜ ɫɜɹɡɟɣ}
Forw Var Long I; Real R; Begin R = 0; For I=1 To N Do R = R + InSignals[I] * Parameters[I]; OutSignals[1] = R End
{ɇɚɱɚɥɨ ɨɩɢɫɚɧɢɹ ɩɪɹɦɨɝɨ ɮɭɧɤɰɢɨɧɢɪɨɜɚɧɢɹ} {Ɉɩɢɫɚɧɢɟ ɥɨɤɚɥɶɧɵɯ ɩɟɪɟɦɟɧɧɵɯ} {I – ɞɥɢɧɧɨɟ ɰɟɥɨɟ – ɢɧɞɟɤɫ} {R – ɞɟɣɫɬɜɢɬɟɥɶɧɨɟ – ɞɥɹ ɧɚɤɨɩɥɟɧɢɹ ɫɭɦɦɵ} {ȼɵɯɨɞɧɨɣ ɫɢɝɧɚɥ ɪɚɜɟɧ ɫɤɚɥɹɪɧɨɦɭ } {ɩɪɨɢɡɜɟɞɟɧɢɸ ɦɚɫɫɢɜɚ ɜɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ} {ɧɚ ɦɚɫɫɢɜ ɩɚɪɚɦɟɬɪɨɜ} {Ʉɨɧɟɰ ɨɩɢɫɚɧɢɹ ɨɛɪɚɬɧɨɝɨ ɮɭɧɤɰɢɨɧɢɪɨɜɚɧɢɹ}
Back {ɇɚɱɚɥɨ ɨɩɢɫɚɧɢɹ ɨɛɪɚɬɧɨɝɨ ɮɭɧɤɰɢɨɧɢɪɨɜɚɧɢɹ} Var Long I; {I – ɥɨɤɚɥɶɧɚɹ ɩɟɪɟɦɟɧɧɚɹ ɬɢɩɚ} Begin {ɞɥɢɧɧɨɟ ɰɟɥɨɟ – ɢɧɞɟɤɫ} For I=1 To N Do Begin {ɉɨɩɪɚɜɤɚ ɤ I-ɭ ɜɯɨɞɧɨɦɭ ɫɢɝɧɚɥɭ ɪɚɜɧɚ ɫɭɦɦɟ ɪɚɧɟɟ ɜɵɱɢɫɥɟɧɧɨɣ ɩɨɩɪɚɜɤɢ ɢ ɩɪɨɢɡɜɟɞɟɧɢɹ ɩɨɩɪɚɜɤɢ ɜɵɯɨɞɧɨɝɨ ɫɢɝɧɚɥɚ ɧɚ I-ɣ ɩɚɪɚɦɟɬɪ} Back.InSignals[I] = Back.OutSignals[1] * Parameters[I]; {ɉɨɩɪɚɜɤɚ ɤ I-ɭ ɩɚɪɚɦɟɬɪɭ ɪɚɜɧɚ ɩɪɨɢɡɜɟɞɟɧɢɸ ɩɨɩɪɚɜɤɢ ɜɵɯɨɞɧɨɝɨ ɫɢɝɧɚɥɚ ɧɚ I-ɣ ɜɯɨɞɧɨɣ ɫɢɝɧɚɥ} Back. Parameters[I] = Back. Parameters[I] + Back.OutSignals[1] * InSignals[I] End End {Ʉɨɧɟɰ ɨɩɢɫɚɧɢɹ ɨɛɪɚɬɧɨɝɨ ɮɭɧɤɰɢɨɧɢɪɨɜɚɧɢɹ} End Adaptiv_Sum {Ʉɨɧɟɰ ɨɩɢɫɚɧɢɹ ɚɞɚɩɬɢɜɧɨɝɨ ɫɭɦɦɚɬɨɪɚ} Element Adaptiv_Sum_Plus ( N : Long) InSignals N OutSignals 1 Parameters N+1
{Ⱥɞɚɩɬɢɜɧɵɣ ɧɟɨɞɧɨɪɨɞɧɵɣ ɫɭɦɦɚɬɨɪ ɧɚ N ɜɯɨɞɨɜ} {N ɜɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ} {Ɉɞɢɧ ɜɵɯɨɞɧɨɣ ɫɢɝɧɚɥ} {N+1 ɩɚɪɚɦɟɬɪ – ɜɟɫɚ ɫɜɹɡɟɣ}
Forw Var Long I; Real R; Begin R = Parameters[N+1]; For I=1 To N Do R = R + InSignals[I] * Parameters[I]; OutSignals[1] = R End
{ɇɚɱɚɥɨ ɨɩɢɫɚɧɢɹ ɩɪɹɦɨɝɨ ɮɭɧɤɰɢɨɧɢɪɨɜɚɧɢɹ } {Ɉɩɢɫɚɧɢɟ ɥɨɤɚɥɶɧɵɯ ɩɟɪɟɦɟɧɧɵɯ} {I – ɞɥɢɧɧɨɟ ɰɟɥɨɟ – ɢɧɞɟɤɫ} {R – ɞɟɣɫɬɜɢɬɟɥɶɧɨɟ – ɞɥɹ ɧɚɤɨɩɥɟɧɢɹ ɫɭɦɦɵ} {ȼɵɯɨɞɧɨɣ ɫɢɝɧɚɥ ɪɚɜɟɧ ɫɭɦɦɟ N+1 ɩɚɪɚɦɟɬɪɚ} {ɢ ɫɤɚɥɹɪɧɨɝɨ ɩɪɨɢɡɜɟɞɟɧɢɹ ɦɚɫɫɢɜɚ ɜɯɨɞɧɵɯ} {ɫɢɝɧɚɥɨɜ ɧɚ ɦɚɫɫɢɜ ɩɚɪɚɦɟɬɪɨɜ} {Ʉɨɧɟɰ ɨɩɢɫɚɧɢɹ ɩɪɹɦɨɝɨ ɮɭɧɤɰɢɨɧɢɪɨɜɚɧɢɹ}
Back {ɇɚɱɚɥɨ ɨɩɢɫɚɧɢɹ ɨɛɪɚɬɧɨɝɨ ɮɭɧɤɰɢɨɧɢɪɨɜɚɧɢɹ } Var Long I; {I – ɥɨɤɚɥɶɧɚɹ ɩɟɪɟɦɟɧɧɚɹ ɬɢɩɚ} Begin {ɞɥɢɧɧɨɟ ɰɟɥɨɟ – ɢɧɞɟɤɫ} For I=1 To N Do Begin {ɉɨɩɪɚɜɤɚ ɤ I-ɭ ɜɯɨɞɧɨɦɭ ɫɢɝɧɚɥɭ ɪɚɜɧɚ ɩɪɨɢɡɜɟɞɟɧɢɸ ɩɨɩɪɚɜɤɢ ɜɵɯɨɞɧɨɝɨ ɫɢɝɧɚɥɚ ɧɚ I-ɣ ɩɚɪɚɦɟɬɪ} Back.InSignals[I] = Back.OutSignals[1] * Parameters[I]; {ɉɨɩɪɚɜɤɚ ɤ I-ɭ ɩɚɪɚɦɟɬɪɭ ɪɚɜɧɚ ɫɭɦɦɟ ɪɚɧɟɟ ɜɵɱɢɫɥɟɧɧɨɣ ɩɨɩɪɚɜɤɢ ɢ ɩɪɨɢɡɜɟɞɟɧɢɹ ɩɨɩɪɚɜɤɢ ɜɵɯɨɞɧɨɝɨ ɫɢɝɧɚɥɚ ɧɚ I-ɣ ɜɯɨɞɧɨɣ ɫɢɝɧɚɥ} Back. Parameters[I] = Back. Parameters[I] + Back.OutSignals[1] * InSignals[I] End; {ɉɨɩɪɚɜɤɚ ɤ (N+1)-ɭ ɩɚɪɚɦɟɬɪɭ ɪɚɜɧɚ ɫɭɦɦɟ ɪɚɧɟɟ ɜɵɱɢɫɥɟɧɧɨɣ ɩɨɩɪɚɜɤɢ ɢ ɩɨɩɪɚɤɢ ɤ ɜɵɯɨɞɧɨɦɭ ɫɢɝɧɚɥɭ} Back.Parameters[N+1] = Back.Parameters[N+1] + Back.OutSignals[1]
CHAP5-3.DOC
95
End End Adaptiv_Sum_Plus Element Square_Sum( N : Long) InSignals N OutSignals 1 Parameters (Sqr(N) + N) Div 2
{Ʉɨɧɟɰ ɨɩɢɫɚɧɢɹ ɨɛɪɚɬɧɨɝɨ ɮɭɧɤɰɢɨɧɢɪɨɜɚɧɢɹ} {Ʉɨɧɟɰ ɨɩɢɫɚɧɢɹ ɧɟɨɞɧɨɪɨɞɧɨɝɨ ɚɞɚɩɬɢɜɧɨɝɨ ɫɭɦɦɚɬɨɪɚ} {Ʉɜɚɞɪɚɬɢɱɧɵɣ ɫɭɦɦɚɬɨɪ ɧɚ N ɜɯɨɞɨɜ} {N ɜɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ} {Ɉɞɢɧ ɜɵɯɨɞɧɨɣ ɫɢɝɧɚɥ} {N(N+1)/2 ɩɚɪɚɦɟɬɪɨɜ – ɜɟɫɨɜ ɫɜɹɡɟɣ}
Forw {ɇɚɱɚɥɨ ɨɩɢɫɚɧɢɹ ɩɪɹɦɨɝɨ ɮɭɧɤɰɢɨɧɢɪɨɜɚɧɢɹ} Var {Ɉɩɢɫɚɧɢɟ ɥɨɤɚɥɶɧɵɯ ɩɟɪɟɦɟɧɧɵɯ} Long I,J,K; {I,J,K – ɩɟɪɟɦɟɧɧɵɟ ɬɢɩɚ ɞɥɢɧɧɨɟ ɰɟɥɨɟ } Real R; {R – ɞɟɣɫɬɜɢɬɟɥɶɧɨɟ – ɞɥɹ ɧɚɤɨɩɥɟɧɢɹ ɫɭɦɦɵ} Begin K = 1; {K – ɧɨɦɟɪ ɨɛɪɚɛɚɬɵɜɚɟɦɨɝɨ ɩɚɪɚɦɟɬɪɚ} R = 0; For I = 1 To N Do {I,J – ɧɨɦɟɪɚ ɜɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ} For J = I To N Do Begin R = R + InSignals[I] * InSignals[J] * Parameters[K]; K=K+1 End; {ȼɵɯɨɞɧɨɣ ɫɢɝɧɚɥ ɪɚɜɟɧ ɫɭɦɦɟ ɜɫɟɯ ɩɨɩɚɪɧɵɯ ɩɪɨɢɡɜɟɞɟɧɢɣ ɜɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ, ɭɦɧɨɠɟɧɧɵɯ ɧɚ ɫɨɨɬɜɟɬɫɬɜɭɸɳɢɟ ɩɚɪɚɦɟɬɪɵ} OutSignals[1] = R End {Ʉɨɧɟɰ ɨɩɢɫɚɧɢɹ ɩɪɹɦɨɝɨ ɮɭɧɤɰɢɨɧɢɪɨɜɚɧɢɹ} Back {ɇɚɱɚɥɨ ɨɩɢɫɚɧɢɹ ɨɛɪɚɬɧɨɝɨ ɮɭɧɤɰɢɨɧɢɪɨɜɚɧɢɹ } Var {Ɉɩɢɫɚɧɢɟ ɥɨɤɚɥɶɧɵɯ ɩɟɪɟɦɟɧɧɵɯ} Long I, J, K; {I,J,K – ɩɟɪɟɦɟɧɧɵɟ ɬɢɩɚ ɞɥɢɧɧɨɟ ɰɟɥɨɟ } Real R; {R – ɞɟɣɫɬɜɢɬɟɥɶɧɨɟ} Vector W; {Ɇɚɫɫɢɜ ɞɥɹ ɧɚɤɨɩɥɟɧɢɹ ɩɪɨɦɟɠɭɬɨɱɧɵɯ ɜɟɥɢɱɢɧ} Begin For I = 1 To N Do W[I] = 0; K = 1; {K – ɧɨɦɟɪ ɨɛɪɚɛɚɬɵɜɚɟɦɨɝɨ ɩɚɪɚɦɟɬɪɚ} For I = 1 To N Do For J = I To N Do Begin {ɉɨɩɪɚɜɤɚ ɤ ɩɚɪɚɦɟɬɪɭ ɪɚɜɧɚ ɫɭɦɦɟ ɪɚɧɟɟ ɜɵɱɢɫɥɟɧɧɨɣ ɩɨɩɪɚɜɤɢ ɢ ɩɪɨɢɡɜɟɞɟɧɢɹ ɩɨɩɪɚɜɤɢ ɤ ɜɯɨɞɧɨɦɭ ɫɢɝɧɚɥɭ ɧɚ ɩɪɨɢɡɜɟɞɟɧɢɟ ɫɢɝɧɚɥɨɜ, ɩɪɨɲɟɞɲɢɯ ɱɟɪɟɡ ɷɬɨɬ ɩɚɪɚɦɟɬɪ ɩɪɢ ɩɪɹɦɨɦ ɮɭɧɤɰɢɨɧɢɪɨɜɚɧɢɢ} Back.Parameters[K] = Back.Parameters[K] + Back.OutSignals[1] * InSignals[I] * InSignals[J]; R = Back.OutSignals[1] * Parameters[K]; W[I] = W[I] + R * InSignals[J]; W[J] = W[J] + R * InSignals[I]; K=K+1 End; For I = 1 To N Do {ɉɨɩɪɚɜɤɚ ɤ ɜɯɨɞɧɨɦɭ ɫɢɝɧɚɥɭ ɪɚɜɧɚ ɩɪɨɢɡɜɟɞɟɧɢɸ ɩɨɩɪɚɜɤɢ ɤ ɜɵɯɨɞɧɨɦɭ ɫɢɝɧɚɥɭ ɧɚ ɫɭɦɦɭ ɜɫɟɯ ɩɚɪɚɦɟɬɪɨɜ, ɱɟɪɟɡ ɤɨɬɨɪɵɟ ɷɬɨɬ ɫɢɝɧɚɥ ɩɪɨɯɨɞɢɥ ɩɪɢ ɩɪɹɦɨɦ ɮɭɧɤɰɢɨɧɢɪɨɜɚɧɢɢ, ɭɦɧɨɠɟɧɧɵɯ ɧɚ ɞɪɭɝɢɟ ɜɯɨɞɧɵɟ ɫɢɝɧɚɥɵ, ɬɚɤ ɠɟ ɩɪɨɲɟɞɲɢɟ ɱɟɪɟɡ ɷɬɢ ɩɚɪɚɦɟɬɪɵ ɩɪɢ ɩɪɹɦɨɦ ɮɭɧɤɰɢɨɧɢɪɨɜɚɧɢɢ} Back.InSignals[1] = W[I] End {Ʉɨɧɟɰ ɨɩɢɫɚɧɢɹ ɩɪɹɦɨɝɨ ɮɭɧɤɰɢɨɧɢɪɨɜɚɧɢɹ} End Square_Sum {Ʉɨɧɟɰ ɨɩɢɫɚɧɢɹ ɤɜɚɞɪɚɬɢɱɧɨɝɨ ɫɭɦɦɚɬɨɪɚ} Element Square_Sum_Plus( N : Long) InSignals N OutSignals 1 Parameters (Sqr(N) + 3 * N) Div 2 + 1 Forw
CHAP5-3.DOC
{Ⱥɞɚɩɬɢɜɧɵɣ ɤɜɚɞɪɚɬɢɱɧɵɣ ɫɭɦɦɚɬɨɪ ɧɚ N ɜɯɨɞɨɜ} {N ɜɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ} {Ɉɞɢɧ ɜɵɯɨɞɧɨɣ ɫɢɝɧɚɥ} {N(N+3)/2+1 ɩɚɪɚɦɟɬɪɨɜ – ɜɟɫɨɜ ɫɜɹɡɟɣ} {ɇɚɱɚɥɨ ɨɩɢɫɚɧɢɹ ɩɪɹɦɨɝɨ ɮɭɧɤɰɢɨɧɢɪɨɜɚɧɢɹ}
96
Var {Ɉɩɢɫɚɧɢɟ ɥɨɤɚɥɶɧɵɯ ɩɟɪɟɦɟɧɧɵɯ} Long I, J, K; {I,J,K – ɩɟɪɟɦɟɧɧɵɟ ɬɢɩɚ ɞɥɢɧɧɨɟ ɰɟɥɨɟ } Real R; {R – ɞɟɣɫɬɜɢɬɟɥɶɧɨɟ – ɞɥɹ ɧɚɤɨɩɥɟɧɢɹ ɫɭɦɦɵ} Begin K = 2 * N+1; {K – ɧɨɦɟɪ ɨɛɪɚɛɚɬɵɜɚɟɦɨɝɨ ɩɚɪɚɦɟɬɪɚ} R = Parameters[Sqr(N) + 3 * N) Div 2 + 1]; For I = 1 To N Do Begin R = R + InSignals[I] * Parameters[I] + Sqr(InSignals[I]) * Parameters[N + I]; For J = I + 1 To N Do Begin R = R + InSignals[I] * InSignals[J] * Parameters[K]; K=K+1 End End {ȼɵɯɨɞɧɨɣ ɫɢɝɧɚɥ ɪɚɜɟɧ ɫɭɦɦɟ ɜɫɟɯ ɩɨɩɚɪɧɵɯ ɩɪɨɢɡɜɟɞɟɧɢɣ ɜɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ, ɭɦɧɨɠɟɧɧɵɯ ɧɚ ɫɨɨɬɜɟɬɫɬɜɭɸɳɢɟ ɩɚɪɚɦɟɬɪɵ, ɩɥɸɫ ɫɭɦɦɟ ɜɫɟɯ ɜɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ ɭɦɧɨɠɟɧɧɵɯ ɧɚ ɫɨɨɬɜɟɬɫɬɜɭɸɳɢɟ ɩɚɪɚɦɟɬɪɵ, ɩɥɸɫ ɩɨɫɥɟɞɧɢɣ ɩɚɪɚɦɟɬɪ} OutSignals[1] = R End {Ʉɨɧɟɰ ɨɩɢɫɚɧɢɹ ɩɪɹɦɨɝɨ ɮɭɧɤɰɢɨɧɢɪɨɜɚɧɢɹ} Back {ɇɚɱɚɥɨ ɨɩɢɫɚɧɢɹ ɨɛɪɚɬɧɨɝɨ ɮɭɧɤɰɢɨɧɢɪɨɜɚɧɢɹ } Var {Ɉɩɢɫɚɧɢɟ ɥɨɤɚɥɶɧɵɯ ɩɟɪɟɦɟɧɧɵɯ} Long I, J, K; {I,J,K – ɩɟɪɟɦɟɧɧɵɟ ɬɢɩɚ ɞɥɢɧɧɨɟ ɰɟɥɨɟ } Real R; {R – ɞɟɣɫɬɜɢɬɟɥɶɧɨɟ – ɞɥɹ ɧɚɤɨɩɥɟɧɢɹ ɫɭɦɦɵ} Vector W; {Ɇɚɫɫɢɜ ɞɥɹ ɧɚɤɨɩɥɟɧɢɹ ɩɪɨɦɟɠɭɬɨɱɧɵɯ ɜɟɥɢɱɢɧ} Begin For I = 1 To N Do W[I] = 0; K = 2 * N + 1; {K – ɧɨɦɟɪ ɨɛɪɚɛɚɬɵɜɚɟɦɨɝɨ ɩɚɪɚɦɟɬɪɚ} For I = 1 To N Do Begin Back.Parameters[I] = Back.Parameters[I] + Back.OutSignals[1] * InSignals[I]; Back.Parameters[N + I] = Back.Parameters[N + I] + Back.OutSignals[1] * Sqr(InSignals[I]); W[I] = W[I] + Back.OutSignals[1] * (Parameters[I] + 2 * Parameters[N + I] * InSignals[I]) For J = I + 1 To N Do Begin Back.Parameters[K] = Back.Parameters[K] + Back.OutSignals[1] * InSignals[I] * InSignals[J]; R = Back.OutSignals[1] * Parameters[K]; W[I] = W[I] + R * InSignals[J]; W[J] = W[J] + R * InSignals[I]; K=K+1 End End; For I = 1 To N Do Back.InSignals[1] = W[I] End {Ʉɨɧɟɰ ɨɩɢɫɚɧɢɹ ɨɛɪɚɬɧɨɝɨ ɮɭɧɤɰɢɨɧɢɪɨɜɚɧɢɹ} End Square_Sum_Plus {Ʉɨɧɟɰ ɨɩɢɫɚɧɢɹ ɚɞɚɩɬɢɜɧɨɝɨ ɤɜɚɞɪɚɬɢɱɧɨɝɨ ɫɭɦɦɚɬɨɪɚ} End NetBibl
5.3.5.3.5 Ɉɩɢɫɚɧɢɟ ɛɥɨɤɨɜ Ɉɩɢɫɚɧɢɟ ɛɥɨɤɚ ɫɨɫɬɨɢɬ ɢɡ ɩɹɬɢ ɨɫɧɨɜɧɵɯ ɪɚɡɞɟɥɨɜ: ɡɚɝɨɥɨɜɤɚ ɨɩɢɫɚɧɢɹ ɛɥɨɤɚ, ɨɩɢɫɚɧɢɹ ɫɢɝɧɚɥɨɜ ɢ ɩɚɪɚɦɟɬɪɨɜ, ɨɩɢɫɚɧɢɹ ɫɨɫɬɚɜɚ, ɨɩɢɫɚɧɢɹ ɫɜɹɡɟɣ ɢ ɤɨɧɰɚ ɨɩɢɫɚɧɢɹ ɛɥɨɤɚ. ɋɭɳɟɫɬɜɭɟɬ ɞɜɚ ɬɢɩɚ ɛɥɨɤɨɜ – ɤɚɫɤɚɞ ɢ ɫɥɨɣ (Layer). Ɋɚɡɥɢɱɢɟ ɦɟɠɞɭ ɷɬɢɦɢ ɞɜɭɦɹ ɬɢɩɚɦɢ ɛɥɨɤɨɜ ɫɨɫɬɨɢɬ ɜ ɬɨɦ, ɱɬɨ ɩɨɞɫɟɬɢ, ɜɯɨɞɹɳɢɟ ɜ ɫɨɫɬɚɜ ɫɥɨɹ, ɮɭɧɤɰɢɨɧɢɪɭɸɬ ɩɚɪɚɥɥɟɥɶɧɨ ɢ ɧɟɡɚɜɢɫɢɦɨ ɞɪɭɝ ɨɬ ɞɪɭɝɚ, ɬɨɝɞɚ ɤɚɤ ɫɨɫɬɚɜɥɹɸɳɢɟ ɤɚɫɤɚɞ ɩɨɞɫɟɬɢ ɮɭɧɤɰɢɨɧɢɪɭɸɬ ɩɨɫɥɟɞɨɜɚɬɟɥɶɧɨ, ɩɪɢɱɟɦ ɤɚɠɞɚɹ ɫɥɟɞɭɸɳɚɹ ɩɨɞɫɟɬɶ ɢɫɩɨɥɶɡɭɟɬ ɪɟɡɭɥɶɬɚɬɵ ɪɚɛɨɬɵ ɩɪɟɞɵɞɭɳɢɯ ɩɨɞɫɟɬɟɣ. ȼ ɫɜɨɸ ɨɱɟɪɟɞɶ ɫɭɳɟɫɬɜɭɟɬ ɬɪɢ ɜɢɞɚ ɤɚɫɤɚɞɨɜ – ɩɪɨɫɬɨɣ ɤɚɫɤɚɞ (Cascad), ɰɢɤɥ ɫ ɮɢɤɫɢɪɨɜɚɧɧɵɦ ɱɢɫɥɨɦ ɲɚɝɨɜ (Loop) ɰɢɤɥ ɩɨ ɭɫɥɨɜɢɸ (Until). Ɋɚɡɥɢɱɢɟ ɦɟɠɞɭ ɬɪɟɦɹ ɜɢɞɚɦɢ ɤɚɫɤɚɞɨɜ ɨɱɟɜɢɞɧɨ – ɩɪɨɫɬɨɣ ɤɚɫɤɚɞ ɮɭɧɤɰɢɨɧɢɪɭɟɬ ɨɞɢɧ ɪɚɡ, ɰɢɤɥ Loop ɮɭɧɤɰɢɨɧɢɪɭɟɬ ɭɤɚɡɚɧɧɨɟ ɜ ɨɩɢɫɚɧɢɢ ɱɢɫɥɨ ɪɚɡ, ɚ ɰɢɤɥ Until ɮɭɧɤɰɢɨɧɢɪɭɟɬ ɞɨ ɬɟɯ ɩɨɪ, ɩɨɤɚ ɧɟ ɜɵɩɨɥɧɢɬɫɹ ɭɤɚɡɚɧɧɨɟ ɜ ɨɩɢɫɚɧɢɢ ɭɫɥɨɜɢɟ. ȼ ɭɫɥɨɜɢɢ, ɭɤɚɡɵɜɚɟɦɨɦ ɜ ɡɚɝɨɥɨɜɤɟ ɰɢɤɥɚ Until, ɜɨɡɦɨɠɧɨ ɢɫɩɨɥɶɡɨɜɚɧɢɟ ɫɪɚɜɧɟɧɢɣ ɦɚɫɫɢɜɨɜ ɢɥɢ ɢɧɬɟɪɜɚɥɨɜ ɦɚɫɫɢɜɨɜ ɫɢɝɧɚɥɨɜ. ɇɚɩɪɢɦɟɪ, ɡɚɩɢɫɶ
CHAP5-3.DOC
97
InSignals=OutSignals ɷɤɜɢɜɚɥɟɧɬɧɚ ɫɥɟɞɭɸɳɟɣ ɡɚɩɢɫɢ InSignals[1..N]=OutSignals[1..N] ɤɨɬɨɪɚɹ ɷɤɜɢɜɚɥɟɧɬɧɚ ɜɵɱɢɫɥɟɧɢɸ ɫɥɟɞɭɸɳɟɣ ɥɨɝɢɱɟɫɤɨɣ ɮɭɧɤɰɢɢ: Function Equal(InSignals, OutSignals : RealArray) : Logic; Var Long I; Logic L Begin L = True For I = 1 To N Do L = L And (InSignals[I] = OutSignals[I]); Equal = L End Ɋɚɡɞɟɥ ɨɩɢɫɚɧɢɹ ɫɨɫɬɚɜɚ ɫɥɟɞɭɟɬ ɫɪɚɡɭ ɩɨɫɥɟ ɡɚɝɨɥɨɜɤɚ ɛɥɨɤɚ ɡɚ ɪɚɡɞɟɥɨɦ ɨɩɢɫɚɧɢɹ ɫɢɝɧɚɥɨɜ ɢ ɩɚɪɚɦɟɬɪɨɜ ɢ ɧɚɱɢɧɚɟɬɫɹ ɫ ɤɥɸɱɟɜɨɝɨ ɫɥɨɜɚ Contents, ɡɚ ɤɨɬɨɪɵɦ ɫɥɟɞɭɸɬ ɢɦɟɧɚ ɩɨɞɫɟɬɟɣ (ɛɥɨɤɨɜ ɢɥɢ ɷɥɟɦɟɧɬɨɜ) ɫɨ ɫɩɢɫɤɚɦɢ ɮɚɤɬɢɱɟɫɤɢɯ ɚɪɝɭɦɟɧɬɨɜ, ɪɚɡɞɟɥɟɧɧɵɟ ɡɚɩɹɬɵɦɢ. ȼɫɟ ɢɦɟɧɚ ɩɨɞɫɟɬɟɣ ɞɨɥɠɧɵ ɩɪɟɞɜɚɪɹɬɶɫɹ ɩɫɟɜɞɨɧɢɦɚɦɢ. ȼ ɞɚɥɶɧɟɣɲɟɦ ɭɤɚɡɚɧɢɟ ɩɫɟɜɞɨɧɢɦɚ ɩɨɥɧɨɫɬɶɸ ɷɤɜɢɜɚɥɟɧɬɧɨ ɭɤɚɡɚɧɢɸ ɢɦɟɧɢ ɩɨɞɫɟɬɢ ɫɨ ɫɩɢɫɤɨɦ ɮɚɤɬɢɱɟɫɤɢɯ ɚɪɝɭɦɟɧɬɨɜ ɢɥɢ ɛɟɡ, ɜ ɡɚɜɢɫɢɦɨɫɬɢ ɨɬ ɤɨɧɬɟɤɫɬɚ. ɉɪɢɡɧɚɤɨɦ ɤɨɧɰɚ ɪɚɡɞɟɥɚ ɨɩɢɫɚɧɢɹ ɫɨɫɬɚɜɚ ɩɨɞɫɟɬɢ ɫɥɭɠɢɬ ɢɦɹ ɩɨɞɫɟɬɢ ɡɚ ɫɩɢɫɤɨɦ ɮɚɤɬɢɱɟɫɤɢɯ ɚɪɝɭɦɟɧɬɨɜ ɤɨɬɨɪɨɝɨ ɧɟ ɫɥɟɞɭɟɬ ɡɚɩɹɬɚɹ. Ɋɚɡɞɟɥ ɨɩɢɫɚɧɢɹ ɫɢɝɧɚɥɨɜ ɢ ɩɚɪɚɦɟɬɪɨɜ ɫɥɟɞɭɟɬ ɡɚ ɪɚɡɞɟɥɨɦ ɨɩɢɫɚɧɢɹ ɫɨɫɬɚɜɚ ɢ ɫɨɫɬɨɢɬ ɢɡ ɭɤɚɡɚɧɢɹ ɱɢɫɥɚ ɜɯɨɞɧɵɯ ɢ ɜɵɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ ɢ ɱɢɫɥɚ ɩɚɪɚɦɟɬɪɨɜ ɛɥɨɤɚ. ȼ ɤɨɧɫɬɚɧɬɧɵɯ ɜɵɪɚɠɟɧɢɹɯ, ɭɤɚɡɵɜɚɸɳɢɯ ɱɢɫɥɨ ɜɯɨɞɧɵɯ ɢ ɜɵɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ ɢ ɩɚɪɚɦɟɬɪɨɜ ɦɨɠɧɨ ɢɫɩɨɥɶɡɨɜɚɬɶ ɞɨɩɨɥɧɢɬɟɥɶɧɨ ɮɭɧɤɰɢɸ NumberOf ɫ ɞɜɭɦɹ ɩɚɪɚɦɟɬɪɚɦɢ. ɉɟɪɜɵɦ ɩɚɪɚɦɟɬɪɨɦ ɹɜɥɹɟɬɫɹ ɨɞɧɨ ɢɡ ɤɥɸɱɟɜɵɯ ɫɥɨɜ InSignals, OutSignals, Parameters, ɚ ɜɬɨɪɵɦ – ɢɦɹ ɩɨɞɫɟɬɢ ɫɨ ɫɩɢɫɤɨɦ ɮɚɤɬɢɱɟɫɤɢɯ ɚɪɝɭɦɟɧɬɨɜ. Ɏɭɧɤɰɢɹ NumberOf ɜɨɡɜɪɚɳɚɟɬ ɱɢɫɥɨ ɜɯɨɞɧɵɯ ɢɥɢ ɜɵɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ ɢɥɢ ɩɚɪɚɦɟɬɪɨɜ (ɜ ɡɚɜɢɫɢɦɨɫɬɢ ɨɬ ɩɟɪɜɨɝɨ ɚɪɝɭɦɟɧɬɚ) ɜ ɩɨɞɫɟɬɢ, ɭɤɚɡɚɧɧɨɣ ɜɨ ɜɬɨɪɨɦ ɚɪɝɭɦɟɧɬɟ. ɂɫɩɨɥɶɡɨɜɚɧɢɟ ɷɬɨɣ ɮɭɧɤɰɢɢ ɧɟɨɛɯɨɞɢɦɨ ɜ ɫɥɭɱɚɟ ɢɫɩɨɥɶɡɨɜɚɧɢɹ ɛɥɨɤɨɦ ɚɪɝɭɦɟɧɬɨɜ-ɩɨɞɫɟɬɟɣ. Ʉɨɧɰɨɦ ɪɚɡɞɟɥɚ ɨɩɢɫɚɧɢɹ ɫɢɝɧɚɥɨɜ ɢ ɩɚɪɚɦɟɬɪɨɜ ɫɥɭɠɢɬ ɨɞɧɨ ɢɡ ɤɥɸɱɟɜɵɯ ɫɥɨɜ ParamDef, Static ɢɥɢ Connections. Ɋɚɡɞɟɥ ɨɩɪɟɞɟɥɟɧɢɹ ɬɢɩɨɜ ɩɚɪɚɦɟɬɪɨɜ ɹɜɥɹɟɬɫɹ ɧɟɨɛɹɡɚɬɟɥɶɧɵɦ ɪɚɡɞɟɥɨɦ ɜ ɨɩɢɫɚɧɢɢ ɛɥɨɤɚ ɢ ɧɚɱɢɧɚɟɬɫɹ ɫ ɤɥɸɱɟɜɨɝɨ ɫɥɨɜɚ ParamDef. ȼ ɤɚɠɞɨɣ ɫɬɪɨɤɟ ɷɬɨɝɨ ɪɚɡɞɟɥɚ ɦɨɠɧɨ ɡɚɞɚɬɶ ɦɢɧɢɦɚɥɶɧɭɸ ɢ ɦɚɤɫɢɦɚɥɶɧɭɸ ɝɪɚɧɢɰɵ ɢɡɦɟɧɟɧɢɹ ɨɞɧɨɝɨ ɬɢɩɚ ɩɚɪɚɦɟɬɪɨɜ. ȿɫɥɢ ɜ ɨɩɢɫɚɧɢɢ ɫɟɬɢ ɜɫɬɪɟɱɚɸɬɫɹ ɩɚɪɚɦɟɬɪɵ ɧɟɨɩɪɟɞɟɥɟɧɧɨɝɨ ɬɢɩɚ, ɬɨ ɷɬɨɬ ɬɢɩ ɫɱɢɬɚɟɬɫɹ ɫɨɜɩɚɞɚɸɳɢɦ ɫ ɬɢɩɨɦ DefaultType. Ɉɩɢɫɚɧɢɟ ɬɢɩɚ ɧɟ ɨɛɹɡɚɧɨ ɩɪɟɞɲɟɫɬɜɨɜɚɬɶ ɨɩɢɫɚɧɢɸ ɩɚɪɚɦɟɬɪɨɜ ɷɬɨɝɨ ɬɢɩɚ. Ɍɚɤ, ɧɚɩɪɢɦɟɪ, ɨɩɪɟɞɟɥɟɧɢɟ ɬɢɩɚ ɩɚɪɚɦɟɬɪɨɜ ɦɨɠɟɬ ɧɚɯɨɞɢɬɶɫɹ ɜ ɨɩɢɫɚɧɢɢ ɝɥɚɜɧɨɣ ɫɟɬɢ. Ʉɨɧɰɨɦ ɷɬɨɝɨ ɪɚɡɞɟɥɚ ɫɥɭɠɢɬ ɨɞɧɨ ɢɡ ɤɥɸɱɟɜɵɯ ɫɥɨɜ Connections. Ɋɚɡɞɟɥ ɨɩɢɫɚɧɢɹ ɫɜɹɡɟɣ ɫɥɟɞɭɟɬ ɡɚ ɪɚɡɞɟɥɨɦ ɨɩɢɫɚɧɢɹ ɫɢɝɧɚɥɨɜ ɢ ɩɚɪɚɦɟɬɪɨɜ ɢ ɧɚɱɢɧɚɟɬɫɹ ɫ ɤɥɸɱɟɜɨɝɨ ɫɥɨɜɚ Connections. ȼ ɪɚɡɞɟɥɟ «Ɉɩɢɫɚɧɢɟ ɪɚɫɩɪɟɞɟɥɟɧɢɹ ɫɢɝɧɚɥɨɜ» ɝɥɚɜɵ «Ɉɛɳɢɣ ɫɬɚɧɞɚɪɬ» ɞɟɬɚɥɶɧɨ ɨɩɢɫɚɧɨ ɪɚɫɩɪɟɞɟɥɟɧɢɟ ɫɜɹɡɟɣ. Ɋɚɡɞɟɥ ɤɨɧɰɚ ɨɩɢɫɚɧɢɹ ɛɥɨɤɚ ɫɨɫɬɨɢɬ ɢɡ ɤɥɸɱɟɜɨɝɨ ɫɥɨɜɚ End, ɡɚ ɤɨɬɨɪɵɦ ɫɥɟɞɭɟɬ ɢɦɹ ɛɥɨɤɚ.
5.3.5.3.6 ɉɪɢɦɟɪ ɨɩɢɫɚɧɢɹ ɛɥɨɤɨɜ ɉɪɢ ɨɩɢɫɚɧɢɢ ɛɥɨɤɨɜ ɢɫɩɨɥɶɡɭɸɬɫɹ ɷɥɟɦɟɧɬɵ, ɨɩɢɫɚɧɧɵɟ ɜ ɛɢɛɥɢɨɬɟɤɟ Elements, ɩɪɢɜɟɞɟɧɧɨɣ ɜ ɪɚɡɞ. «ɉɪɢɦɟɪ ɨɩɢɫɚɧɢɹ ɷɥɟɦɟɧɬɨɜ». NetBibl SubNets Used Elements; {Ȼɢɛɥɢɨɬɟɤɚ ɩɨɞɫɟɬɟɣ, ɢɫɩɨɥɶɡɭɸɳɚɹ ɛɢɛɥɢɨɬɟɤɭ Elements} {ɋɢɝɦɨɢɞɧɵɣ ɧɟɣɪɨɧ ɫ ɩɪɨɢɡɜɨɥɶɧɵɦ ɫɭɦɦɚɬɨɪɨɦ ɧɚ N ɜɯɨɞɨɜ} Cascad NSigm(aSum : Block; N : Long; Char : Real) {ȼ ɫɨɫɬɚɜ ɤɚɫɤɚɞɚ ɜɯɨɞɢɬ ɩɪɨɢɡɜɨɥɶɧɵɣ ɫɭɦɦɚɬɨɪ ɧɚ N ɜɯɨɞɨɜ ɢ ɫɢɝɦɨɢɞɧɵɣ ɧɟɣɪɨɧ ɫ ɧɟɨɛɭɱɚɟɦɨɣ ɯɚɪɚɤɬɟɪɢɫɬɢɤɨɣ} Contents aSum(N), S_NotTrain(Char) InSignals NumberOf(InSignals, aSum(N)) {ɑɢɫɥɨ ɜɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ ɨɩɪɟɞɟɥɹɟɬ ɫɭɦɦɚɬɨɪ} OutSignals 1 {Ɉɞɢɧ ɜɵɯɨɞɧɨɣ ɫɢɝɧɚɥ} Parameters NumberOf(Parameters, aSum(N)) {ɑɢɫɥɨ ɩɚɪɚɦɟɬɪɨɜ ɨɩɪɟɞɟɥɹɟɬ ɫɭɦɦɚɬɨɪ} Connections {ȼɯɨɞɧɵɟ ɫɢɝɧɚɥɵ ɧɟɣɪɨɧɚ – ɜɯɨɞɧɵɟ ɫɢɝɧɚɥɵ ɫɭɦɦɚɬɨɪɚ} InSignals[1.. NumberOf(InSignals, aSum(N))] aSum.InSignals[1.. NumberOf(InSignals, aSum(N))] aSum.OutSignals S_NotTrain.InSignals {ȼɵɯɨɞ ɫɭɦɦɚɬɨɪɚ – ɜɯɨɞ ɩɪɟɨɛɪɚɡɨɜɚɬɟɥɹ}
CHAP5-3.DOC
98
End
OutSignals S_NotTrain.OutSignals {ɉɚɪɚɦɟɬɪɵ ɧɟɣɪɨɧɚ – ɩɚɪɚɦɟɬɪɵ ɫɭɦɦɚɬɨɪɚ } Parameters[1.. NumberOf(Parameters, aSum(N))] aSum.Parameters[1.. NumberOf(Parameters, aSum(N))] {Ʉɨɧɟɰ ɨɩɢɫɚɧɢɹ ɫɢɝɦɨɢɞɧɨɝɨ ɧɟɣɪɨɧɚ ɫ ɩɪɨɢɡɜɨɥɶɧɵɦ ɫɭɦɦɚɬɨɪɨɦ}
{ɋɥɨɣ ɫɢɝɦɨɢɞɧɵɯ ɧɟɣɪɨɧɨɜ ɫ ɩɪɨɢɡɜɨɥɶɧɵɦɢ ɫɭɦɦɚɬɨɪɚɦɢ ɧɚ N ɜɯɨɞɨɜ} Layer Lay1(aSum : Block; N,M : Long; Char : Real) Contents Sigm: NSigm(aSum,N,Char)[M] {ȼ ɫɨɫɬɚɜ ɫɥɨɹ ɜɯɨɞɢɬ M ɧɟɣɪɨɧɨɜ} InSignals M * NumberOf(InSignals, Sigm) {ɑɢɫɥɨ ɜɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ ɨɩɪɟɞɟɥɹɟɬɫɹ ɤɚɤ ɜɡɹɬɨɟ M ɪɚɡ ɱɢɫɥɨ ɜɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ ɧɟɣɪɨɧɨɜ. ȼɦɟɫɬɨ ɢɦɟɧɢ ɧɟɣɪɨɧɚ ɢɫɩɨɥɶɡɭɟɦ ɩɫɟɜɞɨɧɢɦ} OutSignals M {Ɉɞɢɧ ɜɵɯɨɞɧɨɣ ɫɢɝɧɚɥ ɧɚ ɧɟɣɪɨɧ} Parameters M * NumberOf(Parameters, Sigm) {ɑɢɫɥɨ ɩɚɪɚɦɟɬɪɨɜ ɨɩɪɟɞɟɥɹɟɬɫɹ ɤɚɤ ɜɡɹɬɨɟ M ɪɚɡ ɱɢɫɥɨ ɩɚɪɚɦɟɬɪɨɜ ɧɟɣɪɨɧɨɜ} Connections {ɉɟɪɜɵɟ NumberOf(InSignals, NSigm(aSum,N,Char)) ɫɢɝɧɚɥɨɜ ɩɟɪɜɨɦɭ ɧɟɣɪɨɧɭ, ɢ ɬ.ɞ.} InSignals[1..M * NumberOf(InSignals, Sigm)] Sigm[1..M].InSignals[1.. NumberOf(InSignals, Sigm)] {ȼɵɯɨɞɧɵɟ ɫɢɝɧɚɥɵ ɧɟɣɪɨɧɨɜ - ɜɵɯɨɞɧɵɟ ɫɢɝɧɚɥɵ ɫɟɬɢ} OutSignals[1..M] Sigm[1..M].OutSignals {ɉɚɪɚɦɟɬɪɵ ɫɥɨɹ – ɩɚɪɚɦɟɬɪɵ ɧɟɣɪɨɧɨɜ} Parameters[1..M * NumberOf(Parameters, Sigm)] Sigm[1..M].Parameters[1.. NumberOf(Parameters, Sigm)] End {Ʉɨɧɟɰ ɨɩɢɫɚɧɢɹ ɫɥɨɹ ɫɢɝɦɨɢɞɧɵɯ ɧɟɣɪɨɧɨɜ ɫ ɩɪɨɢɡɜɨɥɶɧɵɦ ɫɭɦɦɚɬɨɪɨɦ} {ɋɥɨɣ ɬɨɱɟɤ ɜɟɬɜɥɟɧɢɹ} Layer BLay( N,M : Long) Contents Branch(N)[M] {ȼ ɫɨɫɬɚɜ ɫɥɨɹ ɜɯɨɞɢɬ M ɬɨɱɟɤ ɜɟɬɜɥɟɧɢɹ} InSignals M {ɉɨ ɨɞɧɨɦɭ ɜɯɨɞɧɨɦɭ ɫɢɝɧɚɥɭ ɧɚ ɬɨɱɤɭ ɜɟɬɜɥɟɧɢɹ} OutSignals M * N {N ɜɵɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ ɭ ɤɚɠɞɨɣ ɬɨɱɤɢ ɜɟɬɜɥɟɧɢɹ} Connections InSignals[1..M] Branch[1..M].InSignals {ɉɨ ɨɞɧɨɦɭ ɜɯɨɞɭ ɧɚ ɬɨɱɤɭ ɜɟɬɜɥɟɧɢɹ} {ȼɵɯɨɞɧɵɟ ɫɢɝɧɚɥɵ ɜ ɩɨɪɹɞɤɟ ɩɟɪɜɵɣ ɫ ɤɚɠɞɨɣ ɬɨɱɤɢ ɜɟɬɜɥɟɧɢɹ, ɡɚɬɟɦ ɜɬɨɪɨɣ ɢ ɬ.ɞ. } OutSignals[1..N * M] Branch[+:1..M].OutSignals[1..N] End {Ʉɨɧɟɰ ɨɩɢɫɚɧɢɹ ɫɥɨɹ Ɍɨɱɟɤ ɜɟɬɜɥɟɧɢɹ} {ɉɨɥɧɵɣ ɫɥɨɣ ɫɢɝɦɨɢɞɧɵɯ ɧɟɣɪɨɧɨɜ ɫ ɩɪɨɢɡɜɨɥɶɧɵɦɢ ɫɭɦɦɚɬɨɪɚɦɢ ɧɚ N ɜɯɨɞɨɜ} Cascad FullLay(aSum : Block; N,M : Long; Char : Real) Contents Br: BLay1(M,N), Ne: Lay1(aSum,N,M,Char) {ɋɥɨɣ ɬɨɱɟɤ ɜɟɬɜɥɟɧɢɹ ɢ ɫɥɨɣ ɧɟɣɪɨɧɨɜ} InSignals N {ɑɢɫɥɨ ɜɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ – ɱɢɫɥɨ ɬɨɱɟɤ ɜɟɬɜɥɟɧɢɹ} OutSignals M {Ɉɞɢɧ ɜɵɯɨɞɧɨɣ ɫɢɝɧɚɥ ɧɚ ɧɟɣɪɨɧ} Parameters NumberOf(Parameters, Ne) {ɑɢɫɥɨ ɩɚɪɚɦɟɬɪɨɜ ɨɩɪɟɞɟɥɹɟɬɫɹ ɤɚɤ ɜɡɹɬɨɟ M ɪɚɡ ɱɢɫɥɨ ɩɚɪɚɦɟɬɪɨɜ ɧɟɣɪɨɧɨɜ} Connections InSignals[1..N] Br.InSignals[1..N] {ȼɯɨɞɧɵɟ ɫɢɝɧɚɥɵ – ɫɥɨɸ ɬɨɱɟɤ ɜɟɬɜɥɟɧɢɹ} {ȼɵɯɨɞɧɵɟ ɫɢɝɧɚɥɵ ɧɟɣɪɨɧɨɜ - ɜɵɯɨɞɧɵɟ ɫɢɝɧɚɥɵ ɫɟɬɢ} OutSignals[1..M] Ne.OutSignals[1..M] {ɉɚɪɚɦɟɬɪɵ ɫɥɨɹ – ɩɚɪɚɦɟɬɪɵ ɧɟɣɪɨɧɨɜ} Parameters[1..NumberOf(Parameters, Ne)] Ne.Parameters[1.. NumberOf(Parameters, Ne)] {ȼɵɯɨɞ ɫɥɨɹ ɬɨɱɟɤ ɜɟɬɜɥɟɧɢɹ – ɜɯɨɞ ɫɥɨɹ ɧɟɣɪɨɧɨɜ} Br.OutSignals[1..N * M] Ne.InSignals[1..N * M] End {Ʉɨɧɟɰ ɨɩɢɫɚɧɢɹ ɫɥɨɹ ɫɢɝɦɨɢɞɧɵɯ ɧɟɣɪɨɧɨɜ ɫ ɩɪɨɢɡɜɨɥɶɧɵɦ ɫɭɦɦɚɬɨɪɨɦ} {ɋɟɬɶ ɫ ɫɢɝɦɨɢɞɧɵɦɢ ɧɟɣɪɨɧɚɦɢ ɢ ɩɪɨɢɡɜɨɥɶɧɵɦɢ ɫɭɦɦɚɬɨɪɚɦɢ, ɫɨɞɟɪɠɚɳɚɹ Input – ɱɢɫɥɨ ɧɟɣɪɨɧɨɜ ɧɚ ɜɯɨɞɧɨɦ ɫɥɨɟ; Output – ɱɢɫɥɨ ɧɟɣɪɨɧɨɜ ɧɚ ɜɵɯɨɞɧɨɦ ɫɥɨɟ (ɱɢɫɥɨ ɜɵɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ); Hidden – ɱɢɫɥɨ ɧɟɣɪɨɧɨɜ ɧɚ H>0 ɫɤɪɵɬɵɯ ɫɥɨɹɯ; N – ɱɢɫɥɨ ɜɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ ɜɫɟ ɜɯɨɞɧɵɟ ɫɢɝɧɚɥɵ ɩɨɞɚɸɬɫɹ ɧɚ ɜɫɟ ɧɟɣɪɨɧɵ ɜɯɨɞɧɨɝɨ ɫɥɨɹ}
CHAP5-3.DOC
99
Cascad Net1(aSum : Block; Char : Real; Input, Output, Hidden, H, N : Long) {ɉɨɞ ɬɪɟɦɹ ɪɚɡɧɵɦɢ ɩɫɟɜɞɨɧɢɦɚɦɢ ɢɫɩɨɥɶɡɭɟɬɫɹ ɨɞɧɚ ɢ ɬɚ ɠɟ ɩɨɞɫɟɬɶ ɫ ɪɚɡɧɵɦɢ ɩɚɪɚɦɟɬɪɚɦɢ} Contents In: FullLay(aSum,N,Input,Char), Hid1: FullLay(aSum,Input,Hidden,Char) Hid2: FullLay(aSum,Hidden,Hidden,Char)[H-1] {ɉɭɫɬɨ ɩɪɢ H=1} Out: FullLay(aSum,Hidden,Output,Char) InSignals N {ɑɢɫɥɨ ɜɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ – N} OutSignals Output {Ɉɞɢɧ ɜɵɯɨɞɧɨɣ ɫɢɝɧɚɥ ɧɚ ɧɟɣɪɨɧ} {ɑɢɫɥɨ ɩɚɪɚɦɟɬɪɨɜ ɨɩɪɟɞɟɥɹɟɬɫɹ ɤɚɤ ɫɭɦɦɚ ɱɢɫɟɥ ɩɚɪɚɦɟɬɪɨɜ ɜɫɟɯ ɩɨɞɫɟɬɟɣ} Parameters NumberOf(Parameters, In)+ NumberOf(Parameters, Hid1)+ (H-1) * NumberOf(Parameters, Hid2)+ NumberOf(Parameters, Out) Connections InSignals[1..N] In.InSignals[1..N] {ȼɯɨɞɧɵɟ ɫɢɝɧɚɥɵ – ɜɯɨɞɧɨɦɭ ɫɥɨɸ} {ȼɵɯɨɞɧɵɟ ɫɢɝɧɚɥɵ ɧɟɣɪɨɧɨɜ - ɫ ɜɵɯɨɞɧɨɝɨ ɫɥɨɹ ɫɟɬɢ} OutSignals[1..Output] Out.OutSignals[1.. Output] {ɉɚɪɚɦɟɬɪɵ ɫeɬɢ ɩɨɫɥɟɞɨɜɚɬɟɥɶɧɨ ɜɫɟɦ ɩɨɞɫɟɬɹɦ} Parameters[1..NumberOf(Parameters,In)] In.Parameters[1.. NumberOf(Parameters, In)] Parameters[NumberOf(Parameters,In)+1..NumberOf(Parameters,In)+ NumberOf(Parameters, Hid1)] Hid1.Parameters[1.. NumberOf(Parameters, Hid1)] Parameters[NumberOf(Parameters,In)+ NumberOf(Parameters, Hid1)]+1 ..NumberOf(Parameters,In)+NumberOf(Parameters, Hid1)+ (H-1) * NumberOf(Parameters, Hid2)] Hid2[1..H-1].Parameters[1.. NumberOf(Parameters, Hid2)] Parameters[NumberOf(Parameters,In)+ NumberOf(Parameters, Hid1)]+ (H-1) * NumberOf(Parameters, Hid2)+1..NumberOf(Parameters,In)+ NumberOf(Parameters,Hid1)+(H-1)*NumberOf(Parameters,Hid2)+ NumberOf(Parameters, Out)] Out.Parameters[1.. NumberOf(Parameters, Out)] {ɉɟɪɟɞɚɱɚ ɫɢɝɧɚɥɨɜ ɨɬ ɫɥɨɹ ɤ ɫɥɨɸ} In.OutSignals[1..Input] Hid1.InSignals[1..Input] {Ɉɬ ɜɯɨɞɧɨɝɨ ɤ ɩɟɪɜɨɦɭ ɫɤɪɵɬɨɦɭ ɫɥɨɸ} Hid1.OutSignals[1..Hidden] Hid2[1].InSignals[1..Hidden] {Ɉɬ ɩɟɪɜɨɝɨ ɫɤɪɵɬɨɝɨ ɫɥɨɹ} {ɦɟɠɞɭ ɫɤɪɵɬɵɦɢ ɫɥɨɹɦɢ. ɉɪɢ H=1 ɷɬɚ ɡɚɩɢɫɶ ɩɭɫɬɚ} Hid2[1..H-2].OutSignals[1.. Hidden] Hid2[2..H-1].InSignals[1.. Hidden] Hid2[H-1].OutSignals[1.. Hidden] Out.InSignals[1.. Hidden]{Ɉɬ ɫɤɪɵɬɵɯ – ɤ ɜɵɯɨɞɧɨɦɭ} End {ɉɨɥɧɨɫɜɹɡɧɚɹ ɫɟɬɶ ɫ M ɫɢɝɦɨɢɞɧɵɦɢ ɧɟɣɪɨɧɚɦɢ ɧɚ Ʉ ɬɚɤɬɨɜ ɮɭɧɤɰɢɨɧɢɪɨɜɚɧɢɹ ɫ ɧɟɜɵɞɟɥɟɧɧɵɦ ɜɯɨɞɧɵɦ ɫɥɨɟɦ ɧɚ M ɫɢɝɧɚɥɨɜ} Loop Circle(aSum : Block; Char : Real; M, K : Long) K Contents Net: FullLay(aSum,M,M,Char) InSignals M {ɑɢɫɥɨ ɜɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ – N} OutSignals M {Ɉɞɢɧ ɜɵɯɨɞɧɨɣ ɫɢɝɧɚɥ ɧɚ ɧɟɣɪɨɧ} Parameters NumberOf(Parameters, Net) {ɑɢɫɥɨ ɩɚɪɚɦɟɬɪɨɜ ɨɩɪɟɞɟɥɹɟɬɫɹ ɫɥɨɟɦ FullLay} Connections InSignals[1..M] Net.InSignals[1..M] {ȼɯɨɞɧɵɟ ɫɢɝɧɚɥɵ – ɧɚ ɜɯɨɞ ɫɥɨɹ} OutSignals[1..M] Net.OutSignals[1.. M] {ȼɵɯɨɞɧɵɟ ɫɢɝɧɚɥɵ – ɧɚ ɜɵɯɨɞɟ ɫɥɨɹ} {ȼɫɟ ɩɚɪɚɦɟɬɪɵ ɫɥɨɸ} Parameters[1..NumberOf(Parameters,Net)] Net.Parameters[1.. NumberOf(Parameters,Net)] Net.OutSignals[1..M] Net.InSignals[1..M] {Ɂɚɦɵɤɚɟɦ ɜɵɯɨɞ ɧɚ ɜɯɨɞ} End {Ʉɨɧɟɰ ɨɩɢɫɚɧɢɹ ɫɥɨɹ ɫɢɝɦɨɢɞɧɵɯ ɧɟɣɪɨɧɨɜ ɫ ɩɪɨɢɡɜɨɥɶɧɵɦ ɫɭɦɦɚɬɨɪɨɦ} {ɉɨɥɧɨɫɜɹɡɧɚɹ ɫɟɬɶ ɫ Ɇ ɫɢɝɦɨɢɞɧɵɦɢ ɧɟɣɪɨɧɚɦɢ ɧɚ Ʉ ɬɚɤɬɨɜ ɮɭɧɤɰɢɨɧɢɪɨɜɚɧɢɹ ɫ ɜɵɞɟɥɟɧɧɵɦ ɜɯɨɞɧɵɦ ɫɥɨɟɦ ɧɚ N ɫɢɝɧɚɥɨɜ. ȼɫɟ ɜɯɨɞɧɵɟ ɫɢɝɧɚɥɵ ɩɨɞɚɸɬɫɹ ɧɚ ɜɯɨɞ ɤɚɠɞɨɝɨ ɧɟɣɪɨɧɚ ɜɯɨɞɧɨɝɨ ɫɥɨɹ. ȼɫɟ ɩɚɪɚɦɟɬɪɵ ɨɝɪɚɧɢɱɟɧɵ ɩɨ ɚɛɫɨɥɸɬɧɨɦɭ ɡɧɚɱɟɧɢɸ ɟɞɢɧɢɰɟɣ} Cascad Net2: (aSum : Block; Char : Real; M, K, N : Long) Contents In: FullLay(aSum,N,M,Char), {ȼɯɨɞɧɨɣ ɫɥɨɣ}
CHAP5-3.DOC
100
Net: Circle(aSum,Char,M,K) {ɉɨɥɧɨɫɜɹɡɧɚɹ ɫɟɬɶ} InSignals N {ɑɢɫɥɨ ɜɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ – N} OutSignals M {Ɉɞɢɧ ɜɵɯɨɞɧɨɣ ɫɢɝɧɚɥ ɧɚ ɧɟɣɪɨɧ} {ɑɢɫɥɨ ɩɚɪɚɦɟɬɪɨɜ ɨɩɪɟɞɟɥɹɟɬɫɹ ɤɚɤ ɫɭɦɦɚ ɱɢɫɟɥ ɩɚɪɚɦɟɬɪɨɜ ɜɫɟɯ ɩɨɞɫɟɬɟɣ} Parameters NumberOf(Parameters, In)+ NumberOf(Parameters, Net) ParamDef DefaultType -1 1 Connections InSignals[1..N] In.InSignals[1..N] {ȼɯɨɞɧɵɟ ɫɢɝɧɚɥɵ – ɜɯɨɞɧɨɦɭ ɫɥɨɸ} {ȼɵɯɨɞɧɵɟ ɫɢɝɧɚɥɵ ɧɟɣɪɨɧɨɜ - c ɜɵɯɨɞɧɨɝɨ ɫɥɨɹ ɫɟɬɢ} OutSignals[1..M] Net.OutSignals[1.. M] {ɉɚɪɚɦɟɬɪɵ ɫɟɬɢ ɩɨɫɥɟɞɨɜɚɬɟɥɶɧɨ ɜɫɟɦ ɩɨɞɫɟɬɹɦ} Parameters[1..NumberOf(Parameters, In)] In.Parameters[1.. NumberOf(Parameters, In)] Parameters[NumberOf(Parameters,In)+1.. NumberOf(Parameters,In)+NumberOf(Parameters, Net)] Net.Parameters[1.. NumberOf(Parameters, Net)] {ɉɟɪɟɞɚɱɚ ɫɢɝɧɚɥɨɜ ɨɬ ɫɥɨɹ ɤ ɫɥɨɸ} In.OutSignals[1..M] Net.InSignals[1..M] {Ɉɬ ɜɯɨɞɧɨɝɨ ɤ ɰɢɤɥɭ} Net.OutSignals[1..M] Net.InSignals[1..M] {Ɉɬ ɩɟɪɜɨɝɨ ɫɤɪɵɬɨɝɨ ɫɥɨɹ} End {ɇɟɣɪɨɧ ɫɟɬɢ ɏɨɩɮɢɥɞɚ ɢɡ N ɧɟɣɪɨɧɨɜ} Cascad Hopf(N : Long) Contents Sum(N),Sign_Easy {ɋɭɦɦɚɬɨɪ ɢ ɩɨɪɨɝɨɜɵɣ ɷɥɟɦɟɧɬ} InSignals N {ɑɢɫɥɨ ɜɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ – N} OutSignals 1 {ɑɢɫɥɨ ɜɵɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ – 1} Parameters NumberOf(Parameters,Sum(N)) {ɑɢɫɥɨ ɩɚɪɚɦɟɬɪɨɜ – N} Connections InSignals[1..N] Sum.InSignals[1..N] {ȼɯɨɞɧɵɟ ɫɢɝɧɚɥɵ – ɫɭɦɦɚɬɨɪɭ} {ȼɵɯɨɞɧɨɣ ɫɢɝɧɚɥ ɧɟɣɪɨɧɚ – ɜɵɯɨɞɧɨɣ ɫɢɝɧɚɥ ɩɨɪɨɝɨɜɨɝɨ ɷɥɟɦɟɬɚ} OutSignals Sign_Easy.OutSignals {ɉɚɪɚɦɟɬɪɵ ɧɟɣɪɨɧɚ – ɩɚɪɚɦɟɬɪɵ ɫɭɦɦɚɬɨɪɚ} Parameters[1..NumberOf(Parameters, Sum(N))] Sum.Parameters[1.. NumberOf(Parameters, Sum(N))] Sum.OutSignals Sign_Easy.InSignals {ȼɵɯɨɞ ɫɭɦɦɚɬɨɪɚ ɧɚ ɜɯɨɞ ɩɨɪɨɝɚ} End {ɋɥɨɣ ɧɟɣɪɨɧɨɜ ɏɨɩɮɢɥɞɚ} Layer HLay(N : Long) Contents Hop: Hopf(N)[N] {ȼ ɫɨɫɬɚɜ ɫɥɨɹ ɜɯɨɞɢɬ N ɧɟɣɪɨɧɨɜ} InSignals N * N {N ɧɟɣɪɨɧɨɜ ɩɨ N ɜɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ} OutSignals N {Ɉɞɢɧ ɜɵɯɨɞɧɨɣ ɫɢɝɧɚɥ ɧɚ ɧɟɣɪɨɧ} Parameters N * NumberOf(Parameters, Hop) Connections {ɉɟɪɜɵɟ NumberOf(InSignals, Hop) ɫɢɝɧɚɥɨɜ ɩɟɪɜɨɦɭ ɧɟɣɪɨɧɭ, ɢ ɬ.ɞ.} InSignals[1..Sqr(N)] Hop[1..N].InSignals[1..N] {ȼɵɯɨɞɧɵɟ ɫɢɝɧɚɥɵ ɧɟɣɪɨɧɨɜ - ɜɵɯɨɞɧɵɟ ɫɢɝɧɚɥɵ ɫɟɬɢ} OutSignals[1..N] Hop[1..N].OutSignals {ɉɚɪɚɦɟɬɪɵ ɫɥɨɹ – ɩɚɪɚɦɟɬɪɵ ɧɟɣɪɨɧɨɜ} Parameters[1..N * NumberOf(Parameters, Hop)] Hop[1..N].Parameters[1.. NumberOf(Parameters, Hop)] End {ɋɟɬɶ ɏɨɩɮɢɥɞɚ ɢɡ N ɧɟɣɪɨɧɨɜ} Until Hopfield(N : Long) InSignals=OutSignals Contents BLay(N,N),HLay(N) {ɋɥɨɣ ɬɨɱɟɤ ɜɟɬɜɥɟɧɢɹ ɢ ɫɥɨɣ ɧɟɣɪɨɧɨɜ} InSignals N {ɑɢɫɥɨ ɜɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ – N} OutSignals N {ɑɢɫɥɨ ɜɵɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ – N} Parameters N * NumberOf(Parameters,HLay(N)) {ɑɢɫɥɨ ɩɚɪɚɦɟɬɪɨɜ – N*N} Connections InSignals[1..N] BLay.InSignals[1..N] {ȼɯɨɞɧɵɟ ɫɢɝɧɚɥɵ – ɬɨɱɤɚɦ ɜɟɬɜɥɟɧɢɹ}
CHAP5-3.DOC
101
{ȼɵɯɨɞɧɵɟ ɫɢɝɧɚɥɵ ɧɟɣɪɨɧɨɜ – ɜɵɯɨɞɧɵɟ ɫɢɝɧɚɥɵ ɫɟɬɢ} OutSignals[1..N] HLay.OutSignals[1..N] Parameters[1..N*NumberOf(Parameters, HLay(N))] HLay.Parameters[1..N*NumberOf(Parameters, HLay(N))] {ȼɵɯɨɞ ɬɨɱɟɤ ɜɟɬɜɥɟɧɢɹ ɧɚ ɜɯɨɞ ɧɟɣɪɨɧɨɜ} BLay.OutSignals[1..Sqr(N)] HLay.InSignals[1..Sqr(N)] HLay.OutSignals[1..N] BLay.InSignals[1..N] {Ɂɚɦɵɤɚɟɦ ɤɨɧɟɰ ɧɚ ɧɚɱɚɥɨ} End End NetLib NetWork Hop Used SubNets; {ɋɟɬɶ ɏɨɩɮɢɥɞɚ ɧɚ ɩɹɬɶ ɧɟɣɪɨɧɨɜ} MainNet Hopfield(5) Parameters 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; ParamMask -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1; End NetWork
5.3.5.4 ɋɨɤɪɚɳɟɧɢɟ ɨɩɢɫɚɧɢɹ ɫɟɬɢ ɉɪɟɞɥɨɠɟɧɧɵɣ ɜ ɩɪɟɞɵɞɭɳɢɯ ɪɚɡɞɟɥɚɯ ɹɡɵɤ ɨɩɢɫɚɧɢɹ ɦɧɨɝɨɫɥɨɜɟɧ. ȼ ɛɨɥɶɲɢɧɫɬɜɟ ɫɥɭɱɚɟɜ ɡɚ ɫɱɟɬ ɯɨɪɨɲɟɣ ɫɬɪɭɤɬɭɪɢɡɚɰɢɢ ɫɟɬɢ ɦɨɠɧɨ ɨɩɭɫɬɢɬɶ ɜɫɟ ɪɚɡɞɟɥɵ ɨɩɢɫɚɧɢɹ ɛɥɨɤɚ ɤɪɨɦɟ ɪɚɡɞɟɥɚ ɫɨɫɬɚɜɚ. ȼ ɞɚɧɧɨɦ ɪɚɡɞɟɥɟ ɨɩɢɫɵɜɚɟɬɫɹ ɝɟɧɟɪɚɰɢɹ ɩɨ ɭɦɨɥɱɚɧɢɸ ɪɚɡɞɟɥɨɜ ɨɩɢɫɚɧɢɹ ɫɢɝɧɚɥɨɜ ɢ ɩɚɪɚɦɟɬɪɨɜ, ɢ ɨɩɢɫɚɧɢɹ ɫɜɹɡɟɣ. ɂɫɩɨɥɶɡɨɜɚɧɢɟ ɦɟɯɚɧɢɡɦɨɜ ɭɦɨɥɱɚɧɢɹ ɩɨɡɜɨɥɹɟɬ ɫɢɥɶɧɨ ɫɨɤɪɚɬɢɬɶ ɬɟɤɫɬ ɨɩɢɫɚɧɢɹ ɫɟɬɢ.
5.3.5.4.1 Ɋɚɡɞɟɥ ɨɩɢɫɚɧɢɹ ɫɢɝɧɚɥɨɜ ɢ ɩɚɪɚɦɟɬɪɨɜ Ⱦɥɹ ɜɫɟɯ ɜɢɞɨɜ ɛɥɨɤɨɜ ɱɢɫɥɨ ɩɚɪɚɦɟɬɪɨɜ ɨɩɪɟɞɟɥɹɟɬɫɹ ɤɚɤ ɫɭɦɦɚ ɱɢɫɟɥ ɩɚɪɚɦɟɬɪɨɜ ɜɫɟɯ ɩɨɞɫɟɬɟɣ, ɩɟɪɟɱɢɫɥɟɧɧɵɯ ɜ ɪɚɡɞɟɥɟ ɨɩɢɫɚɧɢɹ ɫɨɫɬɚɜɚ. ɗɬɨ ɦɨɠɟɬ ɩɪɢɜɨɞɢɬɶ ɤ ɥɢɲɧɢɦ ɡɚɩɢɫɹɦ, ɧɨ ɧɟ ɩɨɜɥɢɹɟɬ ɧɚ ɪɚɛɨɬɭ ɫɟɬɢ. ɉɪɢɦɟɪɨɦ ɥɢɲɧɟɣ ɡɚɩɢɫɢ ɦɨɠɟɬ ɫɥɭɠɢɬɶ ɝɟɧɟɪɢɪɭɟɦɚɹ ɡɚɩɢɫɶ: Parameters M * NumberOf(Parameters,Branch(N)) ɜ ɨɩɢɫɚɧɢɢ ɫɥɨɹ ɬɨɱɟɤ ɜɟɬɜɥɟɧɢɹ, ɩɨɫɤɨɥɶɤɭ ɬɨɱɤɢ ɜɟɬɜɥɟɧɢɹ ɧɟ ɢɦɟɸɬ ɩɚɪɚɦɟɬɪɨɜ. ɑɢɫɥɨ ɜɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ ɛɥɨɤɚ ɨɩɪɟɞɟɥɹɟɬɫɹ ɩɨ ɫɥɟɞɭɸɳɢɦ ɩɪɚɜɢɥɚɦ: · ɞɥɹ ɫɥɨɹ ɱɢɫɥɨ ɜɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ ɪɚɜɧɨ ɫɭɦɦɟ ɱɢɫɥɚ ɜɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ ɜɫɟɯ ɩɨɞɫɟɬɟɣ, ɩɟɪɟɱɢɫɥɟɧɧɵɯ ɜ ɪɚɡɞɟɥɟ ɨɩɢɫɚɧɢɹ ɫɨɫɬɚɜɚ; · ɞɥɹ ɤɚɫɤɚɞɨɜ ɜɫɟɯ ɜɢɞɨɜ ɱɢɫɥɨ ɜɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ ɛɥɨɤɚ ɪɚɜɧɨ ɱɢɫɥɭ ɜɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ ɩɨɞɫɟɬɢ, ɫɬɨɹɳɟɣ ɩɟɪɜɨɣ ɜ ɫɩɢɫɤɟ ɩɨɞɫɟɬɟɣ ɜ ɪɚɡɞɟɥɟ ɨɩɢɫɚɧɢɹ ɫɨɫɬɚɜɚ ɑɢɫɥɨ ɜɵɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ ɛɥɨɤɚ ɨɩɪɟɞɟɥɹɟɬɫɹ ɩɨ ɫɥɟɞɭɸɳɢɦ ɩɪɚɜɢɥɚɦ: · ɞɥɹ ɫɥɨɹ ɱɢɫɥɨ ɜɵɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ ɪɚɜɧɨ ɫɭɦɦɟ ɱɢɫɥɚ ɜɵɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ ɜɫɟɯ ɩɨɞɫɟɬɟɣ, ɩɟɪɟɱɢɫɥɟɧɧɵɯ ɜ ɪɚɡɞɟɥɟ ɨɩɢɫɚɧɢɹ ɫɨɫɬɚɜɚ; · ɞɥɹ ɤɚɫɤɚɞɨɜ ɜɫɟɯ ɜɢɞɨɜ ɱɢɫɥɨ ɜɵɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ ɛɥɨɤɚ ɪɚɜɧɨ ɱɢɫɥɭ ɜɵɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ ɩɨɞɫɟɬɢ, ɫɬɨɹɳɟɣ ɩɨɫɥɟɞɧɟɣ ɜ ɫɩɢɫɤɟ ɩɨɞɫɟɬɟɣ ɜ ɪɚɡɞɟɥɟ ɨɩɢɫɚɧɢɹ ɫɨɫɬɚɜɚ; Ɉɩɢɫɚɧɢɹ ɜɫɟɯ ɫɟɬɟɣ, ɩɪɢɜɟɞɟɧɧɵɟ ɜ ɩɪɟɞɵɞɭɳɟɦ ɪɚɡɞɟɥɟ ɩɨɥɧɨɫɬɶɸ ɫɨɨɬɜɟɬɫɬɜɭɸɬ ɩɪɚɜɢɥɚɦ ɝɟɧɟɪɚɰɢɢ. ȼ ɤɚɱɟɫɬɜɟ ɛɨɥɟɟ ɨɛɳɟɝɨ ɩɪɢɦɟɪɚ ɩɪɢɜɟɞɟɦ ɪɚɡɞɟɥ ɨɩɢɫɚɧɢɹ ɫɢɝɧɚɥɨɜ ɢ ɩɚɪɚɦɟɬɪɨɜ ɞɜɭɯ ɭɫɥɨɜɧɵɯ ɛɥɨɤɨɜ. Layer A Contents Net1, Net2[K], Net3 InSignals NumberOf(InSignals,Net1)+K*NumberOf(InSignals,Net2) +NumberOf(InSignals,Net3) OutSignals NumberOf(OutSignals,Net1)+K*NumberOf(OutSignals,Net2) +NumberOf(OutSignals,Net3) Parameters NumberOf(Parameters,Net1)+K*NumberOf(Parameters,Net2) +NumberOf(Parameters,Net3) Cascad B Contents Net1, Net2[K], Net3 InSignals NumberOf(InSignals,Net1) OutSignals NumberOf(OutSignals,Net3) Parameters NumberOf(Parameters,Net1)+K*NumberOf(Parameters,Net2) +NumberOf(Parameters,Net3)
CHAP5-3.DOC
102
5.3.5.4.2 Ɋɚɡɞɟɥ ɨɩɢɫɚɧɢɹ ɫɜɹɡɟɣ Ɋɚɡɞɟɥ ɨɩɢɫɚɧɢɹ ɫɜɹɡɟɣ ɦɨɠɟɬ ɛɵɬɶ ɪɚɡɛɢɬ ɧɚ ɩɹɬɶ ɩɨɞɪɚɡɞɟɥɨɜ. 1. ɍɫɬɚɧɨɜɥɟɧɢɟ ɫɜɹɡɢ ɜɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ ɛɥɨɤɚ ɫ ɜɯɨɞɧɵɦɢ ɫɢɝɧɚɥɚɦɢ ɩɨɞɫɟɬɟɣ. 2. ɍɫɬɚɧɨɜɥɟɧɢɟ ɫɜɹɡɢ ɜɵɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ ɛɥɨɤɚ ɫ ɜɵɯɨɞɧɵɦɢ ɫɢɝɧɚɥɚɦɢ ɩɨɞɫɟɬɟɣ. 3. ɍɫɬɚɧɨɜɥɟɧɢɟ ɫɜɹɡɢ ɩɚɪɚɦɟɬɪɨɜ ɛɥɨɤɚ ɫ ɩɚɪɚɦɟɬɪɚɦɢ ɩɨɞɫɟɬɟɣ. 4. ɍɫɬɚɧɨɜɥɟɧɢɟ ɫɜɹɡɢ ɦɟɠɞɭ ɜɵɯɨɞɧɵɦɢ ɫɢɝɧɚɥɚɦɢ ɨɞɧɢɯ ɩɨɞɫɟɬɟɣ ɢ ɜɯɨɞɧɵɦɢ ɫɢɝɧɚɥɚɦɢ ɞɪɭɝɢɯ ɩɨɞɫɟɬɟɣ. 5. Ɂɚɦɵɤɚɧɢɟ ɜɵɯɨɞɚ ɛɥɨɤɚ ɧɚ ɜɯɨɞ ɛɥɨɤɚ. Ⱦɥɹ ɫɥɨɹ ɪɚɡɞɟɥ ɨɩɢɫɚɧɢɹ ɫɜɹɡɟɣ ɫɬɪɨɢɬɫɹ ɩɨ ɫɥɟɞɭɸɳɢɦ ɩɪɚɜɢɥɚɦ. 1. ȼɫɟ ɩɨɞɫɟɬɢ ɩɨɥɭɱɚɸɬ ɜɯɨɞɧɵɟ ɫɢɝɧɚɥɵ ɜ ɩɨɪɹɞɤɟ ɩɟɪɟɱɢɫɥɟɧɢɹ ɩɨɞɫɟɬɟɣ ɜ ɪɚɡɞɟɥɟ ɨɩɢɫɚɧɢɹ ɫɨɫɬɚɜɚ – ɩɟɪɜɚɹ ɱɚɫɬɶ ɦɚɫɫɢɜɚ ɜɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ ɫɥɨɹ ɨɬɞɚɟɬɫɹ ɩɟɪɜɨɣ ɩɨɞɫɟɬɢ, ɫɥɟɞɭɸɳɚɹ – ɜɬɨɪɨɣ ɢ ɬ.ɞ. ȿɫɥɢ ɤɚɤɚɹ-ɥɢɛɨ ɩɨɞɫɟɬɶ ɜ ɪɚɡɞɟɥɟ ɨɩɢɫɚɧɢɹ ɫɨɫɬɚɜɚ ɭɤɚɡɚɧɚ ɫ ɧɟɤɨɬɨɪɵɦ ɧɟ ɪɚɜɧɵɦ ɟɞɢɧɢɰɟ ɱɢɫɥɨɦ ɷɤɡɟɦɩɥɹɪɨɜ, ɬɨ ɫɱɢɬɚɟɬɫɹ, ɱɬɨ ɷɤɡɟɦɩɥɹɪɵ ɷɬɨɣ ɩɨɞɫɟɬɢ ɩɟɪɟɱɢɫɥɟɧɵ ɜ ɫɩɢɫɤɟ ɜ ɩɨɪɹɞɤɟ ɜɨɡɪɚɫɬɚɧɢɹ ɧɨɦɟɪɚ. 2. ȼɵɯɨɞɧɵɟ ɫɢɝɧɚɥɵ ɩɨɞɫɟɬɟɣ ɨɛɪɚɡɭɸɬ ɦɚɫɫɢɜ ɜɵɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ ɫɥɨɹ ɬɚɤɠɟ ɜ ɩɨɪɹɞɤɟ ɩɟɪɟɱɢɫɥɟɧɢɹ ɩɨɞɫɟɬɟɣ ɜ ɪɚɡɞɟɥɟ ɨɩɢɫɚɧɢɹ ɫɨɫɬɚɜɚ – ɩɟɪɜɚɹ ɱɚɫɬɶ ɦɚɫɫɢɜɚ ɜɵɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ ɫɥɨɹ ɫɨɫɬɨɢɬ ɢɡ ɜɵɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ ɩɟɪɜɨɣ ɩɨɞɫɟɬɢ, ɫɥɟɞɭɸɳɚɹ – ɜɬɨɪɨɣ ɢ ɬ.ɞ. ȿɫɥɢ ɤɚɤɚɹ-ɥɢɛɨ ɩɨɞɫɟɬɶ ɜ ɪɚɡɞɟɥɟ ɨɩɢɫɚɧɢɹ ɫɨɫɬɚɜɚ ɭɤɚɡɚɧɚ ɫ ɧɟɤɨɬɨɪɵɦ ɧɟ ɪɚɜɧɵɦ ɟɞɢɧɢɰɟ ɱɢɫɥɨɦ ɷɤɡɟɦɩɥɹɪɨɜ, ɬɨ ɫɱɢɬɚɟɬɫɹ, ɱɬɨ ɷɤɡɟɦɩɥɹɪɵ ɷɬɨɣ ɩɨɞɫɟɬɢ ɩɟɪɟɱɢɫɥɟɧɵ ɜ ɫɩɢɫɤɟ ɜ ɩɨɪɹɞɤɟ ɜɨɡɪɚɫɬɚɧɢɹ ɧɨɦɟɪɚ. 3. ɉɨɞɪɚɡɞɟɥɵ ɭɫɬɚɧɨɜɥɟɧɢɹ ɫɜɹɡɢ ɦɟɠɞɭ ɜɵɯɨɞɧɵɦɢ ɫɢɝɧɚɥɚɦɢ ɨɞɧɢɯ ɩɨɞɫɟɬɟɣ ɢ ɜɯɨɞɧɵɦɢ ɫɢɝɧɚɥɚɦɢ ɞɪɭɝɢɯ ɩɨɞɫɟɬɟɣ ɢ ɡɚɦɵɤɚɧɢɹ ɜɵɯɨɞɚ ɛɥɨɤɚ ɧɚ ɜɯɨɞ ɞɥɹ ɫɥɨɹ ɨɬɫɭɬɫɬɜɭɸɬ. Ⱦɥɹ ɤɚɫɤɚɞɨɜ ɪɚɡɞɟɥ ɨɩɢɫɚɧɢɹ ɫɜɹɡɟɣ ɫɬɪɨɢɬɫɹ ɩɨ ɫɥɟɞɭɸɳɢɦ ɩɪɚɜɢɥɚɦ: 1. ȼɯɨɞɧɵɟ ɫɢɝɧɚɥɵ ɛɥɨɤɚ ɫɜɹɡɵɜɚɸɬɫɹ ɫ ɜɯɨɞɧɵɦɢ ɫɢɝɧɚɥɚɦɢ ɩɟɪɜɨɣ ɩɨɞɫɟɬɢ ɜ ɫɩɢɫɤɟ ɩɨɞɫɟɬɟɣ ɜ ɪɚɡɞɟɥɟ ɨɩɢɫɚɧɢɹ ɫɨɫɬɚɜɚ. ȿɫɥɢ ɞɥɹ ɩɟɪɜɨɣ ɩɨɞɫɟɬɢ ɭɤɚɡɚɧɨ ɧɟ ɟɞɢɧɢɱɧɨɟ ɱɢɫɥɨ ɷɤɡɟɦɩɥɹɪɨɜ, ɬɨ ɜɫɟ ɜɯɨɞɧɵɟ ɫɢɝɧɚɥɵ ɫɜɹɡɵɜɚɸɬɫɹ ɫ ɜɯɨɞɧɵɦɢ ɫɢɝɧɚɥɚɦɢ ɩɟɪɜɨɝɨ ɷɤɡɟɦɩɥɹɪɚ ɩɨɞɫɟɬɢ. 2. ȼɵɯɨɞɧɵɟ ɫɢɝɧɚɥɵ ɛɥɨɤɚ ɫɜɹɡɵɜɚɸɬɫɹ ɫ ɜɵɯɨɞɧɵɦɢ ɫɢɝɧɚɥɚɦɢ ɩɨɫɥɟɞɧɟɣ ɩɨɞɫɟɬɢ ɜ ɫɩɢɫɤɟ ɩɨɞɫɟɬɟɣ ɜ ɪɚɡɞɟɥɟ ɨɩɢɫɚɧɢɹ ɫɨɫɬɚɜɚ. ȿɫɥɢ ɞɥɹ ɩɨɫɥɟɞɧɟɣ ɩɨɞɫɟɬɢ ɭɤɚɡɚɧɨ ɧɟ ɟɞɢɧɢɱɧɨɟ ɱɢɫɥɨ ɷɤɡɟɦɩɥɹɪɨɜ, ɬɨ ɜɫɟ ɜɵɯɨɞɧɵɟ ɫɢɝɧɚɥɵ ɫɜɹɡɵɜɚɸɬɫɹ ɫ ɜɵɯɨɞɧɵɦɢ ɫɢɝɧɚɥɚɦɢ ɩɨɫɥɟɞɧɟɝɨ (ɫ ɦɚɤɫɢɦɚɥɶɧɵɦ ɧɨɦɟɪɨɦ) ɷɤɡɟɦɩɥɹɪɚ ɩɨɞɫɟɬɢ. 3. Ɇɚɫɫɢɜ ɩɚɪɚɦɟɬɪɨɜ ɛɥɨɤɚ ɨɛɪɚɡɭɟɬɫɹ ɢɡ ɦɚɫɫɢɜɨɜ ɩɚɪɚɦɟɬɪɨɜ ɩɨɞɫɟɬɟɣ ɜ ɩɨɪɹɞɤɟ ɩɟɪɟɱɢɫɥɟɧɢɹ ɩɨɞɫɟɬɟɣ ɜ ɪɚɡɞɟɥɟ ɨɩɢɫɚɧɢɹ ɫɨɫɬɚɜɚ – ɩɟɪɜɚɹ ɱɚɫɬɶ ɦɚɫɫɢɜɚ ɩɚɪɚɦɟɬɪɨɜ ɛɥɨɤɚ ɫɨɫɬɨɢɬ ɢɡ ɩɚɪɚɦɟɬɪɨɜ ɩɟɪɜɨɣ ɩɨɞɫɟɬɢ, ɫɥɟɞɭɸɳɚɹ – ɜɬɨɪɨɣ ɢ ɬ.ɞ. ȿɫɥɢ ɤɚɤɚɹ-ɥɢɛɨ ɩɨɞɫɟɬɶ ɜ ɪɚɡɞɟɥɟ ɨɩɢɫɚɧɢɹ ɫɨɫɬɚɜɚ ɭɤɚɡɚɧɚ ɫ ɧɟɤɨɬɨɪɵɦ ɧɟ ɪɚɜɧɵɦ ɟɞɢɧɢɰɟ ɱɢɫɥɨɦ ɷɤɡɟɦɩɥɹɪɨɜ, ɬɨ ɫɱɢɬɚɟɬɫɹ, ɱɬɨ ɷɤɡɟɦɩɥɹɪɵ ɷɬɨɣ ɩɨɞɫɟɬɢ ɩɟɪɟɱɢɫɥɟɧɵ ɜ ɫɩɢɫɤɟ ɜ ɩɨɪɹɞɤɟ ɜɨɡɪɚɫɬɚɧɢɹ ɧɨɦɟɪɚ. 4. ȼɵɯɨɞɧɵɟ ɫɢɝɧɚɥɵ ɤɚɠɞɨɣ ɩɨɞɫɟɬɢ, ɤɪɨɦɟ ɩɨɫɥɟɞɧɟɣ ɫɜɹɡɵɜɚɸɬɫɹ ɫ ɜɯɨɞɧɵɦɢ ɫɢɝɧɚɥɚɦɢ ɫɥɟɞɭɸɳɟɣ ɩɨɞɫɟɬɢ ɜ ɫɩɢɫɤɟ ɩɨɞɫɟɬɟɣ ɜ ɪɚɡɞɟɥɟ ɨɩɢɫɚɧɢɹ ɫɨɫɬɚɜɚ. ȿɫɥɢ ɤɚɤɚɹ-ɥɢɛɨ ɩɨɞɫɟɬɶ ɜ ɪɚɡɞɟɥɟ ɨɩɢɫɚɧɢɹ ɫɨɫɬɚɜɚ ɭɤɚɡɚɧɚ ɫ ɧɟɤɨɬɨɪɵɦ ɧɟ ɪɚɜɧɵɦ ɟɞɢɧɢɰɟ ɱɢɫɥɨɦ ɷɤɡɟɦɩɥɹɪɨɜ, ɬɨ ɫɱɢɬɚɟɬɫɹ, ɱɬɨ ɷɤɡɟɦɩɥɹɪɵ ɷɬɨɣ ɩɨɞɫɟɬɢ ɩɟɪɟɱɢɫɥɟɧɵ ɜ ɫɩɢɫɤɟ ɜ ɩɨɪɹɞɤɟ ɜɨɡɪɚɫɬɚɧɢɹ ɧɨɦɟɪɚ. 5. Ⱦɥɹ ɛɥɨɤɨɜ ɬɢɩɚ Cascad ɡɚɦɵɤɚɧɢɟ ɜɵɯɨɞɚ ɛɥɨɤɚ ɧɚ ɜɯɨɞ ɛɥɨɤɚ ɨɬɫɭɬɫɬɜɭɟɬ. Ⱦɥɹ ɛɥɨɤɨɜ ɬɢɩɨɜ Loop ɢ Until ɡɚɦɵɤɚɧɢɟ ɜɵɯɨɞɚ ɛɥɨɤɚ ɧɚ ɜɯɨɞ ɛɥɨɤɚ ɞɨɫɬɢɝɚɟɬɫɹ ɩɭɬɟɦ ɭɫɬɚɧɨɜɥɟɧɢɹ ɫɜɹɡɟɣ ɦɟɠɞɭ ɜɵɯɨɞɧɵɦɢ ɫɢɝɧɚɥɚɦɢ ɩɨɫɥɟɞɧɟɣ ɩɨɞɫɟɬɢ ɜ ɫɩɢɫɤɟ ɩɨɞɫɟɬɟɣ ɜ ɪɚɡɞɟɥɟ ɨɩɢɫɚɧɢɹ ɫɨɫɬɚɜɚ ɫ ɜɯɨɞɧɵɦɢ ɫɢɝɧɚɥɚɦɢ ɩɟɪɜɨɣ ɩɨɞɫɟɬɢ ɜ ɫɩɢɫɤɟ ɩɨɞɫɟɬɟɣ ɜ ɪɚɡɞɟɥɟ ɨɩɢɫɚɧɢɹ ɫɨɫɬɚɜɚ. ȿɫɥɢ ɤɚɤɚɹɥɢɛɨ ɩɨɞɫɟɬɶ ɜ ɪɚɡɞɟɥɟ ɨɩɢɫɚɧɢɹ ɫɨɫɬɚɜɚ ɭɤɚɡɚɧɚ ɫ ɧɟɤɨɬɨɪɵɦ ɧɟ ɪɚɜɧɵɦ ɟɞɢɧɢɰɟ ɱɢɫɥɨɦ ɷɤɡɟɦɩɥɹɪɨɜ, ɬɨ ɫɱɢɬɚɟɬɫɹ, ɱɬɨ ɷɤɡɟɦɩɥɹɪɵ ɷɬɨɣ ɩɨɞɫɟɬɢ ɩɟɪɟɱɢɫɥɟɧɵ ɜ ɫɩɢɫɤɟ ɜ ɩɨɪɹɞɤɟ ɜɨɡɪɚɫɬɚɧɢɹ ɧɨɦɟɪɚ. Ɉɩɢɫɚɧɢɹ ɜɫɟɯ ɫɟɬɟɣ, ɩɪɢɜɟɞɟɧɧɵɟ ɜ ɩɪɟɞɵɞɭɳɟɦ ɪɚɡɞɟɥɟ ɩɨɥɧɨɫɬɶɸ ɫɨɨɬɜɟɬɫɬɜɭɸɬ ɩɪɚɜɢɥɚɦ ɝɟɧɟɪɚɰɢɢ. ȼ ɤɚɱɟɫɬɜɟ ɛɨɥɟɟ ɨɛɳɟɝɨ ɩɪɢɦɟɪɚ ɩɪɢɜɟɞɟɦ ɪɚɡɞɟɥ ɨɩɢɫɚɧɢɹ ɫɢɝɧɚɥɨɜ ɢ ɩɚɪɚɦɟɬɪɨɜ ɬɪɟɯ ɭɫɥɨɜɧɵɯ ɛɥɨɤɨɜ. Layer A Contents Net1, Net2[K], Net3 InSignals[1..NumberOf(InSignals,Net1)+K*NumberOf(InSignals,Net2) +NumberOf(InSignals,Net3)] Net1. InSignals[1..NumberOf(InSignals,Net1)], Net2[1..K].InSignals[1..NumberOf(InSignals,Net2)], Net3.InSignals[1..NumberOf(InSignals,Net3)] OutSignals[1..NumberOf(OutSignals,Net1)+K*NumberOf(OutSignals,Net2) +NumberOf(OutSignals,Net3)] Net1. OutSignals[1..NumberOf(OutSignals,Net1)], Net2[1..K].OutSignals[1..NumberOf(OutSignals,Net2)], Net3.OutSignals[1..NumberOf(OutSignals,Net3)]
CHAP5-3.DOC
103
Parameters[1..NumberOf(Parameters,Net1)+K*NumberOf(Parameters,Net2) +NumberOf(Parameters,Net3)] Net1. Parameters[1..NumberOf(Parameters,Net1)], Net2[1..K].Parameters[1..NumberOf(Parameters,Net2)], Net3.Parameters[1..NumberOf(Parameters,Net3)] Cascad B Contents Net1, Net2[K], Net3 InSignals[1..NumberOf(InSignals,Net1)] Net1. InSignals[1..NumberOf(InSignals,Net1)] OutSignals[1..NumberOf(OutSignals,Net3)] Net3.OutSignals[1..NumberOf(OutSignals,Net3)] Parameters[1..NumberOf(Parameters,Net1)+K*NumberOf(Parameters,Net2) +NumberOf(Parameters,Net3)] Net1. Parameters[1..NumberOf(Parameters,Net1)], Net2[1..K].Parameters[1..NumberOf(Parameters,Net2)], Net[3].Parameters[1..NumberOf(Parameters,Net3)] Net1. OutSignals[1..NumberOf(OutSignals,Net1)], Net2[1..K].OutSignals[1..NumberOf(OutSignals,Net2)] Net2[1..K].InSignals[1..NumberOf(InSignals,Net2)], Net3.InSignals[1..NumberOf(InSignals,Net3)] Loop C N Contents Net1, Net2[K], Net3 InSignals[1..NumberOf(InSignals,Net1)] Net1. InSignals[1..NumberOf(InSignals,Net1)] OutSignals[1..NumberOf(OutSignals,Net3)] Net3.OutSignals[1..NumberOf(OutSignals,Net3)] Parameters[1..NumberOf(Parameters,Net1)+K*NumberOf(Parameters,Net2) +NumberOf(Parameters,Net3)] Net1. Parameters[1..NumberOf(Parameters,Net1)], Net2[1..K].Parameters[1..NumberOf(Parameters,Net2)], Net[3].Parameters[1..NumberOf(Parameters,Net3)] Net1. OutSignals[1..NumberOf(OutSignals,Net1)], Net2[1..K].OutSignals[1..NumberOf(OutSignals,Net2)] Net2[1..K].InSignals[1..NumberOf(InSignals,Net2)], Net3.InSignals[1..NumberOf(InSignals,Net3)] Net3.OutSignals[1..NumberOf(OutSignals,Net3)] Net1. InSignals[1..NumberOf(InSignals,Net1)]
5.3.5.4.3 ɑɚɫɬɢɱɧɨ ɫɨɤɪɚɳɟɧɧɨɟ ɨɩɢɫɚɧɢɟ ȿɫɥɢ ɨɩɢɫɵɜɚɟɦɵɣ ɛɥɨɤ ɞɨɥɠɟɧ ɢɦɟɬɶ ɫɜɹɡɢ, ɭɫɬɚɧɚɜɥɢɜɚɟɦɵɟ ɧɟ ɬɚɤ, ɤɚɤ ɨɩɢɫɚɧɨ ɜ ɪɚɡɞ. «Ɋɚɡɞɟɥ ɨɩɢɫɚɧɢɹ ɫɜɹɡɟɣ», ɬɨ ɫɨɨɬɜɟɬɫɬɜɭɸɳɢɣ ɪɚɡɞɟɥ ɨɩɢɫɚɧɢɹ ɛɥɨɤɚ ɦɨɠɟɬ ɛɵɬɶ ɨɩɢɫɚɧ ɹɜɧɨ ɩɨɥɧɨɫɬɶɸ ɢɥɢ ɱɚɫɬɢɱɧɨ. ȿɫɥɢ ɤɚɤɨɣ ɥɢɛɨ ɪɚɡɞɟɥ ɨɩɢɫɚɧ ɱɚɫɬɢɱɧɨ, ɬɨ ɞɟɣɫɬɜɭɟɬ ɫɥɟɞɭɸɳɟɟ ɩɪɚɜɢɥɨ: ɬɟ ɫɢɝɧɚɥɵ, ɩɚɪɚɦɟɬɪɵ ɢ ɢɯ ɫɜɹɡɢ, ɤɨɬɨɪɵɟ ɨɩɢɫɚɧɵ ɹɜɧɨ, ɛɟɪɭɬɫɹ ɢɡ ɹɜɧɨɝɨ ɨɩɢɫɚɧɢɹ, ɚ ɬɟ ɫɢɝɧɚɥɵ, ɩɚɪɚɦɟɬɪɵ ɢ ɢɯ ɫɜɹɡɢ, ɤɨɬɨɪɵɟ ɧɟ ɮɢɝɭɪɢɪɭɸɬ ɜ ɹɜɧɨɦ ɨɩɢɫɚɧɢɢ ɛɟɪɭɬɫɹ ɢɡ ɨɩɢɫɚɧɢɹ ɩɨ ɭɦɨɥɱɚɧɢɸ. Ɍɚɤ, ɜ ɩɪɢɜɟɞɟɧɧɨɦ ɜ ɪɚɡɞ. «ɉɪɢɦɟɪ ɨɩɢɫɚɧɢɹ ɛɥɨɤɨɜ» ɨɩɢɫɚɧɢɢ ɫɥɨɹ ɬɨɱɟɤ ɜɟɬɜɥɟɧɢɹ BLay ɧɟɜɨɡɦɨɠɧɨ ɢɫɩɨɥɶɡɨɜɚɧɢɟ ɝɟɧɟɪɢɪɭɟɦɨɝɨ ɩɨ ɭɦɨɥɱɚɧɢɸ ɩɨɞɪɚɡɞɟɥɚ ɭɫɬɚɧɨɜɥɟɧɢɹ ɫɜɹɡɢ ɜɵɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ ɛɥɨɤɚ ɫ ɜɯɨɞɧɵɦɢ ɫɢɝɧɚɥɚɦɢ ɩɨɞɫɟɬɟɣ. ȼɨɡɦɨɠɧɨ ɫɥɟɞɭɸɳɟɟ ɫɨɤɪɚɳɟɧɧɨɟ ɨɩɢɫɚɧɢɟ. {ɋɥɨɣ ɬɨɱɟɤ ɜɟɬɜɥɟɧɢɹ} Layer BLay( N,M : Long) Contents Branch(N)[M] {ȼ ɫɨɫɬɚɜ ɫɥɨɹ ɜɯɨɞɢɬ M ɬɨɱɟɤ ɜɟɬɜɥɟɧɢɹ} Connections {ȼɵɯɨɞɧɵɟ ɫɢɝɧɚɥɵ ɜ ɩɨɪɹɞɤɟ ɩɟɪɜɵɣ ɫ ɤɚɠɞɨɣ ɬɨɱɤɢ ɜɟɬɜɥɟɧɢɹ, ɡɚɬɟɦ ɜɬɨɪɨɣ ɢ ɬ.ɞ. } OutSignals[1..N * M] Branch[+:1..M].OutSignals[1..N] End {Ʉɨɧɟɰ ɨɩɢɫɚɧɢɹ ɫɥɨɹ Ɍɨɱɟɤ ɜɟɬɜɥɟɧɢɹ}
5.3.5.4.4 ɉɪɢɦɟɪ ɫɨɤɪɚɳɟɧɧɨɝɨ ɨɩɢɫɚɧɢɹ ɛɥɨɤɨɜ ɉɪɢ ɨɩɢɫɚɧɢɢ ɛɥɨɤɨɜ ɢɫɩɨɥɶɡɭɸɬɫɹ ɷɥɟɦɟɧɬɵ, ɨɩɢɫɚɧɧɵɟ ɜ ɛɢɛɥɢɨɬɟɤɟ Elements, ɩɪɢɜɟɞɟɧɧɨɣ ɜ ɪɚɡɞ. "ɉɪɢɦɟɪ ɨɩɢɫɚɧɢɹ ɷɥɟɦɟɧɬɨɜ". NetBibl SubNets Used Elements; {Ȼɢɛɥɢɨɬɟɤɚ ɩɨɞɫɟɬɟɣ, ɢɫɩɨɥɶɡɭɸɳɚɹ ɛɢɛɥɢɨɬɟɤɭ Elements} {ɋɢɝɦɨɢɞɧɵɣ ɧɟɣɪɨɧ ɫ ɩɪɨɢɡɜɨɥɶɧɵɦ ɫɭɦɦɚɬɨɪɨɦ ɧɚ N ɜɯɨɞɨɜ} Cascad NSigm(aSum : Block; N : Long; Char : Real)
CHAP5-3.DOC
104
{ȼ ɫɨɫɬɚɜ ɤɚɫɤɚɞɚ ɜɯɨɞɢɬ ɩɪɨɢɡɜɨɥɶɧɵɣ ɫɭɦɦɚɬɨɪ ɧɚ N ɜɯɨɞɨɜ ɢ ɫɢɝɦɨɢɞɧɵɣ ɧɟɣɪɨɧ ɫ ɧɟɨɛɭɱɚɟɦɨɣ ɯɚɪɚɤɬɟɪɢɫɬɢɤɨɣ} Contents aSum(N), S_NotTrain(Char) End {ɋɥɨɣ ɫɢɝɦɨɢɞɧɵɯ ɧɟɣɪɨɧɨɜ ɫ ɩɪɨɢɡɜɨɥɶɧɵɦɢ ɫɭɦɦɚɬɨɪɚɦɢ ɧɚ N ɜɯɨɞɨɜ} Layer Lay1(aSum : Block; N,M : Long; Char : Real) Contents Sigm: NSigm(aSum,N,Char)[M] {ȼ ɫɨɫɬɚɜ ɫɥɨɹ ɜɯɨɞɢɬ M ɧɟɣɪɨɧɨɜ} End {ɋɥɨɣ ɬɨɱɟɤ ɜɟɬɜɥɟɧɢɹ} Layer BLay( N,M : Long) Contents Branch(N)[M] {ȼ ɫɨɫɬɚɜ ɫɥɨɹ ɜɯɨɞɢɬ M ɬɨɱɟɤ ɜɟɬɜɥɟɧɢɹ} Connections {ȼɵɯɨɞɧɵɟ ɫɢɝɧɚɥɵ ɜ ɩɨɪɹɞɤɟ ɩɟɪɜɵɣ ɫ ɤɚɠɞɨɣ ɬɨɱɤɢ ɜɟɬɜɥɟɧɢɹ, ɡɚɬɟɦ ɜɬɨɪɨɣ ɢ ɬ.ɞ. } OutSignals[1..N * M] Branch[+:1..M].OutSignals[1..N] End {ɉɨɥɧɵɣ ɫɥɨɣ ɫɢɝɦɨɢɞɧɵɯ ɧɟɣɪɨɧɨɜ ɫ ɩɪɨɢɡɜɨɥɶɧɵɦɢ ɫɭɦɦɚɬɨɪɚɦɢ ɧɚ N ɜɯɨɞɨɜ} Cascad FullLay(aSum : Block; N,M : Long; Char : Real) Contents BLay1(M,N), Lay1(aSum,N,M,Char) {ɋɥɨɣ ɬɨɱɟɤ ɜɟɬɜɥɟɧɢɹ ɢ ɫɥɨɣ ɧɟɣɪɨɧɨɜ} End {Ʉɨɧɟɰ ɨɩɢɫɚɧɢɹ ɫɥɨɹ ɫɢɝɦɨɢɞɧɵɯ ɧɟɣɪɨɧɨɜ ɫ ɩɪɨɢɡɜɨɥɶɧɵɦ ɫɭɦɦɚɬɨɪɨɦ} {ɋɟɬɶ ɫ ɫɢɝɦɨɢɞɧɵɦɢ ɧɟɣɪɨɧɚɦɢ ɢ ɩɪɨɢɡɜɨɥɶɧɵɦɢ ɫɭɦɦɚɬɨɪɚɦɢ, ɫɨɞɟɪɠɚɳɚɹ Input – ɱɢɫɥɨ ɧɟɣɪɨɧɨɜ ɧɚ ɜɯɨɞɧɨɦ ɫɥɨɟ; Output – ɱɢɫɥɨ ɧɟɣɪɨɧɨɜ ɧɚ ɜɵɯɨɞɧɨɦ ɫɥɨɟ (ɱɢɫɥɨ ɜɵɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ); Hidden – ɱɢɫɥɨ ɧɟɣɪɨɧɨɜ ɧɚ H>0 ɫɤɪɵɬɵɯ ɫɥɨɹɯ; N – ɱɢɫɥɨ ɜɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ ɜɫɟ ɜɯɨɞɧɵɟ ɫɢɝɧɚɥɵ ɩɨɞɚɸɬɫɹ ɧɚ ɜɫɟ ɧɟɣɪɨɧɵ ɜɯɨɞɧɨɝɨ ɫɥɨɹ} Cascad Net1(aSum : Block; Char : Real; Input, Output, Hidden, H, N : Long) {ɉɨɞ ɬɪɟɦɹ ɪɚɡɧɵɦɢ ɩɫɟɜɞɨɧɢɦɚɦɢ ɢɫɩɨɥɶɡɭɟɬɫɹ ɨɞɧɚ ɢ ɬɚɠɟ ɩɨɞɫɟɬɶ ɫ ɪɚɡɧɵɦɢ ɩɚɪɚɦɟɬɪɚɦɢ. ɂɫɩɨɥɶɡɨɜɚɧɢɟ ɩɫɟɜɞɨɧɢɦɨɜ ɧɟɨɛɯɨɞɢɦɨ ɞɚɠɟ ɩɪɢ ɫɨɤɪɚɳɟɧɧɨɦ ɨɩɢɫɚɧɢɢ} Contents In: FullLay(aSum,N,Input,Char), Hid1: FullLay(aSum,Input,Hidden,Char) Hid2: FullLay(aSum,Hidden,Hidden,Char)[H-1] {ɉɭɫɬɨ ɩɪɢ H=1} Out: FullLay(aSum,Hidden,Output,Char) End {ɉɨɥɧɨɫɜɹɡɧɚɹ ɫɟɬɶ ɫ M ɫɢɝɦɨɢɞɧɵɦɢ ɧɟɣɪɨɧɚɦɢ ɧɚ Ʉ ɬɚɤɬɨɜ ɮɭɧɤɰɢɨɧɢɪɨɜɚɧɢɹ ɫ ɧɟɜɵɞɟɥɟɧɧɵɦ ɜɯɨɞɧɵɦ ɫɥɨɟɦ ɧɚ M ɫɢɝɧɚɥɨɜ. ȼɫɟ ɩɚɪɚɦɟɬɪɵ ɨɝɪɚɧɢɱɟɧɵ ɩɨ ɚɛɫɨɥɸɬɧɨɦɭ ɡɧɚɱɟɧɢɸ ɟɞɢɧɢɰɟɣ} Loop Circle(aSum : Block; Char : Real; M, K : Long) K Contents FullLay(aSum,M,M,Char) ParamDef DefaultType -1 1 End {ɉɨɥɧɨɫɜɹɡɧɚɹ ɫɟɬɶ ɫ Ɇ ɫɢɝɦɨɢɞɧɵɦɢ ɧɟɣɪɨɧɚɦɢ ɧɚ Ʉ ɬɚɤɬɨɜ ɮɭɧɤɰɢɨɧɢɪɨɜɚɧɢɹ ɫ ɜɵɞɟɥɟɧɧɵɦ ɜɯɨɞɧɵɦ ɫɥɨɟɦ ɧɚ N ɫɢɝɧɚɥɨɜ. ȼɫɟ ɜɯɨɞɧɵɟ ɫɢɝɧɚɥɵ ɩɨɞɚɸɬɫɹ ɧɚ ɜɯɨɞ ɤɚɠɞɨɝɨ ɧɟɣɪɨɧɚ ɜɯɨɞɧɨɝɨ ɫɥɨɹ} Cascad Net2: (aSum : Block; Char : Real; M, K, N : Long) Contents In: FullLay(aSum,N,M,Char), {ȼɯɨɞɧɨɣ ɫɥɨɣ} Net: Circle(aSum,Char,M,K) {ɉɨɥɧɨɫɜɹɡɧɚɹ ɫɟɬɶ} End Cascad Hopf(N : Long) Contents Sum(N),Sign_Easy End
{ɇɟɣɪɨɧ ɫɟɬɢ ɏɨɩɮɢɥɞɚ ɢɡ N ɧɟɣɪɨɧɨɜ} {ɋɭɦɦɚɬɨɪ ɢ ɩɨɪɨɝɨɜɵɣ ɷɥɟɦɟɧɬ}
{ɋɥɨɣ ɧɟɣɪɨɧɨɜ ɏɨɩɮɢɥɞɚ}
CHAP5-3.DOC
105
Layer HLay(N : Long) Contents Hop: Hopf(N)[N] End
{ȼ ɫɨɫɬɚɜ ɫɥɨɹ ɜɯɨɞɢɬ N ɧɟɣɪɨɧɨɜ}
{ɋɟɬɶ ɏɨɩɮɢɥɞɚ ɢɡ N ɧɟɣɪɨɧɨɜ} Until Hopfield(N : Long) InSignals=OutSignals Contents BLay(N,N),HLay(N) End
{ɋɥɨɣ ɬɨɱɟɤ ɜɟɬɜɥɟɧɢɹ ɢ ɫɥɨɣ ɧɟɣɪɨɧɨɜ}
End NetLib
5.4 ɋɬɚɧɞɚɪɬ ɜɬɨɪɨɝɨ ɭɪɨɜɧɹ ɤɨɦɩɨɧɟɧɬɚ ɫɟɬɶ ȼ ɞɚɧɧɨɦ ɪɚɡɞɟɥɟ ɝɥɚɜɵ ɪɚɫɫɦɨɬɪɟɧɵ ɜɫɟ ɡɚɩɪɨɫɵ, ɢɫɩɨɥɧɹɟɦɵɟ ɤɨɦɩɨɧɟɧɬɨɦ ɫɟɬɶ. ɉɪɟɠɞɟ ɱɟɦ ɩɪɢɫɬɭɩɚɬɶ ɤ ɨɩɢɫɚɧɢɸ ɫɬɚɧɞɚɪɬɚ ɡɚɩɪɨɫɨɜ ɤɨɦɩɨɧɟɧɬɚ ɫɟɬɶ ɫɥɟɞɭɟɬ ɜɵɞɟɥɢɬɶ ɜɵɩɨɥɧɹɟɦɵɟ ɢɦ ɮɭɧɤɰɢɢ. ɑɬɨ ɞɨɥɠɟɧ ɞɟɥɚɬɶ ɤɨɦɩɨɧɟɧɬ ɫɟɬɶ? Ɉɱɟɜɢɞɧɨ, ɱɬɨ ɩɪɟɠɞɟ ɜɫɟɝɨ ɨɧ ɞɨɥɠɟɧ ɭɦɟɬɶ ɜɵɩɨɥɧɹɬɶ ɬɚɤɢɟ ɮɭɧɤɰɢɢ, ɤɚɤ ɮɭɧɤɰɢɨɧɢɪɨɜɚɧɢɟ ɜɩɟɪɟɞ (ɪɚɛɨɬɚ ɨɛɭɱɟɧɧɨɣ ɫɟɬɢ) ɢ ɧɚɡɚɞ (ɜɵɱɢɫɥɟɧɢɟ ɜɟɤɬɨɪɚ ɩɨɩɪɚɜɨɤ ɢɥɢ ɝɪɚɞɢɟɧɬɚ ɞɥɹ ɨɛɭɱɟɧɢɹ), ɦɨɞɟɪɧɢɡɚɰɢɸ ɩɚɪɚɦɟɬɪɨɜ (ɨɛɭɱɟɧɢɟ ɫɟɬɢ) ɢ ɜɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ (ɨɛɭɱɟɧɢɟ ɩɪɢɦɟɪɚ). Ʉɪɨɦɟ ɬɨɝɨ ɤɨɦɩɨɧɟɧɬ ɫɟɬɶ ɞɨɥɠɟɧ ɭɦɟɬɶ ɱɢɬɚɬɶ ɫɟɬɶ ɫ ɞɢɫɤɚ ɢ ɡɚɩɢɫɵɜɚɬɶ ɟɟ ɧɚ ɞɢɫɤ. ɇɟɨɛɯɨɞɢɦɨ ɬɚɤ ɠɟ ɩɪɟɞɭɫɦɨɬɪɟɬɶ ɜɨɡɦɨɠɧɨɫɬɶ ɫɨɡɞɚɜɚɬɶ ɫɟɬɶ ɢ ɪɟɞɚɤɬɢɪɨɜɚɬɶ ɟɟ ɫɬɪɭɤɬɭɪɭ. ɗɬɢ ɞɜɟ ɮɭɧɤɰɢɨɧɚɥɶɧɵɟ ɜɨɡɦɨɠɧɨɫɬɢ ɧɟ ɫɜɹɡɚɧɵ ɧɚɩɪɹɦɭɸ ɫ ɪɚɛɨɬɨɣ (ɮɭɧɤɰɢɨɧɢɪɨɜɚɧɢɟɦ ɢ ɨɛɭɱɟɧɢɟɦ) ɫɟɬɢ. Ɍɚɤɢɦ ɨɛɪɚɡɨɦ, ɧɟɨɛɯɨɞɢɦɨ ɜɵɞɟɥɢɬɶ ɫɟɪɜɢɫɧɭɸ ɤɨɦɩɨɧɟɧɬɭ – ɪɟɞɚɤɬɨɪ ɫɟɬɟɣ. Ʉɨɦɩɨɧɟɧɬ ɪɟɞɚɤɬɨɪ ɫɟɬɟɣ ɩɨɡɜɨɥɹɟɬ ɫɨɡɞɚɜɚɬɶ ɢ ɢɡɦɟɧɹɬɶ ɫɬɪɭɤɬɭɪɭ ɫɟɬɢ, ɦɨɞɟɪɧɢɡɢɪɨɜɚɬɶ ɨɛɭɱɚɟɦɵɟ ɩɚɪɚɦɟɬɪɵ ɜ «ɪɭɱɧɨɦ» ɪɟɠɢɦɟ.
5.4.1 Ɂɚɩɪɨɫɵ ɤ ɤɨɦɩɨɧɟɧɬɟ ɫɟɬɶ Ɂɚɩɪɨɫɵ ɤ ɤɨɦɩɨɧɟɧɬɭ ɫɟɬɶ ɦɨɠɧɨ ɪɚɡɛɢɬɶ ɧɚ ɩɹɬɶ ɝɪɭɩɩ: 1. Ɏɭɧɤɰɢɨɧɢɪɨɜɚɧɢɟ. 2. ɂɡɦɟɧɟɧɢɟ ɩɚɪɚɦɟɬɪɨɜ. 3. Ɋɚɛɨɬɚ ɫɨ ɫɬɪɭɤɬɭɪɨɣ. 4. ɂɧɢɰɢɚɰɢɹ ɪɟɞɚɤɬɨɪɚ ɢ ɤɨɧɫɬɪɭɤɬɨɪɚ ɫɟɬɟɣ. 5. Ɉɛɪɚɛɨɬɤɚ ɨɲɢɛɨɤ. ɉɨɫɤɨɥɶɤɭ ɤɨɦɩɨɧɟɧɬ ɫɟɬɶ ɦɨɠɟɬ ɪɚɛɨɬɚɬɶ ɨɞɧɨɜɪɟɦɟɧɧɨ ɫ ɧɟɫɤɨɥɶɤɢɦɢ ɫɟɬɹɦɢ, ɛɨɥɶɲɢɧɫɬɜɨ ɡɚɩɪɨɫɨɜ ɤ ɫɟɬɢ ɫɨɞɟɪɠɚɬ ɹɜɧɨɟ ɭɤɚɡɚɧɢɟ ɢɦɟɧɢ ɫɟɬɢ. Ɉɬɦɟɬɢɦ, ɱɬɨ ɩɪɢ ɝɟɧɟɪɚɰɢɢ ɡɚɩɪɨɫɨɜ ɜ ɤɚɱɟɫɬɜɟ ɢɦɟɧɢ ɫɟɬɢ ɦɨɠɧɨ ɭɤɚɡɵɜɚɬɶ ɢɦɹ ɥɸɛɨɣ ɩɨɞɫɟɬɢ. Ɍɚɤɢɦ ɨɛɪɚɡɨɦ, ɢɟɪɚɪɯɢɱɟɫɤɚɹ ɫɬɪɭɤɬɭɪɚ ɫɟɬɢ, ɨɩɢɫɚɧɧɚɹ ɜ ɫɬɚɧɞɚɪɬɟ ɹɡɵɤɚ ɨɩɢɫɚɧɢɹ ɫɟɬɟɣ, ɩɨɡɜɨɥɹɟɬ ɪɚɛɨɬɚɬɶ ɫ ɤɚɠɞɵɦ ɛɥɨɤɨɦ ɢɥɢ ɷɥɟɦɟɧɬɨɦ ɫɟɬɢ ɤɚɤ ɫ ɨɬɞɟɥɶɧɨɣ ɫɟɬɶɸ. ɇɢɠɟ ɩɪɢɜɟɞɟɧɨ ɨɩɢɫɚɧɢɟ ɜɫɟɯ ɡɚɩɪɨɫɨɜ ɤ ɤɨɦɩɨɧɟɧɬɭ ɫɟɬɶ. Ʉɚɠɞɵɣ ɡɚɩɪɨɫ ɹɜɥɹɟɬɫɹ ɥɨɝɢɱɟɫɤɨɣ ɮɭɧɤɰɢɟɣ, ɜɨɡɜɪɚɳɚɸɳɟɣ ɡɧɚɱɟɧɢɟ ɢɫɬɢɧɚ, ɟɫɥɢ ɡɚɩɪɨɫ ɜɵɩɨɥɧɟɧ ɭɫɩɟɲɧɨ, ɢ ɥɨɠɶ – ɩɪɢ Ɍɚɛɥɢɰɚ 3. Ɂɧɚɱɟɧɢɹ ɩɪɟɞɨɩɪɟɞɟɥɟɧɧɵɯ ɤɨɧɫɬɚɧɬ ɇɚɡɜɚɧɢɟȼɟɥɢɱɢɧɚɁɧɚɱɟɧɢɟ InSignals 0 ȼɯɨɞɧɵɟ ɫɢɝɧɚɥɵ ɩɪɹɦɨɝɨ ɮɭɧɤɰɢɨɧɢɪɨɜɚɧɢɹ OutSignals 1 ȼɵɯɨɞɧɵɟ ɫɢɝɧɚɥɵ ɩɪɹɦɨɝɨ ɮɭɧɤɰɢɨɧɢɪɨɜɚɧɢɹ Ɋarameters 2 ɉɚɪɚɦɟɬɪɵ InSignalMask 3 Ɇɚɫɤɚ ɨɛɭɱɚɟɦɨɫɬɢ ɜɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ ParamMask 4 Ɇɚɫɤɚ ɨɛɭɱɚɟɦɨɫɬɢ ɩɚɪɚɦɟɬɪɨɜ BackInSignals 5 ȼɯɨɞɧɵɟ ɫɢɝɧɚɥɵ ɨɛɪɚɬɧɨɝɨ ɮɭɧɤɰɢɨɧɢɪɨɜɚɧɢɹ (ɩɨɩɪɚɜɤɢ) BackOutSignals 6 ȼɵɯɨɞɧɵɟ ɫɢɝɧɚɥɵ ɨɛɪɚɬɧɨɝɨ ɮɭɧɤɰɢɨɧɢɪɨɜɚɧɢɹ (ɩɨɩɪɚɜɤɢ) BackɊarameters 7 ɉɨɩɪɚɜɤɢ ɤ ɩɚɪɚɦɟɬɪɚɦ Element 0 Ɍɢɩ ɩɨɞɫɟɬɢ – ɷɥɟɦɟɧɬ Layer 1 Ɍɢɩ ɩɨɞɫɟɬɢ – ɫɥɨɣ Cascad 2 Ɍɢɩ ɩɨɞɫɟɬɢ – ɩɪɨɫɬɨɣ ɤɚɫɤɚɞ CicleFor 3 Ɍɢɩ ɩɨɞɫɟɬɢ – ɰɢɤɥ ɫ ɡɚɞɚɧɧɵɦ ɱɢɫɥɨɦ ɩɪɨɯɨɞɨɜ CicleUntil 4 Ɍɢɩ ɩɨɞɫɟɬɢ – ɰɢɤɥ ɩɨ ɭɫɥɨɜɢɸ ɨɲɢɛɨɱɧɨɦ ɡɚɜɟɪɲɟɧɢɢ ɢɫɩɨɥɧɟɧɢɹ ɡɚɩɪɨɫɚ.
CHAP5-3.DOC
106
ɉɪɢ ɜɵɡɨɜɟ ɪɹɞɚ ɡɚɩɪɨɫɨɜ ɢɫɩɨɥɶɡɭɸɬɫɹ ɩɪɟɞɨɩɪɟɞɟɥɟɧɧɵɟ ɤɨɧɫɬɚɧɬɵ. ɂɯ ɡɧɚɱɟɧɢɹ ɩɪɢɜɟɞɟɧɵ ɜ ɬɚɛɥ. 3.
5.4.2 Ɂɚɩɪɨɫɵ ɧɚ ɮɭɧɤɰɢɨɧɢɪɨɜɚɧɢɟ Ⱦɜɚ ɡɚɩɪɨɫɚ ɩɟɪɜɨɣ ɝɪɭɩɩɵ ɩɨɡɜɨɥɹɸɬ ɩɪɨɜɨɞɢɬɶ ɩɪɹɦɨɟ ɢ ɨɛɪɚɬɧɨɟ ɮɭɧɤɰɢɨɧɢɪɨɜɚɧɢɟ ɫɟɬɢ. ɉɨ ɫɭɬɢ ɷɬɢ ɡɚɩɪɨɫɵ ɷɤɜɢɜɚɥɟɧɬɧɵ ɜɵɡɨɜɭ ɦɟɬɨɞɨɜ Forw ɢ Back ɫɟɬɢ ɢɥɢ ɟɟ ɷɥɟɦɟɧɬɚ.
5.4.2.1 ȼɵɩɨɥɧɢɬɶ ɩɪɹɦɨɟ Ɏɭɧɤɰɢɨɧɢɪɨɜɚɧɢɟ (Forw)
1. 2. 3.
4. 5.
Ɉɩɢɫɚɧɢɟ ɡɚɩɪɨɫɚ: Pascal: Function Forw ( Net : PString; InSignals : PRealArray ) : Logic; C: Logic Forw(PString Net, PRealArray InSignals) Ɉɩɢɫɚɧɢɟ ɚɪɝɭɦɟɧɬɚ: Net – ɭɤɚɡɚɬɟɥɶ ɧɚ ɫɬɪɨɤɭ ɫɢɦɜɨɥɨɜ, ɫɨɞɟɪɠɚɳɭɸ ɢɦɹ ɫɟɬɢ. InSignals – ɦɚɫɫɢɜ ɜɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ ɫɟɬɢ. ɇɚɡɧɚɱɟɧɢɟ – ɩɪɨɜɨɞɢɬ ɩɪɹɦɨɟ ɮɭɧɤɰɢɨɧɢɪɨɜɚɧɢɟ ɫɟɬɢ, ɭɤɚɡɚɧɧɨɣ ɜ ɩɚɪɚɦɟɬɪɟ Net. Ɉɩɢɫɚɧɢɟ ɢɫɩɨɥɧɟɧɢɹ. ȿɫɥɢ Error 0, ɬɨ ɜɵɩɨɥɧɟɧɢɟ ɡɚɩɪɨɫɚ ɩɪɟɤɪɚɳɚɟɬɫɹ. ȿɫɥɢ ɜ ɤɚɱɟɫɬɜɟ ɚɪɝɭɦɟɧɬɚ Net ɞɚɧ ɩɭɫɬɨɣ ɭɤɚɡɚɬɟɥɶ, ɢɥɢ ɭɤɚɡɚɬɟɥɶ ɧɚ ɩɭɫɬɭɸ ɫɬɪɨɤɭ, ɬɨ ɢɫɩɨɥɧɹɸɳɢɦ ɡɚɩɪɨɫ ɨɛɴɟɤɬɨɦ ɹɜɥɹɟɬɫɹ ɩɟɪɜɚɹ ɫɟɬɶ ɜ ɫɩɢɫɤɟ ɫɟɬɟɣ ɤɨɦɩɨɧɟɧɬɚ ɫɟɬɶ. ȿɫɥɢ ɫɩɢɫɨɤ ɫɟɬɟɣ ɤɨɦɩɨɧɟɧɬɚ ɫɟɬɶ ɩɭɫɬ ɢɥɢ ɢɦɹ ɫɟɬɢ, ɩɟɪɟɞɚɧɧɨɟ ɜ ɚɪɝɭɦɟɧɬɟ Net ɜ ɷɬɨɦ ɫɩɢɫɤɟ ɧɟ ɧɚɣɞɟɧɨ, ɬɨ ɜɨɡɧɢɤɚɟɬ ɨɲɢɛɤɚ 301 – ɧɟɜɟɪɧɨɟ ɢɦɹ ɫɟɬɢ, ɭɩɪɚɜɥɟɧɢɟ ɩɟɪɟɞɚɟɬɫɹ ɨɛɪɚɛɨɬɱɢɤɭ ɨɲɢɛɨɤ, ɚ ɨɛɪɚɛɨɬɤɚ ɡɚɩɪɨɫɚ ɩɪɟɤɪɚɳɚɟɬɫɹ. ȼɵɡɵɜɚɟɬɫɹ ɦɟɬɨɞ Forw ɫɟɬɢ, ɢɦɹ ɤɨɬɨɪɨɣ ɛɵɥɨ ɭɤɚɡɚɧɨ ɜ ɚɪɝɭɦɟɧɬɟ Net. ȿɫɥɢ ɜɨ ɜɪɟɦɹ ɜɵɩɨɥɧɟɧɢɹ ɡɚɩɪɨɫɚ ɜɨɡɧɢɤɚɟɬ ɨɲɢɛɤɚ, ɬɨ ɝɟɧɟɪɢɪɭɟɬɫɹ ɜɧɭɬɪɟɧɧɹɹ ɨɲɢɛɤɚ 304 ɨɲɢɛɤɚ ɩɪɹɦɨɝɨ ɮɭɧɤɰɢɨɧɢɪɨɜɚɧɢɹ. ɍɩɪɚɜɥɟɧɢɟ ɩɟɪɟɞɚɟɬɫɹ ɨɛɪɚɛɨɬɱɢɤɭ ɨɲɢɛɨɤ. ȼɵɩɨɥɧɟɧɢɟ ɡɚɩɪɨɫɚ ɩɪɟɤɪɚɳɚɟɬɫɹ. ȼ ɩɪɨɬɢɜɧɨɦ ɫɥɭɱɚɟ ɜɵɩɨɥɧɟɧɢɟ ɡɚɩɪɨɫɚ ɭɫɩɟɲɧɨ ɡɚɜɟɪɲɚɟɬɫɹ.
5.4.2.2 ȼɵɩɨɥɧɢɬɶ ɨɛɪɚɬɧɨɟ Ɏɭɧɤɰɢɨɧɢɪɨɜɚɧɢɟ (Back)
1. 2. 3.
4. 5.
Ɉɩɢɫɚɧɢɟ ɡɚɩɪɨɫɚ: Pascal: Function Back( Net : PString; BackOutSignals : PRealArray) : Logic; C: Logic Back(PString Net, PRealArray BackOutSignals) Ɉɩɢɫɚɧɢɟ ɚɪɝɭɦɟɧɬɚ: Net – ɭɤɚɡɚɬɟɥɶ ɧɚ ɫɬɪɨɤɭ ɫɢɦɜɨɥɨɜ, ɫɨɞɟɪɠɚɳɭɸ ɢɦɹ ɫɟɬɢ. BackOutSignals – ɦɚɫɫɢɜ ɩɪɨɢɡɜɨɞɧɵɯ ɮɭɧɤɰɢɢ ɨɰɟɧɤɢ ɩɨ ɜɵɯɨɞɧɵɦ ɫɢɝɧɚɥɚɦ ɫɟɬɢ. ɇɚɡɧɚɱɟɧɢɟ – ɩɪɨɜɨɞɢɬ ɨɛɪɚɬɧɨɟ ɮɭɧɤɰɢɨɧɢɪɨɜɚɧɢɟ ɫɟɬɢ, ɭɤɚɡɚɧɧɨɣ ɜ ɩɚɪɚɦɟɬɪɟ Net. Ɉɩɢɫɚɧɢɟ ɢɫɩɨɥɧɟɧɢɹ. ȿɫɥɢ Error 0, ɬɨ ɜɵɩɨɥɧɟɧɢɟ ɡɚɩɪɨɫɚ ɩɪɟɤɪɚɳɚɟɬɫɹ. ȿɫɥɢ ɜ ɤɚɱɟɫɬɜɟ ɚɪɝɭɦɟɧɬɚ Net ɞɚɧ ɩɭɫɬɨɣ ɭɤɚɡɚɬɟɥɶ, ɢɥɢ ɭɤɚɡɚɬɟɥɶ ɧɚ ɩɭɫɬɭɸ ɫɬɪɨɤɭ, ɬɨ ɢɫɩɨɥɧɹɸɳɢɦ ɡɚɩɪɨɫ ɨɛɴɟɤɬɨɦ ɹɜɥɹɟɬɫɹ ɩɟɪɜɚɹ ɫɟɬɶ ɜ ɫɩɢɫɤɟ ɫɟɬɟɣ ɤɨɦɩɨɧɟɧɬɚ ɫɟɬɶ. ȿɫɥɢ ɫɩɢɫɨɤ ɫɟɬɟɣ ɤɨɦɩɨɧɟɧɬɚ ɫɟɬɶ ɩɭɫɬ ɢɥɢ ɢɦɹ ɫɟɬɢ, ɩɟɪɟɞɚɧɧɨɟ ɜ ɚɪɝɭɦɟɧɬɟ Net ɜ ɷɬɨɦ ɫɩɢɫɤɟ ɧɟ ɧɚɣɞɟɧɨ, ɬɨ ɜɨɡɧɢɤɚɟɬ ɨɲɢɛɤɚ 301 – ɧɟɜɟɪɧɨɟ ɢɦɹ ɫɟɬɢ, ɭɩɪɚɜɥɟɧɢɟ ɩɟɪɟɞɚɟɬɫɹ ɨɛɪɚɛɨɬɱɢɤɭ ɨɲɢɛɨɤ, ɚ ɨɛɪɚɛɨɬɤɚ ɡɚɩɪɨɫɚ ɩɪɟɤɪɚɳɚɟɬɫɹ. ȼɵɡɵɜɚɟɬɫɹ ɦɟɬɨɞ Back ɫɟɬɢ, ɢɦɹ ɤɨɬɨɪɨɣ ɛɵɥɨ ɭɤɚɡɚɧɨ ɜ ɚɪɝɭɦɟɧɬɟ Net. ȿɫɥɢ ɜɨ ɜɪɟɦɹ ɜɵɩɨɥɧɟɧɢɹ ɡɚɩɪɨɫɚ ɜɨɡɧɢɤɚɟɬ ɨɲɢɛɤɚ, ɬɨ ɝɟɧɟɪɢɪɭɟɬɫɹ ɜɧɭɬɪɟɧɧɹɹ ɨɲɢɛɤɚ 305 ɨɲɢɛɤɚ ɨɛɪɚɬɧɨɝɨ ɮɭɧɤɰɢɨɧɢɪɨɜɚɧɢɹ. ɍɩɪɚɜɥɟɧɢɟ ɩɟɪɟɞɚɟɬɫɹ ɨɛɪɚɛɨɬɱɢɤɭ ɨɲɢɛɨɤ. ȼɵɩɨɥɧɟɧɢɟ ɡɚɩɪɨɫɚ ɩɪɟɤɪɚɳɚɟɬɫɹ. ȼ ɩɪɨɬɢɜɧɨɦ ɫɥɭɱɚɟ ɜɵɩɨɥɧɟɧɢɟ ɡɚɩɪɨɫɚ ɭɫɩɟɲɧɨ ɡɚɜɟɪɲɚɟɬɫɹ.
5.4.3 Ɂɚɩɪɨɫɵ ɧɚ ɢɡɦɟɧɟɧɢɟ ɩɚɪɚɦɟɬɪɨɜ. Ʉɨ ɜɬɨɪɨɣ ɝɪɭɩɩɟ ɡɚɩɪɨɫɨɜ ɨɬɧɨɫɹɬɫɹ ɱɟɬɵɪɟ ɡɚɩɪɨɫɚ: Modify – ɦɨɞɢɮɢɤɚɰɢɹ ɩɚɪɚɦɟɬɪɨɜ, ɨɛɵɱɧɨ ɧɚɡɵɜɚɟɦɚɹ ɨɛɭɱɟɧɢɟɦ, ModifyMask – ɦɨɞɢɮɢɤɚɰɢɹ ɦɚɫɤɢ ɨɛɭɱɚɟɦɵɯ ɫɢɧɚɩɫɨɜ, NullGradient – ɨɛɧɭɥɟɧɢɟ ɝɪɚɞɢɟɧɬɚ ɢ RandomDirection – ɫɝɟɧɟɪɢɪɨɜɚɬɶ ɫɥɭɱɚɣɧɨɟ ɧɚɩɪɚɜɥɟɧɢɟ ɫɩɭɫɤɚ.
5.4.3.1 ɉɪɨɜɟɫɬɢ ɨɛɭɱɟɧɢɟ (Modify) Ɉɩɢɫɚɧɢɟ ɡɚɩɪɨɫɚ: Pascal:
CHAP5-3.DOC
107
Function Modify( Net : PString; OldStep, NewStep : Real; Tipe : Integer; Grad : PRealArray ) : Logic; C: Logic Modify(PString Net, Real OldStep, Real NewStep, Integer Tipe, PRealArray Grad) Ɉɩɢɫɚɧɢɟ ɚɪɝɭɦɟɧɬɨɜ: Net – ɭɤɚɡɚɬɟɥɶ ɧɚ ɫɬɪɨɤɭ ɫɢɦɜɨɥɨɜ, ɫɨɞɟɪɠɚɳɭɸ ɢɦɹ ɫɟɬɢ. OldStep, NewStep – ɩɚɪɚɦɟɬɪɵ ɨɛɭɱɟɧɢɹ. Tipe – ɨɞɧɚ ɢɡ ɤɨɧɫɬɚɧɬ InSignals ɢɥɢ Parameters. Grad – ɚɞɪɟɫ ɦɚɫɫɢɜɚ ɩɨɩɪɚɜɨɤ ɢɥɢ ɩɭɫɬɨɣ ɭɤɚɡɚɬɟɥɶ. ɇɚɡɧɚɱɟɧɢɟ – ɩɪɨɜɨɞɢɬ ɨɛɭɱɟɧɢɟ ɩɚɪɚɦɟɬɪɨɜ ɢɥɢ ɜɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ ɫɟɬɢ, ɭɤɚɡɚɧɧɨɣ ɜ ɩɚɪɚɦɟɬɪɟ Net. 1. 2. 3.
4. 5.
Ɉɩɢɫɚɧɢɟ ɢɫɩɨɥɧɟɧɢɹ. ȿɫɥɢ Error 0, ɬɨ ɜɵɩɨɥɧɟɧɢɟ ɡɚɩɪɨɫɚ ɩɪɟɤɪɚɳɚɟɬɫɹ. ȿɫɥɢ ɜ ɤɚɱɟɫɬɜɟ ɚɪɝɭɦɟɧɬɚ Net ɞɚɧ ɩɭɫɬɨɣ ɭɤɚɡɚɬɟɥɶ, ɢɥɢ ɭɤɚɡɚɬɟɥɶ ɧɚ ɩɭɫɬɭɸ ɫɬɪɨɤɭ, ɬɨ ɢɫɩɨɥɧɹɸɳɢɦ ɡɚɩɪɨɫ ɨɛɴɟɤɬɨɦ ɹɜɥɹɟɬɫɹ ɩɟɪɜɚɹ ɫɟɬɶ ɜ ɫɩɢɫɤɟ ɫɟɬɟɣ ɤɨɦɩɨɧɟɧɬɚ ɫɟɬɶ. ȿɫɥɢ ɫɩɢɫɨɤ ɫɟɬɟɣ ɤɨɦɩɨɧɟɧɬɚ ɫɟɬɶ ɩɭɫɬ ɢɥɢ ɢɦɹ ɫɟɬɢ, ɩɟɪɟɞɚɧɧɨɟ ɜ ɚɪɝɭɦɟɧɬɟ Net ɜ ɷɬɨɦ ɫɩɢɫɤɟ ɧɟ ɧɚɣɞɟɧɨ, ɬɨ ɜɨɡɧɢɤɚɟɬ ɨɲɢɛɤɚ 301 – ɧɟɜɟɪɧɨɟ ɢɦɹ ɫɟɬɢ, ɭɩɪɚɜɥɟɧɢɟ ɩɟɪɟɞɚɟɬɫɹ ɨɛɪɚɛɨɬɱɢɤɭ ɨɲɢɛɨɤ, ɚ ɨɛɪɚɛɨɬɤɚ ɡɚɩɪɨɫɚ ɩɪɟɤɪɚɳɚɟɬɫɹ. ȿɫɥɢ ɚɪɝɭɦɟɧɬ Grad ɫɨɞɟɪɠɢɬ ɩɭɫɬɨɣ ɭɤɚɡɚɬɟɥɶ, ɬɨ ɩɨɩɪɚɜɤɢ ɛɟɪɭɬɫɹ ɢɡ ɦɚɫɫɢɜɚ Back.Parameters ɢɥɢ Back.InputSignals ɜ ɡɚɜɢɫɢɦɨɫɬɢ ɨɬ ɡɧɚɱɟɧɢɹ ɚɪɝɭɦɟɧɬɚ Tipe. ȼ ɡɚɜɢɫɢɦɨɫɬɢ ɨɬ ɡɧɚɱɟɧɢɹ ɚɪɝɭɦɟɧɬɚ Tipe ɞɥɹ ɤɚɠɞɨɝɨ ɩɚɪɚɦɟɬɪɚ ɢɥɢ ɜɯɨɞɧɨɝɨ ɫɢɝɧɚɥɚ P, ɩɪɢ ɭɫɥɨɜɢɢ, ɱɬɨ ɫɨɨɬɜɟɬɫɬɜɭɸɳɢɣ ɟɦɭ ɷɥɟɦɟɧɬ ɦɚɫɤɢ ɨɛɭɱɚɟɦɨɫɬɢ, ɫɨɨɬɜɟɬɫɬɜɭɸɳɟɣ ɚɪɝɭɦɟɧɬɭ Tipe ɪɚɜɟɧ -1 (ɡɧɚɱɟɧɢɟ ɢɫɬɢɧɚ) ɜɵɩɨɥɧɹɟɬɫɹ ɫɥɟɞɭɸɳɚɹ ɩɪɨɰɟɞɭɪɚ: P1=P*OldStep+DP*NewStep. ȿɫɥɢ ɞɥɹ ɬɢɩɚ, ɤɨɬɨɪɵɦ ɨɩɢɫɚɧ ɩɚɪɚɦɟɬɪ P, ɡɚɞɚɧɵ ɦɢɧɢɦɚɥɶɧɨɟ ɢ ɦɚɤɫɢɦɚɥɶɧɨɟ ɡɧɚɱɟɧɢɹ, ɬɨ: P2=Pmin, ɩɪɢ P1Pmax P2=P1 ɜ ɩɪɨɬɢɜɧɨɦ ɫɥɭɱɚɟ
5.4.3.2 ɂɡɦɟɧɢɬɶ ɦɚɫɤɭ ɨɛɭɱɚɟɦɨɫɬɢ (ModifyMask) Ɉɩɢɫɚɧɢɟ ɡɚɩɪɨɫɚ: Pascal: Function ModifyMask( Net : PString; Tipe : Integer; NewMask: PLogicArray ) : Logic; C: Logic Modify(PString Net, Integer Tipe, PLogicArray NewMask) Ɉɩɢɫɚɧɢɟ ɚɪɝɭɦɟɧɬɨɜ: Net – ɭɤɚɡɚɬɟɥɶ ɧɚ ɫɬɪɨɤɭ ɫɢɦɜɨɥɨɜ, ɫɨɞɟɪɠɚɳɭɸ ɢɦɹ ɫɟɬɢ. Tipe – ɨɞɧɚ ɢɡ ɤɨɧɫɬɚɧɬ InSignals ɢɥɢ Parameters. NewMask – ɧɨɜɚɹ ɦɚɫɤɚ ɨɛɭɱɚɟɦɨɫɬɢ. ɇɚɡɧɚɱɟɧɢɟ – Ɂɚɦɟɧɹɟɬ ɦɚɫɤɭ ɨɛɭɱɚɟɦɨɫɬɢ ɩɚɪɚɦɟɬɪɨɜ ɢɥɢ ɜɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ ɫɟɬɢ, ɭɤɚɡɚɧɧɨɣ ɜ ɩɚɪɚɦɟɬɪɟ Net. Ɉɩɢɫɚɧɢɟ ɢɫɩɨɥɧɟɧɢɹ. 1. ȿɫɥɢ Error 0, ɬɨ ɜɵɩɨɥɧɟɧɢɟ ɡɚɩɪɨɫɚ ɩɪɟɤɪɚɳɚɟɬɫɹ. 2. ȿɫɥɢ ɜ ɤɚɱɟɫɬɜɟ ɚɪɝɭɦɟɧɬɚ Net ɞɚɧ ɩɭɫɬɨɣ ɭɤɚɡɚɬɟɥɶ, ɢɥɢ ɭɤɚɡɚɬɟɥɶ ɧɚ ɩɭɫɬɭɸ ɫɬɪɨɤɭ, ɬɨ ɢɫɩɨɥɧɹɸɳɢɦ ɡɚɩɪɨɫ ɨɛɴɟɤɬɨɦ ɹɜɥɹɟɬɫɹ ɩɟɪɜɚɹ ɫɟɬɶ ɜ ɫɩɢɫɤɟ ɫɟɬɟɣ ɤɨɦɩɨɧɟɧɬɚ ɫɟɬɶ. 3. ȿɫɥɢ ɫɩɢɫɨɤ ɫɟɬɟɣ ɤɨɦɩɨɧɟɧɬɚ ɫɟɬɶ ɩɭɫɬ ɢɥɢ ɢɦɹ ɫɟɬɢ, ɩɟɪɟɞɚɧɧɨɟ ɜ ɚɪɝɭɦɟɧɬɟ Net ɜ ɷɬɨɦ ɫɩɢɫɤɟ ɧɟ ɧɚɣɞɟɧɨ, ɬɨ ɜɨɡɧɢɤɚɟɬ ɨɲɢɛɤɚ 301 – ɧɟɜɟɪɧɨɟ ɢɦɹ ɫɟɬɢ, ɭɩɪɚɜɥɟɧɢɟ ɩɟɪɟɞɚɟɬɫɹ ɨɛɪɚɛɨɬɱɢɤɭ ɨɲɢɛɨɤ, ɚ ɨɛɪɚɛɨɬɤɚ ɡɚɩɪɨɫɚ ɩɪɟɤɪɚɳɚɟɬɫɹ. 4. ȼ ɡɚɜɢɫɢɦɨɫɬɢ ɨɬ ɡɧɚɱɟɧɢɹ ɩɚɪɚɦɟɬɪɚ Tipe ɡɚɦɟɧɹɟɬ ɦɚɫɤɭ ɨɛɭɱɚɟɦɨɫɬɢ ɩɚɪɚɦɟɬɪɨɜ ɢɥɢ ɜɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ ɧɚ ɩɟɪɟɞɚɧɧɭɸ ɜ ɩɚɪɚɦɟɬɪɟ NewMask.
5.4.3.3 Ɉɛɧɭɥɢɬɶ ɝɪɚɞɢɟɧɬ (NullGradient) Ɉɩɢɫɚɧɢɟ ɡɚɩɪɨɫɚ: Pascal: Function NullGradient( Net : PString ) : Logic; C: Logic NullGradient(PString Net)
CHAP5-3.DOC
108
Ɉɩɢɫɚɧɢɟ ɚɪɝɭɦɟɧɬɨɜ: Net – ɭɤɚɡɚɬɟɥɶ ɧɚ ɫɬɪɨɤɭ ɫɢɦɜɨɥɨɜ, ɫɨɞɟɪɠɚɳɭɸ ɢɦɹ ɫɟɬɢ.
1. 2. 3.
4.
ɇɚɡɧɚɱɟɧɢɟ – ɩɪɨɢɡɜɨɞɢɬ ɨɛɧɭɥɟɧɢɟ ɝɪɚɞɢɟɧɬɚ ɫɟɬɢ, ɭɤɚɡɚɧɧɨɣ ɜ ɩɚɪɚɦɟɬɪɟ Net. Ɉɩɢɫɚɧɢɟ ɢɫɩɨɥɧɟɧɢɹ. ȿɫɥɢ Error 0, ɬɨ ɜɵɩɨɥɧɟɧɢɟ ɡɚɩɪɨɫɚ ɩɪɟɤɪɚɳɚɟɬɫɹ. ȿɫɥɢ ɜ ɤɚɱɟɫɬɜɟ ɚɪɝɭɦɟɧɬɚ Net ɞɚɧ ɩɭɫɬɨɣ ɭɤɚɡɚɬɟɥɶ, ɢɥɢ ɭɤɚɡɚɬɟɥɶ ɧɚ ɩɭɫɬɭɸ ɫɬɪɨɤɭ, ɬɨ ɢɫɩɨɥɧɹɸɳɢɦ ɡɚɩɪɨɫ ɨɛɴɟɤɬɨɦ ɹɜɥɹɟɬɫɹ ɩɟɪɜɚɹ ɫɟɬɶ ɜ ɫɩɢɫɤɟ ɫɟɬɟɣ ɤɨɦɩɨɧɟɧɬɚ ɫɟɬɶ. ȿɫɥɢ ɫɩɢɫɨɤ ɫɟɬɟɣ ɤɨɦɩɨɧɟɧɬɚ ɫɟɬɶ ɩɭɫɬ ɢɥɢ ɢɦɹ ɫɟɬɢ, ɩɟɪɟɞɚɧɧɨɟ ɜ ɚɪɝɭɦɟɧɬɟ Net ɜ ɷɬɨɦ ɫɩɢɫɤɟ ɧɟ ɧɚɣɞɟɧɨ, ɬɨ ɜɨɡɧɢɤɚɟɬ ɨɲɢɛɤɚ 301 – ɧɟɜɟɪɧɨɟ ɢɦɹ ɫɟɬɢ, ɭɩɪɚɜɥɟɧɢɟ ɩɟɪɟɞɚɟɬɫɹ ɨɛɪɚɛɨɬɱɢɤɭ ɨɲɢɛɨɤ, ɚ ɨɛɪɚɛɨɬɤɚ ɡɚɩɪɨɫɚ ɩɪɟɤɪɚɳɚɟɬɫɹ. Ɉɛɧɭɥɹɸɬɫɹ ɦɚɫɫɢɜɵ Back.Parameters ɢ Back.OutSignals.
5.4.3.4 ɋɥɭɱɚɣɧɨɟ ɧɚɩɪɚɜɥɟɧɢɟ ɫɩɭɫɤɚ (RandomDirection) Ɉɩɢɫɚɧɢɟ ɡɚɩɪɨɫɚ: Pascal: Function RandomDirection( Net : PString; Range : Real ) : Logic; C: Logic RandomDirection(PString Net, Real Range) Ɉɩɢɫɚɧɢɟ ɚɪɝɭɦɟɧɬɨɜ: Net – ɭɤɚɡɚɬɟɥɶ ɧɚ ɫɬɪɨɤɭ ɫɢɦɜɨɥɨɜ, ɫɨɞɟɪɠɚɳɭɸ ɢɦɹ ɫɟɬɢ. Range – ɨɬɧɨɫɢɬɟɥɶɧɚɹ ɲɢɪɢɧɚ ɢɧɬɟɪɜɚɥɚ, ɧɚ ɤɨɬɨɪɨɦ ɞɨɥɠɧɵ ɛɵɬɶ ɪɚɫɩɪɟɞɟɥɟɧɵ ɡɧɚɱɟɧɢɹ ɫɥɭɱɚɣɧɨɣ ɜɟɥɢɱɢɧɵ.
1. 2. 3.
4.
ɇɚɡɧɚɱɟɧɢɟ – ɝɟɧɟɪɢɪɭɟɬ ɜɟɤɬɨɪ ɫɥɭɱɚɣɧɵɯ ɩɨɩɪɚɜɨɤ ɤ ɩɚɪɚɦɟɬɪɚɦ ɫɟɬɢ. Ɉɩɢɫɚɧɢɟ ɢɫɩɨɥɧɟɧɢɹ. ȿɫɥɢ Error 0, ɬɨ ɜɵɩɨɥɧɟɧɢɟ ɡɚɩɪɨɫɚ ɩɪɟɤɪɚɳɚɟɬɫɹ. ȿɫɥɢ ɜ ɤɚɱɟɫɬɜɟ ɚɪɝɭɦɟɧɬɚ Net ɞɚɧ ɩɭɫɬɨɣ ɭɤɚɡɚɬɟɥɶ, ɢɥɢ ɭɤɚɡɚɬɟɥɶ ɧɚ ɩɭɫɬɭɸ ɫɬɪɨɤɭ, ɬɨ ɢɫɩɨɥɧɹɸɳɢɦ ɡɚɩɪɨɫ ɨɛɴɟɤɬɨɦ ɹɜɥɹɟɬɫɹ ɩɟɪɜɚɹ ɫɟɬɶ ɜ ɫɩɢɫɤɟ ɫɟɬɟɣ ɤɨɦɩɨɧɟɧɬɚ ɫɟɬɶ. ȿɫɥɢ ɫɩɢɫɨɤ ɫɟɬɟɣ ɤɨɦɩɨɧɟɧɬɚ ɫɟɬɶ ɩɭɫɬ ɢɥɢ ɢɦɹ ɫɟɬɢ, ɩɟɪɟɞɚɧɧɨɟ ɜ ɚɪɝɭɦɟɧɬɟ Net ɜ ɷɬɨɦ ɫɩɢɫɤɟ ɧɟ ɧɚɣɞɟɧɨ, ɬɨ ɜɨɡɧɢɤɚɟɬ ɨɲɢɛɤɚ 301 – ɧɟɜɟɪɧɨɟ ɢɦɹ ɫɟɬɢ, ɭɩɪɚɜɥɟɧɢɟ ɩɟɪɟɞɚɟɬɫɹ ɨɛɪɚɛɨɬɱɢɤɭ ɨɲɢɛɨɤ, ɚ ɨɛɪɚɛɨɬɤɚ ɡɚɩɪɨɫɚ ɩɪɟɤɪɚɳɚɟɬɫɹ. Ɂɚɦɟɳɚɸɬ ɜɫɟ ɡɧɚɱɟɧɢɹ ɦɚɫɫɢɜɚ Back.Parameters ɧɚ ɫɥɭɱɚɣɧɵɟ ɜɟɥɢɱɢɧɵ. ɂɧɬɟɪɜɚɥ ɪɚɫɩɪɟɞɟɥɟɧɢɹ ɫɥɭɱɚɣɧɨɣ ɜɟɥɢɱɢɧɵ ɡɚɜɢɫɢɬ ɨɬ ɬɢɩɚ ɩɚɪɚɦɟɬɪɚ, ɭɤɚɡɚɧɧɨɝɨ ɩɪɢ ɨɩɢɫɚɧɢɢ ɫɟɬɢ (ParamType) ɢ ɚɪɝɭɦɟɧɬɚ Range. ɉɨɥɭɲɢɪɢɧɚ ɢɧɬɟɪɜɚɥɚ ɨɩɪɟɞɟɥɹɟɬɫɹ ɤɚɤ ɩɪɨɢɡɜɟɞɟɧɢɟ ɩɨɥɭɲɢɪɢɧɵ ɢɧɬɟɪɜɚɥɚ ɞɨɩɭɫɬɢɦɵɯ ɡɧɚɱɟɧɢɣ ɩɚɪɚɦɟɬɪɚ, ɭɤɚɡɚɧɧɵɯ ɜ ɪɚɡɞɟɥɟ ParamDef ɨɩɢɫɚɧɢɹ ɫɟɬɢ ɧɚ ɜɟɥɢɱɢɧɭ Range. ɂɧɬɟɪɜɚɥ ɪɚɫɩɪɟɞɟɥɟɧɢɹ ɫɥɭɱɚɣɧɨɣ ɜɟɥɢɱɢɧɵ ɨɩɪɟɞɟɥɹɟɬɫɹ ɤɚɤ [-ɉɨɥɭɲɢɪɢɧɚ; ɉɨɥɭɲɢɪɢɧɚ].
5.4.4 Ɂɚɩɪɨɫɵ, ɪɚɛɨɬɚɸɳɢɟ ɫɨ ɫɬɪɭɤɬɭɪɨɣ ɫɟɬɢ. Ʉ ɬɪɟɬɶɟɣ ɝɪɭɩɩɟ ɨɬɧɨɫɹɬɫɹ ɡɚɩɪɨɫɵ, ɩɨɡɜɨɥɹɸɳɢɟ ɢɡɦɟɧɹɬɶ ɫɬɪɭɤɬɭɪɭ ɫɟɬɢ. ɑɚɫɬɶ ɡɚɩɪɨɫɨɜ ɷɬɨɣ ɝɪɭɩɩɵ ɨɩɢɫɚɧɚ ɜ ɪɚɡɞ. "Ɉɫɬɚɥɶɧɵɟ ɡɚɩɪɨɫɵ".
5.4.4.1 ȼɟɪɧɭɬɶ ɩɚɪɚɦɟɬɪɵ ɫɟɬɢ (nwGetData) Ɉɩɢɫɚɧɢɟ ɡɚɩɪɨɫɚ: Pascal: Function nwGetData(Net : PString; DataType : Integer; Var Data : PRealArray) : Logic; C: Logic nwGetData(PString Net, Integer DataType, PRealArray* Data) Ɉɩɢɫɚɧɢɟ ɚɪɝɭɦɟɧɬɨɜ: Net – ɭɤɚɡɚɬɟɥɶ ɧɚ ɫɬɪɨɤɭ ɫɢɦɜɨɥɨɜ, ɫɨɞɟɪɠɚɳɭɸ ɢɦɹ ɫɟɬɢ. DataType – ɨɞɧɚ ɢɡ ɜɨɫɶɦɢ ɩɪɟɞɨɩɪɟɞɟɥɟɧɧɵɯ ɤɨɧɫɬɚɧɬ, ɨɩɢɫɵɜɚɸɳɢɯ ɬɢɩ ɞɚɧɧɵɯ ɫɟɬɢ. Data – ɜɨɡɜɪɚɳɚɟɦɵɣ ɦɚɫɫɢɜ ɩɚɪɚɦɟɬɪɨɜ ɫɟɬɢ. ɇɚɡɧɚɱɟɧɢɟ – ɜɨɡɜɪɚɳɚɟɬ ɩɚɪɚɦɟɬɪɵ, ɜɯɨɞɧɵɟ ɢɥɢ ɜɵɯɨɞɧɵɟ ɫɢɝɧɚɥɵ ɫɟɬɢ, ɭɤɚɡɚɧɧɨɣ ɜ ɚɪɝɭɦɟɧɬɟ Net. Ɉɩɢɫɚɧɢɟ ɢɫɩɨɥɧɟɧɢɹ. 1. ȿɫɥɢ ɜ ɤɚɱɟɫɬɜɟ ɚɪɝɭɦɟɧɬɚ Net ɞɚɧ ɩɭɫɬɨɣ ɭɤɚɡɚɬɟɥɶ, ɢɥɢ ɭɤɚɡɚɬɟɥɶ ɧɚ ɩɭɫɬɭɸ ɫɬɪɨɤɭ, ɬɨ ɢɫɩɨɥɧɹɸɳɢɦ ɡɚɩɪɨɫ ɨɛɴɟɤɬɨɦ ɹɜɥɹɟɬɫɹ ɩɟɪɚɜɹ ɫɟɬɶ ɜ ɫɩɢɫɤɟ ɫɟɬɟɣ ɤɨɦɩɨɧɟɧɬɚ ɫɟɬɶ.
CHAP5-3.DOC
109
2.
3.
4.
ȿɫɥɢ ɢɦɹ ɫɟɬɢ, ɩɟɪɟɞɚɧɧɨɟ ɜ ɚɪɝɭɦɟɧɬɟ Net ɧɟ ɧɚɣɞɟɧɨ ɜ ɫɩɢɫɤɟ ɫɟɬɟɣ ɤɨɦɩɨɧɟɧɬɚ ɫɟɬɶ ɢɥɢ ɷɬɨɬ ɫɩɢɫɨɤ ɩɭɫɬ, ɬɨ ɜɨɡɧɢɤɚɟɬ ɨɲɢɛɤɚ 301 – ɧɟɜɟɪɧɨɟ ɢɦɹ ɫɟɬɢ, ɭɩɪɚɜɥɟɧɢɟ ɩɟɪɟɞɚɟɬɫɹ ɨɛɪɚɛɨɬɱɢɤɭ ɨɲɢɛɨɤ, ɚ ɨɛɪɚɛɨɬɤɚ ɡɚɩɪɨɫɚ ɩɪɟɤɪɚɳɚɟɬɫɹ. ȿɫɥɢ ɡɧɚɱɟɧɢɟ, ɩɟɪɟɞɚɧɧɨɟ ɜ ɚɪɝɭɦɟɧɬɟ DataType ɛɨɥɶɲɟ ɫɟɦɢ ɢɥɢ ɦɟɧɶɲɟ ɧɭɥɹ, ɬɨ ɜɨɡɧɢɤɚɟɬ ɨɲɢɛɤɚ 306 – ɨɲɢɛɨɱɧɵɣ ɬɢɩ ɩɚɪɚɦɟɬɪɚ ɫɟɬɢ, ɭɩɪɚɜɥɟɧɢɟ ɩɟɪɟɞɚɟɬɫɹ ɨɛɪɚɛɨɬɱɢɤɭ ɨɲɢɛɨɤ, ɚ ɨɛɪɚɛɨɬɤɚ ɡɚɩɪɨɫɚ ɩɪɟɤɪɚɳɚɟɬɫɹ. ȼ ɦɚɫɫɢɜɟ Data ɜɨɡɜɪɚɳɚɸɬɫɹ ɭɤɚɡɚɧɧɵɟ ɜ ɚɪɝɭɦɟɧɬɟ DataType ɩɚɪɚɦɟɬɪɵ ɫɟɬɢ.
5.4.4.2 ɍɫɬɚɧɨɜɢɬɶ ɩɚɪɚɦɟɬɪɵ ɫɟɬɢ (nwSetData) Ɉɩɢɫɚɧɢɟ ɡɚɩɪɨɫɚ: Pascal: Function nwSetData(Net : PString; DataType : Integer; Var Data : RealArray) : Logic; C: Logic nwSetData(PString Net, Integer DataType, RealArray* Data) Ɉɩɢɫɚɧɢɟ ɚɪɝɭɦɟɧɬɨɜ: Net – ɭɤɚɡɚɬɟɥɶ ɧɚ ɫɬɪɨɤɭ ɫɢɦɜɨɥɨɜ, ɫɨɞɟɪɠɚɳɭɸ ɢɦɹ ɫɟɬɢ. DataType – ɨɞɧɚ ɢɡ ɜɨɫɶɦɢ ɩɪɟɞɨɩɪɟɞɟɥɟɧɧɵɯ ɤɨɧɫɬɚɧɬ, ɨɩɢɫɵɜɚɸɳɢɯ ɬɢɩ ɞɚɧɧɵɯ ɫɟɬɢ. Data – ɦɚɫɫɢɜ ɩɚɪɚɦɟɬɪɨɜ ɞɥɹ ɡɚɦɟɳɟɧɢɹ ɬɟɤɭɳɟɝɨ ɦɚɫɫɢɜɚ ɩɚɪɚɦɟɬɪɨɜ ɫɟɬɢ. ɇɚɡɧɚɱɟɧɢɟ – ɡɚɦɟɳɚɟɬ ɩɚɪɚɦɟɬɪɵ, ɜɯɨɞɧɵɟ ɢɥɢ ɜɵɯɨɞɧɵɟ ɫɢɝɧɚɥɵ ɫɟɬɢ, ɭɤɚɡɚɧɧɨɣ ɜ ɚɪɝɭɦɟɧɬɟ Net ɧɚ ɡɧɚɱɟɧɢɹ ɢɡ ɦɚɫɫɢɜɚ Data. Ɉɩɢɫɚɧɢɟ ɢɫɩɨɥɧɟɧɢɹ. 1. ȿɫɥɢ ɜ ɤɚɱɟɫɬɜɟ ɚɪɝɭɦɟɧɬɚ Net ɞɚɧ ɩɭɫɬɨɣ ɭɤɚɡɚɬɟɥɶ, ɢɥɢ ɭɤɚɡɚɬɟɥɶ ɧɚ ɩɭɫɬɭɸ ɫɬɪɨɤɭ, ɬɨ ɢɫɩɨɥɧɹɸɳɢɦ ɡɚɩɪɨɫ ɨɛɴɟɤɬɨɦ ɹɜɥɹɟɬɫɹ ɩɟɪɜɚɹ ɫɟɬɶ ɜ ɫɩɢɫɤɟ ɫɟɬɟɣ ɤɨɦɩɨɧɟɧɬɚ ɫɟɬɶ. 2. ȿɫɥɢ ɢɦɹ ɫɟɬɢ, ɩɟɪɟɞɚɧɧɨɟ ɜ ɚɪɝɭɦɟɧɬɟ Net ɧɟ ɧɚɣɞɟɧɨ ɜ ɫɩɢɫɤɟ ɫɟɬɟɣ ɤɨɦɩɨɧɟɧɬɚ ɫɟɬɶ ɢɥɢ ɷɬɨɬ ɫɩɢɫɨɤ ɩɭɫɬ, ɬɨ ɜɨɡɧɢɤɚɟɬ ɨɲɢɛɤɚ 301 – ɧɟɜɟɪɧɨɟ ɢɦɹ ɫɟɬɢ, ɭɩɪɚɜɥɟɧɢɟ ɩɟɪɟɞɚɟɬɫɹ ɨɛɪɚɛɨɬɱɢɤɭ ɨɲɢɛɨɤ, ɚ ɨɛɪɚɛɨɬɤɚ ɡɚɩɪɨɫɚ ɩɪɟɤɪɚɳɚɟɬɫɹ. 3. ȿɫɥɢ ɡɧɚɱɟɧɢɟ, ɩɟɪɟɞɚɧɧɨɟ ɜ ɚɪɝɭɦɟɧɬɟ DataType ɛɨɥɶɲɟ ɫɟɦɢ ɢɥɢ ɦɟɧɶɲɟ ɧɭɥɹ, ɬɨ ɜɨɡɧɢɤɚɟɬ ɨɲɢɛɤɚ 306 – ɨɲɢɛɨɱɧɵɣ ɬɢɩ ɩɚɪɚɦɟɬɪɚ ɫɟɬɢ, ɭɩɪɚɜɥɟɧɢɟ ɩɟɪɟɞɚɟɬɫɹ ɨɛɪɚɛɨɬɱɢɤɭ ɨɲɢɛɨɤ, ɚ ɨɛɪɚɛɨɬɤɚ ɡɚɩɪɨɫɚ ɩɪɟɤɪɚɳɚɟɬɫɹ. 4. Ɂɧɚɱɟɧɢɹ ɩɚɪɚɦɟɬɪɨɜ (ɜɯɨɞɧɵɯ ɢɥɢ ɜɵɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ) ɫɟɬɢ ɡɚɦɟɧɹɸɬɫɹ ɧɚ ɡɧɚɱɟɧɢɹ ɢɡ ɦɚɫɫɢɜɚ Data. ȿɫɥɢ ɞɥɢɧɧɵ ɦɚɫɫɢɜɚ Data ɧɟɞɨɫɬɚɬɨɱɧɨ ɞɥɹ ɡɚɦɟɧɵ ɡɧɚɱɟɧɢɣ ɜɫɟɯ ɩɚɪɚɦɟɬɪɨɜ (ɜɯɨɞɧɵɯ ɢɥɢ ɜɵɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ), ɬɨ ɡɚɦɟɳɚɸɬɫɹ ɬɨɥɶɤɨ ɫɬɨɥɶɤɨ ɷɥɟɦɟɧɬɨɜ ɦɚɫɫɢɜɚ ɩɚɪɚɦɟɬɪɨɜ (ɜɯɨɞɧɵɯ ɢɥɢ ɜɵɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ) ɫɤɨɥɶɤɨ ɷɥɟɦɟɧɬɨɜ ɜ ɦɚɫɫɢɜɟ Data. ȿɫɥɢ ɞɥɢɧɧɚ ɦɚɫɫɢɜɚ Data ɛɨɥɶɲɟ ɞɥɢɧɧɵ ɦɚɫɫɢɜɚ ɩɚɪɚɦɟɬɪɨɜ (ɜɯɨɞɧɵɯ ɢɥɢ ɜɵɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ), ɬɨ ɡɚɦɟɧɹɸɬɫɹ ɜɫɟ ɷɥɟɦɟɧɬɵ ɜɟɤɬɨɪɚ ɩɚɪɚɦɟɬɪɨɜ (ɜɯɨɞɧɵɯ ɢɥɢ ɜɵɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ), ɚ ɥɢɲɧɢɟ ɷɥɟɦɟɧɬɵ ɦɚɫɫɢɜɚ Data ɢɝɧɨɪɢɪɭɸɬɫɹ.
5.4.4.3 ɇɨɪɦɚɥɢɡɨɜɚɬɶ ɫɟɬɶ (NormalizeNet) Ɉɩɢɫɚɧɢɟ ɡɚɩɪɨɫɚ: Pascal: Function NormalizeNet(Net : PString) : Logic; C: Logic NormalizeNet(PString Net) Ɉɩɢɫɚɧɢɟ ɚɪɝɭɦɟɧɬɚ: Net – ɭɤɚɡɚɬɟɥɶ ɧɚ ɫɬɪɨɤɭ ɫɢɦɜɨɥɨɜ, ɫɨɞɟɪɠɚɳɭɸ ɢɦɹ ɫɟɬɢ.
1. 2.
3. 4.
ɇɚɡɧɚɱɟɧɢɟ – ɧɨɪɦɚɥɢɡɚɰɢɹ ɫɟɬɢ, ɭɤɚɡɚɧɧɨɣ ɜ ɚɪɝɭɦɟɧɬɟ Net. Ɉɩɢɫɚɧɢɟ ɢɫɩɨɥɧɟɧɢɹ. ȿɫɥɢ ɜ ɤɚɱɟɫɬɜɟ ɚɪɝɭɦɟɧɬɚ Net ɞɚɧ ɩɭɫɬɨɣ ɭɤɚɡɚɬɟɥɶ, ɢɥɢ ɭɤɚɡɚɬɟɥɶ ɧɚ ɩɭɫɬɭɸ ɫɬɪɨɤɭ, ɬɨ ɢɫɩɨɥɧɹɸɳɢɦ ɡɚɩɪɨɫ ɨɛɴɟɤɬɨɦ ɹɜɥɹɟɬɫɹ ɩɟɪɜɚɹ ɫɟɬɶ ɜ ɫɩɢɫɤɟ ɫɟɬɟɣ ɤɨɦɩɨɧɟɧɬɚ ɫɟɬɶ. ȿɫɥɢ ɢɦɹ ɫɟɬɢ, ɩɟɪɟɞɚɧɧɨɟ ɜ ɚɪɝɭɦɟɧɬɟ Net ɧɟ ɧɚɣɞɟɧɨ ɜ ɫɩɢɫɤɟ ɫɟɬɟɣ ɤɨɦɩɨɧɟɧɬɚ ɫɟɬɶ ɢɥɢ ɷɬɨɬ ɫɩɢɫɨɤ ɩɭɫɬ, ɬɨ ɜɨɡɧɢɤɚɟɬ ɨɲɢɛɤɚ 301 – ɧɟɜɟɪɧɨɟ ɢɦɹ ɫɟɬɢ, ɭɩɪɚɜɥɟɧɢɟ ɩɟɪɟɞɚɟɬɫɹ ɨɛɪɚɛɨɬɱɢɤɭ ɨɲɢɛɨɤ, ɚ ɨɛɪɚɛɨɬɤɚ ɡɚɩɪɨɫɚ ɩɪɟɤɪɚɳɚɟɬɫɹ. ɂɡ ɫɟɬɢ ɭɞɚɥɹɸɬɫɹ ɫɜɹɡɢ, ɢɦɟɸɳɢɟ ɧɭɥɟɜɨɣ ɜɟɫ ɢ ɢɫɤɥɸɱɟɧɧɵɟ ɢɡ ɨɛɭɱɟɧɢɹ. ɇɭɦɟɪɚɰɢɹ ɫɢɝɧɚɥɨɜ ɢ ɩɚɪɚɦɟɬɪɨɜ ɫɨɯɪɚɧɹɟɬɫɹ. ɂɡ ɫɬɪɭɤɬɭɪɵ ɫɟɬɢ ɭɞɚɥɹɸɬɫɹ «ɧɟɦɵɟ» ɭɱɚɫɬɤɢ – ɷɥɟɦɟɧɬɵ ɢ ɛɥɨɤɢ, ɜɵɯɨɞɧɵɟ ɫɢɝɧɚɥɵ ɤɨɬɨɪɵɯ ɧɟ ɹɜɥɹɸɬɫɹ ɜɵɯɨɞɧɵɦɢ ɫɢɝɧɚɥɚɦɢ ɫɟɬɢ ɜ ɰɟɥɨɦ ɢ ɧɟ ɢɫɩɨɥɶɡɭɸɬɫɹ ɜ ɤɚɱɟɫɬɜɟ ɜɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ ɞɪɭɝɢɦɢ ɩɨɞɫɟɬɹɦɢ. ɇɭɦɟɪɚɰɢɹ ɫɢɝɧɚɥɨɜ ɢ ɩɚɪɚɦɟɬɪɨɜ ɫɨɯɪɚɧɹɟɬɫɹ.
CHAP5-3.DOC
110
5.
6. 7.
ɉɪɨɢɡɜɨɞɢɬɫɹ ɡɚɦɟɧɚ ɷɥɟɦɟɧɬɨɜ, ɫɬɚɜɲɢɯ «ɩɪɨɡɪɚɱɧɵɦɢ» – ɩɭɬɟɦ ɡɚɦɵɤɚɧɢɹ ɜɯɨɞɧɨɝɨ ɫɢɝɧɚɥɚ ɧɚ ɜɵɯɨɞɧɨɣ, ɭɞɚɥɹɸɬɫɹ ɩɪɨɫɬɵɟ ɨɞɧɨɪɨɞɧɵɟ ɫɭɦɦɚɬɨɪɵ ɫ ɨɞɧɢɦ ɜɯɨɞɨɦ ɢ ɬɨɱɤɢ ɜɟɬɜɥɟɧɢɹ ɫ ɨɞɧɢɦ ɜɵɯɨɞɨɦ; ɚɞɚɩɬɢɜɧɵɟ ɨɞɧɨɪɨɞɧɵɟ ɫɭɦɦɚɬɨɪɵ ɫ ɨɞɧɢɦ ɜɯɨɞɨɦ ɡɚɦɟɧɹɸɬɫɹ ɫɢɧɚɩɫɚɦɢ. ɇɭɦɟɪɚɰɢɹ ɫɢɝɧɚɥɨɜ ɢ ɩɚɪɚɦɟɬɪɨɜ ɫɨɯɪɚɧɹɟɬɫɹ. ȼ ɤɚɠɞɨɦ ɛɥɨɤɟ ɩɪɨɢɡɜɨɞɢɬɫɹ ɡɚɦɟɧɚ ɢɦɟɧ ɩɨɞɫɟɬɟɣ ɧɚ ɩɫɟɜɞɨɧɢɦɵ. ɉɪɨɢɡɜɨɞɢɬɫɹ ɢɡɦɟɧɟɧɢɟ ɧɭɦɟɪɚɰɢɢ ɫɢɝɧɚɥɨɜ ɢ ɩɚɪɚɦɟɬɪɨɜ ɫɟɬɢ.
5.4.5 Ɉɫɬɚɥɶɧɵɟ ɡɚɩɪɨɫɵ ɇɢɠɟ ɩɪɢɜɟɞɟɧ ɫɩɢɫɨɤ ɡɚɩɪɨɫɨɜ, ɢɫɩɨɥɧɟɧɢɟ ɤɨɬɨɪɵɯ ɨɩɢɫɚɧɨ ɜ ɝɥɚɜɟ "Ɉɛɳɢɣ ɫɬɚɧɞɚɪɬ": nwSetCurrent – ɋɞɟɥɚɬɶ ɫɟɬɶ ɬɟɤɭɳɟɣ nwAdd – Ⱦɨɛɚɜɥɟɧɢɟ ɫɟɬɢ nwDelete – ɍɞɚɥɟɧɢɟ ɫɟɬɢ nwWrite – Ɂɚɩɢɫɶ ɫɟɬɢ nwGetStructNames – ȼɟɪɧɭɬɶ ɢɦɟɧɚ ɩɨɞɫɟɬɟɣ nwGetType – ȼɟɪɧɭɬɶ ɬɢɩ ɩɨɞɫɟɬɢ nwEdit – Ɋɟɞɚɤɬɢɪɨɜɚɬɶ ɤɨɦɩɨɧɟɧɬɭ ɫɟɬɶ OnError – ɍɫɬɚɧɨɜɢɬɶ ɨɛɪɚɛɨɬɱɢɤ ɨɲɢɛɨɤ GetError – Ⱦɚɬɶ ɧɨɦɟɪ ɨɲɢɛɤɢ FreeMemory – Ɉɫɜɨɛɨɞɢɬɶ ɩɚɦɹɬɶ ȼ ɡɚɩɪɨɫɟ nwGetType ɜ ɩɟɪɟɦɟɧɧɨɣ TypeId ɜɨɡɜɪɚɳɚɟɬɫɹ ɡɧɚɱɟɧɢɟ ɨɞɧɨɣ ɢɡ ɩɪɟɞɨɩɪɟɞɟɥɟɧɧɵɯ ɤɨɧɫɬɚɧɬ, ɩɟɪɟɱɢɫɥɟɧɧɵɯ ɜ ɬɚɛɥ. 3. ɋɥɟɞɭɟɬ ɡɚɦɟɬɢɬɶ, ɱɬɨ ɞɜɚ ɡɚɩɪɨɫɚ nwGetData (ɉɨɥɭɱɢɬɶ ɩɚɪɚɦɟɬɪɵ) ɢ nwSetData (ɍɫɬɚɧɨɜɢɬɶ ɩɚɪɚɦɟɬɪɵ) ɢɦɟɸɬ ɧɚɡɜɚɧɢɟ, ɫɨɜɩɚɞɚɸɳɟɟ ɫ ɧɚɡɜɚɧɢɟɦ ɡɚɩɪɨɫɨɜ, ɨɩɢɫɚɧɧɵɯ ɜ ɝɥɚɜɟ "Ɉɛɳɢɣ ɫɬɚɧɞɚɪɬ", ɧɨ ɨɧɢ ɢɦɟɸɬ ɞɪɭɝɨɣ ɧɚɛɨɪ ɚɪɝɭɦɟɧɬɨɜ.
5.4.5.1 Ɉɲɢɛɤɢ ɤɨɦɩɨɧɟɧɬɚ ɫɟɬɶ ȼ ɬɚɛɥ. 4 ɩɪɢɜɟɞɟɧ ɩɨɥɧɵɣ ɫɩɢɫɨɤ ɨɲɢɛɨɤ, ɤɨɬɨɪɵɟ ɦɨɝɭɬ ɜɨɡɧɢɤɚɬɶ ɩɪɢ ɜɵɩɨɥɧɟɧɢɢ ɡɚɩɪɨɫɨɜ ɤɨɦɩɨɧɟɧɬɨɦ ɫɟɬɶ, ɢ ɞɟɣɫɬɜɢɹ ɫɬɚɧɞɚɪɬɧɨɝɨ ɨɛɪɚɛɨɬɱɢɤɚ ɨɲɢɛɨɤ. Ɍɚɛɥɢɰɚ 4 Ɉɲɢɛɤɢ ɤɨɦɩɨɧɟɧɬɚ ɫɟɬɶ ɢ ɞɟɣɫɬɜɢɹ ɫɬɚɧɞɚɪɬɧɨɝɨ ɨɛɪɚɛɨɬɱɢɤɚ ɨɲɢɛɨɤ. ʋɇɚɡɜɚɧɢɟ ɨɲɢɛɤɢɋɬɚɧɞɚɪɬɧɚɹ ɨɛɪɚɛɨɬɤɚ 301 ɇɟɜɟɪɧɨɟ ɢɦɹ ɫɟɬɢɁɚɧɟɫɟɧɢɟ ɧɨɦɟɪɚ ɜ Error 302 Ɉɲɢɛɤɚ ɫɱɢɬɵɜɚɧɢɹ ɫɟɬɢɁɚɧɟɫɟɧɢɟ ɧɨɦɟɪɚ ɜ Error 303 Ɉɲɢɛɤɚ ɫɨɯɪɚɧɟɧɢɹ ɫɟɬɢɁɚɧɟɫɟɧɢɟ ɧɨɦɟɪɚ ɜ Error 304 Ɉɲɢɛɤɚ ɩɪɹɦɨɝɨ ɮɭɧɤɰɢɨɧɢɪɨɜɚɧɢɹɁɚɧɟɫɟɧɢɟ ɧɨɦɟɪɚ ɜ Error 305 Ɉɲɢɛɤɚ ɨɛɪɚɬɧɨɝɨ ɮɭɧɤɰɢɨɧɢɪɨɜɚɧɢɹɁɚɧɟɫɟɧɢɟ ɧɨɦɟɪɚ ɜ Error 306 Ɉɲɢɛɨɱɧɵɣ ɬɢɩ ɩɚɪɚɦɟɬɪɚ ɫɟɬɢɁɚɧɟɫɟɧɢɟ ɧɨɦɟɪɚ ɜ Error
CHAP5-3.DOC
111
6. Ɉɰɟɧɤɚ ɢ ɢɧɬɟɪɩɪɟɬɚɬɨɪ ɨɬɜɟɬɚ ɗɬɚ ɝɥɚɜɚ ɩɨɫɜɹɳɟɧɚ ɨɛɡɨɪɭ ɪɚɡɥɢɱɧɵɯ ɜɢɞɨɜ ɨɰɟɧɨɤ, ɫɩɨɫɨɛɚɦ ɢɯ ɜɵɱɢɫɥɟɧɢɹ. ȼ ɧɟɣ ɬɚɤ ɠɟ ɪɚɫɫɦɨɬɪɟɧ ɫɩɨɫɨɛ ɨɩɪɟɞɟɥɟɧɢɹ ɭɪɨɜɧɹ ɭɜɟɪɟɧɧɨɫɬɢ ɫɟɬɢ ɜ ɜɵɞɚɧɧɨɦ ɨɬɜɟɬɟ ɢ ɩɪɢɜɟɞɟɧ ɫɩɨɫɨɛ ɩɨɫɬɪɨɟɧɢɹ ɨɰɟɧɨɤ, ɩɨɡɜɨɥɹɸɳɢɯ ɨɩɪɟɞɟɥɹɬɶ ɭɪɨɜɟɧɶ ɭɜɟɪɟɧɧɨɫɬɢ. ɉɪɢɜɟɞɟɧ ɨɫɧɨɜɧɨɣ ɩɪɢɧɰɢɩ ɩɪɨɟɤɬɢɪɨɜɚɧɢɹ ɨɰɟɧɤɢ - ɧɚɞɨ ɭɱɢɬɶ ɫɟɬɶ ɬɨɦɭ, ɱɬɨ ɦɵ ɯɨɬɢɦ ɨɬ ɧɟɟ ɩɨɥɭɱɢɬɶ. ɇɚɩɨɦɧɢɦ ɨɫɧɨɜɧɵɟ ɮɭɧɤɰɢɢ, ɤɨɬɨɪɵɟ ɞɨɥɠɧɚ ɜɵɩɨɥɧɹɬɶ ɨɰɟɧɤɚ: 1. ȼɵɱɢɫɥɹɬɶ ɨɰɟɧɤɭ ɪɟɲɟɧɢɹ, ɜɵɞɚɧɧɨɝɨ ɫɟɬɶɸ. 2. ȼɵɱɢɫɥɹɬɶ ɩɪɨɢɡɜɨɞɧɵɟ ɷɬɨɣ ɨɰɟɧɤɢ ɩɨ ɜɵɯɨɞɧɵɦ ɫɢɝɧɚɥɚɦ ɫɟɬɢ. Ʉɪɨɦɟ ɨɰɟɧɨɤ, ɜ ɩɟɪɜɨɦ ɪɚɡɞɟɥɟ ɷɬɨɣ ɝɥɚɜɵ ɪɚɫɫɦɨɬɪɟɧ ɞɪɭɝɨɣ, ɬɟɫɧɨ ɫɜɹɡɚɧɧɵɣ ɫ ɧɟɣ ɨɛɴɟɤɬ ɢɧɬɟɪɩɪɟɬɚɬɨɪ ɨɬɜɟɬɚ. Ɉɫɧɨɜɧɨɟ ɧɚɡɧɚɱɟɧɢɟ ɷɬɨɝɨ ɨɛɴɟɤɬɚ - ɢɧɬɟɪɩɪɟɬɢɪɨɜɚɬɶ ɜɵɯɨɞɧɨɣ ɜɟɤɬɨɪ ɫɟɬɢ ɤɚɤ ɨɬɜɟɬ, ɩɨɧɹɬɧɵɣ ɩɨɥɶɡɨɜɚɬɟɥɸ. Ɉɞɧɚɤɨ, ɩɪɢ ɨɩɪɟɞɟɥɟɧɧɨɦ ɩɨɫɬɪɨɟɧɢɢ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ ɢ ɩɪɚɜɢɥɶɧɨ ɩɨɫɬɪɨɟɧɧɨɣ ɩɨ ɧɟɦɭ ɨɰɟɧɤɟ, ɢɧɬɟɪɩɪɟɬɚɬɨɪ ɨɬɜɟɬɚ ɦɨɠɟɬ ɬɚɤɠɟ ɨɰɟɧɢɜɚɬɶ ɭɪɨɜɟɧɶ ɭɜɟɪɟɧɧɨɫɬɢ ɫɟɬɢ ɜ ɜɵɞɚɧɧɨɦ ɨɬɜɟɬɟ.
6.1 ɂɧɬɟɪɩɪɟɬɚɬɨɪ ɨɬɜɟɬɚ Ʉɚɤ ɛɵɥɨ ɩɨɤɚɡɚɧɨ ɜ ɝɥɚɜɟ «Ɉɩɢɫɚɧɢɟ ɧɟɣɪɨɧɧɵɯ ɫɟɬɟɣ», ɨɬɜɟɬ, ɜɵɞɚɜɚɟɦɵɣ ɧɟɣɪɨɧɧɨɣ ɫɟɬɶɸ, ɤɚɤ ɩɪɚɜɢɥɨ, ɹɜɥɹɟɬɫɹ ɱɢɫɥɨɦ, ɢɡ ɞɢɚɩɚɡɨɧɚ
[ a , b] . ȿɫɥɢ ɨɬɜɟɬ ɜɵɞɚɟɬɫɹ ɧɟɫɤɨɥɶɤɢɦɢ ɧɟɣɪɨɧɚɦɢ, ɬɨ ɧɚ [ a , b] . ȿɫɥɢ ɜ ɤɚɱɟɫɬɜɟ
ɜɵɯɨɞɟ ɫɟɬɢ ɦɵ ɢɦɟɟɦ ɜɟɤɬɨɪ, ɤɚɠɞɵɣ ɤɨɦɩɨɧɟɧɬ ɤɨɬɨɪɨɝɨ ɥɟɠɢɬ ɜ ɢɧɬɟɪɜɚɥɟ
ɨɬɜɟɬɚ ɬɪɟɛɭɟɬɫɹ ɱɢɫɥɨ ɢɡ ɷɬɨɝɨ ɞɢɚɩɚɡɨɧɚ, ɬɨ ɦɵ ɦɨɠɟɦ ɟɝɨ ɩɨɥɭɱɢɬɶ. Ɉɞɧɚɤɨ, ɜ ɛɨɥɶɲɢɧɫɬɜɟ ɫɥɭɱɚɟɜ ɷɬɨ ɧɟ ɬɚɤ. Ⱦɨɫɬɚɬɨɱɧɨ ɱɚɫɬɨ ɬɪɟɛɭɟɦɚɹ ɜ ɤɚɱɟɫɬɜɟ ɨɬɜɟɬɚ ɜɟɥɢɱɢɧɚ ɥɟɠɢɬ ɜ ɞɪɭɝɨɦ ɞɢɚɩɚɡɨɧɟ. ɇɚɩɪɢɦɟɪ, ɩɪɢ ɩɪɟɞɫɤɚɡɚɧɢɢ ɬɟɦɩɟɪɚɬɭɪɵ ɜɨɡɞɭɯɚ 25 ɢɸɧɹ ɜ Ʉɪɚɫɧɨɹɪɫɤɟ ɨɬɜɟɬ ɞɨɥɠɟɧ ɥɟɠɚɬɶ ɜ ɢɧɬɟɪɜɚɥɟ ɨɬ 5 ɞɨ 35 ɝɪɚɞɭɫɨɜ ɐɟɥɶɫɢɹ. ɋɟɬɶ ɧɟ ɦɨɠɟɬ ɞɚɬɶ ɧɚ ɜɵɯɨɞɟ ɬɚɤɨɝɨ ɫɢɝɧɚɥɚ. Ɂɧɚɱɢɬ, ɩɪɟɠɞɟ ɱɟɦ ɨɛɭɱɚɬɶ ɫɟɬɶ ɧɟɨɛɯɨɞɢɦɨ ɪɟɲɢɬɶ ɜ ɤɚɤɨɦ ɜɢɞɟ ɛɭɞɟɦ ɬɪɟɛɨɜɚɬɶ ɨɬɜɟɬ. ȼ ɞɚɧɧɨɦ ɫɥɭɱɚɟ ɨɬɜɟɬ ɦɨɠɧɨ ɬɪɟɛɨɜɚɬɶ ɜ ɜɢɞɟ a = ( b - a)(T - T min ) / (T max - T min ) + a , ɝɞɟ T - ɬɪɟɛɭɟɦɚɹ ɬɟɦɩɟɪɚɬɭɪɚ, Tmin ɢ Tmax ɦɢɧɢɦɚɥɶɧɚɹ ɢ ɦɚɤɫɢɦɚɥɶɧɚɹ ɬɟɦɩɟɪɚɬɭɪɵ, a - ɨɬɜɟɬ, ɤɨɬɨɪɵɣ ɛɭɞɟɦ ɬɪɟɛɨɜɚɬɶ ɨɬ ɫɟɬɢ. ɉɪɢ ɢɧɬɟɪɩɪɟɬɚɰɢɢ ɨɬɜɟɬɚ ɧɟɨɛɯɨɞɢɦɨ ɩɪɨɞɟɥɚɬɶ ɨɛɪɚɬɧɨɟ ɩɪɟɨɛɪɚɡɨɜɚɧɢɟ. ȿɫɥɢ ɫɟɬɶ ɜɵɞɚɥɚ ɫɢɝɧɚɥ a, ɬɨ ɨɬɜɟɬɨɦ ɹɜɥɹɟɬɫɹ ɜɟɥɢɱɢɧɚ T = (a - a)(T max - T min ) / (b - a) + T min . Ɍɚɤɢɦ ɨɛɪɚɡɨɦ, ɦɨɠɧɨ ɢɧɬɟɪɩɪɟɬɢɪɨɜɚɬɶ ɜɵɞɚɜɚɟɦɵɣ ɫɟɬɶɸ ɫɢɝɧɚɥ, ɤɚɤ ɜɟɥɢɱɢɧɭ ɢɡ ɥɸɛɨɝɨ, ɧɚɩɟɪɟɞ ɡɚɞɚɧɧɨɝɨ ɞɢɚɩɚɡɨɧɚ. ȿɫɥɢ ɩɪɢ ɫɨɫɬɚɜɥɟɧɢɢ ɨɛɭɱɚɸɳɟɝɨ ɦɧɨɠɟɫɬɜɚ ɨɬɜɟɬ ɧɚ ɩɪɢɦɟɪɵ ɨɩɪɟɞɟɥɹɥɫɹ ɫ ɧɟɤɨɬɨɪɨɣ ɩɨɝɪɟɲɧɨɫɬɶɸ, ɬɨ ɨɬ ɫɟɬɢ ɫɥɟɞɭɟɬ ɬɪɟɛɨɜɚɬɶ ɧɟ ɬɨɱɧɨɝɨ ɜɨɫɩɪɨɢɡɜɟɞɟɧɢɹ ɨɬɜɟɬɚ, ɚ ɩɨɩɚɞɚɧɢɹ ɜ ɢɧɬɟɪɜɚɥ ɡɚɞɚɧɧɨɣ ɲɢɪɢɧɵ. ȼ ɷɬɨɦ ɫɥɭɱɚɟ ɢɧɬɟɪɩɪɟɬɚɬɨɪ ɨɬɜɟɬɚ ɦɨɠɟɬ ɜɵɞɚɬɶ ɫɨɨɛɳɟɧɢɟ ɨ ɩɪɚɜɢɥɶɧɨɫɬɢ (ɩɨɩɚɞɚɧɢɢ ɜ ɢɧɬɟɪɜɚɥ) ɨɬɜɟɬɚ. Ⱦɪɭɝɢɦ, ɱɚɫɬɨ ɜɫɬɪɟɱɚɸɳɢɦɫɹ ɫɥɭɱɚɟɦ, ɹɜɥɹɟɬɫɹ ɩɪɟɞɫɤɚɡɚɧɢɟ ɫɟɬɶɸ ɩɪɢɧɚɞɥɟɠɧɨɫɬɢ ɜɯɨɞɧɨɝɨ ɜɟɤɬɨɪɚ ɨɞɧɨɦɭ ɢɡ ɡɚɞɚɧɧɵɯ ɤɥɚɫɫɨɜ. Ɍɚɤɢɟ ɡɚɞɚɱɢ ɧɚɡɵɜɚɸɬ ɡɚɞɚɱɚɦɢ ɤɥɚɫɫɢɮɢɤɚɰɢɢ, ɚ ɪɟɲɚɸɳɢɟ ɢɯ ɫɟɬɢ - ɤɥɚɫɫɢɮɢɤɚɬɨɪɚɦɢ. ȼ ɩɪɨɫɬɟɣɲɟɦ ɫɥɭɱɚɟ ɡɚɞɚɱɚ ɤɥɚɫɫɢɮɢɤɚɰɢɢ ɫɬɚɜɢɬɫɹ ɫɥɟɞɭɸɳɢɦ ɨɛɪɚɡɨɦ: ɩɭɫɬɶ ɡɚɞɚɧɨ N ɤɥɚɫɫɨɜ. Ɍɨɝɞɚ ɧɟɣɪɨɫɟɬɶ ɜɵɞɚɟɬ ɜɟɤɬɨɪ ɢɡ N ɫɢɝɧɚɥɨɜ. Ɉɞɧɚɤɨ, ɧɟɬ ɟɞɢɧɨɝɨ ɭɧɢɜɟɪɫɚɥɶɧɨɝɨ ɩɪɚɜɢɥɚ ɢɧɬɟɪɩɪɟɬɚɰɢɢ ɷɬɨɝɨ ɜɟɤɬɨɪɚ. ɇɚɢɛɨɥɟɟ ɱɚɫɬɨ ɢɫɩɨɥɶɡɭɟɬɫɹ ɢɧɬɟɪɩɪɟɬɚɰɢɹ ɩɨ ɦɚɤɫɢɦɭɦɭ: ɧɨɦɟɪ ɧɟɣɪɨɧɚ, ɜɵɞɚɜɲɟɝɨ ɦɚɤɫɢɦɚɥɶɧɵɣ ɩɨ ɜɟɥɢɱɢɧɟ ɫɢɝɧɚɥ, ɹɜɥɹɟɬɫɹ ɧɨɦɟɪɨɦ ɤɥɚɫɫɚ, ɤ ɤɨɬɨɪɨɦɭ ɨɬɧɨɫɢɬɫɹ ɩɪɟɞɴɹɜɥɟɧɧɵɣ ɫɟɬɢ ɜɯɨɞɧɨɣ ɜɟɤɬɨɪ. Ɍɚɤɢɟ ɢɧɬɟɪɩɪɟɬɚɬɨɪɵ ɨɬɜɟɬɚ ɧɚɡɵɜɚɸɬɫɹ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚɦɢ, ɤɨɞɢɪɭɸɳɢɦɢ ɨɬɜɟɬ ɧɨɦɟɪɨɦ ɤɚɧɚɥɚ (ɧɨɦɟɪ ɧɟɣɪɨɧɚ - ɧɨɦɟɪ ɤɥɚɫɫɚ). ȼɫɟ ɢɧɬɟɪɩɪɟɬɚɬɨɪɵ, ɢɫɩɨɥɶɡɭɸɳɢɟ ɤɨɞɢɪɨɜɚɧɢɟ ɧɨɦɟɪɨɦ ɤɚɧɚɥɚ, ɢɦɟɸɬ ɨɞɢɧ ɛɨɥɶɲɨɣ ɧɟɞɨɫɬɚɬɨɤ - ɞɥɹ ɤɥɚɫɫɢɮɢɤɚɰɢɢ ɧɚ N ɤɥɚɫɫɨɜ ɬɪɟɛɭɟɬɫɹ N ɜɵɯɨɞɧɵɯ ɧɟɣɪɨɧɨɜ. ɉɪɢ ɛɨɥɶɲɨɦ N ɬɪɟɛɭɟɬɫɹ ɦɧɨɝɨ ɜɵɯɨɞɧɵɯ ɧɟɣɪɨɧɨɜ ɞɥɹ ɩɨɥɭɱɟɧɢɹ ɨɬɜɟɬɚ. Ɉɞɧɚɤɨ ɫɭɳɟɫɬɜɭɸɬ ɢ ɞɪɭɝɢɟ ɜɢɞɵ ɢɧɬɟɪɩɪɟɬɚɬɨɪɨɜ. Ⱦɜɨɢɱɧɵɣ ɢɧɬɟɪɩɪɟɬɚɬɨɪ . Ɉɫɧɨɜɧɚɹ ɢɞɟɹ ɞɜɨɢɱɧɨɝɨ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ - ɩɨɥɭɱɟɧɢɟ ɧɚ ɜɵɯɨɞɟ ɧɟɣɪɨɧɧɨɣ ɫɟɬɢ ɞɜɨɢɱɧɨɝɨ ɤɨɞɚ ɧɨɦɟɪɚ ɤɥɚɫɫɚ. ɗɬɨ ɞɨɫɬɢɝɚɟɬɫɹ ɞɜɭɯɷɬɚɩɧɨɣ ɢɧɬɟɪɩɪɟɬɚɰɢɟɣ: 1. Ʉɚɠɞɵɣ ɜɵɯɨɞɧɨɣ ɫɢɝɧɚɥ ɧɟɣɪɨɧɧɨɣ ɫɟɬɢ ɢɧɬɟɪɩɪɟɬɢɪɭɟɬɫɹ ɤɚɤ 1, ɟɫɥɢ ɨɧ ɛɨɥɶɲɟ ( a + b ) / 2 , ɢ ɤɚɤ 0 ɜ ɩɪɨɬɢɜɧɨɦ ɫɥɭɱɚɟ. 2. ɉɨɥɭɱɟɧɧɚɹ ɩɨɫɥɟɞɨɜɚɬɟɥɶɧɨɫɬɶ ɧɭɥɟɣ ɢ ɟɞɢɧɢɰ ɢɧɬɟɪɩɪɟɬɢɪɭɟɬɫɹ ɤɚɤ ɞɜɨɢɱɧɨɟ ɱɢɫɥɨ. Ⱦɜɨɢɱɧɵɣ ɢɧɬɟɪɩɪɟɬɚɬɨɪ ɩɨɡɜɨɥɹɟɬ ɢɧɬɟɪɩɪɟɬɢɪɨɜɚɬɶ N ɜɵɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ ɧɟɣɪɨɧɧɨɣ ɫɟɬɢ ɤɚɤ ɧɨɦɟɪ ɨɞɧɨɝɨ ɢɡ 2N ɤɥɚɫɫɨɜ. ɉɨɪɹɞɤɨɜɵɣ ɢɧɬɟɪɩɪɟɬɚɬɨɪ . ɉɨɪɹɞɤɨɜɵɣ ɢɧɬɟɪɩɪɟɬɚɬɨɪ ɤɨɞɢɪɭɟɬ ɧɨɦɟɪ ɤɥɚɫɫɚ ɩɨɞɫɬɚɧɨɜɤɨɣ. Ɉɬɫɨɪɬɢɪɭɟɦ ɜɟɤɬɨɪ ɜɵɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ ɩɨ ɜɨɡɪɚɫɬɚɧɢɸ. ȼɟɤɬɨɪ, ɫɨɫɬɚɜɥɟɧɧɵɣ ɢɡ ɧɨɦɟɪɨɜ ɧɟɣɪɨɧɨɜ ɩɨɫɥɟɞɨɜɚɬɟɥɶɧɨ ɪɚɫɩɨɥɨɠɟɧɧɵɯ ɜ ɨɬɫɨɪɬɢɪɨɜɚɧɧɨɦ ɜɟɤɬɨɪɟ ɜɵɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ, ɛɭɞɟɬ ɩɨɞɫɬɚɧɨɜ-
CHAP6.DOC
112
ɤɨɣ. ȿɫɥɢ ɤɚɠɞɨɣ ɩɨɞɫɬɚɧɨɜɤɟ ɩɪɢɩɢɫɚɬɶ ɧɨɦɟɪ ɤɥɚɫɫɚ, ɬɨ ɬɚɤɨɣ ɢɧɬɟɪɩɪɟɬɚɬɨɪ ɦɨɠɟɬ ɡɚɤɨɞɢɪɨɜɚɬɶ N! ɤɥɚɫɫɨɜ ɢɫɩɨɥɶɡɭɹ N ɜɵɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ.
6.2 ɍɪɨɜɟɧɶ ɭɜɟɪɟɧɧɨɫɬɢ ɑɚɫɬɨ ɩɪɢ ɪɟɲɟɧɢɢ ɡɚɞɚɱ ɤɥɚɫɫɢɮɢɤɚɰɢɢ ɫ ɢɫɩɨɥɶɡɨɜɚɧɢɟɦ ɧɟɣɪɨɧɧɵɯ ɫɟɬɟɣ ɧɟɞɨɫɬɚɬɨɱɧɨ ɩɪɨɫɬɨɝɨ ɨɬɜɟɬɚ «ɜɯɨɞɧɨɣ ɜɟɤɬɨɪ ɩɪɢɧɚɞɥɟɠɢɬ K-ɦɭ ɤɥɚɫɫɭ». ɏɨɬɟɥɨɫɶ ɛɵ ɬɚɤɠɟ ɨɰɟɧɢɬɶ ɭɪɨɜɟɧɶ ɭɜɟɪɟɧɧɨɫɬɢ ɜ ɷɬɨɦ ɨɬɜɟɬɟ. Ⱦɥɹ ɪɚɡɥɢɱɧɵɯ ɢɧɬɟɪɩɪɟɬɚɬɨɪɨɜ ɜɨɩɪɨɫ ɨɩɪɟɞɟɥɟɧɢɹ ɭɪɨɜɧɹ ɭɜɟɪɟɧɧɨɫɬɢ ɪɟɲɚɟɬɫɹ ɩɨɪɚɡɧɨɦɭ. Ɉɞɧɚɤɨ, ɧɟɨɛɯɨɞɢɦɨ ɭɱɟɫɬɶ, ɱɬɨ ɨɬ ɧɟɣɪɨɧɧɨɣ ɫɟɬɢ ɧɟɥɶɡɹ ɬɪɟɛɨɜɚɬɶ ɛɨɥɶɲɟ ɬɨɝɨ, ɱɟɦɭ ɟɟ ɨɛɭɱɢɥɢ. ȼ ɷɬɨɦ ɪɚɡɞɟɥɟ ɛɭɞɟɬ ɪɚɫɫɦɨɬɪɟɧ ɜɨɩɪɨɫ ɨɛ ɨɩɪɟɞɟɥɟɧɢɢ ɭɪɨɜɧɹ ɭɜɟɪɟɧɧɨɫɬɢ ɞɥɹ ɧɟɫɤɨɥɶɤɢɯ ɢɧɬɟɪɩɪɟɬɚɬɨɪɨɜ, ɚ ɜ ɫɥɟɞɭɸɳɟɦ ɛɭɞɟɬ ɩɨɤɚɡɚɧɨ, ɤɚɤ ɩɨɫɬɪɨɢɬɶ ɨɰɟɧɤɭ ɬɚɤ, ɱɬɨɛɵ ɧɟɣɪɨɧɧɚɹ ɫɟɬɶ ɩɨɡɜɨɥɹɥɚ ɟɝɨ ɨɩɪɟɞɟɥɢɬɶ. 1. Ʉɨɞɢɪɨɜɚɧɢɟ ɧɨɦɟɪɨɦ ɤɚɧɚɥɚ. Ɂɧɚɤɨɜɵɣ ɢɧɬɟɪɩɪɟɬɚɬɨɪ. Ɂɧɚɤɨɜɵɣ ɢɧɬɟɪɩɪɟɬɚɬɨɪ ɪɚɛɨɬɚɟɬ ɜ ɞɜɚ ɷɬɚɩɚ. 1. Ʉɚɠɞɵɣ ɜɵɯɨɞɧɨɣ ɫɢɝɧɚɥ ɧɟɣɪɨɧɧɨɣ ɫɟɬɢ ɢɧɬɟɪɩɪɟɬɢɪɭɟɬɫɹ ɤɚɤ 1, ɟɫɥɢ ɨɧ ɛɨɥɶɲɟ ( a + b ) / 2 , ɢ ɤɚɤ 0 ɜ ɩɪɨɬɢɜɧɨɦ ɫɥɭɱɚɟ. 2. ȿɫɥɢ ɜ ɩɨɥɭɱɟɧɧɨɦ ɜɟɤɬɨɪɟ ɬɨɥɶɤɨ ɨɞɧɚ ɟɞɢɧɢɰɚ, ɬɨ ɧɨɦɟɪɨɦ ɤɥɚɫɫɚ ɫɱɢɬɚɟɬɫɹ ɧɨɦɟɪ ɧɟɣɪɨɧɚ, ɫɢɝɧɚɥ ɤɨɬɨɪɨɝɨ ɢɧɬɟɪɩɪɟɬɢɪɨɜɚɧ ɤɚɤ 1. ȼ ɩɪɨɬɢɜɧɨɦ ɫɥɭɱɚɟ ɨɬɜɟɬɨɦ ɫɱɢɬɚɟɬɫɹ ɧɟɨɩɪɟɞɟɥɟɧɧɵɣ ɧɨɦɟɪ ɤɥɚɫɫɚ (ɨɬɜɟɬ «ɧɟ ɡɧɚɸ»). Ⱦɥɹ ɬɨɝɨ ɱɬɨɛɵ ɜɜɟɫɬɢ ɭɪɨɜɟɧɶ ɭɜɟɪɟɧɧɨɫɬɢ ɞɥɹ ɷɬɨɝɨ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ ɩɨɬɪɟɛɭɟɦ, ɱɬɨɛɵ ɩɪɢ ɨɛɭɱɟɧɢɢ ɫɟɬɢ ɞɥɹ ɜɫɟɯ ɩɪɢɦɟɪɨɜ ɛɵɥɨ ɜɟɪɧɨ ɧɟɪɚɜɟɧɫɬɜɨ: a i -
( a + b) / 2 £ e , ɝɞɟ i = 1,K , N ; a i
- i-ɵɣ ɜɵɯɨɞɧɨɣ ɫɢɝɧɚɥ. e - ɭɪɨɜɟɧɶ ɧɚɞɟɠɧɨɫɬɢ (ɧɚɫɤɨɥɶɤɨ ɫɢɥɶɧɨ ɫɢɝɧɚɥɵ ɞɨɥɠɧɵ ɛɵɬɶ ɨɬɞɟɥɟɧɵ ɨɬ ( a + b ) / 2 ɩɪɢ ɨɛɭɱɟɧɢɢ). ȼ ɷɬɨɦ ɫɥɭɱɚɟ ɭɪɨɜɟɧɶ ɭɜɟɪɟɧɧɨɫɬɢ R ɨɩɪɟɞɟɥɹɟɬɫɹ ɫɥɟɞɭɸɳɢɦ ɨɛɪɚɡɨɦ:
a i - (a + b) / 2 ïü ïì R = miní1: min ý . Ɍɚɤɢɦ ɨɛɪɚɡɨɦ, ɩɪɢ ɨɩɪɟɞɟɥɟɧɧɨɦ ɨɬɜɟɬɟ ɭɪɨɜɟɧɶ ɭɜɟɪɟɧɧɨɫɬɢ e ïî ïþ
ɩɨɤɚɡɵɜɚɟɬ, ɧɚɫɤɨɥɶɤɨ ɨɬɜɟɬ ɞɚɥɟɤ ɨɬ ɧɟɨɩɪɟɞɟɥɟɧɧɨɝɨ, ɚ ɜ ɫɥɭɱɚɟ ɧɟɨɩɪɟɞɟɥɟɧɧɨɝɨ ɨɬɜɟɬɚ - ɧɚɫɤɨɥɶɤɨ ɨɧ ɞɚɥɟɤ ɨɬ ɨɩɪɟɞɟɥɟɧɧɨɝɨ. 2. Ʉɨɞɢɪɨɜɚɧɢɟ ɧɨɦɟɪɨɦ ɤɚɧɚɥɚ. Ɇɚɤɫɢɦɚɥɶɧɵɣ ɢɧɬɟɪɩɪɟɬɚɬɨɪ. Ɇɚɤɫɢɦɚɥɶɧɵɣ ɢɧɬɟɪɩɪɟɬɚɬɨɪ ɜ ɤɚɱɟɫɬɜɟ ɧɨɦɟɪɚ ɤɥɚɫɫɚ ɜɵɞɚɟɬ ɧɨɦɟɪ ɧɟɣɪɨɧɚ, ɜɵɞɚɜɲɟɝɨ ɦɚɤɫɢɦɚɥɶɧɵɣ ɫɢɝɧɚɥ. Ⱦɥɹ ɬɚɤɨɝɨ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ ɜ ɤɚɱɟɫɬɜɟ ɭɪɨɜɧɹ ɭɜɟɪɟɧɧɨɫɬɢ ɟɫɬɟɫɬɜɟɧɧɨ ɢɫɩɨɥɶɡɨɜɚɬɶ ɧɟɤɨɬɨɪɭɸ ɮɭɧɤɰɢɸ ɨɬ ɪɚɡɧɨɫɬɢ ɦɟɠɞɭ ɦɚɤɫɢɦɚɥɶɧɵɦ ɢ ɜɬɨɪɵɦ ɩɨ ɜɟɥɢɱɢɧɟ ɫɢɝɧɚɥɚɦɢ. Ⱦɥɹ ɷɬɨɝɨ ɩɨɬɪɟɛɭɟɦ, ɱɬɨɛɵ ɩɪɢ ɨɛɭɱɟɧɢɢ ɞɥɹ ɜɫɟɯ ɩɪɢɦɟɪɨɜ ɨɛɭɱɚɸɳɟɝɨ ɦɧɨɠɟɫɬɜɚ ɪɚɡɧɨɫɬɶ ɦɟɠɞɭ ɦɚɤɫɢɦɚɥɶɧɵɦ ɢ ɜɬɨɪɵɦ ɩɨ ɜɟɥɢɱɢɧɟ ɫɢɝɧɚɥɚɦɢ ɛɵɥɚ ɧɟ ɦɟɧɶɲɟ ɭɪɨɜɧɹ ɧɚɞɟɠɧɨɫɬɢ e. ȼ ɷɬɨɦ ɫɥɭɱɚɟ ɭɪɨɜɟɧɶ ɭɜɟɪɟɧɧɨɫɬɢ ɜɵɱɢɫɥɹɟɬɫɹ ɩɨ ɫɥɟɞɭɸ-
{
}
ɳɟɣ ɮɨɪɦɭɥɟ: R = max 1:(a i - a j ) e , ɝɞɟ
ɥɵ.
a i - ɦɚɤɫɢɦɚɥɶɧɵɣ, ɚ a j - ɜɬɨɪɨɣ ɩɨ ɜɟɥɢɱɢɧɟ ɫɢɝɧɚ-
3. Ⱦɜɨɢɱɧɵɣ ɢɧɬɟɪɩɪɟɬɚɬɨɪ. ɍɪɨɜɟɧɶ ɧɚɞɟɠɧɨɫɬɢ ɞɥɹ ɞɜɨɢɱɧɨɝɨ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ ɜɜɨɞɢɬɫɹ ɬɚɤ ɠɟ, ɤɚɤ ɢ ɞɥɹ ɡɧɚɤɨɜɨɝɨ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ ɩɪɢ ɤɨɞɢɪɨɜɚɧɢɢ ɧɨɦɟɪɨɦ ɤɚɧɚɥɚ. 4. ɉɨɪɹɞɤɨɜɵɣ ɢɧɬɟɪɩɪɟɬɚɬɨɪ. ɉɪɢ ɢɫɩɨɥɶɡɨɜɚɧɢɢ ɩɨɪɹɞɤɨɜɨɝɨ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ ɜ ɤɚɱɟɫɬɜɟ ɭɪɨɜɧɹ ɭɜɟɪɟɧɧɨɫɬɢ ɟɫɬɟɫɬɜɟɧɧɨ ɛɪɚɬɶ ɮɭɧɤɰɢɸ ɨɬ ɪɚɡɧɨɫɬɢ ɞɜɭɯ ɫɨɫɟɞɧɢɯ ɫɢɝɧɚɥɨɜ ɜ ɭɩɨɪɹɞɨɱɟɧɧɨɦ ɩɨ ɜɨɡɪɚɫɬɚɧɢɸ ɜɟɤɬɨɪɟ ɜɵɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ. Ⱦɥɹ ɷɬɨɝɨ ɩɨɬɪɟɛɭɟɦ, ɱɬɨɛɵ ɩɪɢ ɨɛɭɱɟɧɢɢ ɞɥɹ ɜɫɟɯ ɩɪɢɦɟɪɨɜ ɨɛɭɱɚɸɳɟɝɨ ɦɧɨɠɟɫɬɜɚ ɜ ɭɩɨɪɹɞɨɱɟɧɧɨɦ ɩɨ ɜɨɡɪɚɫɬɚɧɢɸ ɜɟɤɬɨɪɟ ɜɵɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ ɪɚɡɧɨɫɬɶ ɦɟɠɞɭ ɞɜɭɦɹ ɫɨɫɟɞɧɢɦɢ ɷɥɟɦɟɧɬɚɦɢ ɛɵɥɚ ɧɟ ɦɟɧɶɲɟ ɭɪɨɜɧɹ ɧɚɞɟɠɧɨɫɬɢ e. ȼ ɷɬɨɦ ɫɥɭɱɚɟ ɭɪɨɜɟɧɶ ɭɜɟɪɟɧɧɨ-
{ (
ɫɬɢ ɦɨɠɧɨ ɜɵɱɢɫɥɢɬɶ ɩɨ ɮɨɪɦɭɥɟ R = min 1; a i +1 - a i i
) e } , ɩɪɢɱɟɦ ɜɟɤɬɨɪ ɜɵɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ
ɩɪɟɞɩɨɥɚɝɚɟɬɫɹ ɨɬɫɨɪɬɢɪɨɜɚɧɧɵɦ ɩɨ ɜɨɡɪɚɫɬɚɧɢɸ. ȼ ɡɚɤɥɸɱɟɧɢɟ ɡɚɦɟɬɢɦ, ɱɬɨ ɞɥɹ ɨɬɜɟɬɚ ɬɢɩɚ ɱɢɫɥɨ, ɜɜɟɫɬɢ ɭɪɨɜɟɧɶ ɭɜɟɪɟɧɧɨɫɬɢ ɩɨɞɨɛɧɵɦ ɨɛɪɚɡɨɦ ɧɟɜɨɡɦɨɠɧɨ. ɉɨɠɚɥɭɣ, ɟɞɢɧɫɬɜɟɧɧɵɦ ɫɩɨɫɨɛɨɦ ɨɰɟɧɤɢ ɞɨɫɬɨɜɟɪɧɨɫɬɢ ɪɟɡɭɥɶɬɚɬɚ ɹɜɥɹɟɬɫɹ ɤɨɧɫɢɥɢɭɦ ɧɟɫɤɨɥɶɤɢɯ ɫɟɬɟɣ - ɟɫɥɢ ɧɟɫɤɨɥɶɤɨ ɫɟɬɟɣ ɨɛɭɱɟɧɵ ɪɟɲɟɧɢɸ ɨɞɧɨɣ ɢ ɬɨɣ ɠɟ ɡɚɞɚɱɢ, ɬɨ ɜ ɤɚɱɟɫɬɜɟ ɨɬɜɟɬɚ ɦɨɠɧɨ ɜɵɛɪɚɬɶ ɫɪɟɞɧɟɟ ɡɧɚɱɟɧɢɟ, ɚ ɩɨ ɨɬɤɥɨɧɟɧɢɸ ɨɬɜɟɬɨɜ ɨɬ ɫɪɟɞɧɟɝɨ ɦɨɠɧɨ ɨɰɟɧɢɬɶ ɞɨɫɬɨɜɟɪɧɨɫɬɶ ɪɟɡɭɥɶɬɚɬɚ.
6.3 ɉɨɫɬɪɨɟɧɢɟ ɨɰɟɧɤɢ ɩɨ ɢɧɬɟɪɩɪɟɬɚɬɨɪɭ ȿɫɥɢ ɜ ɤɚɱɟɫɬɜɟ ɨɬɜɟɬɚ ɧɟɣɪɨɧɧɚɹ ɫɟɬɶ ɞɨɥɠɧɚ ɜɵɞɚɬɶ ɱɢɫɥɨ, ɬɨ ɟɫɬɟɫɬɜɟɧɧɨɣ ɨɰɟɧɤɨɣ ɹɜɥɹɟɬɫɹ ɤɜɚɞɪɚɬ ɪɚɡɧɨɫɬɢ ɜɵɞɚɧɧɨɝɨ ɫɟɬɶɸ ɜɵɯɨɞɧɨɝɨ ɫɢɝɧɚɥɚ ɢ ɩɪɚɜɢɥɶɧɨɝɨ ɨɬɜɟɬɚ. ȼɫɟ ɨɫɬɚɥɶɧɵɟ ɨɰɟɧɤɢ ɞɥɹ ɨɛɭɱɟɧɢɹ ɫɟɬɟɣ ɪɟɲɟɧɢɸ ɬɚɤɢɯ ɡɚɞɚɱ ɹɜɥɹɸɬɫɹ ɦɨɞɢɮɢɤɚɰɢɹɦɢ ɞɚɧɧɨɣ. ɉɪɢɜɟɞɟɦ ɩɪɢɦɟɪ ɬɚɤɨɣ ɦɨɞɢ-
CHAP6.DOC
113
ɮɢɤɚɰɢɢ. ɉɭɫɬɶ ɩɪɢ ɫɨɫɬɚɜɥɟɧɢɢ ɡɚɞɚɱɧɢɤɚ ɜɟɥɢɱɢɧɚ a , ɹɜɥɹɸɳɚɹɫɹ ɨɬɜɟɬɨɦ, ɢɡɦɟɪɹɥɚɫɶ ɫ ɧɟɤɨɬɨɪɨɣ ɬɨɱɧɨɫɬɶɸ e. Ɍɨɝɞɚ ɧɟɬ ɫɦɵɫɥɚ ɬɪɟɛɨɜɚɬɶ ɨɬ ɫɟɬɢ ɨɛɭɱɢɬɶɫɹ ɜɵɞɚɜɚɬɶ ɜ ɤɚɱɟɫɬɜɟ ɨɬɜɟɬɚ ɢɦɟɧɧɨ ɜɟɥɢɱɢɧɭ
a . Ⱦɨɫɬɚɬɨɱɧɨ, ɟɫɥɢ ɜɵɞɚɧɧɵɣ ɫɟɬɶɸ ɨɬɜɟɬ ɩɨɩɚɞɟɬ ɜ ɢɧɬɟɪɜɚɥ a - e , a + e . Ɉɰɟɧɤɚ, ɭɞɨɜɥɟɬɜɨ-
[
ɪɹɸɳɚɹ ɷɬɨɦɭ ɬɪɟɛɨɜɚɧɢɸ, ɢɦɟɟɬ ɜɢɞ:
]
ì0, ɩɪɢ a - a £ e , ï 2 ï H = í a - a - e , ɩɪɢ a > a + e , ï 2 ïî a - a + e , ɩɪɢ a < a - e . ɗɬɭ ɨɰɟɧɤɭ ɛɭɞɟɦ ɧɚɡɵɜɚɬɶ ɨɰɟɧɤɨɣ ɱɢɫɥɚ ɫ ɞɨɩɭɫɤɨɦ e.
( (
) )
Ⱦɥɹ ɡɚɞɚɱ ɤɥɚɫɫɢɮɢɤɚɰɢɢ ɬɚɤɠɟ ɦɨɠɧɨ ɩɨɥɶɡɨɜɚɬɶɫɹ ɨɰɟɧɤɨɣ ɬɢɩɚ ɫɭɦɦɵ ɤɜɚɞɪɚɬɨɜ ɨɬɤɥɨɧɟɧɢɣ ɜɵɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ ɫɟɬɢ ɨɬ ɬɪɟɛɭɟɦɵɯ ɨɬɜɟɬɨɜ. Ɉɞɧɚɤɨ, ɷɬɚ ɨɰɟɧɤɚ ɩɥɨɯɚ ɬɟɦ, ɱɬɨ ɜɨ-ɩɟɪɜɵɯ, ɬɪɟɛɨɜɚɧɢɹ ɩɪɢ ɨɛɭɱɟɧɢɢ ɫɟɬɢ ɧɟ ɫɨɜɩɚɞɚɸɬ ɫ ɬɪɟɛɨɜɚɧɢɹɦɢ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ, ɜɨ-ɜɬɨɪɵɯ - ɬɚɤɚɹ ɨɰɟɧɤɚ ɧɟ ɩɨɡɜɨɥɹɟɬ ɨɰɟɧɢɬɶ ɭɪɨɜɟɧɶ ɭɜɟɪɟɧɧɨɫɬɢ ɫɟɬɢ ɜ ɜɵɞɚɧɧɨɦ ɨɬɜɟɬɟ. Ⱦɨɫɬɨɢɧɫɬɜɨɦ ɬɚɤɨɣ ɨɰɟɧɤɢ ɹɜɥɹɟɬɫɹ ɟɟ ɭɧɢɜɟɪɫɚɥɶɧɨɫɬɶ. Ɉɩɵɬ ɪɚɛɨɬɵ ɫ ɧɟɣɪɨɧɧɵɦɢ ɫɟɬɹɦɢ, ɧɚɤɨɩɥɟɧɧɵɣ ɤɪɚɫɧɨɹɪɫɤɨɣ ɝɪɭɩɩɨɣ ɇɟɣɪɨɄɨɦɩ, ɫɜɢɞɟɬɟɥɶɫɬɜɭɟɬ ɨ ɬɨɦ, ɱɬɨ ɩɪɢ ɢɫɩɨɥɶɡɨɜɚɧɢɢ ɨɰɟɧɤɢ, ɩɨɫɬɪɨɟɧɧɨɣ ɩɨ ɢɧɬɟɪɩɪɟɬɚɬɨɪɭ, ɜ ɧɟɫɤɨɥɶɤɨ ɪɚɡ ɜɨɡɪɚɫɬɚɟɬ ɫɤɨɪɨɫɬɶ ɨɛɭɱɟɧɢɹ. Ɋɚɫɫɦɨɬɪɢɦ ɩɨɫɬɪɨɟɧɢɟ ɨɰɟɧɨɤ ɩɨ ɢɧɬɟɪɩɪɟɬɚɬɨɪɭ ɞɥɹ ɱɟɬɵɪɟɯ ɪɚɫɫɦɨɬɪɟɧɧɵɯ ɜ ɩɪɟɞɵɞɭɳɟɦ ɪɚɡɞɟɥɟ ɢɧɬɟɪɩɪɟɬɚɬɨɪɨɜ ɨɬɜɟɬɚ. 1. Ʉɨɞɢɪɨɜɚɧɢɟ ɧɨɦɟɪɨɦ ɤɚɧɚɥɚ. Ɂɧɚɤɨɜɵɣ ɢɧɬɟɪɩɪɟɬɚɬɨɪ. ɉɭɫɬɶ ɞɥɹ ɪɚɫɫɦɚɬɪɢɜɚɟɦɨɝɨ ɩɪɢɦɟɪɚ ɩɪɚɜɢɥɶɧɵɦ ɨɬɜɟɬɨɦ ɹɜɥɹɟɬɫɹ k-ɵɣ ɤɥɚɫɫ. Ɍɨɝɞɚ ɜɟɤɬɨɪ ɜɵɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ ɫɟɬɢ ɞɨɥɠɟɧ ɭɞɨɜɥɟɬɜɨɪɹɬɶ ɫɥɟɞɭɸɳɟɣ ɫɢɫɬɟɦɟ ɧɟɪɚɜɟɧɫɬɜ:
ìa i < ( a + b) / 2 - e , i ¹ k í îa k > ( a + b) / 2 + e ,
ɝɞɟ e- ɭɪɨɜɟɧɶ ɧɚɞɟɠɧɨɫɬɢ. Ɉɰɟɧɤɭ, ɜɵɱɢɫɥɹɸɳɭɸ ɪɚɫɫɬɨɹɧɢɟ ɨɬ ɬɨɱɤɢ a ɜ ɩɪɨɫɬɪɚɧɫɬɜɟ ɜɵɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ ɞɨ ɦɧɨɠɟɫɬɜɚ ɬɨɱɟɤ, ɭɞɨɜɥɟɬɜɨɪɹɸɳɢɯ ɷɬɨɣ ɫɢɫɬɟɦɟ ɧɟɪɚɜɟɧɫɬɜ, ɦɨɠɧɨ ɡɚɩɢɫɚɬɶ ɜ ɜɢɞɟ:
H = å (a i - (a + b) / 2 + e ) + (a k - (a + b) / 2 - e ) . 2
i¹k
ɉɪɨɢɡɜɨɞɧɚɹ ɨɰɟɧɤɢ ɩɨ i-ɦɭ ɜɵɯɨɞɧɨɦɭ ɫɢɝɧɚɥɭ ɪɚɜɧɚ
2
¶H ì 2(a i - (a + b) / 2 + e ), i ¹ k =í . ¶a i î 2(a k - (a + b) / 2 - e ).
2. Ʉɨɞɢɪɨɜɚɧɢɟ ɧɨɦɟɪɨɦ ɤɚɧɚɥɚ. Ɇɚɤɫɢɦɚɥɶɧɵɣ ɢɧɬɟɪɩɪɟɬɚɬɨɪ. ɉɭɫɬɶ ɞɥɹ ɪɚɫɫɦɚɬɪɢɜɚɟɦɨɝɨ ɩɪɢɦɟɪɚ ɩɪɚɜɢɥɶɧɵɦ ɨɬɜɟɬɨɦ ɹɜɥɹɟɬɫɹ k-ɵɣ ɤɥɚɫɫ. Ɍɨɝɞɚ ɜɟɤɬɨɪ ɜɵɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ ɫɟɬɢ ɞɨɥɠɟɧ ɭɞɨɜɥɟɬɜɨɪɹɬɶ ɫɥɟɞɭɸɳɟɣ ɫɢɫɬɟɦɟ ɧɟɪɚɜɟɧɫɬɜ: a k - e ³ a i , ɩɪɢ i ¹ k . Ɉɰɟɧɤɨɣ ɪɟɲɟɧɢɹ ɫɟɬɶɸ ɞɚɧ-
ɧɨɝɨ ɩɪɢɦɟɪɚ ɹɜɥɹɟɬɫɹ ɪɚɫɫɬɨɹɧɢɟ ɨɬ ɬɨɱɤɢ a ɜ ɩɪɨɫɬɪɚɧɫɬɜɟ ɜɵɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ ɞɨ ɦɧɨɠɟɫɬɜɚ ɬɨɱɟɤ, ɭɞɨɜɥɟɬɜɨɪɹɸɳɢɯ ɷɬɨɣ ɫɢɫɬɟɦɟ ɧɟɪɚɜɟɧɫɬɜ. Ⱦɥɹ ɡɚɩɢɫɢ ɨɰɟɧɤɢ, ɢɫɤɥɸɱɢɦ ɢɡ ɜɟɤɬɨɪɚ ɜɵɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ ɫɢɝɧɚɥ ak, ɚ ɨɫɬɚɥɶɧɵɟ ɫɢɝɧɚɥɵ ɨɬɫɨɪɬɢɪɭɟɦ ɩɨ ɭɛɵɜɚɧɢɸ. Ɉɛɨɡɧɚɱɢɦ ɜɟɥɢɱɢɧɭ ak-e ɱɟɪɟɡ b0, ɚ ɜɟɤɬɨɪ ɨɬɫɨɪɬɢɪɨɜɚɧɧɵɯ ɫɢɝɧɚɥɨɜ ɱɟɪɟɡ b 1 ³ b 2 ³K ³ b N -1 . ɋɢɫɬɟɦɚ ɧɟɪɚɜɟɧɫɬɜ ɜ ɷɬɨɦ ɫɥɭɱɚɟ ɩɪɢ-
b 0 ³ b i , ɩɪɢ i>1. Ɇɧɨɠɟɫɬɜɨ ɬɨɱɟɤ ɭɞɨɜɥɟɬɜɨɪɹɸɳɢɯ ɷɬɨɣ ɫɢɫɬɟɦɟ ɧɟɪɚɜɟɧɫɬɜ ɨɛɨɡɧɚb 0 ³ b 1 , ɬɨ ɬɨɱɤɚ b ɩɪɢɧɚɞɥɟɠɢɬ ɦɧɨɠɟɫɬɜɭ D. ȿɫɥɢ b 0 < b 1 , ɬɨ ɧɚɣɞɟɦ ɩɪɨɟɤɰɢɸ ɬɨɱɤɢ b ɧɚ ɝɢɩɟɪɩɥɨɫɤɨɫɬɶ b0=b1. ɗɬɚ ɬɨɱɤɚ ɢɦɟɟɬ ɤɨɨɪɞɢɧɚɬɵ b + b1 æ b + b1 b 0 + b1 ö b1 = ç 0 > b 2 , ɬɨ ɬɨɱɤɚ b 1 ɩɪɢɧɚɞɥɟɠɢɬ ɦɧɨɠɟ, , b 2 , K , b N -1 ÷ . ȿɫɥɢ 0 è ø 2 2 2 ɫɬɜɭ D. ȿɫɥɢ ɧɟɬ, ɬɨ ɬɨɱɤɭ b ɧɭɠɧɨ ɩɪɨɟɤɬɢɪɨɜɚɬɶ ɧɚ ɝɢɩɟɪɩɥɨɫɤɨɫɬɶ b 0 = b 1 = b 2 . ɇɚɣɞɟɦ ɷɬɭ ɬɨɱɨɛɪɟɬɚɟɬ ɜɢɞ
ɱɢɦ ɱɟɪɟɡ D. Ɉɱɟɜɢɞɧɨ, ɱɬɨ ɟɫɥɢ
(
)
ɤɭ. ȿɟ ɤɨɨɪɞɢɧɚɬɵ ɦɨɠɧɨ ɡɚɩɢɫɚɬɶ ɜ ɫɥɟɞɭɸɳɟɦ ɜɢɞɟ b, b, b, b 3 , K , b N -1 . ɗɬɚ ɬɨɱɤɚ ɨɛɥɚɞɚɟɬ ɬɟɦ
ɫɜɨɣɫɬɜɨɦ, ɱɬɨ ɪɚɫɫɬɨɹɧɢɟ ɨɬ ɧɟɟ ɞɨ ɬɨɱɤɢ b ɦɢɧɢɦɚɥɶɧɨ. Ɍɚɤɢɦ ɨɛɪɚɡɨɦ, ɞɥɹ ɧɚɯɨɠɞɟɧɢɹ ɜɟɥɢɱɢɧɵ b ɞɨɫɬɚɬɨɱɧɨ ɜɡɹɬɶ ɩɪɨɢɡɜɨɞɧɭɸ ɨɬ ɪɚɫɫɬɨɹɧɢɹ ɩɨ b ɢ ɩɪɢɪɚɜɧɹɬɶ ɟɟ ɤ ɧɭɥɸ:
CHAP6.DOC
114
(
)
d (b - b 0 ) 2 + (b - b 1 ) 2 + (b - b 2 ) 2 = 2((b - b 0 ) + (b - b 1 ) + (b - b 2 )) = db = 3b - b 0 - b 1 - b 2 = 0
ɂɡ ɷɬɨɝɨ ɭɪɚɜɧɟɧɢɹ ɧɚɯɨɞɢɦ b ɢ ɡɚɩɢɫɵɜɚɟɦ ɤɨɨɪɞɢɧɚɬɵ ɬɨɱɤɢ b : 2
ö æ b + b1 + b2 b 0 + b1 + b2 b 0 + b1 + b2 , , , b 3 , K , b N -1 ÷ . b2 = ç 0 ø è 3 3 3 ɗɬɚ ɩɪɨɰɟɞɭɪɚ ɩɪɨɞɨɥɠɚɟɬɫɹ ɞɚɥɶɲɟ, ɞɨ ɬɟɯ ɩɨɪ, ɩɨɤɚ ɩɪɢ ɧɟɤɨɬɨɪɨɦ l ɧɟ ɜɵɩɨɥɧɢɬɫɹ ɧɟɪɚɜɟɧ-
åb l
ɫɬɜɨ
ɤɢ
i=0
i
l +1
³ b l +1 ɢɥɢ ɩɨɤɚ l ɧɟ ɨɤɚɠɟɬɫɹ ɪɚɜɧɨɣ N-1. Ɉɰɟɧɤɨɣ ɹɜɥɹɟɬɫɹ ɪɚɫɫɬɨɹɧɢɟ ɨɬ ɬɨɱɤɢ b ɞɨ ɬɨɱ-
l æ l ö bi ç å bi ÷ å l ,K , i = 0 , b l +1 , K , b N + 1 ÷ . b = ç i=0 ç l +1 ÷ l +1 ç ÷ è ø
Ɉɧɚ
ɪɚɜɧɚ
ɫɥɟɞɭɸɳɟɣ
ɜɟɥɢɱɢɧɟ:
æ l ö bi ÷ l çå 0 = i - b j ÷ . ɉɪɨɢɡɜɨɞɧɚɹ ɨɰɟɧɤɢ ɩɨ ɜɵɯɨɞɧɨɦɭ ɫɢɝɧɚɥɭ bm ɪɚɜɧɚ: H = åç ç l +1 ÷ j= 0 ç ÷ è ø 2
ìæ l ö ÷ ïç å bi ¶H ïç i =0 - bm ÷ , m £ l , ÷ íç l + 1 ¶bm ïç ÷ è ø ï m > l. 0, î
Ⱦɥɹ ɩɟɪɟɯɨɞɚ ɤ ɩɪɨɢɡɜɨɞɧɵɦ ɩɨ ɢɫɯɨɞɧɵɦ ɜɵɯɨɞɧɵɦ ɫɢɝɧɚɥɚɦ a i ɧɟɨɛɯɨɞɢɦɨ ɨɛɪɚɬɢɬɶ ɫɞɟɥɚɧɧɵɟ ɧɚ ɩɟɪɜɨɦ ɷɬɚɩɟ ɜɵɱɢɫɥɟɧɢɹ ɨɰɟɧɤɢ ɩɪɟɨɛɪɚɡɨɜɚɧɢɹ. 3. Ⱦɜɨɢɱɧɵɣ ɢɧɬɟɪɩɪɟɬɚɬɨɪ. Ɉɰɟɧɤɚ ɞɥɹ ɞɜɨɢɱɧɨɝɨ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ ɫɬɪɨɢɬɫɹ ɬɨɱɧɨ ɬɚɤɠɟ ɤɚɤ ɢ ɞɥɹ ɡɧɚɤɨɜɨɝɨ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ ɩɪɢ ɤɨɞɢɪɨɜɚɧɢɢ ɧɨɦɟɪɨɦ ɤɚɧɚɥɚ. ɉɭɫɬɶ ɩɪɚɜɢɥɶɧɵɦ ɨɬɜɟɬɨɦ ɹɜɥɹɟɬɫɹ k-ɵɣ ɤɥɚɫɫ, ɬɨɝɞɚ ɨɛɨɡɧɚɱɢɦ ɱɟɪɟɡ K ɦɧɨɠɟɫɬɜɨ ɧɨɦɟɪɨɜ ɫɢɝɧɚɥɨɜ, ɤɨɬɨɪɵɦ ɜ ɞɜɨɢɱɧɨɦ ɩɪɟɞɫɬɚɜɥɟɧɢɢ k ɫɨɨɬɜɟɬɫɬɜɭɸɬ ɟɞɢɧɢɰɵ. ɉɪɢ ɭɪɨɜɧɟ ɧɚɞɟɠɧɨɫɬɢ ɨɰɟɧɤɚ ɡɚɞɚɟɬɫɹ ɮɨɪɦɭɥɨɣ: 2 2 H = ai - a+b /2+e + ai - a+b /2-e . i ÏK i ÎK ɉɪɨɢɡɜɨɞɧɚɹ ɨɰɟɧɤɢ ɩɨ i-ɦɭ ɜɵɯɨɞɧɨɦɭ ɫɢɝɧɚɥɭ ɪɚɜɧɚ:
å(
(
)
) å(
(
)
)
¶H ì2(a i - (a + b) / 2 + e ), i Ï K =í . ¶a i î2(a k - (a + b) / 2 - e ), i Î K .
4. ɉɨɪɹɞɤɨɜɵɣ ɢɧɬɟɪɩɪɟɬɚɬɨɪ. Ⱦɥɹ ɩɨɫɬɪɨɟɧɢɹ ɨɰɟɧɤɢ ɩɨ ɩɨɪɹɞɤɨɜɨɦɭ ɢɧɬɟɪɩɪɟɬɚɬɨɪɭ ɧɟɨɛɯɨɞɢɦɨ ɩɪɟɞɜɚɪɢɬɟɥɶɧɨ ɩɟɪɟɫɬɚɜɢɬɶ ɤɨɦɩɨɧɟɧɬɵ ɜɟɤɬɨɪɚ a ɜ ɫɨɨɬɜɟɬɫɬɜɢɢ ɫ ɩɨɞɫɬɚɧɨɜɤɨɣ, ɤɨɞɢɪɭɸ0 ɳɟɣ ɩɪɚɜɢɥɶɧɵɣ ɨɬɜɟɬ. Ɉɛɨɡɧɚɱɢɦ ɩɨɥɭɱɟɧɧɵɣ ɜ ɪɟɡɭɥɶɬɚɬɟ ɜɟɤɬɨɪ ɱɟɪɟɡ b . Ɇɧɨɠɟɫɬɜɨ ɬɨɱɟɤ, ɭɞɨɜɥɟ-
ɬɜɨɪɹɸɳɢɯ ɭɫɥɨɜɢɸ ɡɚɞɚɱɢ, ɨɩɢɫɵɜɚɟɬɫɹ ɫɢɫɬɟɦɨɣ ɭɪɚɜɧɟɧɢɣ
b i0 + e £ b i0+1 , ɝɞɟ e - ɭɪɨɜɟɧɶ ɧɚɞɟɠɧɨ-
ɫɬɢ. Ɉɛɨɡɧɚɱɢɦ ɷɬɨ ɦɧɨɠɟɫɬɜɨ ɱɟɪɟɡ D. Ɉɰɟɧɤɚ ɡɚɞɚɟɬɫɹ ɪɚɫɫɬɨɹɧɢɟɦ ɨɬ ɬɨɱɤɢ b ɞɨ ɩɪɨɟɤɰɢɢ ɷɬɨɣ ɬɨɱɤɢ ɧɚ ɦɧɨɠɟɫɬɜɨ D. Ɉɩɢɲɟɦ ɩɪɨɰɟɞɭɪɭ ɜɵɱɢɫɥɟɧɢɹ ɩɪɨɟɤɰɢɢ. 0 1. ɉɪɨɫɦɨɬɪɟɜ ɤɨɨɪɞɢɧɚɬɵ ɬɨɱɤɢ b , ɨɬɦɟɬɢɦ ɬɟ ɧɨɦɟɪɚ ɤɨɨɪɞɢɧɚɬ, ɞɥɹ ɤɨɬɨɪɵɯ ɧɚɪɭɲɚɟɬɫɹ ɧɟɪɚɜɟɧɫɬɜɨ
b i0 + e £ b i0+1 .
CHAP6.DOC
115
2.
Ɇɧɨɠɟɫɬɜɨ ɨɬɦɟɱɟɧɧɵɯ ɤɨɨɪɞɢɧɚɬ ɥɢɛɨ ɫɨɫɬɨɢɬ ɢɡ ɨɞɧɨɣ ɩɨɫɥɟɞɨɜɚɬɟɥɶɧɨɫɬɢ ɩɨɫɥɟɞɨɜɚɬɟɥɶɧɵɯ ɧɨɦɟɪɨɜ i , i + 1,K , i + l , ɢɥɢ ɢɡ ɧɟɫɤɨɥɶɤɢɯ ɬɚɤɢɯ ɩɨɫɥɟɞɨɜɚɬɟɥɶɧɨɫɬɟɣ. ɇɚɣɞɟɦ ɬɨɱɤɭ
b 1 , ɤɨɬɨɪɚɹ ɹɜɥɹɥɚɫɶ ɛɵ ɩɪɨɟɤɰɢɟɣ ɬɨɱɤɢ b 0 ɧɚ ɝɢɩɟɪɩɥɨɫɤɨɫɬɶ, ɨɩɪɟɞɟɥɹɟɦɭɸ ɭɪɚɜɧɟɧɢɹɦɢ b 1i + e = b 1i +1 , ɝɞɟ i ɩɪɨɛɟɝɚɟɬ ɦɧɨɠɟɫɬɜɨ ɢɧɞɟɤɫɨɜ ɨɬɦɟɱɟɧɧɵɯ ɤɨɨɪɞɢɧɚɬ. ɉɭɫɬɶ ɦɧɨɠɟɫɬɜɨ ɨɬɦɟɱɟɧɧɵɯ ɤɨɨɪɞɢɧɚɬ ɪɚɫɩɚɞɚɟɬɫɹ ɧɚ n ɩɨɫɥɟɞɨɜɚɬɟɥɶɧɨɫɬɟɣ, ɤɚɠɞɚɹ ɢɡ ɤɨɬɨɪɵɯ ɢɦɟɟɬ ɜɢɞ
(
b 1 = b10 , K , bi10-1 , g 1 , g 1 + e , K , g 1 + l1e , bi10+l1 +1 , K , bi20-1 , g 2 , g 2 + e , K , g 2 + l2 e ,K , bN0
b im ,K , b im + lm , ɝɞɟ m - ɧɨɦɟɪ ɩɨɫɥɟɞɨɜɚɬɟɥɶɧɨɫɬɢ. Ɍɨɝɞɚ ɬɨɱɤɚ b ɢɦɟɟɬ ɜɢɞ: 1.
Ɍɨɱɤɚ
1
b 1 ɹɜɥɹɟɬɫɹ ɩɪɨɟɤɰɢɟɣ, ɢ ɫɥɟɞɨɜɚɬɟɥɶɧɨ, ɪɚɫɫɬɨɹɧɢɟ ɨɬ b 0 ɞɨ b 1 ɞɨɥɠɧɨ ɛɵɬɶ ɦɢɧɢ-
2ù - g m - je ú . Ⱦɥɹ ɧɚɯɨɠɞɟɧɢɹ ɦɢɧɢɦɭɦɚ ɷɬɨɣ û ë ɮɭɧɤɰɢɢ ɧɟɨɛɯɨɞɢɦɨ ɩɪɢɪɚɜɧɹɬɶ ɤ ɧɭɥɸ ɟɟ ɩɪɨɢɡɜɨɞɧɵɟ ɩɨ g m . ɉɨɥɭɱɚɟɦ ɫɢɫɬɟɦɭ ɭɪɚɜɧɟɧɢɣ
é
å êå ( b n
ɦɚɥɶɧɵɦ. ɗɬɨ ɪɚɫɫɬɨɹɧɢɟ ɪɚɜɧɨ
m=1
å (b lm
j=0
2.
)
0 im + j
ȿɫɥɢ ɬɨɱɤɚ
-g
m
lm
j =0
)
0 im + j
)
- je = 0 . Ɋɟɲɚɹ ɟɟ, ɧɚɯɨɞɢɦ g
= å b i0m + j lm
m
j=0
(l m + 1) - l m e
2.
b 1 ɭɞɨɜɥɟɬɜɨɪɹɟɬ ɧɟɪɚɜɟɧɫɬɜɚɦ, ɩɪɢɜɟɞɟɧɧɵɦ ɜ ɩɟɪɜɨɦ ɩɭɧɤɬɟ ɩɪɨɰɟɞɭɪɵ, ɬɨ ɪɚɫ-
ɫɬɨɹɧɢɟ ɨɬ ɧɟɟ ɞɨ ɬɨɱɤɢ
b 0 ɹɜɥɹɟɬɫɹ ɨɰɟɧɤɨɣ. ȼ ɩɪɨɬɢɜɧɨɦ ɫɥɭɱɚɟ, ɩɨɜɬɨɪɹɟɦ ɩɟɪɜɵɣ ɲɚɝ ɩɪɨ-
ɰɟɞɭɪɵ, ɢɫɩɨɥɶɡɭɹ ɬɨɱɤɭ
b 1 ɜɦɟɫɬɨ b 0 ; Ɉɛɴɟɞɢɧɹɟɦ ɩɨɥɭɱɟɧɧɵɣ ɫɩɢɫɨɤ ɨɬɦɟɱɟɧɧɵɯ ɤɨɦɩɨ-
ɧɟɧɬɨɜ ɫɨ ɫɩɢɫɤɨɦ, ɩɨɥɭɱɟɧɧɵɦ ɩɪɢ ɩɨɢɫɤɟ ɩɪɟɞɵɞɭɳɟɣ ɬɨɱɤɢ; ɧɚɯɨɞɢɦ ɬɨɱɤɭ b , ɩɨɜɬɨɪɹɹ ɜɫɟ ɲɚɝɢ ɩɪɨɰɟɞɭɪɵ, ɧɚɱɢɧɚɹ ɫɨ ɜɬɨɪɨɝɨ. Ɉɬɦɟɬɢɦ, ɱɬɨ ɜ ɯɨɞɟ ɩɪɨɰɟɞɭɪɵ ɱɢɫɥɨ ɨɬɦɟɱɟɧɧɵɯ ɩɨɫɥɟɞɨɜɚɬɟɥɶɧɨɫɬɟɣ ɫɨɫɟɞɧɢɯ ɢɧɞɟɤɫɨɜ ɧɟ ɜɨɡɪɚɫɬɚɟɬ. ɇɟɤɨɬɨɪɵɟ ɩɨɫɥɟɞɨɜɚɬɟɥɶɧɨɫɬɢ ɦɨɝɭɬ ɫɥɢɜɚɬɶɫɹ, ɧɨ ɧɨɜɵɟ ɜɨɡɧɢɤɚɬɶ ɧɟ ɦɨɝɭɬ. ɉɨɫɥɟ ɧɚɯɨɠɞɟɧɢɹ ɩɪɨɟɤɰɢɢ ɦɨɠɧɨ ɡɚɩɢɫɚɬɶ ɨɰɟɧɤɭ: 2
2 lm n é lm æ ö ù H = å êå ç b i0m + j - å b i0m + j ( l m + 1) - ( l m - 2 j )e 2÷ ú . ø ú m =1 ê j = 0 è j=0 û ë Ɉɛɨɡɧɚɱɢɦ ɱɟɪɟɡ I m m-ɭɸ ɩɨɫɥɟɞɨɜɚɬɟɥɶɧɨɫɬɶ ɫɨɫɟɞɧɢɯ ɤɨɨɪɞɢɧɚɬ, ɜɵɞɟɥɟɧɧɭɸ ɩɪɢ ɩɨɫɥɟɞ-
ɧɟɦ ɢɫɩɨɥɧɟɧɢɢ ɩɟɪɜɨɝɨ ɲɚɝɚ ɩɪɨɰɟɞɭɪɵ ɜɵɱɢɫɥɟɧɢɹ ɨɰɟɧɤɢ: ɩɪɨɢɡɜɨɞɧɭɸ ɨɰɟɧɤɢ ɩɨ ɜɵɯɨɞɧɨɦɭ ɫɢɝɧɚɥɭ
I m = {i m , i m + 1, K , i m + lm } . Ɍɨɝɞɚ
b ɦɨɠɧɨ ɡɚɩɢɫɚɬɶ ɜ ɫɥɟɞɭɸɳɟɦ ɜɢɞɟ:
lm ìæ ïç b 0i - å b 0 im + j ¶H ïïçè j =0 =í ¶b i ï n ï0, i Ï UI m . ïî m =1
0 i
(lm + 1) - (lm - 2(i - im ))e
ö 2÷ , $m: i Î I m ; ÷ ø
Ɍɚɤɢɦ ɨɛɪɚɡɨɦ, ɩɨɫɬɪɨɟɧɢɟ ɨɰɟɧɤɢ ɩɨ ɢɧɬɟɪɩɪɟɬɚɬɨɪɭ ɫɜɨɞɢɬɫɹ ɤ ɫɥɟɞɭɸɳɟɣ ɩɪɨɰɟɞɭɪɟ. Ɉɩɪɟɞɟɥɹɟɦ ɦɧɨɠɟɫɬɜɨ ɞɨɩɭɫɬɢɦɵɯ ɬɨɱɟɤ, ɬɨ ɟɫɬɶ ɬɚɤɢɯ ɬɨɱɟɤ ɜ ɩɪɨɫɬɪɚɧɫɬɜɟ ɜɵɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ, ɤɨɬɨɪɵɟ ɢɧɬɟɪɩɪɟɬɚɬɨɪ ɨɬɜɟɬɚ ɛɭɞɟɬ ɢɧɬɟɪɩɪɟɬɢɪɨɜɚɬɶ ɤɚɤ ɩɪɚɜɢɥɶɧɵɣ ɨɬɜɟɬ ɫɨ ɫɬɨɩɪɨɰɟɧɬɧɵɦ ɭɪɨɜɧɟɦ ɭɜɟɪɟɧɧɨɫɬɢ. 2. ɇɚɯɨɞɢɦ ɩɪɨɟɤɰɢɸ ɜɵɞɚɧɧɨɣ ɫɟɬɶɸ ɬɨɱɤɢ ɧɚ ɷɬɨ ɦɧɨɠɟɫɬɜɨ. ɉɪɨɟɤɰɢɟɣ ɹɜɥɹɟɬɫɹ ɛɥɢɠɚɣɲɚɹ ɬɨɱɤɚ ɢɡ ɦɧɨɠɟɫɬɜɚ. 3. Ɂɚɩɢɫɵɜɚɟɦ ɨɰɟɧɤɭ ɤɚɤ ɪɚɫɫɬɨɹɧɢɟ ɨɬ ɬɨɱɤɢ, ɜɵɞɚɧɧɨɣ ɫɟɬɶɸ, ɞɨ ɟɟ ɩɪɨɟɤɰɢɢ ɧɚ ɦɧɨɠɟɫɬɜɨ ɞɨɩɭɫɬɢɦɵɯ ɬɨɱɟɤ. 1.
CHAP6.DOC
116
6.4 Ɉɰɟɧɤɚ ɨɛɭɱɚɸɳɟɝɨ ɦɧɨɠɟɫɬɜɚ. ȼɟɫ ɩɪɢɦɟɪɚ ȼ ɩɪɟɞɵɞɭɳɟɦ ɪɚɡɞɟɥɟ ɛɵɥ ɪɚɫɫɦɨɬɪɟɧ ɪɹɞ ɨɰɟɧɨɤ, ɩɨɡɜɨɥɹɸɳɢɯ ɨɰɟɧɢɬɶ ɪɟɲɟɧɢɟ ɫɟɬɶɸ ɤɨɧɤɪɟɬɧɨɝɨ ɩɪɢɦɟɪɚ. Ɉɞɧɚɤɨ, ɫɢɬɭɚɰɢɹ, ɤɨɝɞɚ ɫɟɬɶ ɯɨɬɹɬ ɨɛɭɱɢɬɶ ɪɟɲɟɧɢɸ ɬɨɥɶɤɨ ɨɞɧɨɝɨ ɩɪɢɦɟɪɚ, ɞɨɫɬɚɬɨɱɧɨ ɪɟɞɤɚ. Ɉɛɵɱɧɨ ɫɟɬɶ ɞɨɥɠɧɚ ɧɚɭɱɢɬɶɫɹ ɪɟɲɚɬɶ ɜɫɟ ɩɪɢɦɟɪɵ ɨɛɭɱɚɸɳɟɝɨ ɦɧɨɠɟɫɬɜɚ. Ɋɹɞ ɚɥɝɨɪɢɬɦɨɜ ɨɛɭɱɟɧɢɹ, ɤɨɬɨɪɵɟ ɛɭɞɭɬ ɪɚɫɫɦɚɬɪɢɜɚɬɶɫɹ ɜ ɝɥɚɜɟ "ɭɱɢɬɟɥɶ", ɬɪɟɛɭɸɬ ɜɨɡɦɨɠɧɨɫɬɢ ɨɛɭɱɚɬɶ ɫɟɬɶ ɪɟɲɟɧɢɸ ɜɫɟɯ ɩɪɢɦɟɪɨɜ ɨɞɧɨɜɪɟɦɟɧɧɨ ɢ, ɫɨɨɬɜɟɬɫɬɜɟɧɧɨ, ɨɰɟɧɢɜɚɬɶ ɪɟɲɟɧɢɟ ɫɟɬɶɸ ɜɫɟɯ ɩɪɢɦɟɪɨɜ ɨɛɭɱɚɸɳɟɝɨ ɦɧɨɠɟɫɬɜɚ. Ʉɚɤ ɭɠɟ ɨɬɦɟɱɚɥɨɫɶ, ɨɛɭɱɟɧɢɟ ɧɟɣɪɨɧɧɨɣ ɫɟɬɢ - ɷɬɨ ɩɪɨɰɟɫɫ ɦɢɧɢɦɢɡɚɰɢɢ ɜ ɩɪɨɫɬɪɚɧɫɬɜɟ ɨɛɭɱɚɟɦɵɯ ɩɚɪɚɦɟɬɪɨɜ ɮɭɧɤɰɢɢ ɨɰɟɧɤɢ. Ȼɨɥɶɲɢɧɫɬɜɨ ɚɥɝɨɪɢɬɦɨɜ ɨɛɭɱɟɧɢɹ ɢɫɩɨɥɶɡɭɸɬ ɫɩɨɫɨɛɧɨɫɬɶ ɧɟɣɪɨɧɧɵɯ ɫɟɬɟɣ ɛɵɫɬɪɨ ɜɵɱɢɫɥɹɬɶ ɜɟɤɬɨɪ ɝɪɚɞɢɟɧɬɚ ɮɭɧɤɰɢɢ ɨɰɟɧɤɢ ɩɨ ɨɛɭɱɚɟɦɵɦ ɩɚɪɚɦɟɬɪɚɦ. Ɉɛɨɡɧɚɱɢɦ ɨɰɟɧɤɭ ɨɬɞɟɥɶɧɨɝɨ ɩɪɢɦɟɪɚ ɱɟɪɟɡ H i . ɚ ɨɰɟɧɤɭ ɜɫɟɝɨ ɨɛɭɱɚɸɳɟɝɨ ɦɧɨɠɟɫɬɜɚ ɱɟɪɟɡ
H OM . ɉɪɨɫɬɟɣɲɢɣ ɫɩɨɫɨɛ ɩɨɥɭɱɟɧɢɹ ɥɹɟɬɫɹ ɨɱɟɧɶ ɩɪɨɫɬɨ:
H OM ɢɡ H i - ɩɪɨɫɬɚɹ ɫɭɦɦɚ. ɉɪɢ ɷɬɨɦ ɜɟɤɬɨɪ ɝɪɚɞɢɟɧɬɚ ɜɵɱɢɫH OM = å H i ,
( å H ) = å ÑH .
ÑH OM = Ñ
i
.
i
Ɍɚɤɢɦ ɨɛɪɚɡɨɦ, ɢɫɩɨɥɶɡɭɹ ɫɩɨɫɨɛɧɨɫɬɶ ɫɟɬɢ ɜɵɱɢɫɥɹɬɶ ɝɪɚɞɢɟɧɬ ɮɭɧɤɰɢɢ ɨɰɟɧɤɢ ɪɟɲɟɧɢɹ ɨɞɧɨɝɨ ɩɪɢɦɟɪɚ, ɦɨɠɧɨ ɩɨɥɭɱɢɬɶ ɝɪɚɞɢɟɧɬ ɮɭɧɤɰɢɢ ɨɰɟɧɤɢ ɜɫɟɝɨ ɨɛɭɱɚɸɳɟɝɨ ɦɧɨɠɟɫɬɜɚ. Ɉɛɭɱɟɧɢɟ ɩɨ ɜɫɟɦɭ ɨɛɭɱɚɸɳɟɦɭ ɦɧɨɠɟɫɬɜɭ ɩɨɡɜɨɥɹɟɬ ɡɚɞɟɣɫɬɜɨɜɚɬɶ ɞɨɩɨɥɧɢɬɟɥɶɧɵɟ ɦɟɯɚɧɢɡɦɵ ɭɫɤɨɪɟɧɢɹ ɨɛɭɱɟɧɢɹ. Ȼɨɥɶɲɢɧɫɬɜɨ ɷɬɢɯ ɦɟɯɚɧɢɡɦɨɜ ɛɭɞɟɬ ɪɚɫɫɦɨɬɪɟɧɨ ɜ ɝɥɚɜɟ ???. ȼ ɷɬɨɦ ɪɚɡɞɟɥɟ ɛɭɞɟɬ ɪɚɫɫɦɨɬɪɟɧ ɬɨɥɶɤɨ ɨɞɢɧ ɢɡ ɧɢɯ - ɢɫɩɨɥɶɡɨɜɚɧɢɟ ɜɟɫɨɜ ɩɪɢɦɟɪɨɜ. ɂɫɩɨɥɶɡɨɜɚɧɢɟ ɜɟɫɨɜ ɩɪɢɦɟɪɨɜ ɦɨɠɟɬ ɛɵɬɶ ɜɵɡɜɚɧɨ ɨɞɧɨɣ ɢɡ ɫɥɟɞɭɸɳɢɯ ɩɪɢɱɢɧ. 1. Ɉɞɢɧ ɢɡ ɩɪɢɦɟɪɨɜ ɩɥɨɯɨ ɨɛɭɱɚɟɬɫɹ. 2. ɑɢɫɥɨ ɩɪɢɦɟɪɨɜ ɪɚɡɧɵɯ ɤɥɚɫɫɨɜ ɜ ɨɛɭɱɚɸɳɟɦ ɦɧɨɠɟɫɬɜɟ ɫɢɥɶɧɨ ɨɬɥɢɱɚɸɬɫɹ ɞɪɭɝ ɨɬ ɞɪɭɝɚ. 3. ɉɪɢɦɟɪɵ ɜ ɨɛɭɱɚɸɳɟɦ ɦɧɨɠɟɫɬɜɟ ɢɦɟɸɬ ɪɚɡɥɢɱɧɭɸ ɞɨɫɬɨɜɟɪɧɨɫɬɶ. Ɋɚɫɫɦɨɬɪɢɦ ɩɟɪɜɭɸ ɩɪɢɱɢɧɭ - ɩɪɢɦɟɪ ɩɥɨɯɨ ɨɛɭɱɚɟɬɫɹ. ɉɨɞ «ɩɥɨɯɨ ɨɛɭɱɚɟɬɫɹ» ɛɭɞɟɦ ɩɨɧɢɦɚɬɶ ɦɟɞɥɟɧɧɨɟ ɫɧɢɠɟɧɢɟ ɨɰɟɧɤɢ ɞɚɧɧɨɝɨ ɩɪɢɦɟɪɚ ɩɨ ɨɬɧɨɲɟɧɢɸ ɤ ɫɧɢɠɟɧɢɸ ɨɰɟɧɤɢ ɩɨ ɨɛɭɱɚɸɳɟɦɭ ɦɧɨɠɟɫɬɜɭ. Ⱦɥɹ ɬɨɝɨ ɱɬɨɛɵ ɭɫɤɨɪɢɬɶ ɨɛɭɱɟɧɢɟ ɞɚɧɧɨɝɨ ɩɪɢɦɟɪɚ, ɟɦɭ ɦɨɠɧɨ ɩɪɢɩɢɫɚɬɶ ɜɟɫ, ɛɨɥɶɲɢɣ, ɱɟɦ ɭ ɨɫɬɚɥɶɧɵɯ ɩɪɢɦɟɪɨɜ. ɉɪɢ ɷɬɨɦ ɨɰɟɧɤɚ ɩɨ ɨɛɭɱɚɸɳɟɦɭ ɦɧɨɠɟɫɬɜɭ ɢ ɟɟ ɝɪɚɞɢɟɧɬ ɦɨɠɧɨ ɡɚɩɢɫɚɬɶ ɜ ɫɥɟɞɭɸɳɟɦ ɜɢɞɟ:
H OM = å wi H i ; ÑH OM = å wi ÑH i . ɝɞɟ wi - ɜɟɫ i-ɝɨ ɩɪɢɦɟɪɚ. ɗɬɭ ɮɭɧɤɰɢɸ ɨɰɟɧɤɢ
ɛɭɞɟɦ ɧɚɡɵɜɚɬɶ ɨɰɟɧɤɨɣ ɜɡɜɟɲɟɧɧɵɯ ɩɪɢɦɟɪɨɜ. ɉɪɢ ɷɬɨɦ ɝɪɚɞɢɟɧɬ, ɜɵɱɢɫɥɟɧɧɵɣ ɩɨ ɨɰɟɧɤɟ ɪɟɲɟɧɢɹ ɫɟɬɶɸ ɷɬɨɝɨ ɩɪɢɦɟɪɚ, ɜɨɣɞɟɬ ɜ ɫɭɦɦɚɪɧɵɣ ɝɪɚɞɢɟɧɬ ɫ ɛɨɥɶɲɢɦ ɜɟɫɨɦ, ɢ, ɫɥɟɞɨɜɚɬɟɥɶɧɨ, ɫɢɥɶɧɟɟ ɩɨɜɥɢɹɟɬ ɧɚ ɜɵɛɨɪ ɧɚɩɪɚɜɥɟɧɢɹ ɨɛɭɱɟɧɢɹ. ɗɬɨɬ ɫɩɨɫɨɛ ɩɪɢɦɟɧɢɦ ɬɚɤɠɟ ɢ ɞɥɹ ɤɨɪɪɟɤɰɢɢ ɩɪɨɛɥɟɦ, ɫɜɹɡɚɧɧɵɯ ɫɨ ɜɬɨɪɨɣ ɩɪɢɱɢɧɨɣ - ɪɚɡɧɨɟ ɱɢɫɥɨ ɩɪɢɦɟɪɨɜ ɪɚɡɧɵɯ ɤɥɚɫɫɨɜ. Ɉɞɧɚɤɨ ɜ ɷɬɨɦ ɫɥɭɱɚɟ ɭɜɟɥɢɱɢɜɚɸɬɫɹ ɜɟɫɚ ɜɫɟɦ ɩɪɢɦɟɪɚɦ ɬɨɝɨ ɤɥɚɫɫɚ, ɜ ɤɨɬɨɪɨɦ ɦɟɧɶɲɟ ɩɪɢɦɟɪɨɜ. Ɉɩɵɬ ɩɨɤɚɡɵɜɚɟɬ, ɱɬɨ ɢɫɩɨɥɶɡɨɜɚɧɢɟ ɜɟɫɨɜ ɜ ɬɚɤɢɯ ɫɢɬɭɚɰɢɹɯ ɩɨɡɜɨɥɹɟɬ ɭɥɭɱɲɢɬɶ ɨɛɨɛɳɚɸɳɢɟ ɫɩɨɫɨɛɧɨɫɬɢ ɫɟɬɟɣ. ȼ ɫɥɭɱɚɟ ɪɚɡɥɢɱɧɨɣ ɞɨɫɬɨɜɟɪɧɨɫɬɢ ɩɪɢɦɟɪɨɜ ɜ ɨɛɭɱɚɸɳɟɦ ɦɧɨɠɟɫɬɜɟ ɮɭɧɤɰɢɹ ɜɡɜɟɲɟɧɧɵɯ ɩɪɢɦɟɪɨɜ ɧɟ ɩɪɢɦɟɧɢɦɚ. Ⱦɟɣɫɬɜɢɬɟɥɶɧɨ, ɟɫɥɢ ɢɡɜɟɫɬɧɨ, ɱɬɨ ɞɨɫɬɨɜɟɪɧɨɫɬɶ ɨɬɜɟɬɚ ɜ k-ɨɦ ɩɪɢɦɟɪɟ ɜ ɞɜɚ ɪɚɡɚ ɧɢɠɟ, ɱɟɦ ɜ l-ɨɦ, ɯɨɬɟɥɨɫɶ ɛɵ, ɱɬɨɛɵ ɨɛɭɱɟɧɧɚɹ ɫɟɬɶ ɜɵɞɚɜɚɥɚ ɞɥɹ k-ɨɝɨ ɩɪɢɦɟɪɚ ɜ ɞɜɚ ɪɚɡɚ ɦɟɧɶɲɢɣ ɭɪɨɜɟɧɶ ɭɜɟɪɟɧɧɨɫɬɢ. ɗɬɨɝɨ ɦɨɠɧɨ ɞɨɫɬɢɱɶ, ɟɫɥɢ ɩɪɢ ɜɵɱɢɫɥɟɧɢɢ ɨɰɟɧɤɢ k-ɨɝɨ ɩɪɢɦɟɪɚ ɛɭɞɟɬ ɢɫɩɨɥɶɡɨɜɚɬɶɫɹ ɜ ɞɜɚ ɪɚɡɚ ɦɟɧɶɲɢɣ ɭɪɨɜɟɧɶ ɧɚɞɟɠɧɨɫɬɢ. Ɉɰɟɧɤɚ ɨɛɭɱɚɸɳɟɝɨ ɦɧɨɠɟɫɬɜɚ ɜ ɷɬɨɦ ɫɥɭɱɚɟ ɜɵɱɢɫɥɹɟɬɫɹ ɩɨ ɮɨɪɦɭɥɟ ɛɟɡ ɜɟɫɨɜ, ɚ ɞɨɫɬɨɜɟɪɧɨɫɬɶ ɭɱɢɬɵɜɚɟɬɫɹ ɧɟɩɨɫɪɟɞɫɬɜɟɧɧɨ ɩɪɢ ɜɵɱɢɫɥɟɧɢɢ ɨɰɟɧɤɢ ɩɨ ɩɪɢɦɟɪɭ. Ɍɚɤɭɸ ɨɰɟɧɤɭ ɛɭɞɟɦ ɧɚɡɵɜɚɬɶ ɨɰɟɧɤɨɣ ɜɡɜɟɲɟɧɧɨɣ ɞɨɫɬɨɜɟɪɧɨɫɬɢ. Ɍɚɤɢɦ ɨɛɪɚɡɨɦ, ɤɚɠɞɵɣ ɩɪɢɦɟɪ ɦɨɠɟɬ ɢɦɟɬɶ ɞɜɚ ɜɟɫɚ: ɜɟɫ ɩɪɢɦɟɪɚ ɢ ɞɨɫɬɨɜɟɪɧɨɫɬɶ ɩɪɢɦɟɪɚ. Ʉɪɨɦɟ ɬɨɝɨ, ɩɪɢ ɪɟɲɟɧɢɢ ɡɚɞɚɱ ɤɥɚɫɫɢɮɢɤɚɰɢɢ ɤɚɠɞɵɣ ɤɥɚɫɫ ɦɨɠɟɬ ɨɛɥɚɞɚɬɶ ɫɨɛɫɬɜɟɧɧɵɦ ɜɟɫɨɦ. Ɉɤɨɧɱɚɬɟɥɶɧɨ ɮɭɧɤɰɢɸ ɨɰɟɧɤɢ ɩɨ ɨɛɭɱɚɸɳɟɦɭ ɦɧɨɠɟɫɬɜɭ ɢ ɟɟ ɝɪɚɞɢɟɧɬ ɦɨɠɧɨ ɡɚɩɢɫɚɬɶ ɜ ɫɥɟɞɭɸɳɟɦ ɜɢɞɟ:
H OM (e ) = å wi H i (d i e ) ,
ÑH OM (e ) = å wi ÑH i . (d i e ),
ɝɞɟ
wi - ɜɟɫ ɩɪɢɦɟɪɚ, d i - ɟɝɨ ɞɨɫɬɨɜɟɪɧɨɫɬɶ.
CHAP6.DOC
117
6.5 Ƚɥɨɛɚɥɶɧɵɟ ɢ ɥɨɤɚɥɶɧɵɟ ɨɰɟɧɤɢ ȼ ɩɪɟɞɵɞɭɳɢɯ ɪɚɡɞɟɥɚɯ ɛɵɥ ɪɚɫɫɦɨɬɪɟɧ ɪɹɞ ɨɰɟɧɨɤ. ɗɬɢ ɨɰɟɧɤɢ ɨɛɥɚɞɚɸɬ ɨɞɧɢɦ ɨɛɳɢɦ ɫɜɨɣɫɬɜɨɦ - ɞɥɹ ɜɵɱɢɫɥɟɧɢɹ ɨɰɟɧɤɢ ɩɨ ɩɪɢɦɟɪɭ, ɩɪɟɞɴɹɜɥɟɧɧɨɦɭ ɫɟɬɢ, ɞɨɫɬɚɬɨɱɧɨ ɡɧɚɬɶ ɜɵɯɨɞɧɨɣ ɜɟɤɬɨɪ, ɜɵɞɚɧɧɵɣ ɫɟɬɶɸ ɩɪɢ ɪɟɲɟɧɢɢ ɷɬɨɝɨ ɩɪɢɦɟɪɚ, ɢ ɩɪɚɜɢɥɶɧɵɣ ɨɬɜɟɬ. Ɍɚɤɢɟ ɨɰɟɧɤɢ ɛɭɞɟɦ ɧɚɡɵɜɚɬɶ ɥɨɤɚɥɶɧɵɦɢ. ɉɪɢɜɟɞɟɦ ɬɨɱɧɨɟ ɨɩɪɟɞɟɥɟɧɢɟ. Ɉɩɪɟɞɟɥɟɧɢɟ. Ʌɨɤɚɥɶɧɨɣ ɧɚɡɵɜɚɟɬɫɹ ɥɸɛɚɹ ɨɰɟɧɤɚ, ɹɜɥɹɸɳɚɹɫɹ ɥɢɧɟɣɧɨɣ ɤɨɦɛɢɧɚɰɢɟɣ ɩɪɨɢɡɜɨɥɶɧɵɯ ɧɟɩɪɟɪɵɜɧɨ ɞɢɮɮɟɪɟɧɰɢɪɭɟɦɵɯ ɮɭɧɤɰɢɣ, ɤɚɠɞɚɹ ɢɡ ɤɨɬɨɪɵɯ ɡɚɜɢɫɢɬ ɨɬ ɨɰɟɧɤɢ ɬɨɥɶɤɨ ɨɞɧɨɝɨ ɩɪɢɦɟɪɚ. ɂɫɩɨɥɶɡɨɜɚɧɢɟ ɥɨɤɚɥɶɧɵɯ ɨɰɟɧɨɤ ɩɨɡɜɨɥɹɟɬ ɨɛɭɱɚɬɶ ɫɟɬɶ ɪɟɲɟɧɢɸ ɤɚɤ ɨɬɞɟɥɶɧɨ ɜɡɹɬɨɝɨ ɩɪɢɦɟɪɚ, ɬɚɤ ɢ ɜɫɟɝɨ ɨɛɭɱɚɸɳɟɝɨ ɦɧɨɠɟɫɬɜɚ ɜ ɰɟɥɨɦ. Ɉɞɧɚɤɨ ɫɭɳɟɫɬɜɭɸɬ ɡɚɞɚɱɢ, ɞɥɹ ɤɨɬɨɪɵɯ ɧɟɜɨɡɦɨɠɧɨ ɩɨɫɬɪɨɢɬɶ ɥɨɤɚɥɶɧɭɸ ɨɰɟɧɤɭ. Ȼɨɥɟɟ ɬɨɝɨ, ɞɥɹ ɧɟɤɨɬɨɪɵɯ ɡɚɞɚɱ ɧɟɥɶɡɹ ɩɨɫɬɪɨɢɬɶ ɞɚɠɟ ɨɛɭɱɚɸɳɟɟ ɦɧɨɠɟɫɬɜɨ. ɂɫɩɨɥɶɡɨɜɚɧɢɟ ɧɟɥɨɤɚɥɶɧɵɯ ɨɰɟɧɨɤ ɜɨɡɦɨɠɧɨ ɞɚɠɟ ɩɪɢ ɪɟɲɟɧɢɢ ɡɚɞɚɱ ɤɥɚɫɫɢɮɢɤɚɰɢɢ. ɉɪɢɜɟɞɟɦ ɞɜɚ ɩɪɢɦɟɪɚ ɧɟɥɨɤɚɥɶɧɵɯ ɨɰɟɧɤɢ. Ʉɢɧɟɬɢɱɟɫɤɚɹ ɨɰɟɧɤɚ ɞɥɹ ɡɚɞɚɱɢ ɤɥɚɫɫɢɮɢɤɚɰɢɢ. ɉɭɫɬɶ ɜ ɨɛɭɱɚɸɳɟɟ ɦɧɨɠɟɫɬɜɨ ɜɯɨɞɹɬ ɩɪɢɦɟɪɵ k ɤɥɚɫɫɨɜ. Ɍɪɟɛɭɟɬɫɹ ɨɛɭɱɢɬɶ ɫɟɬɶ ɬɚɤ, ɱɬɨɛɵ ɜ ɩɪɨɫɬɪɚɧɫɬɜɟ ɜɵɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ ɦɧɨɠɟɫɬɜɚ ɩɪɢɦɟɪɨɜ ɪɚɡɧɵɯ ɤɥɚɫɫɨɜ ɛɵɥɢ ɩɨɩɚɪɧɨ ɥɢɧɟɣɧɨ ɪɚɡɞɟɥɢɦɵ. ɉɭɫɬɶ ɫɟɬɶ ɜɵɞɚɟɬ N ɜɵɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ. Ⱦɥɹ ɪɟɲɟɧɢɹ ɡɚɞɚɱɢ ɞɨɫɬɚɬɨɱɧɨ, ɱɬɨɛɵ ɜ ɯɨɞɟ ɨɛɭɱɟɧɢɹ ɜɫɟ ɬɨɱɤɢ ɜ ɩɪɨɫɬɪɚɧɫɬɜɟ ɜɵɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ, ɫɨɨɬɜɟɬɫɬɜɭɸɳɢɟ ɩɪɢɦɟɪɚɦ ɨɞɧɨɝɨ ɤɥɚɫɫɚ, ɫɨɛɢɪɚɥɢɫɶ ɜɨɤɪɭɝ ɨɞɧɨɣ ɬɨɱɤɢ - ɰɟɧɬɪɚ ɤɨɧɰɟɧɬɪɚɰɢɢ ɤɥɚɫɫɚ, ɢ ɱɬɨɛɵ ɰɟɧɬɪɵ ɤɨɧɰɟɧɬɪɚɰɢɢ ɪɚɡɧɵɯ ɤɥɚɫɫɨɜ ɛɵɥɢ ɤɚɤ ɦɨɠɧɨ ɞɚɥɶɲɟ ɞɪɭɝ ɨɬ ɞɪɭɝɚ. ȼ ɤɚɱɟɫɬɜɟ ɰɟɧɬɪɚ ɤɨɧɰɟɧɬɪɚɰɢɢ ɦɨɠɧɨ ɜɵɛɪɚɬɶ ɛɚɪɢɰɟɧɬɪ ɦɧɨɠɟɫɬɜɚ ɬɨɱɟɤ, ɫɨɨɬɜɟɬɫɬɜɭɸɳɢɯ ɩɪɢɦɟɪɚɦ ɞɚɧɧɨɝɨ ɤɥɚɫɫɚ. Ɍɚɤɢɦ ɨɛɪɚɡɨɦ, ɮɭɧɤɰɢɹ ɨɰɟɧɤɢ ɞɨɥɠɧɚ ɫɨɫɬɨɹɬɶ ɢɡ ɞɜɭɯ ɤɨɦɩɨɧɟɧɬɨɜ: ɩɟɪɜɚɹ ɪɟɚɥɢɡɭɟɬ ɩɪɢɬɹɠɟɧɢɟ ɦɟɠɞɭ ɩɪɢɦɟɪɚɦɢ ɨɞɧɨɝɨ ɤɥɚɫɫɚ ɢ ɛɚɪɢɰɟɧɬɪɨɦ ɷɬɨɝɨ ɤɥɚɫɫɚ, ɚ ɜɬɨɪɚɹ ɨɬɜɟɱɚɟɬ ɡɚ ɨɬɬɚɥɤɢɜɚɧɢɟ ɛɚɪɢɰɟɧɬɪɨɜ ɪɚɡɧɵɯ ɤɥɚɫɫɨɜ. Ɉɛɨɡɧɚɱɢɦ ɬɨɱɤɭ ɜ ɩɪɨɫɬɪɚɧɫɬɜɟ ɜɵɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ, ɫɨɨɬɜɟɬɫɬɜɭɸɳɭɸ
m-ɦɭ ɩɪɢɦɟɪɭ, ɱɟɪɟɡ a m , ɦɧɨɠɟɫɬɜɨ ɩɪɢɦɟɪɨɜ i-ɝɨ ɤɥɚɫɫɚ ɱɟɪɟɡ I i , ɛɚɪɢɰɟɧɬɪ ɬɨɱɟɤ, ɫɨɨɬɜɟɬɫɬɜɭɸɳɢɯ 1 i i ɩɪɢɦɟɪɚɦ ɷɬɨɝɨ ɤɥɚɫɫɚ, ɱɟɪɟɡ B ( B = å a m ), ɱɢɫɥɨ ɩɪɢɦɟɪɨɜ ɜ i-ɨɦ ɤɥɚɫɫɟ ɱɟɪɟɡ B i , ɚ ɪɚɫI i mÎIi ɫɬɨɹɧɢɟ ɦɟɠɞɭ ɬɨɱɤɚɦɢ
(
a ɢ b ɱɟɪɟɡ dist( a , b) = å a j - b j j
(
)
2
. ɂɫɩɨɥɶɡɭɹ ɷɬɢ ɨɛɨɡɧɚɱɟɧɢɹ, ɦɨɠɧɨ
)
ɡɚɩɢɫɚɬɶ ɩɪɢɬɹɝɢɜɚɸɳɢɣ ɤɨɦɩɨɧɟɧɬ ɮɭɧɤɰɢɢ ɨɰɟɧɤɢ ɞɥɹ ɜɫɟɯ ɩɪɢɦɟɪɨɜ i-ɝɨ ɤɥɚɫɫɚ ɜ ɜɢɞɟ:
H iP = å dist a j , B i j ÎI i
P i
Ɏɭɧɤɰɢɹ ɨɰɟɧɤɢ H ɨɛɟɫɩɟɱɢɜɚɟɬ ɫɢɥɶɧɨɟ ɩɪɢɬɹɠɟɧɢɟ ɞɥɹ ɩɪɢɦɟɪɨɜ, ɧɚɯɨɞɹɳɢɯɫɹ ɞɚɥɟɤɨ ɨɬ ɛɚɪɢɰɟɧɬɪɚ. ɉɪɢɬɹɠɟɧɢɟ ɨɫɥɚɛɟɜɚɟɬ ɫ ɩɪɢɛɥɢɠɟɧɢɟɦ ɤ ɛɚɪɢɰɟɧɬɪɭ. Ʉɨɦɩɨɧɟɧɬ ɮɭɧɤɰɢɢ ɨɰɟɧɤɢ, ɨɬɜɟɱɚɸɳɢɣ ɡɚ ɨɬɬɚɥɤɢɜɚɧɢɟ ɛɚɪɢɰɟɧɬɪɨɜ ɪɚɡɧɵɯ ɤɥɚɫɫɨɜ, ɞɨɥɠɟɧ ɨɛɟɫɩɟɱɢɜɚɬɶ ɫɢɥɶɧɨɟ ɨɬɬɚɥɤɢɜɚɧɢɟ ɛɥɢɡɤɢɯ ɛɚɪɢɰɟɧɬɪɨɜ ɢ ɨɫɥɚɛɟɜɚɬɶ ɫ ɭɞɚɥɟɧɢɟɦ ɛɚɪɢɰɟɧɬɪɨɜ ɞɪɭɝ ɨɬ ɞɪɭɝɚ. Ɍɚɤɢɦɢ ɫɜɨɣɫɬɜɚɦɢ ɨɛɥɚɞɚɟɬ ɝɪɚɜɢɬɚɰɢɨɧɧɨɟ ɨɬɬɚɥɤɢɜɚɧɢɟ. ɂɫɩɨɥɶɡɭɹ ɝɪɚɜɢɬɚɰɢɨɧɧɨɟ ɨɬɬɚɥɤɢɜɚɧɢɟ ɦɨɠɧɨ ɡɚɩɢɫɚɬɶ ɜɬɨɪɨɣ ɤɨɦɩɨɧɟɧɬ ɮɭɧɤɰɢɢ ɨɰɟɧɤɢ ɜ ɜɢɞɟ:
(
H O = å dist B i , B j i< j
)
-1
. Ɍɚɤɢɦ ɨɛɪɚɡɨɦ, ɨɰɟɧɤɭ, ɨɛɟɫɩɟɱɢɜɚɸɳɭɸ ɫɛɥɢɠɟ-
ɧɢɟ ɬɨɱɟɤ, ɫɨɨɬɜɟɬɫɬɜɭɸɳɢɯ ɩɪɢɦɟɪɚɦ ɨɞɧɨɝɨ ɤɥɚɫɫɚ, ɢ ɨɬɬɚɥɤɢɜɚɧɢɟ ɛɚɪɢɰɟɧɬɪɨɜ, ɦɨɠɧɨ ɡɚɩɢɫɚɬɶ ɜ ɜɢɞɟ:
(
)
(
)
H = å H iP + H O = å å dist a j , B i + å dist B i , B j . i
i
j ÎI i
i< j
ȼɵɱɢɫɥɢɦ ɩɪɨɢɡɜɨɞɧɭɸ ɨɰɟɧɤɢ ɩɨ j-ɦɭ ɜɵɯɨɞɧɨɦɭ ɫɢɝɧɚɥɭ, ɩɨɥɭɱɟɧɧɨɦɭ ɩɪɢ ɪɟɲɟɧɢɢ i-ɝɨ ɩɪɢɦɟɪɚ. ɉɭɫɬɶ i-ɵɣ ɩɪɢɦɟɪ ɩɪɢɧɚɞɥɟɠɢɬ l-ɦɭ ɤɥɚɫɫɭ. Ɍɨɝɞɚ ɩɪɨɢɡɜɨɞɧɚɹ ɢɦɟɟɬ ɜɢɞ:
(
)
2 dH = 2 a ij - B lj da ij Il
B jl - B kj
å dist k ¹l
2
(B , B ) l
k
.
ɗɬɭ ɨɰɟɧɤɭ ɛɭɞɟɦ ɧɚɡɵɜɚɬɶ ɤɢɧɟɬɢɱɟɫɤɨɣ. ɋɭɳɟɫɬɜɭɟɬ ɨɞɧɨ ɨɫɧɨɜɧɨɟ ɨɬɥɢɱɢɟ ɷɬɨɣ ɨɰɟɧɤɢ ɨɬ ɜɫɟɯ ɞɪɭɝɢɯ, ɪɚɧɟɟ ɪɚɫɫɦɨɬɪɟɧɧɵɯ, ɨɰɟɧɨɤ ɞɥɹ ɪɟɲɟɧɢɹ ɡɚɞɚɱ ɤɥɚɫɫɢɮɢɤɚɰɢɢ. ɉɪɢ ɢɫɩɨɥɶɡɨɜɚɧɢɢ ɬɪɚɞɢɰɢɨɧɧɵɯ ɩɨɞɯɨɞɨɜ, ɫɧɚɱɚɥɚ ɜɵɛɢɪɚɸɬ ɢɧɬɟɪɩɪɟɬɚɬɨɪ ɨɬɜɟɬɚ, ɡɚɬɟɦ ɫɬɪɨɹɬ ɩɨ ɜɵɛɪɚɧɧɨɦɭ ɢɧɬɟɪɩɪɟɬɚɬɨɪɭ ɮɭɧɤɰɢɸ ɨɰɟɧɤɢ, ɢ ɬɨɥɶɤɨ ɡɚɬɟɦ ɩɪɢɫɬɭɩɚɸɬ ɤ ɨɛɭɱɟɧɢɸ ɫɟɬɢ. Ⱦɥɹ ɤɢɧɟɬɢɱɟɫɤɨɣ ɨɰɟɧɤɢ ɬɚɤɨɣ
CHAP6.DOC
118
ɩɨɞɯɨɞ ɧɟ ɩɪɢɦɟɧɢɦ. Ⱦɟɣɫɬɜɢɬɟɥɶɧɨ, ɞɨ ɬɨɝɨ ɤɚɤ ɛɭɞɟɬ ɡɚɤɨɧɱɟɧɨ ɨɛɭɱɟɧɢɟ ɫɟɬɢ ɧɟɜɨɡɦɨɠɧɨ ɩɨɫɬɪɨɢɬɶ ɢɧɬɟɪɩɪɟɬɚɬɨɪ. Ʉɪɨɦɟ ɬɨɝɨ, ɢɫɩɨɥɶɡɨɜɚɧɢɟ ɤɢɧɟɬɢɱɟɫɤɨɣ ɨɰɟɧɤɢ, ɞɟɥɚɟɬ ɧɟɨɛɯɨɞɢɦɵɦ ɨɛɭɱɟɧɢɟ ɫɟɬɢ ɪɟɲɟɧɢɸ ɜɫɟɯ ɩɪɢɦɟɪɨɜ ɨɛɭɱɚɸɳɟɝɨ ɦɧɨɠɟɫɬɜɚ ɨɞɧɨɜɪɟɦɟɧɧɨ. ɗɬɨ ɫɜɹɡɚɧɧɨ ɫ ɧɟɜɨɡɦɨɠɧɨɫɬɶɸ ɜɵɱɢɫɥɢɬɶ ɨɰɟɧɤɭ ɨɞɧɨɝɨ ɩɪɢɦɟɪɚ. Ʉɢɧɟɬɢɱɟɫɤɚɹ ɨɰɟɧɤɚ, ɨɱɟɜɢɞɧɨ, ɧɟ ɹɜɥɹɟɬɫɹ ɥɨɤɚɥɶɧɨɣ: ɞɥɹ ɜɵɱɢɫɥɟɧɢɹ ɩɪɨɢɡɜɨɞɧɵɯ ɨɰɟɧɤɢ ɩɨ ɜɵɯɨɞɧɵɦ ɫɢɝɧɚɥɚɦ ɩɪɢɦɟɪɚ ɧɟɨɛɯɨɞɢɦɨ ɡɧɚɬɶ ɛɚɪɢɰɟɧɬɪɵ ɜɫɟɯ ɤɥɚɫɫɨɜ, ɞɥɹ ɜɵɱɢɫɥɟɧɢɹ ɤɨɬɨɪɵɯ, ɜ ɫɜɨɸ ɨɱɟɪɟɞɶ, ɧɟɨɛɯɨɞɢɦɨ ɡɧɚɬɶ ɜɵɯɨɞɧɵɟ ɫɢɝɧɚɥɵ, ɩɨɥɭɱɚɟɦɵɟ ɩɪɢ ɪɟɲɟɧɢɢ ɜɫɟɯ ɩɪɢɦɟɪɨɜ ɨɛɭɱɚɸɳɟɝɨ ɦɧɨɠɟɫɬɜɚ. ɂɧɬɟɪɩɪɟɬɚɬɨɪ ɞɥɹ ɤɢɧɟɬɢɱɟɫɤɨɣ ɨɰɟɧɤɢ ɫɬɪɨɢɬɫɹ ɫɥɟɞɭɸɳɢɦ ɨɛɪɚɡɨɦ. Ⱦɥɹ ɩɨɫɬɪɨɟɧɢɹ ɪɚɡɞɟ-
(
)
ɥɢɬɟɥɹ i-ɝɨ ɢ j-ɝɨ ɤɥɚɫɫɨɜ ɫɬɪɨɢɦ ɩɥɨɫɤɨɫɬɶ, ɩɟɪɩɟɧɞɢɤɭɥɹɪɧɭɸ ɤ ɜɟɤɬɨɪɭ B - B . ɍɪɚɜɧɟɧɢɟ ɷɬɨɣ ɩɥɨɫɤɨɫɬɢ ɦɨɠɧɨ ɡɚɩɢɫɚɬɶ ɜ ɜɢɞɟ
(
)
i j å Bh - B p a p N
h =1 N
(
i j å Bh - B p
h =1
)
2
i
j
+ D = 0.
Ⱦɥɹ ɨɩɪɟɞɟɥɟɧɢɹ ɤɨɧɫɬɚɧɬɵ D ɧɚɯɨɞɢɦ ɫɪɟɞɢ ɬɨɱɟɤ i-ɝɨ ɤɥɚɫɫɚ ɛɥɢɠɚɣɲɭɸ ɤ ɛɚɪɢɰɟɧɬɪɭ j-ɝɨ ɤɥɚɫɫɚ. ɉɨɞɫɬɚɜɥɹɹ ɤɨɨɪɞɢɧɚɬɵ ɷɬɨɣ ɬɨɱɤɢ ɜ ɭɪɚɜɧɟɧɢɟ ɝɢɩɟɪɩɥɨɫɤɨɫɬɢ, ɩɨɥɭɱɚɟɦ ɭɪɚɜɧɟɧɢɟ ɧɚ D. Ɋɟɲɢɜ ɷɬɨ ɭɪɚɜɧɟɧɢɟ, ɧɚɯɨɞɢɦ ɜɟɥɢɱɢɧɭ D1 . ɂɫɩɨɥɶɡɭɹ ɛɥɢɠɚɣɲɭɸ ɤ ɛɚɪɢɰɟɧɬɪɭ i-ɝɨ ɤɥɚɫɫɚ ɬɨɱɤɭ j-ɝɨ ɤɥɚɫɫɚ, ɧɚɯɨɞɢɦ ɜɟɥɢɱɢɧɭ
D2 . ɂɫɤɨɦɚɹ ɤɨɧɫɬɚɧɬɚ D ɧɚɯɨɞɢɬɫɹ ɤɚɤ ɫɪɟɞɧɟɟ ɚɪɢɮɦɟɬɢɱɟɫɤɨɟ ɦɟɠɞɭ D1
ɢ D 2 . Ⱦɥɹ ɨɬɧɟɫɟɧɢɹ ɩɪɨɢɡɜɨɥɶɧɨɝɨ ɜɟɤɬɨɪɚ ɤ i-ɦɭ ɢɥɢ j-ɦɭ ɤɥɚɫɫɭ ɞɨɫɬɚɬɨɱɧɨ ɩɨɞɫɬɚɜɢɬɶ ɟɝɨ ɡɧɚɱɟɧɢɹ ɜ ɥɟɜɭɸ ɱɚɫɬɶ ɭɪɚɜɧɟɧɢɹ ɪɚɡɞɟɥɹɸɳɟɣ ɝɢɩɟɪɩɥɨɫɤɨɫɬɢ. ȿɫɥɢ ɡɧɚɱɟɧɢɟ ɥɟɜɨɣ ɱɚɫɬɢ ɭɪɚɜɧɟɧɢɹ ɩɨɥɭɱɚɟɬɫɹ ɛɨɥɶɲɟ ɧɭɥɹ, ɬɨ ɜɟɤɬɨɪ ɨɬɧɨɫɢɬɫɹ ɤ j-ɦɭ ɤɥɚɫɫɭ, ɜ ɩɪɨɬɢɜɧɨɦ ɫɥɭɱɚɟ - ɤ i-ɦɭ. ɂɧɬɟɪɩɪɟɬɚɬɨɪ ɪɚɛɨɬɚɟɬ ɫɥɟɞɭɸɳɢɦ ɨɛɪɚɡɨɦ: ɟɫɥɢ ɞɥɹ i-ɝɨ ɤɥɚɫɫɚ ɜɫɟ ɪɚɡɞɟɥɢɬɟɥɢ ɷɬɨɝɨ ɤɥɚɫɫɚ ɫ ɨɫɬɚɥɶɧɵɦɢ ɤɥɚɫɫɚɦɢ ɜɵɞɚɥɢ ɨɬɜɟɬ i-ɵɣ ɤɥɚɫɫ, ɬɨ ɨɤɨɧɱɚɬɟɥɶɧɵɦ ɨɬɜɟɬɨɦ ɹɜɥɹɟɬɫɹ i-ɵɣ ɤɥɚɫɫ. ȿɫɥɢ ɬɚɤɨɝɨ ɤɥɚɫɫɚ ɧɟ ɧɚɲɥɨɫɶ, ɬɨ ɨɬɜɟɬ «ɧɟ ɡɧɚɸ». ɋɢɬɭɚɰɢɹ, ɤɨɝɞɚ ɞɥɹ ɞɜɭɯ ɪɚɡɥɢɱɧɵɯ ɤɥɚɫɫɨɜ ɜɫɟ ɪɚɡɞɟɥɢɬɟɥɢ ɩɨɞɬɜɟɪɞɢɥɢ ɩɪɢɧɚɞɥɟɠɧɨɫɬɶ ɤ ɷɬɨɦɭ ɤɥɚɫɫɭ, ɧɟɜɨɡɦɨɠɧɚ, ɬɚɤ ɤɚɤ ɪɚɡɞɟɥɢɬɟɥɶ ɷɬɢɯ ɞɜɭɯ ɤɥɚɫɫɨɜ ɞɨɥɠɟɧ ɛɵɥ ɨɬɞɚɬɶ ɩɪɟɞɩɨɱɬɟɧɢɟ ɨɞɧɨɦɭ ɢɡ ɧɢɯ. Ɋɚɫɫɦɨɬɪɟɧɧɵɣ ɩɪɢɦɟɪ ɪɟɲɟɧɢɹ ɡɚɞɚɱɢ ɫ ɢɫɩɨɥɶɡɨɜɚɧɢɟɦ ɧɟɥɨɤɚɥɶɧɨɣ ɨɰɟɧɤɢ ɩɨɡɜɨɥɹɟɬ ɜɵɞɟɥɢɬɶ ɨɫɧɨɜɧɵɟ ɱɟɪɬɵ ɨɛɭɱɟɧɢɹ ɫ ɧɟɥɨɤɚɥɶɧɨɣ ɨɰɟɧɤɨɣ: 1. ɇɟɜɨɡɦɨɠɧɨɫɬɶ ɨɰɟɧɢɬɶ ɪɟɲɟɧɢɟ ɨɞɧɨɝɨ ɩɪɢɦɟɪɚ. 2. ɇɟɜɨɡɦɨɠɧɨɫɬɶ ɨɰɟɧɢɬɶ ɩɪɚɜɢɥɶɧɨɫɬɶ ɪɟɲɟɧɢɹ ɩɪɢɦɟɪɚ ɞɨ ɨɤɨɧɱɚɧɢɹ ɨɛɭɱɟɧɢɹ. 3. ɇɟɜɨɡɦɨɠɧɨɫɬɶ ɩɨɫɬɪɨɟɧɢɹ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ ɨɬɜɟɬɚ ɞɨ ɨɤɨɧɱɚɧɢɹ ɨɛɭɱɟɧɢɹ. ɗɬɨɬ ɩɪɢɦɟɪ ɹɜɥɹɟɬɫɹ ɨɬɱɚɫɬɢ ɧɚɞɭɦɚɧɧɵɦ, ɩɨɫɤɨɥɶɤɭ ɟɝɨ ɦɨɠɧɨ ɪɟɲɢɬɶ ɫ ɢɫɩɨɥɶɡɨɜɚɧɢɟɦ ɛɨɥɟɟ ɩɪɨɫɬɵɯ ɥɨɤɚɥɶɧɵɯ ɨɰɟɧɨɤ. ɇɢɠɟ ɩɪɢɜɟɞɟɧ ɩɪɢɦɟɪ ɡɚɞɚɱɢ, ɤɨɬɨɪɭɸ ɧɟɜɨɡɦɨɠɧɨ ɪɟɲɢɬɶ ɫ ɢɫɩɨɥɶɡɨɜɚɧɢɟɦ ɥɨɤɚɥɶɧɵɯ ɨɰɟɧɨɤ. Ƚɟɧɟɪɚɬɨɪ ɫɥɭɱɚɣɧɵɯ ɱɢɫɟɥ. ɇɟɨɛɯɨɞɢɦɨ ɨɛɭɱɢɬɶ ɫɟɬɶ ɝɟɧɟɪɢɪɨɜɚɬɶ ɩɨɫɥɟɞɨɜɚɬɟɥɶɧɨɫɬɶ ɫɥɭɱɚɣɧɵɯ ɱɢɫɟɥ ɢɡ ɞɢɚɩɚɡɨɧɚ
[0,1] ɫ ɡɚɞɚɧɧɵɦɢ k ɩɟɪɜɵɦɢ ɦɨɦɟɧɬɚɦɢ. ɇɚɩɨɦɧɢɦ, ɱɬɨ ɞɥɹ ɜɵɛɨɪɤɢ ɪɨɥɶ
ɩɟɪɜɨɝɨ ɦɨɦɟɧɬɚ ɢɝɪɚɟɬ ɫɪɟɞɧɟɟ ɡɧɚɱɟɧɢɟ, ɜɬɨɪɨɝɨ - ɫɪɟɞɧɢɣ ɤɜɚɞɪɚɬ, ɬɪɟɬɶɟɝɨ - ɫɪɟɞɧɢɣ ɤɭɛ ɢ ɬɚɤ ɞɚɥɟɟ. ȿɫɬɶ ɞɜɚ ɩɭɬɢ ɪɟɲɟɧɢɹ ɷɬɨɣ ɡɚɞɚɱɢ. ɉɟɪɜɵɣ - ɢɫɩɨɥɶɡɭɹ ɫɬɚɧɞɚɪɬɧɵɣ ɝɟɧɟɪɚɬɨɪ ɫɥɭɱɚɣɧɵɯ ɱɢɫɟɥ ɩɨɞɝɨɬɨɜɢɬɶ ɡɚɞɚɱɧɢɤ ɢ ɨɛɭɱɢɬɶ ɩɨ ɧɟɦɭ ɫɟɬɶ. ɗɬɨɬ ɩɭɬɶ ɩɥɨɯ ɬɟɦ, ɱɬɨ ɬɚɤɨɣ ɝɟɧɟɪɚɬɨɪ ɛɭɞɟɬ ɩɪɨɫɬɨ ɜɨɫɩɪɨɢɡɜɨɞɢɬɶ ɩɨɫɥɟɞɨɜɚɬɟɥɶɧɨɫɬɶ ɱɢɫɟɥ, ɡɚɩɢɫɚɧɧɭɸ ɜ ɡɚɞɚɱɧɢɤɟ. Ⱦɥɹ ɩɨɥɭɱɟɧɢɹ ɬɚɤɨɝɨ ɪɟɡɭɥɶɬɚɬɚ ɦɨɠɧɨ ɩɪɨɫɬɨ ɯɪɚɧɢɬɶ ɡɚɞɚɱɧɢɤ. ȼɬɨɪɨɣ ɜɚɪɢɚɧɬ - ɨɛɭɱɚɬɶ ɫɟɬɶ ɛɟɡ ɡɚɞɚɱɧɢɤɚ! ɉɭɫɬɶ ɧɟɣɪɨɫɟɬɶ ɩɪɢɧɢɦɚɟɬ ɨɞɢɧ ɜɯɨɞɧɨɣ ɫɢɝɧɚɥ ɢ ɜɵɞɚɟɬ ɨɞɢɧ ɜɵɯɨɞɧɨɣ. ɉɪɢ ɢɫɩɨɥɶɡɨɜɚɧɢɢ ɫɟɬɢ ɜɵɯɨɞɧɨɣ ɫɢɝɧɚɥ ɩɟɪɜɨɝɨ ɫɪɚɛɚɬɵɜɚɧɢɹ ɫɟɬɢ (ɩɟɪɜɨɟ ɫɥɭɱɚɣɧɨɟ ɱɢɫɥɨ) ɛɭɞɟɬ ɫɥɭɠɢɬɶ ɜɯɨɞɧɵɦ ɫɢɝɧɚɥɨɦ ɞɥɹ ɜɬɨɪɨɝɨ ɫɪɚɛɚɬɵɜɚɧɢɹ ɫɟɬɢ ɢ ɬɚɤ ɞɚɥɟɟ. Ⱦɥɹ ɩɨɫɬɪɨɟɧɢɹ ɨɰɟɧɤɢ ɡɚɞɚɞɢɦɫɹ ɬɪɟɦɹ ɧɚɛɨɪɚɦɢ ɱɢɫɟɥ: M i - ɧɟɨɛɯɨɞɢɦɨɟ ɡɧɚɱɟɧɢɟ i-ɝɨ ɦɨɦɟɧɬɚ,
Li - ɞɥɢɧɚ ɩɨɫɥɟɞɨɜɚɬɟɥɶɧɨɫɬɢ, ɧɚ ɤɨɬɨɪɨɣ i-ɵɣ ɦɨɦɟɧɬ ɫɝɟɧɟɪɢɪɨɜɚɧɧɨɣ ɩɨɫɥɟɞɨɜɚɬɟɥɶɧɨɫɬɢ e i ɨɬɥɢɱɚɬɶɫɹ ɨɬ M i . e i - ɬɨɱɧɨɫɬɶ ɜɵɱɢɫɥɟɧɢɹ i-ɝɨ ɦɨɦɟɧɬɚ. ȼɵɛɨɪɨɱɧɚɹ ɨɰɟɧɤɚ ɫɨɜɩɚɞɟɧɢɹ i-ɝɨ ɦɨɦɟɧɬɚ ɜ ɫɝɟɧɟɪɢɪɨɜɚɧɧɨɣ ɩɨɫɥɟɞɨɜɚɬɟɥɶɧɨɫɬɢ ɧɚ ɨɬɪɟɡɤɟ, 1 j + Li -1 i j ɧɚɱɢɧɚɸɳɟɦɫɹ ɫ j-ɝɨ ɫɥɭɱɚɣɧɨɝɨ ɱɢɫɥɚ, ɜɵɱɢɫɥɹɟɬɫɹ ɩɨ ɫɥɟɞɭɸɳɟɣ ɮɨɪɦɭɥɟ: M i = å a l , ɝɞɟ Li l = j
ɞɨɥɠɟɧ ɧɟ ɛɨɥɟɟ ɱɟɦ ɧɚ
a l - ɜɵɯɨɞɧɨɣ ɫɢɝɧɚɥ, ɩɨɥɭɱɟɧɧɵɣ ɧɚ l-ɨɦ ɫɪɚɛɚɬɵɜɚɧɢɢ ɫɟɬɢ. Ⱦɥɹ ɨɰɟɧɤɢ ɬɨɱɧɨɫɬɢ ɫɨɜɩɚɞɟɧɢɹ i-ɝɨ
CHAP6.DOC
119
ɦɨɦɟɧɬɚ ɜ ɫɝɟɧɟɪɢɪɨɜɚɧɧɨɣ ɩɨɫɥɟɞɨɜɚɬɟɥɶɧɨɫɬɢ ɧɚ ɨɬɪɟɡɤɟ, ɧɚɱɢɧɚɸɳɟɦɫɹ ɫ j-ɝɨ ɫɥɭɱɚɣɧɨɝɨ ɱɢɫɥɚ, ɜɨɫɩɨɥɶɡɭɟɦɫɹ ɨɰɟɧɤɨɣ ɱɢɫɥɚ ɫ ɞɨɩɭɫɤɨɦ e i :
ì 0, ɩɪɢ M i j - M i £ e i , ï 2 ï H ij = í M i j - M i - e i , ɩɪɢ M i j > M i + , e i ï 2 ï M i j - M i + e i , ɩɪɢ M i j < M i - e i . î Ɍɚɤɢɦ ɨɛɪɚɡɨɦ, ɩɪɢ ɨɛɭɱɟɧɢɢ ɫɟɬɢ ɝɟɧɟɪɚɰɢɢ ɩɨɫɥɟɞɨɜɚɬɟɥɶɧɨɫɬɢ ɢɡ N ɫɥɭɱɚɣɧɵɯ ɱɢɫɟɥ ɨɰɟɧɤɭ
( (
) )
ɦɨɠɧɨ ɡɚɩɢɫɚɬɶ ɜ ɫɥɟɞɭɸɳɟɦ ɜɢɞɟ:
H=å
åH
k
N - Li
i =1
j =1
i j
.
ɉɪɨɢɡɜɨɞɧɚɹ ɨɰɟɧɤɢ ɩɨ ɜɵɯɨɞɧɨɦɭ ɫɢɝɧɚɥɭ l-ɝɨ ɫɪɚɛɚɬɵɜɚɧɢɹ ɫɟɬɢ ɦɨɠɧɨ ɡɚɩɢɫɚɬɶ ɜ ɫɥɟɞɭɸɳɟɦ ɜɢɞɟ:
ì 0, ɩɪɢ M i j - M i £ e i , ï i -1 l + Li -1 ï ia k dH ï M i j - M i - e i , ɩɪɢ M i j > M i + e i , =å å í L da l i =1 j = l - Li +1 ï i i -1 ï ia M i j - M i + e i , ɩɪɢ M i j < M i - e i . ïî Li
( (
) )
ɂɫɩɨɥɶɡɭɹ ɷɬɭ ɨɰɟɧɤɭ ɦɨɠɧɨ ɨɛɭɱɚɬɶ ɫɟɬɶ ɝɟɧɟɪɢɪɨɜɚɬɶ ɫɥɭɱɚɣɧɵɟ ɱɢɫɥɚ. ɍɞɨɛɫɬɜɨ ɷɬɨɝɨ ɩɨɞɯɨɞɚ ɤ ɪɟɲɟɧɢɸ ɡɚɞɚɱɢ ɨɛɭɱɟɧɢɹ ɝɟɧɟɪɚɬɨɪɚ ɫɥɭɱɚɣɧɵɯ ɱɢɫɟɥ ɜ ɬɨɦ, ɱɬɨ ɦɨɠɧɨ ɞɨɫɬɚɬɨɱɧɨ ɱɚɫɬɨ ɦɟɧɹɬɶ ɢɧɢɰɢɢɪɭɸɳɢɣ ɫɟɬɶ ɜɯɨɞɧɨɣ ɫɢɝɧɚɥ, ɱɬɨ ɩɨɡɜɨɥɢɬ ɫɟɬɢ ɝɟɧɟɪɢɪɨɜɚɬɶ ɧɟ ɨɞɧɭ, ɚ ɦɧɨɝɨ ɪɚɡɥɢɱɧɵɯ ɩɨɫɥɟɞɨɜɚɬɟɥɶɧɨɫɬɟɣ, ɨɛɥɚɞɚɸɳɢɯ ɜɫɟɦɢ ɧɟɨɛɯɨɞɢɦɵɦɢ ɫɜɨɣɫɬɜɚɦɢ. ɉɪɢ ɢɫɩɨɥɶɡɨɜɚɧɢɢ ɩɪɟɞɥɨɠɟɧɧɨɣ ɨɰɟɧɤɢ ɧɟɬ ɧɢɤɚɤɢɯ ɝɚɪɚɧɬɢɣ ɬɨɝɨ, ɱɬɨ ɜ ɝɟɧɟɪɢɪɭɟɦɨɣ ɫɟɬɶɸ ɩɨɫɥɟɞɨɜɚɬɟɥɶɧɨɫɬɢ ɧɟ ɩɨɹɜɹɬɫɹ ɫɢɥɶɧɨ ɫɤɨɪɪɟɥɢɪɨɜɚɧɧɵɟ ɩɨɞɩɨɫɥɟɞɨɜɚɬɟɥɶɧɨɫɬɢ. Ⱦɥɹ ɭɞɚɥɟɧɢɹ ɤɨɪɪɟɥɹɰɢɣ ɦɨɠɧɨ ɦɨɞɢɮɢɰɢɪɨɜɚɬɶ ɨɰɟɧɤɭ ɬɚɤ, ɱɬɨɛɵ ɨɧɚ ɜɨɡɪɚɫɬɚɥɚ ɩɪɢ ɩɨɹɜɥɟɧɢɢ ɤɨɪɪɟɥɹɰɢɣ. Ɋɚɫɫɦɨɬɪɢɦ ɞɜɟ ɩɨɞɩɨɫɥɟɞɨɜɚɬɟɥɶɧɨɫɬɢ ɞɥɢɧɧɵ L, ɩɟɪɜɚɹ ɢɡ ɤɨɬɨɪɵɯ ɧɚɱɢɧɚɟɬɫɹ ɫ a i , ɚ ɞɪɭɝɚɹ ɫ a i + h . Ʉɨɷɮɮɢɰɢɟɧɬ ɤɨɪɪɟɥɹɰɢɢ ɷɬɢɯ ɩɨɫɥɟɞɨɜɚɬɟɥɶɧɨɫɬɟɣ ɡɚɩɢɫɵɜɚɟɬɫɹ ɜ ɜɢɞɟ:
rih =
1 L-1 å a i+ ja i+ j+h - a i a i+h L j=0 a i2 - a i
2
a i2+ h - a i + h
ȼ ɷɬɨɣ ɮɨɪɦɭɥɟ ɩɪɢɧɹɬɵ ɫɥɟɞɭɸɳɢɟ ɨɛɨɡɧɚɱɟɧɢɹ:
2
.
a i - ɫɪɟɞɧɟɟ ɩɨ ɩɨɫɥɟɞɨɜɚɬɟɥɶɧɨɫɬɢ, ɧɚɱɢ-
ɧɚɸɳɟɣɫɹ ɫ a i ; a i - ɫɪɟɞɧɢɣ ɤɜɚɞɪɚɬ ɩɨɫɥɟɞɨɜɚɬɟɥɶɧɨɫɬɢ ɧɚɱɢɧɚɸɳɟɣɫɹ ɫ a i . ȼɵɱɢɫɥɟɧɢɟ ɬɚɤɨɝɨ ɤɨɷɮɮɢɰɢɟɧɬɚ ɤɨɪɪɟɥɹɰɢɢ ɞɨɜɨɥɶɧɨ ɞɨɥɝɢɣ ɩɪɨɰɟɫɫ. Ɉɞɧɚɤɨ ɜɦɟɫɬɨ ɜɵɛɨɪɨɱɧɵɯ ɦɨɦɟɧɬɨɜ ɜ ɮɨɪɦɭɥɭ ɦɨɠɧɨ ɩɨɞɫɬɚɜɢɬɶ ɡɧɚɱɟɧɢɹ ɦɨɦɟɧɬɨɜ, ɤɨɬɨɪɵɟ ɩɨɫɥɟɞɨɜɚɬɟɥɶɧɨɫɬɶ ɞɨɥɠɧɚ ɢɦɟɬɶ. ȼ ɷɬɨɦ ɫɥɭɱɚɟ ɮɨɪɦɭɥɚ ɫɢɥɶɧɨ ɭɩɪɨɳɚɟɬɫɹ: 2
rih =
1 L -1 å a i + j a i + j + h - M 12 L j=0 M 2 - M 12
.
Ⱦɨɛɚɜɤɭ ɞɥɹ ɭɞɚɥɟɧɢɹ ɤɨɪɪɟɥɹɰɢɣ ɩɨɫɥɟɞɨɜɚɬɟɥɶɧɨɫɬɟɣ ɞɥɢɧɨɣ ɨɬ ɨɬɧɨɫɢɬɟɥɶɧɨ ɞɪɭɝɚ ɧɚ ɫɦɟɳɟɧɢɹ ɨɬ
CHAP6.DOC
h1 ɞɨ h2 ɦɨɠɧɨ ɡɚɩɢɫɚɬɶ ɜ ɜɢɞɟ:
120
L1 ɞɨ L2 ɢ ɫɦɟɳɟɧɧɵɯ ɞɪɭɝ
æ 1 L -1 2ö ç å a i + ja i + j +h - M 1 ÷ L 0 j = ç ÷ . ç ÷ M 2 - M 12 ç ÷ è ø 2
Hr =
åå å L2
h2 N - h - L +1
L = L1 h = h1
i =1
ɉɪɢ ɧɟɨɛɯɨɞɢɦɨɫɬɢ ɦɨɠɧɨ ɜɜɟɫɬɢ ɢ ɞɪɭɝɢɟ ɩɨɩɪɚɜɤɢ, ɭɱɢɬɵɜɚɸɳɢɟ ɬɪɟɛɨɜɚɧɢɹ ɤ ɝɟɧɟɪɚɬɨɪɭ ɫɥɭɱɚɣɧɵɯ ɱɢɫɟɥ.
6.6 ɋɨɫɬɚɜɧɵɟ ɢɧɬɟɪɩɪɟɬɚɬɨɪ ɨɬɜɟɬɚ ɢ ɨɰɟɧɤɚ ɉɪɢ ɢɫɩɨɥɶɡɨɜɚɧɢɢ ɧɟɣɪɨɧɧɵɯ ɫɟɬɟɣ ɞɥɹ ɪɟɲɟɧɢɹ ɪɚɡɥɢɱɧɵɯ ɡɚɞɚɱ ɜɨɡɧɢɤɚɟɬ ɧɟɨɛɯɨɞɢɦɨɫɬɶ ɩɨɥɭɱɚɬɶ ɨɬ ɫɟɬɢ ɧɟ ɨɞɢɧ ɨɬɜɟɬ, ɚ ɧɟɫɤɨɥɶɤɨ. ɇɚɩɪɢɦɟɪ, ɩɪɢ ɨɛɭɱɟɧɢɢ ɫɟɬɢ ɪɟɲɟɧɢɸ ɡɚɞɚɱɢ ɞɢɚɝɧɨɫɬɢɤɢ ɨɬɤɥɨɧɟɧɢɣ ɜ ɪɟɚɤɰɢɢ ɧɚ ɫɬɪɟɫɫ ɧɟɣɪɨɧɧɚɹ ɫɟɬɶ ɞɨɥɠɧɚ ɛɵɥɚ ɨɩɪɟɞɟɥɢɬɶ ɧɚɥɢɱɢɟ ɢɥɢ ɨɬɫɭɬɫɬɜɢɟ ɬɪɢɧɚɞɰɚɬɢ ɪɚɡɥɢɱɧɵɯ ɩɚɬɨɥɨɝɢɣ. ȿɫɥɢ ɨɞɧɚ ɫɟɬɶ ɦɨɠɟɬ ɜɵɞɚɜɚɬɶ ɬɨɥɶɤɨ ɨɞɢɧ ɨɬɜɟɬ, ɬɨ ɞɥɹ ɪɟɲɟɧɢɹ ɡɚɞɚɱɢ ɧɟɨɛɯɨɞɢɦɨ ɡɚɞɟɣɫɬɜɨɜɚɬɶ ɬɪɢɧɚɞɰɚɬɶ ɫɟɬɟɣ. Ɉɞɧɚɤɨ ɜ ɷɬɨɦ ɧɟɬ ɧɟɨɛɯɨɞɢɦɨɫɬɢ. ɉɨɫɤɨɥɶɤɭ ɤɚɠɞɵɣ ɨɬɜɟɬ, ɤɨɬɨɪɵɣ ɞɨɥɠɧɚ ɜɵɞɚɜɚɬɶ ɫɟɬɶ, ɢɦɟɟɬ ɬɨɥɶɤɨ ɞɜɚ ɜɚɪɢɚɧɬɚ, ɬɨ ɦɨɠɧɨ ɢɫɩɨɥɶɡɨɜɚɬɶ ɞɥɹ ɟɝɨ ɩɨɥɭɱɟɧɢɹ ɤɥɚɫɫɢɮɢɤɚɬɨɪ ɧɚ ɞɜɚ ɤɥɚɫɫɚ. Ⱦɥɹ ɬɚɤɨɝɨ ɤɥɚɫɫɢɮɢɤɚɬɨɪɚ ɧɟɨɛɯɨɞɢɦɨ ɞɜɚ ɜɵɯɨɞɧɵɯ ɫɢɝɧɚɥɚ. Ɍɨɝɞɚ ɞɥɹ ɪɟɲɟɧɢɹ ɡɚɞɚɱɢ ɞɨɫɬɚɬɨɱɧɨ ɩɨɥɭɱɚɬɶ 26 ɜɵɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ: ɩɟɪɜɵɟ ɞɜɚ ɫɢɝɧɚɥɚ - ɞɥɹ ɨɩɪɟɞɟɥɟɧɢɹ ɩɟɪɜɨɣ ɩɚɬɨɥɨɝɢɢ, ɬɪɟɬɢɣ ɢ ɱɟɬɜɟɪɬɵɣ - ɞɥɹ ɜɬɨɪɨɣ ɢ ɬɚɤ ɞɚɥɟɟ. Ɍɚɤɢɦ ɨɛɪɚɡɨɦ, ɢɧɬɟɪɩɪɟɬɚɬɨɪ ɨɬɜɟɬɚ ɞɥɹ ɷɬɨɣ ɡɚɞɚɱɢ ɫɨɫɬɨɢɬ ɢɡ ɬɪɢɧɚɞɰɚɬɢ ɢɧɬɟɪɩɪɟɬɚɬɨɪɨɜ, ɚ ɨɰɟɧɤɚ ɢɡ ɬɪɢɧɚɞɰɚɬɢ ɨɰɟɧɨɤ. Ȼɨɥɟɟ ɬɨɝɨ, ɧɟɬ ɧɢɤɚɤɢɯ ɨɝɪɚɧɢɱɟɧɢɣ ɧɚ ɬɢɩɵ ɢɫɩɨɥɶɡɭɟɦɵɯ ɢɧɬɟɪɩɪɟɬɚɬɨɪɨɜ ɢɥɢ ɨɰɟɧɨɤ. ȼɨɡɦɨɠɧɚ ɤɨɦɛɢɧɚɰɢɹ, ɧɚɩɪɢɦɟɪ, ɫɥɟɞɭɸɳɢɯ ɨɬɜɟɬɨɜ. 1. ɑɢɫɥɨ ɫ ɞɨɩɭɫɤɨɦ. 2. Ʉɥɚɫɫɢɮɢɤɚɬɨɪ ɧɚ ɜɨɫɟɦɶ ɤɥɚɫɫɨɜ. 3. ɋɥɭɱɚɣɧɨɟ ɱɢɫɥɨ. ɉɪɢ ɢɫɩɨɥɶɡɨɜɚɧɢɢ ɬɚɤɢɯ ɫɨɫɬɚɜɧɵɯ ɨɰɟɧɨɤ ɢ ɢɧɬɟɪɩɪɟɬɚɬɨɪɨɜ ɤɚɠɞɵɣ ɢɡ ɷɬɢɯ ɤɨɦɩɨɧɟɧɬɨɜ ɞɨɥɠɟɧ ɫɥɟɞɢɬɶ ɡɚ ɬɟɦ, ɱɬɨɛɵ ɤɚɠɞɚɹ ɱɚɫɬɧɚɹ ɨɰɟɧɤɚ ɢɥɢ ɢɧɬɟɪɩɪɟɬɚɬɨɪ ɩɨɥɭɱɚɥɢ ɧɚ ɜɯɨɞ ɬɟ ɞɚɧɧɵɟ, ɤɨɬɨɪɵɟ ɢɦ ɧɟɨɛɯɨɞɢɦɵ.
6.7 ɋɬɚɧɞɚɪɬ ɩɟɪɜɨɝɨ ɭɪɨɜɧɹ ɤɨɦɩɨɧɟɧɬɚ ɢɧɬɟɪɩɪɟɬɚɬɨɪ ɨɬɜɟɬɚ Ⱦɚɧɧɵɣ ɪɚɡɞɟɥ ɩɨɫɜɹɳɟɧ ɨɩɢɫɚɧɢɸ ɫɬɚɧɞɚɪɬɚ ɡɚɩɢɫɢ ɧɚ ɞɢɫɤ ɤɨɦɩɨɧɟɧɬɚ ɢɧɬɟɪɩɪɟɬɚɬɨɪ ɨɬɜɟɬɨɜ. ɉɨɫɬɪɨɟɧɢɟ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ ɩɪɨɢɫɯɨɞɢɬ ɜ ɪɟɞɚɤɬɨɪɟ ɢɧɬɟɪɩɪɟɬɚɬɨɪɨɜ ɨɬɜɟɬɚ. ɂɧɬɟɪɩɪɟɬɚɬɨɪ ɨɬɜɟɬɚ ɜɫɟɝɞɚ ɹɜɥɹɟɬɫɹ ɫɨɫɬɚɜɧɵɦ, ɞɚɠɟ ɟɫɥɢ ɜɵɯɨɞɨɦ ɹɜɥɹɟɬɫɹ ɨɞɢɧ ɨɬɜɟɬ. ȼ ɫɨɫɬɚɜ ɷɬɨɝɨ ɨɛɴɟɤɬɚ ɜɯɨɞɹɬ ɱɚɫɬɧɵɟ ɢɧɬɟɪɩɪɟɬɚɬɨɪɵ. Ʉɪɨɦɟ ɬɨɝɨ, ɨɩɢɫɚɧɢɟ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ ɞɨɥɠɧɨ ɜɤɥɸɱɚɬɶ ɜ ɫɟɛɹ ɩɪɚɜɢɥɚ ɪɚɫɩɪɟɞɟɥɟɧɢɹ ɜɵɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ ɫɟɬɢ ɦɟɠɞɭ ɱɚɫɬɧɵɦɢ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚɦɢ ɢ ɪɚɫɩɨɥɨɠɟɧɢɹ ɨɬɜɟɬɨɜ ɱɚɫɬɧɵɯ ɢɧɬɟɪɩɪɟɬɚɬɨɪɨɜ ɜ ɟɞɢɧɨɦ ɦɚɫɫɢɜɟ ɨɬɜɟɬɨɜ. Ɍɚɤɢɦ ɨɛɪɚɡɨɦ, ɢɧɬɟɪɩɪɟɬɚɬɨɪ ɨɬɜɟɬɚ ɩɪɢ ɜɵɩɨɥɧɟɧɢɢ ɡɚɩɪɨɫɚ ɧɚ ɢɧɬɟɪɩɪɟɬɚɰɢɸ ɦɚɫɫɢɜɚ ɜɵɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ ɫɟɬɢ ɩɨɥɭɱɚɟɬ ɧɚ ɜɯɨɞɟ ɦɚɫɫɢɜ ɜɵɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ ɫɟɬɢ, ɚ ɜɨɡɜɪɚɳɚɟɬ ɞɜɚ ɦɚɫɫɢɜɚ – ɨɬɜɟɬɨɜ ɢ ɤɨɷɮɮɢɰɢɟɧɬɨɜ ɭɜɟɪɟɧɧɨɫɬɢ. Ʉɚɠɞɵɣ ɱɚɫɬɧɵɣ ɢɧɬɟɪɩɪɟɬɚɬɨɪ ɨɬɜɟɬɚ ɩɨɥɭɱɚɟɬ ɧɚ ɜɯɨɞɟ ɦɚɫɫɢɜ ɫɢɝɧɚɥɨɜ (ɜɨɡɦɨɠɧɨ ɢɡ ɨɞɧɨɝɨ ɷɥɟɦɟɧɬɚ), ɤɨɬɨɪɵɟ ɨɧ ɢɧɬɟɪɩɪɟɬɢɪɭɟɬ, ɚ ɧɚ ɜɵɯɨɞɟ ɜɨɡɜɪɚɳɚɟɬ ɞɜɚ ɱɢɫɥɚ – ɨɬɜɟɬ ɢ ɤɨɷɮɮɢɰɢɟɧɬ ɭɜɟɪɟɧɧɨɫɬɢ ɜ ɷɬɨɦ ɨɬɜɟɬɟ. Ɍɚɛɥɢɰɚ 1. Ʉɥɸɱɟɜɵɟ ɫɥɨɜɚ ɹɡɵɤɚ ɨɩɢɫɚɧɢɹ ɢɧɬɟɪɩɪɟɬɚɬɨɪɨɜ ɨɬɜɟɬɚ. Ʉɥɸɱɟɜɨɟ ɫɥɨɜɨɄɪɚɬɤɨɟ ɨɩɢɫɚɧɢɟ 1. Answer Ɉɬɜɟɬ. 2. Connections ɇɚɱɚɥɨ ɛɥɨɤɚ ɨɩɢɫɚɧɢɹ ɪɚɫɩɪɟɞɟɥɟɧɢɹ ɫɢɝɧɚɥɨɜ ɢ ɨɬɜɟɬɨɜ. 3. Contents ɇɚɱɚɥɨ ɛɥɨɤɚ ɨɩɢɫɚɧɢɹ ɫɨɫɬɚɜɚ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ. 4. Include ɉɪɟɞɲɟɫɬɜɭɟɬ ɢɦɟɧɢ ɮɚɣɥɚ, ɰɟɥɢɤɨɦ ɜɫɬɚɜɥɹɟɦɨɝɨ ɜ ɷɬɨ ɦɟɫɬɨ ɨɩɢɫɚɧɢɹ. 5. Interpretator Ɂɚɝɨɥɨɜɨɤ ɪɚɡɞɟɥɚ ɮɚɣɥɚ, ɫɨɞɟɪɠɚɳɢɣ ɨɩɢɫɚɧɢɟ ɢɧɬɟɪɩɪɟɬɚɬɨɪ. 6. NumberOf Ɏɭɧɤɰɢɹ. ȼɨɡɜɪɚɳɚɟɬ ɱɢɫɥɨ ɢɧɬɟɪɩɪɟɬɢɪɭɟɦɵɯ ɱɚɫɬɧɵɦ ɢɧɬɟɪɩɪɟɬɚɬɨɪɨɦ ɫɢɝɧɚɥɨɜ. 7. Reliability Ʉɨɷɮɮɢɰɢɟɧɬ ɭɜɟɪɟɧɧɨɫɬɢ. 8. Signals ɂɦɹ, ɩɨ ɤɨɬɨɪɨɦɭ ɚɞɪɟɫɭɸɬɫɹ ɢɧɬɟɪɩɪɟɬɢɪɭɟɦɵɟ ɫɢɝɧɚɥɵ; ɧɚɱɚɥɨ ɛɥɨɤɚ ɨɩɢɫɚɧɢɹ ɫɢɝɧɚɥɨɜ. 9. SetParameters ɉɪɨɰɟɞɭɪɚ ɭɫɬɚɧɨɜɥɟɧɢɹ ɡɧɚɱɟɧɢɣ ɩɚɪɚɦɟɬɪɨɜ.
CHAP6.DOC
121
Ɍɚɛɥɢɰɚ 2. ɋɬɚɧɞɚɪɬɧɵɟ ɱɚɫɬɧɵɟ ɢɧɬɟɪɩɪɟɬɚɬɨɪɵ. ɇɚɡɜɚɧɢɟɉɚɪɚɦɟɬɪɵȺɪɝɭɦɟɧɬɵɈɩɢɫɚɧɢɟ Empty B – ɦɧɨɠɢɬɟɥɶ ɂɧɬɟɪɩɪɟɬɢɪɭɟɬ ɨɞɢɧ ɫɢɝɧɚɥ Ⱥ. Ɉɬɜɟɬɨɦ C – ɫɦɟɳɟɧɢɟ ɹɜɥɹɟɬɫɹ ɜɟɥɢɱɢɧɚ Ɉ=Ⱥ*ȼ+ɋ Binary E – ɭɪɨɜɟɧɶ ɧɚɞɟɠɧɨɫɬɢ N – ɱɢɫɥɨ ɫɢɝɧɚɥɨɜ Ʉɨɞɢɪɨɜɚɧɢɟ ɧɨɦɟɪɨɦ ɤɚɧɚɥɚ. Ɂɧɚɤɨɜɵɣ (ɤɥɚɫɫɨɜ) ɢɧɬɟɪɩɪɟɬɚɬɨɪ Major E – ɭɪɨɜɟɧɶ ɧɚɞɟɠɧɨɫɬɢ N – ɱɢɫɥɨ ɫɢɝɧɚɥɨɜ Ʉɨɞɢɪɨɜɚɧɢɟ ɧɨɦɟɪɨɦ ɤɚɧɚɥɚ. Ɇɚɤɫɢ(ɤɥɚɫɫɨɜ) ɦɚɥɶɧɵɣ ɢɧɬɟɪɩɪɟɬɚɬɨɪ. BynaryCoded E – ɭɪɨɜɟɧɶ ɧɚɞɟɠɧɨɫɬɢ N – ɱɢɫɥɨ ɫɢɝɧɚɥɨɜ Ⱦɜɨɢɱɧɵɣ ɢɧɬɟɪɩɪɟɬɚɬɨɪ. (ɤɥɚɫɫɨɜ) ȼ ɬɚɛɥ. 1 ɩɪɢɜɟɞɟɧ ɫɩɢɫɨɤ ɤɥɸɱɟɜɵɯ ɫɥɨɜ, ɫɩɟɰɢɮɢɱɟɫɤɢɯ ɞɥɹ ɹɡɵɤɚ ɨɩɢɫɚɧɢɹ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ ɨɬɜɟɬɨɜ. ɇɚɢɛɨɥɟɟ ɱɚɫɬɨ ɜɫɬɪɟɱɚɸɳɢɟɫɹ ɢɧɬɟɪɩɪɟɬɚɬɨɪɵ ɨɛɴɹɜɥɟɧɵ ɫɬɚɧɞɚɪɬɧɵɦɢ. Ⱦɥɹ ɫɬɚɧɞɚɪɬɧɵɯ ɢɧɬɟɪɩɪɟɬɚɬɨɪɨɜ ɨɩɢɫɚɧɢɟ ɱɚɫɬɧɵɯ ɢɧɬɟɪɩɪɟɬɚɬɨɪɨɜ ɨɬɫɭɬɫɬɜɭɟɬ. ɋɩɢɫɨɤ ɫɬɚɧɞɚɪɬɧɵɯ ɢɧɬɟɪɩɪɟɬɚɬɨɪɨɜ ɩɪɢɜɟɞɟɧ ɜ ɬɚɛɥ. 2.
6.7.1 ȻɇɎ ɹɡɵɤɚ ɨɩɢɫɚɧɢɹ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ Ɉɛɨɡɧɚɱɟɧɢɹ, ɩɪɢɧɹɬɵɟ ɜ ɞɚɧɧɨɦ ɪɚɫɲɢɪɟɧɢɢ ȻɇɎ ɢ ɨɩɢɫɚɧɢɟ ɪɹɞɚ ɤɨɧɫɬɪɭɤɰɢɣ ɩɪɢɜɟɞɟɧɵ ɜ ɝɥɚɜɟ «Ɉɛɳɢɣ ɫɬɚɧɞɚɪɬ» ɜ ɪɚɡɞɟɥɟ «Ɉɩɢɫɚɧɢɟ ɹɡɵɤɚ ɨɩɢɫɚɧɢɹ ɤɨɦɩɨɧɟɧɬɨɜ». ::= [] [] [] [] [] ::= Interpretator ::= ::= [] ::= [] [] ::= Inter : () ::= ::= Begin End ::= Contents ; ::= [,] ::= : { ½ } [[]][()] ::= ::= ::= ::= ::= [;] ::= Signals ::= ::= ::= End Interpretator
6.7.2 Ɉɩɢɫɚɧɢɟ ɹɡɵɤɚ ɨɩɢɫɚɧɢɹ ɢɧɬɟɪɩɪɟɬɚɬɨɪɨɜ ɋɬɪɭɤɬɭɪɚ ɨɩɢɫɚɧɢɹ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ ɢɦɟɟɬ ɜɢɞ: ɡɚɝɨɥɨɜɨɤ, ɨɩɢɫɚɧɢɟ ɱɚɫɬɧɵɯ ɢɧɬɟɪɩɪɟɬɚɬɨɪɨɜ, ɨɩɢɫɚɧɢɟ ɫɨɫɬɚɜɚ, ɨɩɢɫɚɧɢɟ ɫɢɝɧɚɥɨɜ, ɨɩɢɫɚɧɢɟ ɪɚɫɩɪɟɞɟɥɟɧɢɹ ɫɢɝɧɚɥɨɜ, ɨɩɢɫɚɧɢɟ ɪɚɫɩɪɟɞɟɥɟɧɢɹ ɨɬɜɟɬɨɜ, ɤɨɧɟɰ ɨɩɢɫɚɧɢɹ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ. Ɂɚɝɨɥɨɜɨɤ ɫɨɫɬɨɢɬ ɢɡ ɤɥɸɱɟɜɨɝɨ ɫɥɨɜɚ Interpretator ɢ ɢɦɟɧɢ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ ɢ ɫɥɭɠɢɬ ɞɥɹ ɨɛɨɡɧɚɱɟɧɢɹ ɧɚɱɚɥɚ ɨɩɢɫɚɧɢɹ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ ɜ ɮɚɣɥɟ, ɫɨɞɟɪɠɚɳɟɦ ɧɟɫɤɨɥɶɤɨ ɤɨɦɩɨɧɟɧɬɨɜ ɧɟɣɪɨɤɨɦɩɶɸɬɟɪɚ.
CHAP6.DOC
122
Ɉɩɢɫɚɧɢɟ ɱɚɫɬɧɨɝɨ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ – ɷɬɨ ɨɩɢɫɚɧɢɟ ɩɪɨɰɟɞɭɪɵ, ɜɵɱɢɫɥɹɸɳɟɣ ɞɜɟ ɜɟɥɢɱɢɧɵ: ɨɬɜɟɬ ɢ ɭɜɟɪɟɧɧɨɫɬɶ ɜ ɨɬɜɟɬɟ. Ɉɬɦɟɬɢɦ, ɱɬɨ ɭɜɟɪɟɧɧɨɫɬɶ ɜ ɨɬɜɟɬɟ ɢɦɟɟɬ ɫɦɵɫɥ ɬɨɥɶɤɨ ɞɥɹ ɨɰɟɧɨɤ ɫ ɭɪɨɜɧɟɦ ɧɚɞɟɠɧɨɫɬɢ. ȼ ɨɫɬɚɥɶɧɵɯ ɫɥɭɱɚɹɯ ɢɧɬɟɪɩɪɟɬɚɬɨɪ ɨɬɜɟɬɚ ɦɨɠɟɬ ɜɵɱɢɫɥɹɬɶ ɚɧɚɥɨɝɢɱɧɭɸ ɜɟɥɢɱɢɧɭ, ɧɨ ɷɬɚ ɜɟɥɢɱɢɧɚ ɧɟ ɹɜɥɹɟɬɫɹ ɤɨɷɮɮɢɰɢɟɧɬɨɦ ɭɜɟɪɟɧɧɨɫɬɢ ɜ ɨɬɜɟɬɟ ɜ ɬɨɱɧɨɦ ɫɦɵɫɥɟ. Ɉɬɦɟɬɢɦ, ɱɬɨ ɩɪɢ ɨɩɢɫɚɧɢɢ ɱɚɫɬɧɨɝɨ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ ɟɝɨ ɚɪɝɭɦɟɧɬɨɦ, ɤɚɤ ɩɪɚɜɢɥɨ, ɹɜɥɹɟɬɫɹ ɱɢɫɥɨ ɢɧɬɟɪɩɪɟɬɢɪɭɟɦɵɯ ɫɢɝɧɚɥɨɜ. ɉɪɢ ɜɵɩɨɥɧɟɧɢɢ ɱɚɫɬɧɵɣ ɢɧɬɟɪɩɪɟɬɚɬɨɪ ɩɨɥɭɱɚɟɬ ɜ ɤɚɱɟɫɬɜɟ ɚɪɝɭɦɟɧɬɨɜ ɦɚɫɫɢɜ ɢɧɬɟɪɩɪɟɬɢɪɭɟɦɵɯ ɫɢɝɧɚɥɨɜ ɢ ɞɜɟ ɞɟɣɫɬɜɢɬɟɥɶɧɵɟ ɩɟɪɟɦɟɧɧɵɟ ɞɥɹ ɜɨɡɜɪɚɳɟɧɢɹ ɜɵɱɢɫɥɟɧɧɵɯ ɨɬɜɟɬɚ ɢ ɭɜɟɪɟɧɧɨɫɬɢ ɜ ɨɬɜɟɬɟ. Ɏɨɪɦɚɥɶɧɨ, ɩɪɢ ɢɫɩɨɥɧɟɧɢɢ, ɱɚɫɬɧɵɣ ɢɧɬɟɪɩɪɟɬɚɬɨɪ ɢɦɟɟɬ ɨɩɢɫɚɧɢɟ ɫɥɟɞɭɸɳɟɝɨ ɜɢɞɚ: Pascal: Procedure Interpretator(Signals : PRealArray; Var Answer, Reliability : Real); C: void Interpretator(PRealArray Signals, Real* Answer, Real* Reliability); ȼ ɪɚɡɞɟɥɟ ɨɩɢɫɚɧɢɹ ɫɨɫɬɚɜɚ ɩɟɪɟɱɢɫɥɹɸɬɫɹ ɱɚɫɬɧɵɟ ɢɧɬɟɪɩɪɟɬɚɬɨɪɵ, ɜɯɨɞɹɳɢɟ ɜ ɫɨɫɬɚɜ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ. ɉɪɢɡɧɚɤɨɦ ɤɨɧɰɚ ɪɚɡɞɟɥɚ ɫɥɭɠɢɬ ɫɢɦɜɨɥ «;». ȼ ɧɟɨɛɹɡɚɬɟɥɶɧɨɦ ɪɚɡɞɟɥɟ ɭɫɬɚɧɨɜɥɟɧɢɹ ɩɚɪɚɦɟɬɪɨɜ ɩɪɨɢɡɜɨɞɢɬɫɹ ɡɚɞɚɧɢɟ ɡɧɚɱɟɧɢɣ ɩɚɪɚɦɟɬɪɨɜ (ɫɬɚɬɢɱɟɫɤɢɯ ɩɟɪɟɦɟɧɧɵɯ) ɱɚɫɬɧɵɯ ɢɧɬɟɪɩɪɟɬɚɬɨɪɨɜ. ɉɨɫɥɟ ɤɥɸɱɟɜɨɝɨ ɫɥɨɜɚ SetParameters ɫɥɟɞɭɟɬ ɫɩɢɫɨɤ ɡɧɚɱɟɧɢɣ ɩɚɪɚɦɟɬɪɨɜ ɜ ɬɨɦ ɩɨɪɹɞɤɟ, ɜ ɤɚɤɨɦ ɩɚɪɚɦɟɬɪɵ ɛɵɥɢ ɨɛɴɹɜɥɟɧɵ ɩɪɢ ɨɩɢɫɚɧɢɢ ɱɚɫɬɧɨɝɨ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ (ɞɥɹ ɫɬɚɧɞɚɪɬɧɵɯ ɢɧɬɟɪɩɪɟɬɚɬɨɪɨɜ ɩɨɪɹɞɨɤ ɩɚɪɚɦɟɬɪɨɜ ɭɤɚɡɚɧ ɜ ɬɚɛɥ. 2). ɉɪɢ ɢɫɩɨɥɶɡɨɜɚɧɢɢ ɨɞɧɨɝɨ ɨɩɟɪɚɬɨɪɚ ɡɚɞɚɧɢɹ ɩɚɪɚɦɟɬɪɨɜ ɞɥɹ ɡɚɞɚɧɢɹ ɩɚɪɚɦɟɬɪɨɜ ɧɟɫɤɨɥɶɤɢɦ ɷɤɡɟɦɩɥɹɪɚɦ ɨɞɧɨɝɨ ɱɚɫɬɧɨɝɨ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ ɩɨɫɥɟ ɤɥɸɱɟɜɨɝɨ ɫɥɨɜɚ SetParameters ɭɤɚɡɵɜɚɟɬɫɹ ɫɬɨɥɶɤɨ ɜɵɪɚɠɟɧɢɣ, ɡɚɞɚɸɳɢɯ ɡɧɚɱɟɧɢɹ ɩɚɪɚɦɟɬɪɨɜ, ɫɤɨɥɶɤɨ ɧɟɨɛɯɨɞɢɦɨ ɞɥɹ ɨɞɧɨɝɨ ɷɤɡɟɦɩɥɹɪɚ. ɇɚɩɪɢɦɟɪ, ɟɫɥɢ ɜ ɛɥɨɤɟ ɨɩɢɫɚɧɢɹ ɫɨɫɬɚɜɚ ɫɨɞɟɪɠɢɬɫɹ 10 ɷɤɡɟɦɩɥɹɪɨɜ ɞɜɨɢɱɧɨɝɨ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ ɧɚ 15 ɢɧɬɟɪɩɪɟɬɢɪɭɟɦɵɯ ɫɢɝɧɚɥɨɜ – MyInt : BinaryCoded(15)[10], ɬɨ ɩɨɫɥɟ ɤɥɸɱɟɜɨɝɨ ɫɥɨɜɚ SetParameters ɞɨɥɠɧɨ ɛɵɬɶ ɬɨɥɶɤɨ ɨɞɧɨ ɜɵɪɚɠɟɧɢɟ: MyInt[I:1..10] SetParameters 0.01*I ȼ ɞɚɧɧɨɦ ɩɪɢɦɟɪɟ ɩɟɪɜɵɣ ɢɧɬɟɪɩɪɟɬɚɬɨɪ ɛɭɞɟɬ ɢɦɟɬɶ ɭɪɨɜɟɧɶ ɧɚɞɟɠɧɨɫɬɢ ɪɚɜɧɵɣ 0.01, ɜɬɨɪɨɣ – 0.02 ɢ ɬ.ɞ. ȼ ɧɟɨɛɹɡɚɬɟɥɶɧɨɦ ɪɚɡɞɟɥɟ ɨɩɢɫɚɧɢɟ ɫɢɝɧɚɥɨɜ ɭɤɚɡɵɜɚɟɬɫɹ ɱɢɫɥɨ ɫɢɝɧɚɥɨɜ, ɢɧɬɟɪɩɪɟɬɢɪɭɟɦɵɯ ɢɧɬɟɪɩɪɟɬɚɬɨɪɨɦ. ȿɫɥɢ ɷɬɨɬ ɪɚɡɞɟɥ ɨɩɭɳɟɧ, ɬɨ ɩɨɥɚɝɚɟɬɫɹ, ɱɬɨ ɱɢɫɥɨ ɢɧɬɟɪɩɪɟɬɢɪɭɟɦɵɯ ɢɧɬɟɪɩɪɟɬɚɬɨɪɨɦ ɫɢɝɧɚɥɨɜ ɪɚɜɧɨ ɫɭɦɦɟ ɫɢɝɧɚɥɨɜ, ɢɧɬɟɪɩɪɟɬɢɪɭɟɦɵɯ ɜɫɟɦɢ ɱɚɫɬɧɵɦɢ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚɦɢ. ȼ ɤɨɧɫɬɚɧɬɧɨɦ ɜɵɪɚɠɟɧɢɢ ɦɨɠɟɬ ɜɵɡɵɜɚɬɶɫɹ ɮɭɧɤɰɢɹ NumberOf, ɚɪɝɭɦɟɧɬɨɦ ɤɨɬɨɪɨɣ ɹɜɥɹɟɬɫɹ ɢɦɹ ɱɚɫɬɧɨɝɨ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ (ɢɥɢ ɟɝɨ ɩɫɟɜɞɨɧɢɦ) ɫ ɭɤɚɡɚɧɢɟɦ ɮɚɤɬɢɱɟɫɤɢɯ ɚɪɝɭɦɟɧɬɨɜ. ȼ ɧɟɨɛɹɡɚɬɟɥɶɧɨɦ ɪɚɡɞɟɥɟ ɨɩɢɫɚɧɢɹ ɪɚɫɩɪɟɞɟɥɟɧɢɹ ɫɢɝɧɚɥɨɜ ɞɥɹ ɤɚɠɞɨɝɨ ɱɚɫɬɧɨɝɨ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ ɭɤɚɡɵɜɚɟɬɫɹ, ɤɚɤɢɟ ɫɢɝɧɚɥɵ ɢɡ ɨɛɳɟɝɨ ɢɧɬɟɪɩɪɟɬɢɪɭɟɦɨɝɨ ɦɚɫɫɢɜɚ ɩɟɪɟɞɚɸɬɫɹ ɟɦɭ ɞɥɹ ɢɧɬɟɪɩɪɟɬɚɰɢɢ. ȿɫɥɢ ɷɬɨɬ ɪɚɡɞɟɥ ɨɬɫɭɬɫɬɜɭɟɬ, ɬɨ ɫɱɢɬɚɟɬɫɹ, ɱɬɨ ɤɚɠɞɵɣ ɫɥɟɞɭɸɳɢɣ ɱɚɫɬɧɵɣ ɢɧɬɟɪɩɪɟɬɚɬɨɪ ɩɨɥɭɱɚɟɬ ɫɥɟɞɭɸɳɢɣ ɮɪɚɝɦɟɧɬ ɨɛɳɟɝɨ ɜɟɤɬɨɪɚ ɜɵɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ. ȼ ɩɪɢɦɟɪɟ 1 ɞɚɧɧɵɣ ɪɚɡɞɟɥ ɨɩɢɫɵɜɚɟɬ ɪɚɫɩɪɟɞɟɥɟɧɢɟ ɫɢɝɧɚɥɨɜ ɩɨ ɭɦɨɥɱɚɧɢɸ. ȼ ɧɟɨɛɹɡɚɬɟɥɶɧɨɦ ɪɚɡɞɟɥɟ ɨɩɢɫɚɧɢɹ ɪɚɫɩɪɟɞɟɥɟɧɢɹ ɨɬɜɟɬɨɜ ɞɥɹ ɤɚɠɞɨɝɨ ɱɚɫɬɧɨɝɨ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ ɭɤɚɡɵɜɚɟɬɫɹ, ɤɚɤɨɣ ɷɥɟɦɟɧɬ ɦɚɫɫɢɜɚ ɨɬɜɟɬɨɜ ɨɧ ɜɵɱɢɫɥɹɟɬ. ȿɫɥɢ ɷɬɨɬ ɪɚɡɞɟɥ ɨɩɭɳɟɧ, ɬɨ ɫɱɢɬɚɟɬɫɹ, ɱɬɨ ɩɟɪɜɵɣ ɱɚɫɬɧɵɣ ɢɧɬɟɪɩɪɟɬɚɬɨɪ ɜɵɱɢɫɥɹɟɬ ɩɟɪɜɵɣ ɷɥɟɦɟɧɬ ɦɚɫɫɢɜɚ ɨɬɜɟɬɨɜ, ɜɬɨɪɨɣ – ɜɬɨɪɨɣ ɷɥɟɦɟɧɬ ɢ ɬ.ɞ. Ɇɚɫɫɢɜ ɭɪɨɜɧɟɣ ɧɚɞɟɠɧɨɫɬɟɣ ɜɫɟɝɞɚ ɩɚɪɚɥɥɟɥɟɧ ɦɚɫɫɢɜɭ ɨɬɜɟɬɨɜ. ȼ ɩɪɢɦɟɪɟ 1 ɞɚɧɧɵɣ ɪɚɡɞɟɥ ɨɩɢɫɵɜɚɟɬ ɪɚɫɩɪɟɞɟɥɟɧɢɟ ɨɬɜɟɬɨɜ ɩɨ ɭɦɨɥɱɚɧɢɸ. Ʉɪɨɦɟ ɬɨɝɨ, ɜ ɥɸɛɨɦ ɦɟɫɬɟ ɨɩɢɫɚɧɢɹ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ ɦɨɝɭɬ ɜɫɬɪɟɱɚɬɶɫɹ ɤɨɦɦɟɧɬɚɪɢɢ, ɡɚɤɥɸɱɟɧɧɵɟ ɜ ɮɢɝɭɪɧɵɟ ɫɤɨɛɤɢ.
6.7.3 ɉɪɢɦɟɪ ɨɩɢɫɚɧɢɹ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ ȼ ɷɬɨɦ ɪɚɡɞɟɥɟ ɩɪɢɜɟɞɟɧɵ ɞɜɚ ɩɪɢɦɟɪɚ ɨɩɢɫɚɧɢɹ ɨɞɧɨɝɨ ɢ ɬɨɝɨ ɠɟ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ ɫɥɟɞɭɸɳɟɝɨ ɫɨɫɬɚɜɚ: ɩɟɪɜɵɣ ɫɢɝɧɚɥ ɢɧɬɟɪɩɪɟɬɢɪɭɟɬɫɹ ɤɚɤ ɬɟɦɩɟɪɚɬɭɪɚ ɩɭɬɟɦ ɭɦɧɨɠɟɧɢɹ ɧɚ 10 ɢ ɞɨɛɚɜɥɟɧɢɹ 273; ɫɥɟɞɭɸɳɢɟ ɞɜɚ ɫɢɝɧɚɥɚ ɢɧɬɟɪɩɪɟɬɢɪɭɸɬɫɹ ɤɚɤ ɧɚɥɢɱɢɟ ɨɛɥɚɱɧɨɫɬɢ, ɢɫɩɨɥɶɡɭɹ ɡɧɚɤɨɜɵɣ ɢɧɬɟɪɩɪɟɬɚɬɨɪ; ɫɥɟɞɭɸɳɢɟ ɬɪɢ ɫɢɝɧɚɥɚ ɢɧɬɟɪɩɪɟɬɢɪɭɸɬɫɹ ɤɚɤ ɧɚɩɪɚɜɥɟɧɢɟ ɜɟɬɪɚ, ɢɫɩɨɥɶɡɭɹ ɞɜɨɢɱɧɵɣ ɢɧɬɟɪɩɪɟɬɚɬɨɪ (ɜɨɫɟɦɶ ɪɭɦɛɨɜ); ɩɨɫɥɟɞɧɢɟ ɬɪɢ ɫɢɝɧɚɥɚ ɢɧɬɟɪɩɪɟɬɢɪɭɸɬɫɹ ɦɚɤɫɢɦɚɥɶɧɵɦ ɢɧɬɟɪɩɪɟɬɚɬɨɪɨɦ ɤɚɤ ɫɢɥɚ ɨɫɚɞɤɨɜ (ɛɟɡ ɨɫɚɞɤɨɜ, ɫɥɚɛɵɟ ɨɫɚɞɤɢ, ɫɢɥɶɧɵɟ ɨɫɚɞɤɢ). ȼ ɩɟɪɜɨɦ ɩɪɢɦɟɪɟ ɩɪɢɜɟɞɟɧɨ ɨɩɢɫɚɧɢɟ ɞɭɛɥɢɤɚɬɨɜ ɜɫɟɯ ɫɬɚɧɞɚɪɬɧɵɯ ɢɧɬɟɪɩɪɟɬɚɬɨɪɨɜ. ȼɨ ɜɬɨɪɨɦ – ɢɫɩɨɥɶɡɨɜɚɧɵ ɫɬɚɧɞɚɪɬɧɵɟ ɢɧɬɟɪɩɪɟɬɚɬɨɪɵ. ɉɪɢɦɟɪ 1. Interpretator Meteorology Inter Empty1 () {ɂɧɬɟɪɩɪɟɬɚɬɨɪ ɨɫɭɳɟɫɬɜɥɹɸɳɢɣ ɦɚɫɲɬɚɛɢɪɨɜɚɧɢɟ ɢ ɫɞɜɢɝ ɫɢɝɧɚɥɚ} Static Real B Name "Ɇɚɫɲɬɚɛɧɵɣ ɦɧɨɠɢɬɟɥɶ";
CHAP6.DOC
123
Real C Name "ɋɞɜɢɝ ɧɚɱɚɥɚ ɨɬɫɱɟɬɚ"; Begin Answer = Signals[1] * B + C; Reliability = 0 End Inter Binary1 : ( N : Long ) { Ʉɨɞɢɪɨɜɚɧɢɟ ɧɨɦɟɪɨɦ ɤɚɧɚɥɚ. Ɂɧɚɤɨɜɵɣ ɢɧɬɟɪɩɪɟɬɚɬɨɪ} Static Real E Name "ɍɪɨɜɟɧɶ ɧɚɞɟɠɧɨɫɬɢ"; Var Long A, B, I; Real Dist; Begin Dist = E; B = 0; {ɑɢɫɥɨ ɟɞɢɧɢɰ} A = 0; {ɇɨɦɟɪ ɟɞɢɧɢɰɵ} For I = 1 To N Do Begin If Abs(Signals[I]) < Dist Then Dist = Abs(Signals[I]); If Signals[I] > 0 Then Begin A = I; B = B + 1; End; End; If B 1 Then Answer = 0 Else Answer = A Reliability = Abs(Dist / E) End Inter Major1 : ( N : Long) { Ʉɨɞɢɪɨɜɚɧɢɟ ɧɨɦɟɪɨɦ ɤɚɧɚɥɚ. Ɇɚɤɫɢɦɚɥɶɧɵɣ ɢɧɬɟɪɩɪɟɬɚɬɨɪ.} Static Real E Name "ɍɪɨɜɟɧɶ ɧɚɞɟɠɧɨɫɬɢ"; Var Real A, B; Long I, J; Begin A = -1.E+30; {Ɇɚɤɫɢɦɚɥɶɧɵɣ ɫɢɝɧɚɥ} B = -1.E+30; {ȼɬɨɪɨɣ ɩɨ ɜɟɥɢɱɢɧɟ ɫɢɝɧɚɥ} J = 0; {ɇɨɦɟɪ ɦɚɤɫɢɦɚɥɶɧɨɝɨ ɫɢɝɧɚɥɚ} For I = 1 To N Do Begin If Signals[I] > A Then Begin B = A; A = Signals[I]; J=I; End Else If Signals[I] > B Then B = Signals[I]; End; Answer = J; If A - B > E Then Reliability = 1 Else Reliability = (A - B) / E; End Inter BynaryCoded1 : ( N : Long ) Static Real E Name "ɍɪɨɜɟɧɶ ɧɚɞɟɠɧɨɫɬɢ"; Var Long A, I; Real Dist; Begin Dist = E; A = 0; {Ɉɬɜɟɬ} For I = 1 To N Do Begin If Abs(Signals[I]) < Dist Then Dist = Abs(Signals[I]); A = A * 2; If Signals[I] > 0 Then A = A + 1; End; Answer = A; Reliability = Abs(Dist / E) End Contents Temp : Empty1, Cloud : Binary1(2), Wind : BynaryCoded1(3), Rain : Major1(3);
CHAP6.DOC
124
Temp SetParameters 10, 273; Cloud SetParameters 0.1; Wind SetParameters 0.2; Rain SetParameters 0.15 Signals NumberOf(Signals,Temp) + NumberOf(Signals, Cloud) + NumberOf(Signals, Wind) + NumberOf(Signals, Rain) Connections Temp.Signals Signals[1]; Cloud.Signals[1..2] Signals[2; 3]; Wind.Signals[1..3] Signals[4..6]; Rain.Signals[1..3] Signals[7..9] Temp.Answer Answer[1]; Cloud.Answer[1..2] Answer[2]; Wind.Answer[1..3] Answer[3]; Rain.Answer[1..3] Answer[4] End Interpretator ɉɪɢɦɟɪ 2. Interpretator Meteorology Contents Temp : Empty, Cloud : Binary(2), Wind : BynaryCoded(3), Rain : Major(3); Temp SetParameters 10, 273; Cloud SetParameters 0.1; Wind SetParameters 0.2; Rain SetParameters 0.15 End Interpretator
6.8 ɋɬɚɧɞɚɪɬ ɜɬɨɪɨɝɨ ɭɪɨɜɧɹ ɤɨɦɩɨɧɟɧɬɚ ɢɧɬɟɪɩɪɟɬɚɬɨɪ ɨɬɜɟɬɚ Ɂɚɩɪɨɫɵ ɤ ɤɨɦɩɨɧɟɧɬɭ ɢɧɬɟɪɩɪɟɬɚɬɨɪ ɨɬɜɟɬɚ ɦɨɠɧɨ ɪɚɡɛɢɬɶ ɧɚ ɩɹɬɶ ɝɪɭɩɩ: ɂɧɬɟɪɩɪɟɬɚɰɢɹ. ɂɡɦɟɧɟɧɢɟ ɩɚɪɚɦɟɬɪɨɜ. Ɋɚɛɨɬɚ ɫɨ ɫɬɪɭɤɬɭɪɨɣ. ɂɧɢɰɢɚɰɢɹ ɪɟɞɚɤɬɨɪɚ ɢ ɤɨɧɫɬɪɭɤɬɨɪɚ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ ɨɬɜɟɬɚ. Ɉɛɪɚɛɨɬɤɚ ɨɲɢɛɨɤ. ɉɨɫɤɨɥɶɤɭ ɧɟɣɪɨɤɨɦɩɶɸɬɟɪ ɦɨɠɟɬ ɪɚɛɨɬɚɬɶ ɨɞɧɨɜɪɟɦɟɧɧɨ ɫ ɧɟɫɤɨɥɶɤɢɦɢ ɫɟɬɹɦɢ, ɬɨ ɢ ɤɨɦɩɨɧɟɧɬ ɢɧɬɟɪɩɪɟɬɚɬɨɪ ɨɬɜɟɬɚ ɞɨɥɠɟɧ ɢɦɟɬɶ ɜɨɡɦɨɠɧɨɫɬɶ ɨɞɧɨɜɪɟɦɟɧɧɨɣ ɪɚɛɨɬɵ ɫ ɧɟɫɤɨɥɶɤɢɦɢ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚɦɢ. ɉɨɷɬɨɦɭ ɛɨɥɶɲɢɧɫɬɜɨ ɡɚɩɪɨɫɨɜ ɤ ɢɧɬɟɪɩɪɟɬɚɬɨɪɭ ɫɨɞɟɪɠɚɬ ɹɜɧɨɟ ɭɤɚɡɚɧɢɟ ɢɦɟɧɢ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ ɨɬɜɟɬɚ. ɇɢɠɟ ɩɪɢɜɟɞɟɧɨ ɨɩɢɫɚɧɢɟ ɜɫɟɯ ɡɚɩɪɨɫɨɜ ɤ ɤɨɦɩɨɧɟɧɬɭ ɢɧɬɟɪɩɪɟɬɚɬɨɪ ɨɬɜɟɬɚ. Ʉɚɠɞɵɣ ɡɚɩɪɨɫ ɹɜɥɹɟɬɫɹ ɥɨɝɢɱɟɫɤɨɣ ɮɭɧɤɰɢɟɣ, ɜɨɡɜɪɚɳɚɸɳɟɣ ɡɧɚɱɟɧɢɟ ɢɫɬɢɧɚ, ɟɫɥɢ ɡɚɩɪɨɫ ɜɵɩɨɥɧɟɧ ɭɫɩɟɲɧɨ, ɢ ɥɨɠɶ – ɩɪɢ ɨɲɢɛɨɱɧɨɦ ɡɚɜɟɪɲɟɧɢɢ ɢɫɩɨɥɧɟɧɢɹ ɡɚɩɪɨɫɚ. ȼ ɡɚɩɪɨɫɚɯ ɜɬɨɪɨɣ ɢ ɬɪɟɬɶɟɣ ɝɪɭɩɩɵ ɩɪɢ ɨɛɪɚɳɟɧɢɢ ɤ ɱɚɫɬɧɵɦ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚɦ ɢɫɩɨɥɶɡɭɟɬɫɹ ɫɥɟɞɭɸɳɢɣ ɫɢɧɬɚɤɫɢɫ: ::= . [[]] 1. 2. 3. 4. 5.
Ɍɚɛɥɢɰɚ 3. Ɂɧɚɱɟɧɢɹ ɩɪɟɞɨɩɪɟɞɟɥɟɧɧɵɯ ɤɨɧɫɬɚɧɬ ɤɨɦɩɨɧɟɧɬɚ ɢɧɬɟɪɩɪɟɬɚɬɨɪ ɨɬɜɟɬɚ ɢ ɨɰɟɧɤɚ ɇɚɡɜɚɧɢɟȼɟɥɢɱɢɧɚɁɧɚɱɟɧɢɟ Empty 0 ɂɧɬɟɪɩɪɟɬɢɪɭɟɬ ɨɞɢɧ ɫɢɝɧɚɥ ɤɚɤ ɞɟɣɫɬɜɢɬɟɥɶɧɨɟ ɱɢɫɥɨ. Binary 1 Ʉɨɞɢɪɨɜɚɧɢɟ ɧɨɦɟɪɨɦ ɤɚɧɚɥɚ. Ɂɧɚɤɨɜɵɣ ɢɧɬɟɪɩɪɟɬɚɬɨɪ Major 2 Ʉɨɞɢɪɨɜɚɧɢɟ ɧɨɦɟɪɨɦ ɤɚɧɚɥɚ. Ɇɚɤɫɢɦɚɥɶɧɵɣ ɢɧɬɟɪɩɪɟɬɚɬɨɪ. BynaryCoded 3 Ⱦɜɨɢɱɧɵɣ ɢɧɬɟɪɩɪɟɬɚɬɨɪ. UserType -1 ɂɧɬɟɪɩɪɟɬɚɬɨɪ, ɨɩɪɟɞɟɥɟɧɧɵɣ ɩɨɥɶɡɨɜɚɬɟɥɟɦ.
CHAP6.DOC
125
ɉɪɢ ɜɵɡɨɜɟ ɪɹɞɚ ɡɚɩɪɨɫɨɜ ɢɫɩɨɥɶɡɭɸɬɫɹ ɩɪɟɞɨɩɪɟɞɟɥɟɧɧɵɟ ɤɨɧɫɬɚɧɬɵ. ɂɯ ɡɧɚɱɟɧɢɹ ɩɪɢɜɟɞɟɧɵ ɜ ɬɚɛɥ. 3.
6.8.1 Ɂɚɩɪɨɫ ɧɚ ɢɧɬɟɪɩɪɟɬɚɰɢɸ ȿɞɢɧɫɬɜɟɧɧɵɣ ɡɚɩɪɨɫ ɩɟɪɜɨɣ ɝɪɭɩɩɵ ɜɵɩɨɥɧɹɟɬ ɨɫɧɨɜɧɭɸ ɮɭɧɤɰɢɸ ɤɨɦɩɨɧɟɧɬɚ ɢɧɬɟɪɩɪɟɬɚɬɨɪ ɨɬɜɟɬɚ – ɢɧɬɟɪɩɪɟɬɢɪɭɟɬ ɦɚɫɫɢɜ ɫɢɝɧɚɥɨɜ.
6.8.1.1 ɂɧɬɟɪɩɪɟɬɢɪɨɜɚɬɶ ɦɚɫɫɢɜ ɫɢɝɧɚɥɨɜ (Interpretate) Ɉɩɢɫɚɧɢɟ ɡɚɩɪɨɫɚ: Pascal: Function Interpretate( IntName : PString; Signals : PRealArray; Var Reliability, Answers : PRealArray ) : Logic; C: Logic Interpretate(PString IntName, PRealArray Signals, PRealArray* Reliability, PRealArray* Answers) Ɉɩɢɫɚɧɢɟ ɚɪɝɭɦɟɧɬɚ: IntName – ɭɤɚɡɚɬɟɥɶ ɧɚ ɫɬɪɨɤɭ ɫɢɦɜɨɥɨɜ, ɫɨɞɟɪɠɚɳɭɸ ɢɦɹ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ ɨɬɜɟɬɚ. Signals – ɦɚɫɫɢɜ ɢɧɬɟɪɩɪɟɬɢɪɭɟɦɵɯ ɫɢɝɧɚɥɨɜ. Answers – ɦɚɫɫɢɜ ɨɬɜɟɬɨɜ. Reliability – ɦɚɫɫɢɜ ɤɨɷɮɮɢɰɢɟɧɬɨɜ ɭɜɟɪɟɧɧɨɫɬɢ ɜ ɨɬɜɟɬɟ. ɇɚɡɧɚɱɟɧɢɟ – ɢɧɬɟɪɩɪɟɬɢɪɭɟɬ ɦɚɫɫɢɜ ɫɢɝɧɚɥɨɜ Signals, ɢɫɩɨɥɶɡɭɹ ɢɧɬɟɪɩɪɟɬɚɬɨɪ ɨɬɜɟɬɚ, ɭɤɚɡɚɧɧɵɣ ɜ ɩɚɪɚɦɟɬɪɟ IntName. Ɉɩɢɫɚɧɢɟ ɢɫɩɨɥɧɟɧɢɹ. 1. ȿɫɥɢ Error 0, ɬɨ ɜɵɩɨɥɧɟɧɢɟ ɡɚɩɪɨɫɚ ɩɪɟɤɪɚɳɚɟɬɫɹ. 2. ȿɫɥɢ ɜ ɤɚɱɟɫɬɜɟ ɚɪɝɭɦɟɧɬɚ IntName ɞɚɧ ɩɭɫɬɨɣ ɭɤɚɡɚɬɟɥɶ, ɢɥɢ ɭɤɚɡɚɬɟɥɶ ɧɚ ɩɭɫɬɭɸ ɫɬɪɨɤɭ, ɬɨ ɢɫɩɨɥɧɹɸɳɢɦ ɡɚɩɪɨɫ ɨɛɴɟɤɬɨɦ ɹɜɥɹɟɬɫɹ ɩɟɪɜɵɣ ɢɧɬɟɪɩɪɟɬɚɬɨɪ ɨɬɜɟɬɚ ɜ ɫɩɢɫɤɟ ɢɧɬɟɪɩɪɟɬɚɬɨɪɨɜ ɤɨɦɩɨɧɟɧɬɚ ɢɧɬɟɪɩɪɟɬɚɬɨɪ. 3. ȿɫɥɢ ɫɩɢɫɨɤ ɢɧɬɟɪɩɪɟɬɚɬɨɪɨɜ ɤɨɦɩɨɧɟɧɬɚ ɢɧɬɟɪɩɪɟɬɚɬɨɪ ɩɭɫɬ ɢɥɢ ɢɦɹ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ ɨɬɜɟɬɚ, ɩɟɪɟɞɚɧɧɨɟ ɜ ɚɪɝɭɦɟɧɬɟ IntName ɜ ɷɬɨɦ ɫɩɢɫɤɟ ɧɟ ɧɚɣɞɟɧɨ, ɬɨ ɜɨɡɧɢɤɚɟɬ ɨɲɢɛɤɚ 501 – ɧɟɜɟɪɧɨɟ ɢɦɹ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ ɨɬɜɟɬɚ, ɭɩɪɚɜɥɟɧɢɟ ɩɟɪɟɞɚɟɬɫɹ ɨɛɪɚɛɨɬɱɢɤɭ ɨɲɢɛɨɤ, ɚ ɨɛɪɚɛɨɬɤɚ ɡɚɩɪɨɫɚ ɩɪɟɤɪɚɳɚɟɬɫɹ. 4. ɉɪɨɢɡɜɨɞɢɬɫɹ ɢɧɬɟɪɩɪɟɬɚɰɢɹ ɨɬɜɟɬɚ ɢɧɬɟɪɩɪɟɬɚɬɨɪɨɦ ɨɬɜɟɬɚ, ɢɦɹ ɤɨɬɨɪɨɝɨ ɛɵɥɨ ɭɤɚɡɚɧɨ ɜ ɚɪɝɭɦɟɧɬɟ IntName. 5. ȿɫɥɢ ɜɨ ɜɪɟɦɹ ɜɵɩɨɥɧɟɧɢɹ ɡɚɩɪɨɫɚ ɜɨɡɧɢɤɚɟɬ ɨɲɢɛɤɚ, ɬɨ ɝɟɧɟɪɢɪɭɟɬɫɹ ɜɧɭɬɪɟɧɧɹɹ ɨɲɢɛɤɚ 504 ɨɲɢɛɤɚ ɢɧɬɟɪɩɪɟɬɚɰɢɢ. ɍɩɪɚɜɥɟɧɢɟ ɩɟɪɟɞɚɟɬɫɹ ɨɛɪɚɛɨɬɱɢɤɭ ɨɲɢɛɨɤ. ȼɵɩɨɥɧɟɧɢɟ ɡɚɩɪɨɫɚ ɩɪɟɤɪɚɳɚɟɬɫɹ. ȼ ɩɪɨɬɢɜɧɨɦ ɫɥɭɱɚɟ ɜɵɩɨɥɧɟɧɢɟ ɡɚɩɪɨɫɚ ɭɫɩɟɲɧɨ ɡɚɜɟɪɲɚɟɬɫɹ.
6.8.2 Ɉɫɬɚɥɶɧɵɟ ɡɚɩɪɨɫɵ ɇɢɠɟ ɩɪɢɜɟɞɟɧ ɫɩɢɫɨɤ ɡɚɩɪɨɫɨɜ, ɢɫɩɨɥɧɟɧɢɟ ɤɨɬɨɪɵɯ ɨɩɢɫɚɧɨ ɜ ɝɥɚɜɟ "Ɉɛɳɢɣ ɫɬɚɧɞɚɪɬ": aiSetCurrent – ɋɞɟɥɚɬɶ ɢɧɬɟɪɩɪɟɬɚɬɨɪ ɨɬɜɟɬɚ ɬɟɤɭɳɢɦ aiAdd – Ⱦɨɛɚɜɥɟɧɢɟ ɧɨɜɨɝɨ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ ɨɬɜɟɬɚ aiDelete – ɍɞɚɥɟɧɢɟ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ ɨɬɜɟɬɚ aiWrite – Ɂɚɩɢɫɶ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ ɨɬɜɟɬɚ aiGetStructNames – ȼɟɪɧɭɬɶ ɢɦɟɧɚ ɱɚɫɬɧɵɯ ɢɧɬɟɪɩɪɟɬɚɬɨɪɨɜ aiGetType – ȼɟɪɧɭɬɶ ɬɢɩ ɱɚɫɬɧɨɝɨ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ aiGetData – ɉɨɥɭɱɢɬɶ ɩɚɪɚɦɟɬɪɵ ɱɚɫɬɧɨɝɨ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ aiGetName – ɉɨɥɭɱɢɬɶ ɢɦɟɧɚ ɩɚɪɚɦɟɬɪɨɜ ɱɚɫɬɧɨɝɨ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ aiSetData – ɍɫɬɚɧɨɜɢɬɶ ɩɚɪɚɦɟɬɪɵ ɱɚɫɬɧɨɝɨ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ aiEdit – Ɋɟɞɚɤɬɢɪɨɜɚɬɶ ɢɧɬɟɪɩɪɟɬɚɬɨɪ ɨɬɜɟɬɚ OnError – ɍɫɬɚɧɨɜɢɬɶ ɨɛɪɚɛɨɬɱɢɤ ɨɲɢɛɨɤ GetError – Ⱦɚɬɶ ɧɨɦɟɪ ɨɲɢɛɤɢ FreeMemory – Ɉɫɜɨɛɨɞɢɬɶ ɩɚɦɹɬɶ ȼ ɡɚɩɪɨɫɟ aiGetType ɜ ɩɟɪɟɦɟɧɧɨɣ TypeId ɜɨɡɜɪɚɳɚɟɬɫɹ ɡɧɚɱɟɧɢɟ ɨɞɧɨɣ ɢɡ ɩɪɟɞɨɩɪɟɞɟɥɟɧɧɵɯ ɤɨɧɫɬɚɧɬ, ɩɟɪɟɱɢɫɥɟɧɧɵɯ ɜ ɬɚɛɥ. 3. ɉɪɢ ɢɫɩɨɥɧɟɧɢɢ ɡɚɩɪɨɫɚ aiSetData ɝɟɧɟɪɢɪɭɟɬɫɹ ɡɚɩɪɨɫ SetEstIntParameters ɤ ɤɨɦɩɨɧɟɧɬɟ ɨɰɟɧɤɚ. Ⱥɪɝɭɦɟɧɬɵ ɝɟɧɟɪɢɪɭɟɦɨɝɨ ɡɚɩɪɨɫɚ ɫɨɜɩɚɞɚɸɬ ɫ ɚɪɝɭɦɟɧɬɚɦɢ ɢɫɩɨɥɧɹɟɦɨɝɨ ɡɚɩɪɨɫɚ
CHAP6.DOC
126
6.8.3 Ɉɲɢɛɤɢ ɤɨɦɩɨɧɟɧɬɚ ɢɧɬɟɪɩɪɟɬɚɬɨɪ ɨɬɜɟɬɚ ȼ ɬɚɛɥ. 4 ɩɪɢɜɟɞɟɧ ɩɨɥɧɵɣ ɫɩɢɫɨɤ ɨɲɢɛɨɤ, ɤɨɬɨɪɵɟ ɦɨɝɭɬ ɜɨɡɧɢɤɚɬɶ ɩɪɢ ɜɵɩɨɥɧɟɧɢɢ ɡɚɩɪɨɫɨɜ ɤɨɦɩɨɧɟɧɬɨɦ ɢɧɬɟɪɩɪɟɬɚɬɨɪ ɨɬɜɟɬɚ, ɢ ɞɟɣɫɬɜɢɹ ɫɬɚɧɞɚɪɬɧɨɝɨ ɨɛɪɚɛɨɬɱɢɤɚ ɨɲɢɛɨɤ. Ɍɚɛɥɢɰɚ 4. Ɉɲɢɛɤɢ ɤɨɦɩɨɧɟɧɬɚ ɢɧɬɟɪɩɪɟɬɚɬɨɪ ɨɬɜɟɬɚ ɢ ɞɟɣɫɬɜɢɹ ɫɬɚɧɞɚɪɬɧɨɝɨ ɨɛɪɚɛɨɬɱɢɤɚ ɨɲɢɛɨɤ. ʋɇɚɡɜɚɧɢɟ ɨɲɢɛɤɢɋɬɚɧɞɚɪɬɧɚɹ ɨɛɪɚɛɨɬɤɚ 501 ɇɟɜɟɪɧɨɟ ɢɦɹ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ ɨɬɜɟɬɚɁɚɧɟɫɟɧɢɟ ɧɨɦɟɪɚ ɜ Error 502 Ɉɲɢɛɤɚ ɫɱɢɬɵɜɚɧɢɹ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ ɨɬɜɟɬɚɁɚɧɟɫɟɧɢɟ ɧɨɦɟɪɚ ɜ Error 503 Ɉɲɢɛɤɚ ɫɨɯɪɚɧɟɧɢɹ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ ɨɬɜɟɬɚɁɚɧɟɫɟɧɢɟ ɧɨɦɟɪɚ ɜ Error 504 Ɉɲɢɛɤɚ ɢɧɬɟɪɩɪɟɬɚɰɢɢɁɚɧɟɫɟɧɢɟ ɧɨɦɟɪɚ ɜ Error
6.9 ɋɬɚɧɞɚɪɬ ɩɟɪɜɨɝɨ ɭɪɨɜɧɹ ɤɨɦɩɨɧɟɧɬɚ ɨɰɟɧɤɚ Ⱦɚɧɧɵɣ ɪɚɡɞɟɥ ɩɨɫɜɹɳɟɧ ɨɩɢɫɚɧɢɸ ɫɬɚɧɞɚɪɬɚ ɯɪɚɧɟɧɢɹ ɧɚ ɞɢɫɤɟ ɨɩɢɫɚɧɢɹ ɤɨɦɩɨɧɟɧɬɚ ɨɰɟɧɤɚ. ɉɨɫɬɪɨɟɧɢɟ ɨɰɟɧɤɢ ɩɪɨɢɫɯɨɞɢɬ ɜ ɪɟɞɚɤɬɨɪɟ ɨɰɟɧɨɤ. ȼ ɞɚɧɧɨɦ ɫɬɚɧɞɚɪɬɟ ɩɪɟɞɥɚɝɚɟɬɫɹ ɨɝɪɚɧɢɱɢɬɶɫɹ ɪɚɫɫɦɨɬɪɟɧɢɟɦ ɬɨɥɶɤɨ ɥɨɤɚɥɶɧɵɯ ɨɰɟɧɨɤ, ɩɨɫɤɨɥɶɤɭ ɢɫɩɨɥɶɡɨɜɚɧɢɟ ɧɟɥɨɤɚɥɶɧɵɯ (ɝɥɨɛɚɥɶɧɵɯ) ɨɰɟɧɨɤ ɫɢɥɶɧɨ ɭɫɥɨɠɧɹɟɬ ɤɨɦɩɨɧɟɧɬ ɨɰɟɧɤɚ, ɚ ɨɛɥɚɫɬɶ ɩɪɢɦɟɧɟɧɢɹ ɧɟɥɨɤɚɥɶɧɵɯ ɨɰɟɧɨɤ ɭɡɤɚ ɩɨ ɫɪɚɜɧɟɧɢɸ ɫ ɥɨɤɚɥɶɧɵɦɢ ɨɰɟɧɤɚɦɢ. Ɉɰɟɧɤɚ ɜɫɟɝɞɚ ɹɜɥɹɟɬɫɹ ɫɨɫɬɚɜɧɨɣ, ɞɚɠɟ ɟɫɥɢ ɨɬɜɟɬɨɦ ɫɟɬɢ ɹɜɥɹɟɬɫɹ ɨɞɧɚ ɜɟɥɢɱɢɧɚ. ȼ ɫɨɫɬɚɜ ɷɬɨɝɨ ɨɛɴɟɤɬɚ ɜɯɨɞɹɬ ɱɚɫɬɧɵɟ ɨɰɟɧɤɢ. Ʉɪɨɦɟ ɬɨɝɨ, ɜ ɨɩɢɫɚɧɢɟ ɨɰɟɧɤɢ ɜɤɥɸɱɚɸɬɫɹ ɩɪɚɜɢɥɚ ɪɚɫɩɪɟɞɟɥɟɧɢɹ ɜɵɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ ɫɟɬɢ ɦɟɠɞɭ ɱɚɫɬɧɵɦɢ ɨɰɟɧɤɚɦɢ ɢ ɪɚɫɩɨɥɨɠɟɧɢɹ ɨɰɟɧɨɤ, ɜɵɱɢɫɥɹɟɦɵɯ ɱɚɫɬɧɵɦɢ ɨɰɟɧɤɚɦɢ, ɜ ɟɞɢɧɨɦ ɦɚɫɫɢɜɟ ɨɰɟɧɨɤ. Ʉɪɨɦɟ ɬɨɝɨ, ɪɚɡɥɢɱɧɵɟ ɱɚɫɬɧɵɟ ɨɰɟɧɤɢ ɦɨɝɭɬ ɢɦɟɬɶ ɪɚɡɧɭɸ ɡɧɚɱɢɦɨɫɬɶ. ȼ ɷɬɨɦ ɫɥɭɱɚɟ ɨɛɳɚɹ ɨɰɟɧɤɚ ɨɩɪɟɞɟɥɹɟɬɫɹ ɤɚɤ ɫɭɦɦɚ ɱɚɫɬɧɵɯ ɨɰɟɧɨɤ ɫ ɜɟɫɚɦɢ, ɡɚɞɚɸɳɢɦɢ ɡɧɚɱɢɦɨɫɬɶ. Ɍɚɤɢɦ ɨɛɪɚɡɨɦ, ɨɰɟɧɤɚ ɩɪɢ ɜɵɩɨɥɧɟɧɢɢ ɡɚɩɪɨɫɚ ɧɚ ɨɰɟɧɢɜɚɧɢɟ ɦɚɫɫɢɜɚ ɜɵɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ ɫɟɬɢ ɩɨɥɭɱɚɟɬ ɧɚ ɜɯɨɞɟ ɦɚɫɫɢɜ ɜɵɯɨɞɧɵɯ ɫɢɝɧɚɥɨɜ ɫɟɬɢ, ɦɚɫɫɢɜ ɩɪɚɜɢɥɶɧɵɯ ɨɬɜɟɬɨɜ ɢ ɦɚɫɫɢɜ ɢɯ ɞɨɫɬɨɜɟɪɧɨɫɬɟɣ, ɚ ɜɨɡɜɪɚɳɚɟɬ ɞɜɚ ɦɚɫɫɢɜɚ – ɦɚɫɫɢɜ ɨɰɟɧɨɤ ɢ ɦɚɫɫɢɜ ɩɪɨɢɡɜɨɞɧɵɯ ɨɰɟɧɤɢ ɩɨ ɜɵɯɨɞɧɵɦ ɫɢɝɧɚɥɚɦ ɫɟɬɢ – ɢ ɜɟɥɢɱɢɧɭ ɫɭɦɦɚɪɧɨɣ ɨɰɟɧɤɢ. ȼɨɡɦɨɠɧɵ ɞɜɚ ɪɟɠɢɦɚ ɨɰɟɧɢɜɚɧɢɹ: ɨɰɟɧɢɜɚɧɢɟ ɛɟɡ ɜɵɱɢɫɥɟɧɢɹ ɦɚɫɫɢɜɚ ɩɪɨɢɡɜɨɞɧɵɯ ɨɰɟɧɤɢ ɩɨ ɜɵɯɨɞɧɵɦ ɫɢɝɧɚɥɚɦ ɫɟɬɢ, ɢ ɨɰɟɧɢɜɚɧɢɟ ɫ ɜɵɱɢɫɥɟɧɢɟɦ ɦɚɫɫɢɜɚ ɩɪɨɢɡɜɨɞɧɵɯ. Ɍɚɛɥɢɰɚ 5 Ʉɥɸɱɟɜɵɟ ɫɥɨɜɚ ɹɡɵɤɚ ɨɩɢɫɚɧɢɹ ɨɰɟɧɨɤ. Ʉɥɸɱɟɜɨɟ ɫɥɨɜɨɄɪɚɬɤɨɟ ɨɩɢɫɚɧɢɟ 1. Answer ɉɪɚɜɢɥɶɧɵɣ ɨɬɜɟɬ. 2. Back Ɇɚɫɫɢɜ ɩɪɨɢɡɜɨɞɧɵɯ ɨɰɟɧɤɢ ɩɨ ɨɰɟɧɢɜɚɟɦɵɦ ɫɢɝɧɚɥɚɦ. 3. Contents ɇɚɱɚɥɨ ɛɥɨɤɚ ɨɩɢɫɚɧɢɹ ɫɨɫɬɚɜɚ ɨɰɟɧɤɢ. 4. Direv ɉɪɢɡɧɚɤ ɧɟɨɛɯɨɞɢɦɨɫɬɢ ɜɵɱɢɫɥɟɧɢɹ ɩɪɨɢɡɜɨɞɧɵɯ. 5. Est Ɂɚɝɨɥɨɜɨɤ ɨɩɢɫɚɧɢɹ ɱɚɫɬɧɨɣ ɨɰɟɧɤɢ. 6. Estim ɉɟɪɟɦɟɧɧɚɹ ɞɟɣɫɬɜɢɬɟɥɶɧɨɝɨ ɬɢɩɚ, ɞɥɹ ɜɨɡɜɪɚɳɟɧɢɹ ɜɵɱɢɫɥɟɧɧɨɣ ɨɰɟɧɤɢ. 7. Estimation Ɂɚɝɨɥɨɜɨɤ ɪɚɡɞɟɥɚ ɮɚɣɥɚ, ɫɨɞɟɪɠɚɳɢɣ ɨɩɢɫɚɧɢɟ ɨɰɟɧɤɢ. 8. Include ɉɪɟɞɲɟɫɬɜɭɟɬ ɢɦɟɧɢ ɮɚɣɥɚ, ɰɟɥɢɤɨɦ ɜɫɬɚɜɥɹɟɦɨɝɨ ɜ ɷɬɨ ɦɟɫɬɨ ɨɩɢɫɚɧɢɹ. 9. Link ɍɤɚɡɵɜɚɟɬ ɢɧɬɟɪɩɪɟɬɚɬɨɪ ɨɬɜɟɬɚ, ɫɜɹɡɚɧɧɵɣ ɫ ɨɰɟɧɤɨɣ. 10. NumberOf Ɏɭɧɤɰɢɹ. ȼɨɡɜɪɚɳɚɟɬ ɱɢɫɥɨ ɢɧɬɟɪɩɪɟɬɢɪɭɟɦɵɯ ɱɚɫɬɧɵɦ ɢɧɬɟɪɩɪɟɬɚɬɨɪɨɦ ɫɢɝɧɚɥɨɜ. 11. Reliability Ⱦɨɫɬɨɜɟɪɧɨɫɬɶ ɩɪɚɜɢɥɶɧɨɝɨ ɨɬɜɟɬɚ. 12. Signals ɂɦɹ, ɩɨ ɤɨɬɨɪɨɦɭ ɚɞɪɟɫɭɸɬɫɹ ɢɧɬɟɪɩɪɟɬɢɪɭɟɦɵɟ ɫɢɝɧɚɥɵ; ɧɚɱɚɥɨ ɛɥɨɤɚ ɨɩɢɫɚɧɢɹ ɫɢɝɧɚɥɨɜ. 13. Weight ȼɟɫ ɱɚɫɬɧɨɣ ɨɰɟɧɤɢ. 14. Weights ɇɚɱɚɥɨ ɛɥɨɤɚ ɨɩɢɫɚɧɢɹ ɜɟɫɨɜ ɱɚɫɬɧɵɯ ɨɰɟɧɨɤ. Ʉɚɠɞɚɹ ɱɚɫɬɧɚɹ ɨɰɟɧɤɚ ɩɨɥɭɱɚɟɬ ɧɚ ɜɯɨɞɟ ɫɜɨɣ ɦɚɫɫɢɜ ɫɢɝɧɚɥɨɜ (ɜɨɡɦɨɠɧɨ ɢɡ ɨɞɧɨɝɨ ɷɥɟɦɟɧɬɚ), ɩɪɚɜɢɥɶɧɵɣ ɨɬɜɟɬ ɢ ɟɝɨ ɞɨɫɬɨɜɟɪɧɨɫɬɶ, ɚ ɧɚ ɜɵɯɨɞɟ ɜɵɱɢɫɥɹɟɬ ɨɰɟɧɤɭ ɢ, ɩɪɢ ɧɟɨɛɯɨɞɢɦɨɫɬɢ, ɦɚɫɫɢɜ ɩɪɨɢɡɜɨɞɧɵɯ ɨɰɟɧɤɢ ɩɨ ɜɵɯɨɞɧɵɦ ɫɢɝɧɚɥɚɦ ɫɟɬɢ. ȼ ɬɚɛɥ. 5 ɩɪɢɜɟɞɟɧ ɫɩɢɫɨɤ ɤɥɸɱɟɜɵɯ ɫɥɨɜ ɫɩɟɰɢɮɢɱɟɫɤɢɯ ɞɥɹ ɹɡɵɤɚ ɨɩɢɫɚɧɢɹ ɨɰɟɧɨɤ. ɇɚɢɛɨɥɟɟ ɱɚɫɬɨ ɜɫɬɪɟɱɚɸɳɢɟɫɹ ɱɚɫɬɧɵɟ ɨɰɟɧɤɢ ɨɛɴɹɜɥɟɧɵ ɫɬɚɧɞɚɪɬɧɵɦɢ. Ⱦɥɹ ɫɬɚɧɞɚɪɬɧɵɯ ɨɰɟɧɨɤ ɨɩɢɫɚɧɢɟ ɱɚɫɬɧɵɯ ɨɰɟɧɨɤ ɨɬɫɭɬɫɬɜɭɟɬ. ɋɩɢɫɨɤ ɫɬɚɧɞɚɪɬɧɵɯ ɨɰɟɧɨɤ ɩɪɢɜɟɞɟɧ ɜ ɬɚɛɥ. 6.
CHAP6.DOC
127
Ɍɚɛɥɢɰɚ 6 ɋɬɚɧɞɚɪɬɧɵɟ ɱɚɫɬɧɵɟ ɨɰɟɧɤɢ. ɇɚɡɜɚɧɢɟɉɚɪɚɦɟɬɪɵȺɪɝɭɦɟɧɬɵɈɩɢɫɚɧɢɟ Empty B – ɦɧɨɠɢɬɟɥɶ Ɉɰɟɧɢɜɚɟɬ ɨɞɢɧ ɫɢɝɧɚɥ Ⱥ, ɜɵɱɢɫɥɹɹ ɪɚɫC – ɫɦɟɳɟɧɢɟ ɫɬɨɹɧɢɟ ɞɨ ɩɪɚɜɢɥɶɧɨɝɨ ɨɬɜɟɬɚ ɫ ɭɱɟɬɨɦ ɧɨɪɦɢɪɨɜɤɢ. Binary E – ɭɪɨɜɟɧɶ ɧɚɞɟɠɧɨɫɬɢ N – ɱɢɫɥɨ ɫɢɝɧɚɥɨɜ. Ʉɨɞɢɪɨɜɚɧɢɟ ɧɨɦɟɪɨɦ ɤɚɧɚɥɚ. ɋɨɨɬɜɟɬɫɬɜɭɟɬ ɡɧɚɤɨɜɨɦɭ ɢɧɬɟɪɩɪɟɬɚɬɨɪɭ. Major E – ɭɪɨɜɟɧɶ ɧɚɞɟɠɧɨɫɬɢ N – ɱɢɫɥɨ ɫɢɝɧɚɥɨɜ. Ʉɨɞɢɪɨɜɚɧɢɟ ɧɨɦɟɪɨɦ ɤɚɧɚɥɚ. ɋɨɨɬɜɟɬɫɬɜɭɟɬ ɦɚɤɫɢɦɚɥɶɧɨɦɭ ɢɧɬɟɪɩɪɟɬɚɬɨɪɭ. BynaryCoded E – ɭɪɨɜɟɧɶ ɧɚɞɟɠɧɨɫɬɢ N – ɱɢɫɥɨ ɫɢɝɧɚɥɨɜ. ɋɨɨɬɜɟɬɫɬɜɭɟɬ ɞɜɨɢɱɧɨɦɭ ɢɧɬɟɪɩɪɟɬɚɬɨɪɭ.
6.9.1 ȻɇɎ ɹɡɵɤɚ ɨɩɢɫɚɧɢɹ ɨɰɟɧɨɤ Ɉɛɨɡɧɚɱɟɧɢɹ, ɩɪɢɧɹɬɵɟ ɜ ɞɚɧɧɨɦ ɪɚɫɲɢɪɟɧɢɢ ȻɇɎ ɢ ɨɩɢɫɚɧɢɟ ɪɹɞɚ ɤɨɧɫɬɪɭɤɰɢɣ ɩɪɢɜɟɞɟɧɵ ɜ ɝɥɚɜɟ «Ɉɛɳɢɣ ɫɬɚɧɞɚɪɬ» ɜ ɪɚɡɞɟɥɟ «Ɉɩɢɫɚɧɢɟ ɹɡɵɤɚ ɨɩɢɫɚɧɢɹ ɤɨɦɩɨɧɟɧɬ». ::= [] [] [] [] [] [] [] ::= Estimation ::= ::= [] ::= [] [] ::= Est () ::= ::= Begin End ::= Contents ; ::= [,] ::= : { ½ } [()] [[]] ::= ::= ::= ::= ::= [;] ::= [[ [.. [:] ]]] Link [[ [.. [:] ]]] ::= ::= Weights ; ::= [,] ::= ::= Signals ::= ::= ::= End Estimation
6.9.2 Ɉɩɢɫɚɧɢɟ ɹɡɵɤɚ ɨɩɢɫɚɧɢɹ ɨɰɟɧɨɤ ɋɬɪɭɤɬɭɪɚ ɨɩɢɫɚɧɢɹ ɨɰɟɧɤɢ ɢɦɟɟɬ ɜɢɞ: ɡɚɝɨɥɨɜɨɤ, ɨɩɢɫɚɧɢɟ ɮɭɧɤɰɢɣ, ɨɩɢɫɚɧɢɟ ɱɚɫɬɧɵɯ ɨɰɟɧɨɤ, ɨɩɢɫɚɧɢɟ ɫɨɫɬɚɜɚ, ɨɩɢɫɚɧɢɟ ɫɜɹɡɟɣ ɫ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚɦɢ, ɨɩɢɫɚɧɢɟ ɫɢɝɧɚɥɨɜ, ɨɩɢɫɚɧɢɟ ɪɚɫɩɪɟɞɟɥɟɧɢɹ ɫɢɝɧɚɥɨɜ, ɨɩɢɫɚɧɢɟ ɪɚɫɩɪɟɞɟɥɟɧɢɹ ɨɬɜɟɬɨɜ, ɤɨɧɟɰ ɨɩɢɫɚɧɢɹ ɨɰɟɧɤɢ. Ɂɚɝɨɥɨɜɨɤ ɫɨɫɬɨɢɬ ɢɡ ɤɥɸɱɟɜɨɝɨ ɫɥɨɜɚ Estimation ɢ ɢɦɟɧɢ ɨɰɟɧɤɢ ɢ ɫɥɭɠɢɬ ɞɥɹ ɨɛɨɡɧɚɱɟɧɢɹ ɧɚɱɚɥɚ ɨɩɢɫɚɧɢɹ ɨɰɟɧɤɢ ɜ ɮɚɣɥɟ, ɫɨɞɟɪɠɚɳɟɦ ɧɟɫɤɨɥɶɤɨ ɤɨɦɩɨɧɟɧɬ ɧɟɣɪɨɤɨɦɩɶɸɬɟɪɚ.
CHAP6.DOC
128
Ɉɩɢɫɚɧɢɟ ɱɚɫɬɧɨɣ ɨɰɟɧɤɢ – ɷɬɨ ɨɩɢɫɚɧɢɟ ɩɪɨɰɟɞɭɪɵ, ɜɵɱɢɫɥɹɸɳɟɣ ɨɰɟɧɤɭ ɢ, ɩɪɢ ɧɟɨɛɯɨɞɢɦɨɫɬɢ, ɦɚɫɫɢɜ ɩɪɨɢɡɜɨɞɧɵɯ ɨɰɟɧɤɢ ɩɨ ɜɵɯɨɞɧɵɦ ɫɢɝɧɚɥɚɦ ɫɟɬɢ. Ɉɬɦɟɬɢɦ, ɱɬɨ ɩɪɢ ɨɩɢɫɚɧɢɢ ɱɚɫɬɧɨɣ ɨɰɟɧɤɢ ɟɝɨ ɚɪɝɭɦɟɧɬɨɦ, ɤɚɤ ɩɪɚɜɢɥɨ, ɹɜɥɹɟɬɫɹ ɱɢɫɥɨ ɨɰɟɧɢɜɚɟɦɵɯ ɫɢɝɧɚɥɨɜ. ɉɪɢ ɜɵɩɨɥɧɟɧɢɢ ɱɚɫɬɧɚɹ ɨɰɟɧɤɚ ɩɨɥɭɱɚɟɬ ɜ ɤɚɱɟɫɬɜɟ ɚɪɝɭɦɟɧɬɨɜ ɦɚɫɫɢɜ ɨɰɟɧɢɜɚɟɦɵɯ ɫɢɝɧɚɥɨɜ, ɩɪɢɡɧɚɤ ɧɟɨɛɯɨɞɢɦɨɫɬɢ ɜɵɱɢɫɥɟɧɢɹ ɩɪɨɢɡɜɨɞɧɵɯ, ɩɪɚɜɢɥɶɧɵɣ ɨɬɜɟɬ, ɞɨɫɬɨɜɟɪɧɨɫɬɶ ɩɪɚɜɢɥɶɧɨɝɨ ɨɬɜɟɬɚ, ɞɟɣɫɬɜɢɬɟɥɶɧɭɸ ɩɟɪɟɦɟɧɧɭɸ ɞɥɹ ɜɨɡɜɪɚɳɟɧɢɹ ɜɵɱɢɫɥɟɧɧɨɣ ɨɰɟɧɤɢ ɢ ɦɚɫɫɢɜ ɞɥɹ ɜɨɡɜɪɚɳɟɧɢɹ ɩɪɨɢɡɜɨɞɧɵɯ. Ɏɨɪɦɚɥɶɧɨ, ɩɪɢ ɢɫɩɨɥɧɟɧɢɢ ɱɚɫɬɧɚɹ ɨɰɟɧɤɚ ɢɦɟɟɬ ɨɩɢɫɚɧɢɟ ɫɥɟɞɭɸɳɟɝɨ ɜɢɞɚ: Pascal: Procedure Estimation(Signals, Back : PRealArray; Direv : Logic; Answer, Reliability : Real; Var Estim : Real); C: void Estimation(PRealArray Signals, PRealArray Back, Logic Direv, Real Answer, Real Reliability, Real* Estim); Ɉɬɦɟɬɢɦ ɨɞɧɭ ɜɚɠɧɭɸ ɨɫɨɛɟɧɧɨɫɬɶ ɜɵɩɨɥɧɟɧɢɹ ɬɟɥɚ ɱɚɫɬɧɨɣ ɨɰɟɧɤɢ. Ɉɩɟɪɚɬɨɪ ɩɪɢɫɜɚɢɜɚɧɢɹ ɡɧɚɱɟɧɢɹ ɷɥɟɦɟɧɬɭ ɦɚɫɫɢɜɚ ɩɪɨɢɡɜɨɞɧɵɯ, ɨɡɧɚɱɚɟɬ ɞɨɛɚɜɥɟɧɢɟ ɷɬɨɝɨ ɡɧɚɱɟɧɢɹ ɤ ɜɟɥɢɱɢɧɟ, ɪɚɧɟɟ ɧɚɯɨɞɢɜɲɟɣɫɹ ɜ ɷɬɨɦ ɦɚɫɫɢɜɟ. ɇɚɩɪɢɦɟɪ, ɡɚɩɢɫɶ Back[I] = A, ɨɡɧɚɱɚɟɬ ɜɵɩɨɥɧɟɧɢɟ ɫɥɟɞɭɸɳɟɝɨ ɨɩɟɪɚɬɨɪɚ Back[I] = Back[I] + A. ɗɬɨ ɫɜɹɡɚɧɨ ɫ ɬɟɦ, ɱɬɨ ɨɞɢɧ ɢ ɬɨɬ ɠɟ ɫɢɝɧɚɥ ɦɨɠɟɬ ɛɵɬɶ ɡɚɞɟɣɫɬɜɨɜɚɧ ɜ ɧɟɫɤɨɥɶɤɢɯ ɱɚɫɬɧɵɯ ɨɰɟɧɤɚɯ ɢ ɩɪɨɢɡɜɨɞɧɚɹ ɨɛɳɟɣ ɮɭɧɤɰɢɢ ɨɰɟɧɤɢ ɪɚɜɧɚ ɫɭɦɦɟ ɩɪɨɢɡɜɨɞɧɵɯ ɱɚɫɬɧɵɯ ɨɰɟɧɨɤ ɩɨ ɷɬɨɦɭ ɫɢɝɧɚɥɭ. ȼ ɪɚɡɞɟɥɟ ɨɩɢɫɚɧɢɹ ɫɨɫɬɚɜɚ ɩɟɪɟɱɢɫɥɹɸɬɫɹ ɱɚɫɬɧɵɟ ɨɰɟɧɤɢ, ɜɯɨɞɹɳɢɟ ɜ ɫɨɫɬɚɜ ɨɰɟɧɤɢ. ɉɪɢɡɧɚɤɨɦ ɤɨɧɰɚ ɪɚɡɞɟɥɚ ɫɥɭɠɢɬ ɫɢɦɜɨɥ «;». ȼ ɧɟɨɛɹɡɚɬɟɥɶɧɨɦ ɪɚɡɞɟɥɟ ɭɫɬɚɧɨɜɥɟɧɢɹ ɩɚɪɚɦɟɬɪɨɜ ɩɪɨɢɡɜɨɞɢɬɫɹ ɡɚɞɚɧɢɟ ɡɧɚɱɟɧɢɣ ɩɚɪɚɦɟɬɪɨɜ ɱɚɫɬɧɵɯ ɨɰɟɧɨɤ. ɉɨɫɥɟ ɤɥɸɱɟɜɨɝɨ ɫɥɨɜɚ SetParameters ɫɥɟɞɭɟɬ ɫɩɢɫɨɤ ɡɧɚɱɟɧɢɣ ɩɚɪɚɦɟɬɪɨɜ ɜ ɬɨɦ ɩɨɪɹɞɤɟ, ɜ ɤɚɤɨɦ ɩɚɪɚɦɟɬɪɵ (ɫɬɚɬɢɱɟɫɤɢɟ ɩɟɪɟɦɟɧɧɵɟ) ɛɵɥɢ ɨɛɴɹɜɥɟɧɵ ɩɪɢ ɨɩɢɫɚɧɢɢ ɱɚɫɬɧɨɣ ɨɰɟɧɤɢ (ɞɥɹ ɫɬɚɧɞɚɪɬɧɵɯ ɨɰɟɧɨɤ ɩɨɪɹɞɨɤ ɩɚɪɚɦɟɬɪɨɜ ɭɤɚɡɚɧ ɜ ɬɚɛɥ. 6). ɉɪɢ ɢɫɩɨɥɶɡɨɜɚɧɢɢ ɨɞɧɨɝɨ ɨɩɟɪɚɬɨɪɚ ɡɚɞɚɧɢɹ ɩɚɪɚɦɟɬɪɨɜ ɞɥɹ ɡɚɞɚɧɢɹ ɩɚɪɚɦɟɬɪɨɜ ɧɟɫɤɨɥɶɤɢɦ ɷɤɡɟɦɩɥɹɪɚɦ ɨɞɧɨɣ ɱɚɫɬɧɨɣ ɨɰɟɧɤɢ ɩɨɫɥɟ ɤɥɸɱɟɜɨɝɨ ɫɥɨɜɚ SetParameters ɭɤɚɡɵɜɚɟɬɫɹ ɫɬɨɥɶɤɨ ɜɵɪɚɠɟɧɢɣ, ɡɚɞɚɸɳɢɯ ɡɧɚɱɟɧɢɹ ɩɚɪɚɦɟɬɪɨɜ, ɫɤɨɥɶɤɨ ɧɟɨɛɯɨɞɢɦɨ ɞɥɹ ɨɞɧɨɝɨ ɷɤɡɟɦɩɥɹɪɚ. ɇɚɩɪɢɦɟɪ, ɟɫɥɢ ɜ ɛɥɨɤɟ ɨɩɢɫɚɧɢɹ ɫɨɫɬɚɜɚ ɫɨɞɟɪɠɢɬɫɹ 10 ɷɤɡɟɦɩɥɹɪɨɜ ɞɜɨɢɱɧɨɣ ɨɰɟɧɤɢ ɧɚ 15 ɨɰɟɧɢɜɚɟɦɵɯ ɫɢɝɧɚɥɨɜ – MyEst : BinaryCoded(15)[10], ɬɨ ɩɨɫɥɟ ɤɥɸɱɟɜɨɝɨ ɫɥɨɜɚ SetParameters ɞɨɥɠɧɨ ɛɵɬɶ ɬɨɥɶɤɨ ɨɞɧɨ ɜɵɪɚɠɟɧɢɟ: MyEst[I:1..10] SetParameters 0.01*I ȼ ɞɚɧɧɨɦ ɩɪɢɦɟɪɟ ɩɟɪɜɚɹ ɨɰɟɧɤɚ ɛɭɞɟɬ ɢɦɟɬɶ ɭɪɨɜɟɧɶ ɧɚɞɟɠɧɨɫɬɢ ɪɚɜɧɵɣ 0.01, ɜɬɨɪɚɹ – 0.02 ɢ ɬ.ɞ. ȼ ɧɟɨɛɹɡɚɬɟɥɶɧɨɦ ɪɚɡɞɟɥɟ ɨɩɢɫɚɧɢɹ ɫɜɹɡɟɣ ɫ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚɦɢ ɦɨɠɧɨ ɭɤɚɡɚɬɶ ɢɧɬɟɪɩɪɟɬɚɬɨɪ ɨɬɜɟɬɚ, ɫɜɹɡɚɧɧɵɣ ɫ ɞɚɧɧɨɣ ɨɰɟɧɤɨɣ. Ⱦɥɹ ɫɜɹɡɢ ɢɧɬɟɪɩɪɟɬɚɬɨɪ ɢ ɨɰɟɧɤɚ ɞɨɥɠɧɵ ɢɦɟɬɶ ɨɞɢɧɚɤɨɜɨɟ ɱɢɫɥɨ ɩɚɪɚɦɟɬɪɨɜ ɢ ɨɞɢɧɚɤɨɜɵɣ ɩɨɪɹɞɨɤ ɢɯ ɨɩɢɫɚɧɢɹ. Ɍɚɤ, ɜ ɩɪɢɜɟɞɟɧɧɨɦ ɧɢɠɟ ɩɪɢɦɟɪɟ, ɧɟɜɨɡɦɨɠɧɨ ɫɜɹɡɵɜɚɧɢɟ ɨɰɟɧɤɢ Temp ɫ ɨɞɧɨɢɦɟɧɧɵɦ ɢɧɬɟɪɩɪɟɬɚɬɨɪɨɦ ɢɡ-ɡɚ ɪɚɡɥɢɱɢɹ ɜ ɱɢɫɥɟ ɩɚɪɚɦɟɬɪɨɜ. ȿɫɥɢ ɜ ɥɟɜɨɣ ɱɚɫɬɢ ɜɵɪɚɠɟɧɢɹ Link ɭɤɚɡɚɧ ɞɢɚɩɚɡɨɧ ɨɰɟɧɨɤ, ɬɨ ɜ ɩɪɚɜɨɣ ɱɚɫɬɢ ɞɨɥɠɟɧ ɛɵɬɶ ɭɤɚɡɚɧ ɞɢɚɩɚɡɨɧ, ɫɨɞɟɪɠɚɳɢɣ ɫɬɨɥɶɤɨ ɠɟ ɢɧɬɟɪɩɪɟɬɚɬɨɪɨɜ. ɍɤɚɡɚɧɢɟ ɫɜɹɡɢ ɜɥɟɱɟɬ ɢɞɟɧɬɢɱɧɨɫɬɶ ɩɚɪɚɦɟɬɪɨɜ ɨɰɟɧɤɢ ɢ ɫɜɹɡɚɧɧɨɝɨ ɫ ɧɟɣ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ ɨɬɜɟɬɨɜ. ɂɞɟɧɬɢɱɧɨɫɬɶ ɨɛɟɫɩɟɱɢɜɚɟɬɫɹ ɩɪɢ ɢɫɩɨɥɧɟɧɢɢ ɡɚɩɪɨɫɨɜ aiSetData ɢ esSetData. ȼ ɧɟɨɛɹɡɚɬɟɥɶɧɨɦ ɪɚɡɞɟɥɟ ɨɩɢɫɚɧɢɹ ɜɟɫɨɜ ɭɤɚɡɵɜɚɸɬɫɹ ɜɟɫɚ ɱɚɫɬɧɵɯ ɨɰɟɧɨɤ. ȿɫɥɢ ɷɬɨɬ ɪɚɡɞɟɥ ɨɩɭɳɟɧ, ɬɨ ɜɫɟ ɱɚɫɬɧɵɟ ɨɰɟɧɤɢ ɪɚɜɧɵ ɟɞɢɧɢɰɟ, ɬɨ ɟɫɬɶ ɜɫɟ ɱɚɫɬɧɵɟ ɨɰɟɧɤɢ ɢɦɟɸɬ ɪɚɜɧɭɸ ɡɧɚɱɢɦɨɫɬɶ. ȼ ɧɟɨɛɹɡɚɬɟɥɶɧɨɦ ɪɚɡɞɟɥɟ ɨɩɢɫɚɧɢɹ ɫɢɝɧɚɥɨɜ ɭɤɚɡɵɜɚɟɬɫɹ ɱɢɫɥɨ ɫɢɝɧɚɥɨɜ, ɨɰɟɧɢɜɚɟɦɵɯ ɜɫɟɦɢ ɱɚɫɬɧɵɦɢ ɨɰɟɧɤɚɦɢ. ȿɫɥɢ ɷɬɨɬ ɪɚɡɞɟɥ ɨɩɭɳɟɧ, ɬɨ ɩɨɥɚɝɚɟɬɫɹ, ɱɬɨ ɱɢɫɥɨ ɨɰɟɧɢɜɚɟɦɵɯ ɨɰɟɧɤɨɣ ɫɢɝɧɚɥɨɜ ɪɚɜɧɨ ɫɭɦɦɟ ɫɢɝɧɚɥɨɜ, ɨɰɟɧɢɜɚɟɦɵɯ ɜɫɟɦɢ ɱɚɫɬɧɵɦɢ ɨɰɟɧɤɚɦɢ. ȼ ɤɨɧɫɬɚɧɬɧɨɦ ɜɵɪɚɠɟɧɢɢ ɦɨɠɟɬ ɜɵɡɵɜɚɬɶɫɹ ɮɭɧɤɰɢɹ NumberOf, ɚɪɝɭɦɟɧɬɨɦ ɤɨɬɨɪɨɣ ɹɜɥɹɟɬɫɹ ɢɦɹ ɱɚɫɬɧɨɣ ɨɰɟɧɤɢ (ɢɥɢ ɟɟ ɩɫɟɜɞɨɧɢɦ) ɫ ɭɤɚɡɚɧɢɟɦ ɮɚɤɬɢɱɟɫɤɢɯ ɚɪɝɭɦɟɧɬɨɜ. ȼ ɧɟɨɛɹɡɚɬɟɥɶɧɨɦ ɪɚɡɞɟɥɟ ɨɩɢɫɚɧɢɹ ɪɚɫɩɪɟɞɟɥɟɧɢɹ ɫɢɝɧɚɥɨɜ ɞɥɹ ɤɚɠɞɨɣ ɱɚɫɬɧɨɣ ɨɰɟɧɤɢ ɭɤɚɡɵɜɚɟɬɫɹ, ɤɚɤɢɟ ɫɢɝɧɚɥɵ ɢɡ ɨɛɳɟɝɨ ɨɰɟɧɢɜɚɟɦɨɝɨ ɦɚɫɫɢɜɚ ɩɟɪɟɞɚɸɬɫɹ ɟɣ ɞɥɹ ɨɰɟɧɢɜɚɧɢɹ. ȿɫɥɢ ɷɬɨɬ ɪɚɡɞɟɥ ɨɩɭɳɟɧ, ɬɨ ɫɱɢɬɚɟɬɫɹ, ɱɬɨ ɤɚɠɞɚɹ ɫɥɟɞɭɸɳɚɹ ɱɚɫɬɧɚɹ ɨɰɟɧɤɚ ɩɨɥɭɱɚɟɬ ɫɥɟɞɭɸɳɢɣ ɮɪɚɝɦɟɧɬ ɦɚɫɫɢɜɚ ɫɢɝɧɚɥɨɜ. ɉɨɪɹɞɨɤ ɫɥɟɞɨɜɚɧɢɹ ɱɚɫɬɧɵɯ ɨɰɟɧɨɤ ɫɨɨɬɜɟɬɫɬɜɭɟɬ ɩɨɪɹɞɤɭ ɢɯ ɩɟɪɟɱɢɫɥɟɧɢɹ ɜ ɪɚɡɞɟɥɟ ɨɩɢɫɚɧɢɹ ɫɨɫɬɚɜɚ. ȼ ɩɪɢɦɟɪɟ 1 ɪɚɡɞɟɥ ɨɩɢɫɚɧɢɹ ɪɚɫɩɪɟɞɟɥɟɧɢɹ ɫɢɝɧɚɥɨɜ ɡɚɞɚɟɬ ɪɚɫɩɪɟɞɟɥɟɧɢɟ ɫɢɝɧɚɥɨɜ ɩɨ ɭɦɨɥɱɚɧɢɸ. Ɇɚɫɫɢɜ ɩɪɨɢɡɜɨɞɧɵɯ ɨɰɟɧɤɢ ɩɨ ɜɵɯɨɞɧɵɦ ɫɢɝɧɚɥɚɦ ɫɟɬɢ ɩɚɪɚɥɥɟɥɟɧ ɦɚɫɫɢɜɭ ɫɢɝɧɚɥɨɜ. ȼ ɧɟɨɛɹɡɚɬɟɥɶɧɨɦ ɪɚɡɞɟɥɟ ɨɩɢɫɚɧɢɹ ɪɚɫɩɪɟɞɟɥɟɧɢɹ ɨɬɜɟɬɨɜ ɞɥɹ ɤɚɠɞɨɣ ɱɚɫɬɧɨɣ ɨɰɟɧɤɢ ɭɤɚɡɵɜɚɟɬɫɹ ɤɚɤɨɣ ɷɥɟɦɟɧɬ ɦɚɫɫɢɜɚ ɨɬɜɟɬɨɜ ɛɭɞɟɬ ɟɣ ɩɟɪɟɞɚɧ. ȿɫɥɢ ɷɬɨɬ ɪɚɡɞɟɥ ɨɩɭɳɟɧ, ɬɨ ɫɱɢɬɚɟɬɫɹ, ɱɬɨ ɤɚɠɞɚɹ ɫɥɟɞɭɸɳɚɹ ɱɚɫɬɧɚɹ ɨɰɟɧɤɚ ɩɨɥɭɱɚɟɬ ɫɥɟɞɭɸɳɢɣ ɷɥɟɦɟɧɬ ɦɚɫɫɢɜɚ ɨɬɜɟɬɨɜ. ɉɨɪɹɞɨɤ ɫɥɟɞɨɜɚɧɢɹ ɱɚɫɬɧɵɯ ɨɰɟɧɨɤ ɫɨɨɬɜɟɬɫɬɜɭɟɬ ɩɨɪɹɞɤɭ ɢɯ ɩɟɪɟɱɢɫɥɟɧɢɹ ɜ ɪɚɡɞɟɥɟ ɨɩɢɫɚɧɢɹ ɫɨɫɬɚɜɚ. ȼ ɩɪɢɦɟɪɟ 1 ɪɚɡɞɟɥ ɨɩɢɫɚɧɢɹ ɪɚɫɩɪɟɞɟɥɟɧɢɹ ɨɬɜɟɬɨɜ ɡɚɞɚɟɬ ɪɚɫɩɪɟɞɟɥɟɧɢɟ ɫɢɝɧɚɥɨɜ ɩɨ ɭɦɨɥɱɚɧɢɸ. Ɇɚɫɫɢɜɵ ɞɨɫɬɨɜɟɪɧɨɫɬɟɣ ɨɬɜɟɬɨɜ ɢ ɜɵɱɢɫɥɟɧɧɵɯ ɨɰɟɧɨɤ ɩɚɪɚɥɥɟɥɶɧɵ ɦɚɫɫɢɜɭ ɨɬɜɟɬɨɜ.
CHAP6.DOC
129
Ʉɪɨɦɟ ɬɨɝɨ, ɜ ɥɸɛɨɦ ɦɟɫɬɟ ɨɩɢɫɚɧɢɹ ɨɰɟɧɤɢ ɦɨɝɭɬ ɜɫɬɪɟɱɚɬɶɫɹ ɤɨɦɦɟɧɬɚɪɢɢ, ɡɚɤɥɸɱɟɧɧɵɟ ɜ ɮɢɝɭɪɧɵɟ ɫɤɨɛɤɢ.
6.9.3 ɉɪɢɦɟɪ ɨɩɢɫɚɧɢɹ ɨɰɟɧɤɢ ȼ ɷɬɨɦ ɪɚɡɞɟɥɟ ɩɪɢɜɟɞɟɧɵ ɞɜɚ ɩɪɢɦɟɪɚ ɨɩɢɫɚɧɢɹ ɨɞɧɨɣ ɢ ɬɨɣ ɠɟ ɨɰɟɧɤɢ ɫɥɟɞɭɸɳɟɝɨ ɫɨɫɬɚɜɚ: ɩɟɪɜɵɣ ɫɢɝɧɚɥ ɢɧɬɟɪɩɪɟɬɢɪɭɟɬɫɹ ɤɚɤ ɬɟɦɩɟɪɚɬɭɪɚ ɩɭɬɟɦ ɭɦɧɨɠɟɧɢɹ ɧɚ 10 ɢ ɞɨɛɚɜɥɟɧɢɹ 273; ɫɥɟɞɭɸɳɢɟ ɞɜɚ ɫɢɝɧɚɥɚ ɢɧɬɟɪɩɪɟɬɢɪɭɸɬɫɹ ɤɚɤ ɧɚɥɢɱɢɟ ɨɛɥɚɱɧɨɫɬɢ, ɢɫɩɨɥɶɡɭɹ ɡɧɚɤɨɜɵɣ ɢɧɬɟɪɩɪɟɬɚɬɨɪ; ɫɥɟɞɭɸɳɢɟ ɬɪɢ ɫɢɝɧɚɥɚ ɢɧɬɟɪɩɪɟɬɢɪɭɸɬɫɹ ɤɚɤ ɧɚɩɪɚɜɥɟɧɢɟ ɜɟɬɪɚ, ɢɫɩɨɥɶɡɭɹ ɞɜɨɢɱɧɵɣ ɢɧɬɟɪɩɪɟɬɚɬɨɪ (ɜɨɫɟɦɶ ɪɭɦɛɨɜ); ɩɨɫɥɟɞɧɢɟ ɬɪɢ ɫɢɝɧɚɥɚ ɢɧɬɟɪɩɪɟɬɢɪɭɸɬɫɹ ɦɚɤɫɢɦɚɥɶɧɵɦ ɢɧɬɟɪɩɪɟɬɚɬɨɪɨɦ ɤɚɤ ɫɢɥɚ ɨɫɚɞɤɨɜ (ɛɟɡ ɨɫɚɞɤɨɜ, ɫɥɚɛɵɟ ɨɫɚɞɤɢ, ɫɢɥɶɧɵɟ ɨɫɚɞɤɢ). Ⱦɥɹ ɬɪɟɯ ɩɨɫɥɟɞɧɢɯ ɢɧɬɟɪɩɪɟɬɚɬɨɪɨɜ ɢɫɩɨɥɶɡɭɸɬɫɹ ɫɨɨɬɜɟɬɫɬɜɭɸɳɢɟ ɢɦ ɨɰɟɧɤɢ ɬɢɩɚ ɪɚɫɫɬɨɹɧɢɟ ɞɨ ɦɧɨɠɟɫɬɜɚ. ȼ ɩɟɪɜɨɦ ɩɪɢɦɟɪɟ ɩɪɢɜɟɞɟɧɨ ɨɩɢɫɚɧɢɟ ɞɭɛɥɢɤɚɬɨɜ ɜɫɟɯ ɫɬɚɧɞɚɪɬɧɵɯ ɨɰɟɧɨɤ. ȼɨ ɜɬɨɪɨɦ – ɢɫɩɨɥɶɡɨɜɚɧɵ ɫɬɚɧɞɚɪɬɧɵɟ ɨɰɟɧɤɢ. ɉɪɢɦɟɪ 1. Estimation Meteorology Est Empty1 () {Ɉɰɟɧɤɚ ɞɥɹ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ, ɨɫɭɳɟɫɬɜɥɹɸɳɟɝɨ ɦɚɫɲɬɚɛɢɪɨɜɚɧɢɟ ɢ ɫɞɜɢɝ ɫɢɝɧɚɥɚ} Static Real B Name "Ɇɚɫɲɬɚɛɧɵɣ ɦɧɨɠɢɬɟɥɶ"; Real C Name "ɋɞɜɢɝ ɧɚɱɚɥɚ ɨɬɫɱɟɬɚ"; Real E Name "Ɍɪɟɛɭɟɦɚɹ ɬɨɱɧɨɫɬɶ ɫɨɜɩɚɞɟɧɢɹ"; Var Real A; Begin A = Signals[1] - (Answer - C) / B; D = E * Reliability; {ɍɪɨɜɟɧɶ ɧɚɞɟɠɧɨɫɬɢ ɫ ɩɨɩɪɚɜɤɨɣ ɧɚ ɞɨɫɬɨɜɟɪɧɨɫɬɶ} If Abs(A) 0 Then Begin Estim = Weight * Sqr(A - D) / 2; If Direv Then Back[1] = Weight * (A - D); End Else Begin Estim = Weight * Sqr(A + D) / 2; If Direv Then Back[1] = Weight * (A + D); End End Est Binary1 ( N : Long) { Ʉɨɞɢɪɨɜɚɧɢɟ ɧɨɦɟɪɨɦ ɤɚɧɚɥɚ. Ɉɰɟɧɤɚ ɞɥɹ ɡɧɚɤɨɜɨɝɨ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ.} Static Real E Name "ɍɪɨɜɟɧɶ ɧɚɞɟɠɧɨɫɬɢ; Var Long I, J; Real A, B, C; Begin J = Answer; {ɉɪɚɜɢɥɶɧɵɣ ɨɬɜɟɬ – ɧɨɦɟɪ ɩɪɚɜɢɥɶɧɨɝɨ ɤɥɚɫɫɚ} B = 0; C = E * Reliability; {ɍɪɨɜɟɧɶ ɧɚɞɟɠɧɨɫɬɢ ɫ ɩɨɩɪɚɜɤɨɣ ɧɚ ɞɨɫɬɨɜɟɪɧɨɫɬɶ} For I = 1 To N Do If I = J Then Begin If Signals[I] < ɋ Then Begin B = B + Sqr(Signals[I] - ɋ); If Direv Then Back[I] = 2 * Weight * (Signals[I]-ɋ); End; End Else Begin If Signals[I] > -C Then Begin B = B + Sqr(Signals[I] + C); If Direv Then Back[I] = 2 * Weight * (Signals[I] + C); End End; Estim = Weight*B End
CHAP6.DOC
130
Est Major1 ( N : Long) {Ʉɨɞɢɪɨɜɚɧɢɟ ɧɨɦɟɪɨɦ ɤɚɧɚɥɚ. Ɉɰɟɧɤɚ ɞɥɹ ɦɚɤɫɢɦɚɥɶɧɨɝɨ ɢɧɬɟɪɩɪɟɬɚɬɨɪɚ.} Static Real E Name "ɍɪɨɜɟɧɶ ɧɚɞɟɠɧɨɫɬɢ; Var Real A, B; Long I, J, K, Ans; RealArray[N+1] Al,Ind; Begin Ans = Answer; Ind[1] = Ans; Al[1] = Signals[Ans] - E * Reliability; Ind[N+1] = 0; Al[N+1] = -1.e40; K:=1; For I = 1 To N Do If I Ans Then Begin Al[K] = Signals[I]; Ind[K] = I; K = K + 1; End; {ɉɨɞɝɨɬɨɜɥɟɧ ɦɚɫɫɢɜ ɫɢɝɧɚɥɨɜ} For I = 2 To N-1 Do Begin A = Al[I]; K = I; For J = I+1 To N Do If Al[J] > A Then Begin K = J; A = Al[J]; End; {ɇɚɣɞɟɧ ɫɥɟɞɭɸɳɢɣ ɩɨ ɜɟɥɢɱɢɧɟ} Al[K] = Al[I]; Al[I] = A; J = Ind[K]; Ind[K] = Ind[I]; Ind[I] = J; End; {Ɇɚɫɫɢɜɵ ɨɬɫɨɪɬɢɪɨɜɚɧɵ} A = Al[1]; {ɋɭɦɦɚ ɩɟɪɜɵɯ I ɱɥɟɧɨɜ} I = 1; While (A / I