File: gen_net.man

package info (click to toggle)
scilab 2.4-1
  • links: PTS
  • area: non-free
  • in suites: potato, slink
  • size: 55,196 kB
  • ctags: 38,019
  • sloc: ansic: 231,970; fortran: 148,976; tcl: 7,099; makefile: 4,585; sh: 2,978; csh: 154; cpp: 101; asm: 39; sed: 5
file content (76 lines) | stat: -rw-r--r-- 1,666 bytes parent folder | download | duplicates (2)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
.TH gen_net 1 "September 1996" "Scilab Group" "Scilab function"
.so ../sci.an
.SH NAME
gen_net - generation of a network
.SH CALLING SEQUENCE
.nf
g = gen_net(name,directed,v)
g = gen_net()
.fi
.SH PARAMETERS
.TP 5
name
: string, the name of the graph
.TP 9
directed
:  integer, 0 (undirected graph) or 1 (directed graph)
.TP 3
v
: row vector with 12 values for defining the network
.TP 2
g
: graph list
.SH DESCRIPTION
\fVgen_net\fR generates a network \fVg\fR.
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.

\fVv\fR 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 \fVg\fR 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.
.SH EXAMPLE
.nf
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)
.fi
.SH SEE ALSO
mesh2d