Scénario de test & Cas d'usage
Network analysis and graph algorithms.
Discover all actions of optNetworkGeneration of a large, complex graph simulating a national telecom network with a core backbone and regional clusters. This uses a macro to generate a high volume of links.
| 1 | %macro generate_network(nodes=1000, density=3); |
| 2 | DATA mycas.TelcoNetworkLinks; |
| 3 | call streaminit(123); |
| 4 | DO i = 1 to &nodes; |
| 5 | DO j = 1 to &density; |
| 6 | from_node = 'N' || put(i, z5.); |
| 7 | to_node = 'N' || put(ceil(rand('UNIFORM') * &nodes), z5.); |
| 8 | IF (from_node ne to_node) THEN OUTPUT; |
| 9 | END; |
| 10 | END; |
| 11 | RUN; |
| 12 | %mend; |
| 13 | %generate_network(nodes=5000, density=4); |
| 1 | PROC CAS; |
| 2 | ACTION optNetwork.biconnectedComponents / |
| 3 | links={name='TelcoNetworkLinks'} |
| 4 | nThreads=4 |
| 5 | logLevel='MODERATE' |
| 6 | out={name='mycas.NetworkSummary', replace=true} |
| 7 | outNodes={name='mycas.TelcoNodes', replace=true}; |
| 8 | RUN; |
| 9 | QUIT; |
| 1 | PROC CAS; |
| 2 | TABLE.fetch / TABLE={name='NetworkSummary'}; |
| 3 | RUN; |
| 4 | QUIT; |
The action should complete successfully on the large-scale graph without errors or excessive run time. The log will show progress updates due to `logLevel='MODERATE'`. The 'NetworkSummary' table will provide a high-level count of articulation points and components, allowing the telecom provider to quickly assess the overall structural integrity of their network.