This repository provides MATLAB implementations of two algorithms:
- MDTA constructs fully link-disjoint multicast trees.
- COBRA constructs arc-disjoint multicast trees and can use bypass edges during construction.
Both algorithms share an exploration phase that derives source-rooted cost and hop information, followed by a construction phase that produces the multicast trees.
- MATLAB with support for
graph,digraph, tables, and string arrays. - No additional MATLAB toolboxes are required by the code in this repository.
From the repository root, add the project to the MATLAB path:
root = pwd;
addpath(genpath(root));Load a topology and run either algorithm:
[~, ~, G] = load_graph("topologies/Usnet", ...
"/MatlabFileEdges.txt", "/MatlabFileNodes.txt");
mdta_results = RunMDTAorCobra(G, 1, [2 3], "MDTA", 2);
cobra_results = RunMDTAorCobra(G, 1, [2 3], "Cobra", 2);RunMDTAorCobra returns a table containing the generated trees, route costs, number of routes found per destination, success metrics, and execution time.
functions/contains the algorithm entry point, exploration phase, construction phase, topology loader, and shared helpers.class/contains the mobility-model configuration class.topologies/contains the Usnet and Rand static topology data.test/static/contains reproducible static experiments and their evaluator.test/dynamic_rwp/contains the continuous Random Waypoint experiment and its evaluator.
Run static experiments on Usnet and Rand:
run("test/static/s_static_test.m")
run("test/static/t_eval_static.m")Run the Random Waypoint experiment:
run("test/dynamic_rwp/s_dynamic_rwp.m")
run("test/dynamic_rwp/t_eval_dynamic_rwp.m")The experiment scripts use fixed random seeds for reproducibility. Results are written to the corresponding results/ directory.
This software is provided for research and reproducibility. Validate results and parameter choices for the topology and scenario under study before relying on them.
If you use this software, please cite the release-specific software record and the associated article when available. Citation metadata is provided in CITATION.cff.
Manso, N., Lopez-Pajares, D., Carral, J. A., Carrascal, D., and Martinez-Yelmo, I. (2026). COBRA: Constructive Backtracking for Rooted Arc-Disjoint Trees in Mobile Ad Hoc Networks (Version 1.0.0). Zenodo. https://doi.org/10.5281/zenodo.21491835
This software is licensed under the Apache License 2.0. See LICENSE for details.