IOS ZB Case

Introduction

This is the initial approach to the analysis of the IOS ZB case

## Loading required package: igraph
## Loading required package: xtable

General description of the whole network

Let’s calculate some relevant parameters from the network as it is:

apl=average.path.length(g0)
cc =transitivity(g0)  # Cluster coefficient
dn =diameter(g0)
#
clusters(g0)$no

[1] 1

asd=assortativity.degree(g0)  # acording to different vertex types. do we have?
apl

[1] 1.784

cc

[1] 0

dn

[1] 3

asd

[1] 0.07904091

# Properties
pdata=data.frame(degree(g0),betweenness(g0),evcent(g0)$vector)
# Let's plot with attributes
g1=g0
vp=round(10*pdata[,3])+1
mp=max(vp)
cp=palette()
vp8=cp[vp%%8]
vp8[vp==0]=8
V(g1)$color=vp8
V(g1)$size = 5*pdata[,1]
ns=vcount(g1)
vs=sort(unique(pdata[,2]))
nvs=vertex.shapes()
shp=nvs[apply(as.matrix(pdata[,2]),1,function(x){return(which(x==vs))})]
# degree, Centrality betweeness, cohesivity
pdata[,4]=vp8
pdata[,5]=shp
colnames(pdata)[4:5]=c("Color","Shape")
print(xtable(pdata),type="html")
degree.g0. betweenness.g0. evcent.g0..vector Color Shape
QM (Feicht Peter) 3.00 2.00 0.31 blue crectangle
PDCA IOS ZB Prod 6.00 0.00 1.00 green3 circle
QS 1.00 0.00 0.08 red circle
Seg. 1866 1.00 0.00 0.08 red circle
PE12 (Fischer Gerhard) 5.00 11.20 0.70 green3 sphere
Deml Daniel 4.00 6.00 0.24 red pie
Seg. 1861 1.00 0.00 0.07 red circle
Seg. 1862 1.00 0.00 0.07 red circle
Seg. 1868 1.00 0.00 0.07 red circle
Support 5.00 0.00 0.92 green3 circle
Dotterweich Rudolf 4.00 6.00 0.24 red pie
Seg. 1865 1.00 0.00 0.07 red circle
Seg. 1863 1.00 0.00 0.07 red circle
Seg. 1864 1.00 0.00 0.07 green3 circle
Fellgiebel Gerhard 3.00 4.00 0.22 red csquare
Seg. 1860 1.00 0.00 0.06 red circle
Seg. 1867 1.00 0.00 0.06 green3 circle
PE11 (Kammermeier Andreas) 5.00 8.20 0.68 red rectangle
Staudinger Robert 2.00 2.00 0.20 green3 crectangle
Seg. 1837 1.00 0.00 0.05 red circle
Lachner Ludwig 3.00 4.00 0.21 red csquare
Seg. 1824 1.00 0.00 0.06 green3 circle
Seg. 1825 1.00 0.00 0.06 red circle
Feifer Alexander 3.00 4.00 0.21 red csquare
Seg. 1836 1.00 0.00 0.06 blue circle
Seg. 1838 1.00 0.00 0.06 red circle
PE10 (Sig2 Martin) 6.00 7.20 0.75 red raster
Rothenbücher Clemens 4.00 6.00 0.26 red pie
Montagelogistik 1.00 0.00 0.07 green3 circle
Seg. 1944 1.00 0.00 0.07 green3 circle
Seg. 1943 1.00 0.00 0.07 green3 circle
Seg. 1940 1.00 0.00 0.20 green3 circle
Seg. 1942 1.00 0.00 0.20 red circle
Seg. 1941 1.00 0.00 0.20 red circle
PE13 (Götz Thomas) 5.00 11.20 0.70 red sphere
Reisinger Roland 4.00 6.00 0.24 green3 pie
Seg. 1801 1.00 0.00 0.07 red circle
Seg. 1803 1.00 0.00 0.07 red circle
Seg. 1802 1.00 0.00 0.07 green3 circle
Fleischmann Markus 3.00 4.00 0.22 red csquare
Seg. 1805 1.00 0.00 0.06 red circle
Seg. 1806 1.00 0.00 0.06 red circle
Schierlinger Mario 4.00 6.00 0.24 yellow pie
Seg. 1809 1.00 0.00 0.07 green3 circle
Seg. 1808 1.00 0.00 0.07 red circle
Seg. 1810 1.00 0.00 0.07 red circle
PE15 (Lanz Christian) 3.00 4.20 0.57 red none
Hofmeister Georg 4.00 6.00 0.19 pie
Seg. 1921 1.00 0.00 0.05 circle
Seg. 1923 1.00 0.00 0.05 circle
Seg. 1922 1.00 0.00 0.05 circle
plot(g1,layout=layout.fruchterman.reingold(g1, niter=20000, area=30*vcount(g1)^2),
     edge.arrow.size=0.5,vertex.shape=shp)
