Scénario de test & Cas d'usage
Network analysis and graph algorithms.
Discover all actions of optNetworkCreation of a transaction table with a hidden circular pattern (Acc_A -> Acc_B -> Acc_C -> Acc_A) among legitimate linear transfers.
| 1 | |
| 2 | DATA mycas.transactions; |
| 3 | INPUT from_acc $ to_acc $ amount; |
| 4 | DATALINES; |
| 5 | Acc_A Acc_B 10000 Acc_B Acc_C 9500 Acc_C Acc_A 9000 Acc_X Acc_Y 500 Acc_Y Acc_Z 200; |
| 6 | |
| 7 | RUN; |
| 8 |
| 1 | |
| 2 | PROC CAS; |
| 3 | optNetwork.cycle RESULT=r STATUS=s / direction="DIRECTED" links={name="transactions"} linksVar={from="from_acc", to="to_acc"} maxCycles="ALL" minLength=3 out={name="SuspiciousRings", replace=true} outCyclesLinks={name="RingDetails", replace=true}; |
| 4 | |
| 5 | RUN; |
| 6 |
| 1 | |
| 2 | PROC CAS; |
| 3 | TABLE.fetch TABLE={name="SuspiciousRings"}; |
| 4 | |
| 5 | RUN; |
| 6 |
The action identifies exactly one cycle (Acc_A, Acc_B, Acc_C). The output table 'SuspiciousRings' contains the 3 accounts involved. The linear transactions are excluded.