File: gen_net.cat

package info (click to toggle)
scilab 2.6-4
  • links: PTS
  • area: non-free
  • in suites: woody
  • size: 54,632 kB
  • ctags: 40,267
  • sloc: ansic: 267,851; fortran: 166,549; sh: 10,005; makefile: 4,119; tcl: 1,070; cpp: 233; csh: 143; asm: 135; perl: 130; java: 39
file content (44 lines) | stat: -rw-r--r-- 1,683 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
gen_net           Scilab Group           Scilab function            gen_net
NAME
   gen_net - generation of a network
  
CALLING SEQUENCE
 g = gen_net(name,directed,v)
 g = gen_net()
PARAMETERS
 name  : string, the name of the graph
       
 directed
        :  integer, 0 (undirected graph) or 1 (directed graph)
       
 v     : row vector with 12 values for defining the network
       
 g     : graph list
       
DESCRIPTION
   gen_net generates a network g. The arguments are the name of the graph, a
  flag equal to 0 (undirected graph) or  to 1 (directed graph) and a vector
  describing the network (see below).  If no argument are given, a dialog
  box for the definition of all the arguments is opened.  v must be a row
  vector with 12 values. The meaning of the values are:  Seed for random:
  used for initialization of random generation  Number of nodes  Number of
  sources  Number of sinks  Minimum cost  Maximum cost  Input supply 
  Output supply  Minimum capacity  Maximum capacity  Percentage of edges
  with costs: between 0 and 100  Percentage of edges with capacities:
  between 0 and 100  The cost of edges without cost are put to minimum
  cost. The maximum capacity of edges without capacity are put to maximum
  upply  The result is a network g built on a planar connected graph, by
  using a triangulation method. Moreover, computations are made in order to
  have a coherent network. Values of costs and maximum capacities are put
  on the edges. Minimum capacities are reduced to 0.
  
EXAMPLE
 v=[1,10,2,1,0,10,100,100,0,100,50,50];
 g=gen_net('foo',1,v);
 show_graph(g)
 // generating using dialogs
 g=gen_net();
 show_graph(g)
SEE ALSO
   mesh2d