legend("bottom",c("Color ~ Centrality","Shape ~ Betweeness", "Size ~ Degree"),ncol=3,cex=1)

Here in the plot of the network we can see the degree associated to the size of the node as well as the color as an idea of the cohesivity (depending on the connectivity of their neigbours)

Let’s look for the PDSA datafiles themselves

## Loading required package: plyr
## Loading required package: compare
## 
## Attaching package: 'compare'
## 
## The following object is masked from 'package:igraph':
## 
##     compare
## 
## The following object is masked from 'package:base':
## 
##     isTRUE

Now we will look for .csv files as they were exported from the PDCA excel files. Only pure PDCA from each path was exported. After identifying the .csv files specific range of cells will be readed (lines 37 till the end and columns 1,2,4 and 6, which means Date, week, individual value planned, individual vale finally gotten)

#
setwd("~/git/quaternions/IOS_ZB_Case/")
lf =list.files(pattern="*.csv",recursive=TRUE)
est=ldply(.data=lf,.fun=coloca,"/",6)
lest=as.data.frame(t(apply(est,1,xls_pn)))
est[,7]=unlist(apply(est,1,busca_idd,dd))
est[,8]=apply(est,1,busca_ord)
colnames(est)=c("XLS","DE","A","P01","P02","P03","IDD","TYPE")
#
# Reading KPI files.
exc_m_dat=list()
for (i in 1:length(lf)) {
  hj=read.csv2(lf[i],skip=36)
  if ( nrow(hj) > 0) {
    hjf=hj[apply(as.data.frame(hj[,1]),1,nchar)>0,]
    exc_m_dat[[i]]=hjf[,c(1,2,4,6)]
  }
}

Subgraph analysis

Let’s look into some subgraphs (basically at degree 4). We will consider alignment for processes to produce what it was planned. Thus, misalignment will be expressed as the differences found between planed and produced number of items. We are interested in find how is the relationship between misalignment at PO against the one from each of the dependent processes, as well as between them.

Process Schierlinger

From the excel file the PO is based on the input from three other processes 1808, 1809 and 1810:

nnode="Schierlinger"
a=procesa_grafo(nnode,dd,est,TRUE)

It is possible to realize that missalignment in processes 1808 and 1809 are not so much related to the missalignment in Schierlinger process. The process 1810 is a bit more in relationship but still the root process has its own reasons for misalingments out of those coming from the underlaying processes. There is no special relationship between the support processes themselves.

Process Reisinger

The Reisinger process relays on processes 1801, 1802, 1803. Let’s have a look into the graph as well as into the correlation details: From the excel file the PO is based on the input from three other processes 1808, 1809 and 1810:

nnode="Roland"
a=procesa_grafo(nnode,dd,est,TRUE)

Here we can realize that biggest relationship (or source of misalignment) for Reisinger process is the process 1802. Thus it makes sense to improve the PDCA over this particular process.

Process Fellgiebel

The Fellgiebel process relays on processes 1860 and 1867, just two processes

