flowshop_graph - flowshop graph builder ( maxplus )
PT_ij ((i,j)-entry of matrix PT) is the processing time of part j by machine i (T_ij = -inf if part j does not visit machine i) in a flowshop (in a flowshop, as opposed to a jobshop, all parts visit machines in the increasing order of the machine numbers with the possibility of skipping some machines).
nm is a vector with size equal to the PT row number: it yields the numbers of machines of each type working in parallel.
np is a vector of size equal to the PT column number: it yields the numbers of pallets of each type (parts of each type are carried by specialized pallets).
Given this data, flowshop_graph:
- builds a flowshop graph (g) (metanet graph-list) depicting the corresponding cyclic flowshop (where it is assumed that as soon as machines and pallets have finished with all tasks of a cycle, they start another cycle),
- builds a maxplus matrix of the timings (T) for the corresponding event graph, Tkl contains the processing time of edge from k to l where the states corresponds here tp couples (i,j).
- builds a maxplus matrix of the initial markings (N) for the corresponding event graph, Nkl contains the initial marking of edge from k to l.
- plots the flowshop in a metanet window.
PT must not have a row or a column identical to -inf.
Remarks:
Some nodes are duplicated artificially to see the system as an input-output system with feedback. Then red nodes may considered as input nodes (U), green nodes as output nodes and the feedback as the identity (Y=U).
The black edge weights are processing times, the blue are resource (machine or pallet numbers). The yellow edges (feedback) have 0 processing time and 0 resource.
The arc weights (processing time or resource number) are in the "edge_length" field (called flow in menus) of the graph-list g because either the processing time or the resource number is 0 in this modelling, and, by this way, no manipulations are necessary to visualize these quantities in metanet.
PT=#([2,1;%0,1;4,%0]) xsetech([0 0 0.5 0.5]); [g,T,N]=flowshop_graph(PT,[1,1,1],[1,1],50); [l,v]=semihoward(T,N) // l gives the throughput of the flowshop