6.0 KiB
WPS Arama ve Seçim Mantığı Dokümantasyonu / WPS Search & Selection Logic Documentation
Bu belge, app/Http/Controllers/AutoCompleteType/wps_no2.php dosyasındaki WPS arama algoritmasının teknik detaylarını ve işleyiş mantığını açıklar.
This document serves as the technical documentation for the WPS search algorithm located in app/Http/Controllers/AutoCompleteType/wps_no2.php.
🇹🇷 Türkçe Dokümantasyon
1. Genel Bakış
Bu modül, kullanıcı tarafından sağlanan parametrelere (Çap, Et Kalınlığı, Kaynak Tipi vb.) dayanarak en uygun WPS (Welding Procedure Specification) kaydını bulmak için tasarlanmıştır. Sistem, önce uygun PQR (Prosedür Onay Kaydı) listesini belirler, ardından bu PQR'lar ve diğer fiziksel kısıtlamalarla WPS tablosunu filtreler.
Eşleşme bulunamazsa, sistem "Teşhis Modu"na (Diagnostic Mode) geçerek kullanıcının hangi kriterden dolayı sonuç alamadığını analiz eder.
2. Girdi Parametreleri
Algoritma aşağıdaki parametreleri kullanır:
- outside_diameter_1: Boru Dış Çapı (mm)
- wall_thickness_1: Boru Et Kalınlığı (mm)
- type_of_welds: Kaynak Tipi (örn: BW, FW)
- pwht: Isıl İşlem Durumu ('YES' veya 'NO')
- ru_material_group_1: 1. Malzeme Grubu
- ru_material_group_2: 2. Malzeme Grubu
- piping_type: Hat Tipi ("Support" özel durum oluşturur)
3. İşleyiş Mantığı
Adım 1: PQR Seçimi
Sistem ilk olarak malzeme gruplarına göre geçerli PQR'ları belirler.
- Aynı Malzeme Grupları: Eğer Grup 1 ve Grup 2 aynıysa, sistem sadece tekil grubu içeren kayıtları arar ve
+ile birleştirilmiş karma malzemeleri (dissimilar welds) hariç tutar. - Farklı Malzeme Grupları: İki grup birbirinden farklıysa, sistem bunların kombinasyonlarını (
Grup1+Grup2veyaGrup2+Grup1) arar.
Adım 2: WPS Filtreleme
Seçilen PQR listesi ve diğer parametreler kullanılarak w_p_s tablosunda arama yapılır.
- Temel Kriterler:
approved_datedolu olmalı vepqr_nobulunan PQR listesinde yer almalıdır. - Et Kalınlığı:
- WPS'in
min_thickdeğeri, aranan kalınlığa eşit veya küçük olmalı. - WPS'in
max_thickdeğeri, aranan kalınlığa eşit veya büyük olmalı (0 değeri limitsiz kabul edilir).
- WPS'in
- Dış Çap:
- Eğer hat tipi "Support" değilse:
work_type"PIPE" içermeli ve çap aralıkları (min/max) kontrol edilmelidir. - Eğer hat tipi "Support" ise: Sadece
work_typealanı kontrol edilir, çap kısıtlaması uygulanmaz.
- Eğer hat tipi "Support" değilse:
- Kaynak Tipi:
joint_typebirebir eşleşmelidir. - PWHT (Isıl İşlem):
- YES:
pwht_temp_rangevepwht_min_timealanları dolu olmalıdır. - NO: Bu alanlar boş veya "0" olmalıdır.
- YES:
Adım 3: Hata Analizi (Hiçbir Sonuç Bulunamazsa)
Sistem hiçbir WPS bulamazsa, hatanın kaynağını tespit etmek için filtreleri tek tek ve gruplar halinde tekrar çalıştırır.
- Tekil Analiz: Sadece Çap, sadece Kalınlık, sadece Kaynak Tipi vb. kaç sonuç döndürüyor?
- Kombine Analiz: (Çap + Kalınlık), (Çap + Kaynak Tipi) vb. kesişim kümeleri kontrol edilir.
Bu analiz sonucunda kullanıcıya "Çap uyuyor ama Kaynak Tipi uymuyor" gibi çıkarımlar yapabileceği detaylı bir hata raporu sunulur.
🇬🇧 English Documentation
1. Overview
This module is designed to find the most appropriate WPS (Welding Procedure Specification) record based on user-provided parameters (Diameter, Wall Thickness, Weld Type, etc.). The system first identifies the list of suitable PQR (Procedure Qualification Records), then filters the WPS table using these PQRs and other physical constraints.
If no match is found, the system enters "Diagnostic Mode" to analyze which specific criterion caused the failure.
2. Input Parameters
The algorithm utilizes the following parameters:
- outside_diameter_1: Pipe Outside Diameter (mm)
- wall_thickness_1: Pipe Wall Thickness (mm)
- type_of_welds: Type of Weld (e.g., BW, FW)
- pwht: Post Weld Heat Treatment status ('YES' or 'NO')
- ru_material_group_1: Material Group 1
- ru_material_group_2: Material Group 2
- piping_type: Line Type ("Support" triggers special logic)
3. Workflow Logic
Step 1: PQR Selection
The system first determines valid PQRs based on material groups.
- Identical Material Groups: If Group 1 and Group 2 are the same, the system searches for records containing only that single group, explicitly excluding dissimilar weld combinations containing
+. - Different Material Groups: If the groups differ, the system searches for valid combinations (
Group1+Group2orGroup2+Group1).
Step 2: WPS Filtering
Using the selected PQR list and other parameters, the system searches the w_p_s table.
- Basic Criteria:
approved_datemust not be null, andpqr_nomust be in the identified PQR list. - Wall Thickness:
- WPS
min_thickmust be less than or equal to the requested thickness. - WPS
max_thickmust be greater than or equal to the requested thickness (0 is considered unlimited).
- WPS
- Outside Diameter:
- If piping type is NOT "Support":
work_typemust contain "PIPE", and diameter ranges (min/max) are checked. - If piping type IS "Support": Only
work_typeis checked; diameter constraints are ignored.
- If piping type is NOT "Support":
- Joint Type:
joint_typemust match valid values exactly. - PWHT:
- YES:
pwht_temp_rangeandpwht_min_timefields must be populated. - NO: These fields must be empty or "0".
- YES:
Step 3: Error Analysis (If No Results Found)
If the system finds no matching WPS, it re-runs filters individually and in groups to identify the root cause.
- Individual Analysis: How many results do Diameter, Thickness, Joint Type, etc., yield on their own?
- Combined Analysis: Checks intersection sets like (Diameter + Thickness), (Diameter + Joint Type).
Based on this analysis, a detailed error report is generated for the user, allowing them to deduce, for example, that "Diameter matches but Joint Type does not."