nnode="Fellgiebel"
a=procesa_grafo(nnode,dd,est,TRUE)

With limited coherence, the two basic processes are related to the main one.Anyhow, the 1867 seems to be more in relation with the Fellgiebel.

Process Dotterweich

The Dotterweich process relays on processes 1863, 1864 and 1865:

nnode="Dotterweich"
a=procesa_grafo(nnode,dd,est,TRUE)

All the three are significant (arount 70% or higher) but 1864 and 1865 are the most significant. Here the interrelationship between support processes is also limitied but higher than in other situations.

Process Fleischmann

The Fleischmann process relays on processes 1805 and 1806:

nnode="Fleischmann"
a=procesa_grafo(nnode,dd,est,TRUE)

In this particular case the misalignment on Fleischmann process can be mosty explained by the 1805.

Process Lachner

The Lachner process relays on processes 1824 and 1825:

nnode="Lachner"
a=procesa_grafo(nnode,dd,est,TRUE)

From the data, it is clear a significant relationhip between 1824 and the Lachner process. THen, improvements in aligning it will mean the same in the Lancher process.

Process Feifer

The Feifer process relays on processes 1836 and 1838:

nnode="Feifer"
a=procesa_grafo(nnode,dd,est,TRUE)

The relationship between process Feifer and all of its support processes is significant but lower than in other cases.

Process Deml

The Deml process relays on processes 1861, 1862 and 1868:

nnode="Deml"
a=procesa_grafo(nnode,dd,est,TRUE)

The relationship between process Feifer and some of its support processes (1862 and 1868) is significant but lower than in other cases. This suggest that some other sources of variation haven’t been identified yet by the PDCA.

Process Rothenbücher

The Rothenbücher process relays on processes 1943 and 1944:

nnode="Rothenbücher"
a=procesa_grafo(nnode,dd,est,TRUE)

From the data, there is a significant relationhip between 1944 and the Rothenbücher process.

Process Staudinger

The Staudinger process relays on process 1837:

nnode="Staudinger"
a=procesa_grafo(nnode,dd,est,TRUE)

From the data, Process Staudinger does not add anything new over the process 1837.

Process Sigl

The Sigl process relays on processes 1940, 1941 and 1942. Here there is an error because the logic shows that those PDCA should exist under the Sigl Martin subdirectory but actually they exist into the upper directory PE10 (Sigl Martin) one. In order to fix this mistake I will move those csv files into its right place according to the network. Indeed, there is no output PDCA for the Martin Sigl at the level of Sigl Martin subprocess. There is a global one for the PE10 (Sigl Martin) but it includes other processes. Then, the meaning is that we can not support subprocess Sigl Martin anymore, then we will update the network structure. Clemens has as PDCA subprocess those belonging theoretically to Sigl M (1940, 1941 and 1942) I will remove them as they are exactly the same. Finally, last but not least the support subprocess which is intended to provide input for Sigl process does not contribute at all as it does not provide any PDSA csv file.

Anyhow here exists a huge topological error in the configured network. The process reviewed looks now into the subgraph

nnode="Sig2"
a=procesa_grafo(nnode,dd,est,TRUE)

From the data, Process Sigl is strongly related to the behabiour of subprocess 1942 while Subprocess from Rothenbücher is less correlated but still meaningful.

Process Hofmeister

The Hofmeister process relays on process 1837:

nnode="Hofmeister"
a=procesa_grafo(nnode,dd,est,TRUE)

Error: Num of outcomes for the node Hofmeister is different than 1:0

From the data, this subprocess doesn’t have any PDCA, in spite it declares so.

Process Lanz

The Lanz process relays on several PO:

nnode="Lanz"
a=procesa_grafo(nnode,dd,est,TRUE)

Error: Num of outcomes for the node Lanz is different than 1:0

Process Götz

The Götz process relays on several PO:

nnode="Götz"
a=procesa_grafo(nnode,dd,est,TRUE)

Error: Num of outcomes for the node Götz is different than 1:0

Process Kammermeier

