"; } ?> None

TORSCHE Scheduling
Toolbox for Matlab

Name

graph — creates the graph object.

Synopsis


   G = GRAPH(Aw[[,noEdge],'Property name',value,...])
   G = GRAPH('adj',A[,'Property name',value,...])
   G = GRAPH('inc',I[,'Property name',value,...])
   G = GRAPH('edl',edgeList[,'edgeDatatype',dataTypes][,'Property name',value,...])
   G = GRAPH('ndl',nodeList[,'nodeDatatype',dataTypes][,'Property name',value,...])
   G = GRAPH('ndl',nodeList,'edl',edgeList[,'nodeDatatype',dataTypes]
             [,'edgeDatatype',dataTypes][,'Property name',value,...])
   G = GRAPH(TASKSET[,KW,TransformFunction[,Parameters]])
   G = GRAPH(GRAPH[,'edl',edgeList][,'ndl',nodeList])

Description

G = GRAPH(...) creates the graph from ordered data structures.

Parameters:

Aw

Matrix of edges weigths (just for simple graph)

noEdge

Value of weigth in place without edge. Default is inf.

A

Adjacency matrix

I

Incidency matrix

edgeList

List of edges (cell): initial node, terminal node, user parameters

nodeList

List of nodes (cell): number of node, user parameters

dataTypes

Cell of data types

Name

Name of the graph - class char UserParam:

User-specified data

Color

Background color of graph in graphical projection

GridFreq

Sets the grid of graph in graphical projection - [x y]

G = GRAPH(TASKSET[,KW,TransformFunction[,Parameters]]) creates a graph from precedence constrains matrix of set of tasks:

TASKSET

Set of tasks

KW

Key word - define type of TransformFunction: 't2n' - task to node transfer function; 'p2e' - taskset's TSuserparams to edge's userparam

TransformFunction

Handler to a transform function, which transform tasks to nodes (resp. TSuserparam to userparam). If the variable is empty, standart function 'task/task2node' and 'graph/param2edge' are used.

Parameters

Parameters for transform function, frequently used for users selecting and sorting tasks parameters for setting userparameters of nodes. Parameters are colected to one parameter as cell before calling the transform function.

G = GRAPH(GRAPH[,'edl',edgeList][,'ndl',nodeList]) adds edges or/and nodes to existing graph:

GRAPH

Existing graph object

edgeList

List of edges: initial node, terminal node, user parameters

nodeList

List of nodes: number of node, user parameters

Example

   >> Aw = [4 3 0; 0 0 5; 1 2 3]
   >> g = graph(Aw,0,'Name','g1')
   >> dataTypes = {'double','double','char'}
   >> edgeList = {1,2, 35,[5 8],'edge1'; 2,3, 68,[2 7],'edge2'}
   >> g = graph('edl',edgeList,'edgeDatatype',dataTypes)
   >>
   >> g = graph(T,'t2n',@task2node,'proctime','name','p2e',@param2edges) 

See also

TASKSET/TASKSET, TASK/TASK2NODE, TASK/TASK2USERPARAM, GRAPH/PARAM2EDGE

Webmaster - Jan Dvořák (2004 - 2024)