Scénario de test & Cas d'usage
Netzwerkanalyse und Graphenalgorithmen.
Entdecken Sie alle Aktionen von optNetworkErstellung einer Transaktionstabelle mit einem versteckten 3-Knoten-Zyklus (A->B->C->A).
| 1 | DATA mycas.transactions; INPUT SOURCE $ target $ amount; DATALINES; |
| 2 | KontoA KontoB 1000 |
| 3 | KontoB KontoC 950 |
| 4 | KontoC KontoA 900 |
| 5 | KontoA KontoD 200 |
| 6 | KontoD KontoE 200 |
| 7 | ; RUN; |
| 1 | |
| 2 | PROC CASUTIL; |
| 3 | load |
| 4 | DATA=mycas.transactions casout="transactions" replace; |
| 5 | |
| 6 | RUN; |
| 7 |
| 1 | |
| 2 | PROC CAS; |
| 3 | optNetwork.cycle / direction="DIRECTED" links={name="transactions", vars={from=" |
| 4 | source", to="target"}} out={name="cycle_nodes"} outCyclesLinks={name="cycle_links"} maxCycles="ALL"; |
| 5 | |
| 6 | RUN; |
| 7 |
Die Aktion muss erfolgreich laufen und den Zyklus KontoA -> KontoB -> KontoC -> KontoA identifizieren. Die Tabelle 'cycle_nodes' sollte 3 Einträge für diesen Zyklus enthalten.