The Kammermeier process relays on several PO:

nnode="Kammermeier"
a=procesa_grafo(nnode,dd,est,TRUE)

Error: Num of outcomes for the node Kammermeier is different than 1:0

Process Fischer

The Fischer process relays on several PO:

nnode="Fischer"
a=procesa_grafo(nnode,dd,est,TRUE)

Error: Num of outcomes for the node Fischer is different than 1:0

All the PTL together

In this particular case there is no input and output. Instead we are interested in analizing all the relationship at once. We look for unique PTL components

# 
ptl=est[!duplicated(est[,1]),]
ptl=ptl[-nrow(ptl),]
ptl=ptl[-nrow(ptl),]
mat=exc_m_dat[[as.numeric(rownames(ptl)[1])]]
for (i in as.numeric(rownames(ptl)[-1])) {
  mat=merge(mat,exc_m_dat[[i]],by=c("Datum","KW"),all=TRUE)
}
DPTL=nrow(ptl)
nmat=c(unlist(lapply(strsplit(unlist(lapply(strsplit(ptl[,1],"-"),
                function(x){return(x[2])})),"[_,\\.]"),function(x){return(x[2])})))
mat[,(ncol(mat)+1)]=mat[,3]-mat[,4]
colnames(mat)[ncol(mat)]=paste(nmat[1],sep="")
for( j in 2:nrow(ptl)) {
  mat[,(ncol(mat)+1)]=mat[,(4+2*j-1)]-mat[,(4+2*j)]
  colnames(mat)[ncol(mat)]=paste(nmat[j],sep="")
}
pdf("map.pdf",width=24,height=24)
pairs.panels(mat[,(3+2*DPTL):(2+3*DPTL)])
dev.off()

pdf 2

# pairs.panels(mat[,(3+2*DPTL):(2+3*DPTL)])

Nuber agaist all the PTL together

In this particular case we need to summarize at level of week the data

#
oper=function(x) {
  ss=apply(x,2,mean,na.rm=TRUE)
  return(as.matrix(ss))
}
tmat=mat[,c(2,(3+2*DPTL):(2+3*DPTL))]
mtmat=by(tmat[,c(2:ncol(tmat))],tmat[,1],oper)
# 
smat=as.data.frame(mtmat[2][[1]])
colnames(smat)=names(mtmat)[2]
for (i in 3:length(names(mtmat))) {
  smat[,(ncol(smat)+1)]=mtmat[i][[1]]
  colnames(smat)[ncol(smat)]=names(mtmat)[i]
}
# There are only 40 weeks from available data.
smat=as.matrix(smat[,1:46])
setwd("~/git/quaternions/IOS_ZB_Case/")
dnub=read.csv2(file="PDCA IOS ZB Prod/Datos_Nuber.ddd",
               dec=",",header=FALSE,skip=2)
colnames(dnub)[2]="Nuber"
dnub=dnub[1:46,c(1,2,4,5)]
ss = t(dnub[,2:4])
rownames(dnub)=dnub[,1]
colnames(ss)=rownames(dnub)
dsmat=as.data.frame(rbind(smat,ss))
rownames(dsmat)[(nrow(smat)+1):nrow(dsmat)]=c("Nuber_Leistung",
              "Nuber_Reichweite","Nuber_R_Verzung")
#
pdf("map_datos_nuber.pdf",width=24,height=24)
pairs.panels(t(dsmat))
dev.off()

pdf 2

pdf("map_evol.pdf",width=24,height=24)
pairs.panels(dsmat)
dev.off()

pdf 2

#
colnames(dnub)[3]="Nuber"
dnub=dnub[1:40,]
s2 = t(dnub[,3])
colnames(s2)=rownames(dnub)
gsmat=as.data.frame(rbind(smat,s2[1,]))
rownames(gsmat)[nrow(gsmat)]=colnames(dnub)[3]
pdf("map_g_nuber.pdf",width=24,height=24)
pairs.panels(t(gsmat))
dev.off()

pdf 2