I have a MILP problem that requires knowing the number of nodes within a cycle (there will be multiple depending on inputs). I believe this will involve tracing nodes/values within cycles using the node-arc matrix, but I am unsure how to construct the mathematical formulation to do so.
I am required to use MATLAB and Gurobi solver.
How do I accomplish this?