Optimization: principles and algorithms, by Michel Bierlaire
Functions
prepareNetwork.m File Reference

Prepares the network for efficient access to the data. More...

Go to the source code of this file.

Functions

function prepareNetwork (in adj)
 Identifies the upstream and downstream nodes of each arc. More...
 

Detailed Description

Prepares the network for efficient access to the data.

Note
Tested with runPrepareNetwork.m
Called by simpleCycle
Called by shortestPath
Called by dijkstra
Called by incidenceMatrix
Called by transhipmentTransform
Called by run2120.m
Called by runEnumeratePaths.m
Author
Michel Bierlaire
Date
Fri Mar 27 17:52:24 2015

Definition in file prepareNetwork.m.

Function Documentation

◆ prepareNetwork()

function prepareNetwork ( in  adj)

Identifies the upstream and downstream nodes of each arc.

Parameters
adjthe adjacency matrix of the network. It is a $m \times m$ matrix, such that the element at row i and column j corresponds to the id of the arc (i,j). The numbering should be from 1 to n.
Returns
arcs A matrix containing the upstream and downstream nodes of each arc. Each row corresponds to an arc. Column 1 contains the upstream node and column 2 the downstream.
Copyright 2015-2018 Michel Bierlaire