2 %> Provide the incidence matrix of the network
for the teanshipment problem
7 %> @author Michel Bierlaire
8 %> @date Wed Jul 23 09:43:15 2014
12 %> Provide the incidence matrix a a network
13 %> @param adj the adjacency matrix of the network
17 addpath(
"../chap21") ;
19 narcs = max(max(adj)) ;
20 if (columns(adj) != nnodes)
21 error(
"Adjacency matrix must be square") ;
26 A = zeros(nnodes,narcs) ;
function transhipment(in adj, in cost, in lb, in ub, in supply, in useGlpk)
Solve the transhipment problem with bound constraints.
function incidenceMatrix(in adj)
Provide the incidence matrix a a network.
function prepareNetwork(in adj)
Identifies the upstream and downstream nodes of each arc.