<< NARVAL_R_PathRT NARVAL NARVAL_R_PredRoute >>

NARVAL >> NARVAL > NARVAL_R_PathWeightMod

NARVAL_R_PathWeightMod

Modify the weight of links belonging to a path inside a network graph.

Calling Sequence

[g]=NARVAL_R_PathWeightMod(g,path,w)

Parameters

g :

maximal value.

path :

connection path.

w :

additional weight.

Description

NARVAL_R_PathWeightMod modifies the weight of links belonging to the route path inside the network graph g. The constant weight w is added to any link of the path.

Examples

[path]=NARVAL_F_NARVALPath();//path to NARVAL module
path=path+'/demos/';//folder path
load(path+'topo_100.graph');//loading of the network graph
load(path+'RoutingTables_topo_100.dat','pt','rt1','rt2','rt3','rt4','rt5');//loading of the network routing tables
n=100;//network size
[nd,nf]=NARVAL_F_Random_i_j(n);//generation of extremal connection nodes  
[path]=NARVAL_R_PathERT(rt1,nd,nf,n);//shortest path between nd and nf
p=NARVAL_G_Nodes2Path(path,g);//indexes of links belonging to the shortest path
w=1000;
g.edge_length(p)//initial length values of each path link
[g]=NARVAL_R_PathWeightMod(g,path,w);//application of NARVAL_R_PathWeightMod 
g.edge_length(p)//new length values of each path link

Dependency

NARVAL_G_Nodes2Path

Author

http://wwwen.uni.lu/interdisciplinary_centre_for_security_reliability_and_trust

Contact

<< NARVAL_R_PathRT NARVAL NARVAL_R_PredRoute >>