Gozintograph: Unterschied zwischen den Versionen

Aus FLBK-Wiki
Zur Navigation springen Zur Suche springen
Keine Bearbeitungszusammenfassung
Markierung: Manuelle Zurücksetzung
Keine Bearbeitungszusammenfassung
Zeile 19: Zeile 19:
== Zusammenhang zu Matrizen ==
== Zusammenhang zu Matrizen ==


Die Informationen eines Gozintographen lassen sich in einer sogenannten '''Gozintomatrix''' darstellen.
Die Informationen eines Gozintographen lassen sich in einer sogenannten '''Gozintomatrix''' darstellen.


Dies ist eine Matrix
Dies ist eine Matrix
Zeile 46: Zeile 46:
Die Pfeile zeigen, welche Einzelteile in welches Bauteil eingehen. Die Zahlen an den Pfeilen geben die benötigte Stückzahl an.
Die Pfeile zeigen, welche Einzelteile in welches Bauteil eingehen. Die Zahlen an den Pfeilen geben die benötigte Stückzahl an.


<!-- VARIANTE B – FINAL OPTIMIERT -->
<html>
<html>
<style>
<style>
Zeile 53: Zeile 52:
     height:50vw;
     height:50vw;
     max-width:1100px;
     max-width:1100px;
     max-height:400px;
     max-height:450px;
     border:0;
     border:0;
     margin:0;
     margin:0;
Zeile 87: Zeile 86:
   }
   }


   .edge-arrow { fill:#000; }
   .edge-arrow {
    fill:#000;
  }


   .count-circle {
   .count-circle {
Zeile 97: Zeile 98:


<div class="gozinto-wrap">
<div class="gozinto-wrap">
<svg id="gozinto_svg_2" viewBox="0 0 1200 450" preserveAspectRatio="xMinYMin meet">
<svg id="gozinto_svg_2"
    viewBox="0 0 1200 450"
    preserveAspectRatio="xMinYMin meet">
</svg>
</svg>
</div>
</div>
Zeile 103: Zeile 106:
<script>
<script>
(function(){
(function(){
  const svg = document.getElementById("gozinto_svg_2");


  const scale = 100;
const svg=document.getElementById("gozinto_svg_2");
  const yOffset = 0;
 
  const xOffsetGlobal = 120;
const scale=100;
const yOffset=0;
const xOffsetGlobal=120;
 
function svgEl(name,attrs){
  const el=document.createElementNS("http://www.w3.org/2000/svg",name);
  for(const k in (attrs||{})) el.setAttribute(k,attrs[k]);
  return el;
}
 
function getSVGcoords(evt){
  const pt=svg.createSVGPoint();
  pt.x=evt.clientX;
  pt.y=evt.clientY;
  return pt.matrixTransform(svg.getScreenCTM().inverse());
}
 
function createNode(id,cx,cy,w,h,label){
 
  cx+=xOffsetGlobal/scale;


   function svgEl(name, attrs){
   const g=svgEl("g",{"data-id":id});
    const el = document.createElementNS("http://www.w3.org/2000/svg", name);
 
     for(const k in (attrs||{})) el.setAttribute(k, attrs[k]);
  const rect=svgEl("rect",{
     return el;
    class:"node-rect",
   }
    x:(cx-w/2)*scale,
     y:(cy-h/2)*scale+yOffset,
    width:w*scale,
    height:h*scale,
    rx:6,
     ry:6
   });


   function getSVGcoords(evt){
   const text=svgEl("text",{
     const pt = svg.createSVGPoint();
     class:"node-text",
     pt.x = evt.clientX;
     x:cx*scale,
     pt.y = evt.clientY;
     y:cy*scale+yOffset,
     return pt.matrixTransform(svg.getScreenCTM().inverse());
    "text-anchor":"middle",
   }
     "dominant-baseline":"middle"
   });


   function createNode(id, cx, cy, w, h, label){
   text.textContent=label;
    cx += xOffsetGlobal/scale;


    const g = svgEl("g", {"data-id":id});
  g.appendChild(rect);
    const rect = svgEl("rect", {
  g.appendChild(text);
      class:"node-rect",
      x:(cx-w/2)*scale,
      y:(cy-h/2)*scale + yOffset,
      width:w*scale,
      height:h*scale,
      rx:6,
      ry:6
    });


    const text = svgEl("text", {
  svg.appendChild(g);
      class:"node-text",
      x:cx*scale,
      y:cy*scale+yOffset,
      "text-anchor":"middle",
      "dominant-baseline":"middle"
    });


    text.textContent = label;
  const node={id,cx,cy,w,h,rect,text,g};


    g.appendChild(rect);
  let dragging=false,start={};
    g.appendChild(text);
    svg.appendChild(g);


    const node = {id,cx,cy,w,h,rect,text,g};
  rect.addEventListener("pointerdown",e=>{
    rect.setPointerCapture(e.pointerId);
    dragging=true;


     let dragging=false, start={};
     const p=getSVGcoords(e);


     rect.addEventListener("pointerdown", e=>{
     start={
       rect.setPointerCapture(e.pointerId);
       px:p.x,
      dragging=true;
      py:p.y,
      const p = getSVGcoords(e);
      cx:node.cx,
      start = {px:p.x, py:p.y, cx:node.cx, cy:node.cy};
      cy:node.cy
    });
    };
  });


    rect.addEventListener("pointermove", e=>{
  rect.addEventListener("pointermove",e=>{
      if(!dragging) return;


      const p = getSVGcoords(e);
    if(!dragging) return;


      node.cx = start.cx + (p.x - start.px)/scale;
    const p=getSVGcoords(e);
      node.cy = start.cy + (p.y - start.py)/scale;


      updateNode(node);
    node.cx=start.cx+(p.x-start.px)/scale;
      updateAllEdges();
     node.cy=start.cy+(p.y-start.py)/scale;
     });


     rect.addEventListener("pointerup", e=>{
     updateNode(node);
      dragging=false;
    updateAllEdges();
      rect.releasePointerCapture(e.pointerId);
  });
    });


     return node;
  rect.addEventListener("pointerup",e=>{
   }
    dragging=false;
     rect.releasePointerCapture(e.pointerId);
   });


   function updateNode(n){
   return node;
    n.rect.setAttribute("x",(n.cx-n.w/2)*scale);
}
    n.rect.setAttribute("y",(n.cy-n.h/2)*scale+yOffset);
    n.text.setAttribute("x",n.cx*scale);
    n.text.setAttribute("y",n.cy*scale+yOffset);
  }


  function intersectRectBorder(node, tx, ty){
function updateNode(n){
    const cx=node.cx, cy=node.cy, w2=node.w/2, h2=node.h/2;
  n.rect.setAttribute("x",(n.cx-n.w/2)*scale);
    const dx=tx-cx, dy=ty-cy;
  n.rect.setAttribute("y",(n.cy-n.h/2)*scale+yOffset);


    let pts=[];
  n.text.setAttribute("x",n.cx*scale);
  n.text.setAttribute("y",n.cy*scale+yOffset);
}


    if(Math.abs(dx)>1e-9){
function intersectRectBorder(node,tx,ty){
      let t1=(-w2)/dx;
      let y1=cy+t1*dy;


      if(t1>0 && y1>=cy-h2 && y1<=cy+h2)
  const cx=node.cx;
        pts.push({x:cx-w2,y:y1,t:t1});
  const cy=node.cy;


      let t2=(w2)/dx;
  const w2=node.w/2;
      let y2=cy+t2*dy;
  const h2=node.h/2;


      if(t2>0 && y2>=cy-h2 && y2<=cy+h2)
  const dx=tx-cx;
        pts.push({x:cx+w2,y:y2,t:t2});
  const dy=ty-cy;
    }


    if(Math.abs(dy)>1e-9){
  let pts=[];
      let t3=(-h2)/dy;
      let x3=cx+t3*dx;


      if(t3>0 && x3>=cx-w2 && x3<=cx+w2)
  if(Math.abs(dx)>1e-9){
        pts.push({x:x3,y:cy-h2,t:t3});


      let t4=(h2)/dy;
    let t1=(-w2)/dx;
      let x4=cx+t4*dx;
    let y1=cy+t1*dy;


      if(t4>0 && x4>=cx-w2 && x4<=cx+w2)
    if(t1>0 && y1>=cy-h2 && y1<=cy+h2)
        pts.push({x:x4,y:cy+h2,t:t4});
      pts.push({x:cx-w2,y:y1,t:t1});
    }


     pts.sort((a,b)=>a.t-b.t);
     let t2=(w2)/dx;
    let y2=cy+t2*dy;


     return pts[0] || {x:cx,y:cy};
     if(t2>0 && y2>=cy-h2 && y2<=cy+h2)
      pts.push({x:cx+w2,y:y2,t:t2});
   }
   }


   function pointOnCircle(cx,cy,R,tx,ty){
   if(Math.abs(dy)>1e-9){
    const dx=tx-cx;
    const dy=ty-cy;


     const d=Math.sqrt(dx*dx+dy*dy);
     let t3=(-h2)/dy;
    let x3=cx+t3*dx;


     if(d<1e-9) return {x:cx,y:cy};
     if(t3>0 && x3>=cx-w2 && x3<=cx+w2)
      pts.push({x:x3,y:cy-h2,t:t3});


     return {
     let t4=(h2)/dy;
      x:cx+R*dx/d,
    let x4=cx+t4*dx;
       y:cy+R*dy/d
 
    };
    if(t4>0 && x4>=cx-w2 && x4<=cx+w2)
       pts.push({x:x4,y:cy+h2,t:t4});
   }
   }


   function makeArrowHead(x,y,ux,uy,size){
   pts.sort((a,b)=>a.t-b.t);
    let px=-uy, py=ux;
 
  return pts[0]||{x:cx,y:cy};
}
 
function pointOnCircle(cx,cy,R,tx,ty){
 
  const dx=tx-cx;
  const dy=ty-cy;
 
  const d=Math.sqrt(dx*dx+dy*dy);
 
  if(d<1e-9) return {x:cx,y:cy};
 
  return {
    x:cx+R*dx/d,
    y:cy+R*dy/d
  };
}
 
function makeArrowHead(x,y,ux,uy,size){


    return `M ${x} ${y}
  let px=-uy;
            L ${x-ux*size+px*size*0.5} ${y-uy*size+py*size*0.5}
  let py=ux;
            L ${x-ux*size-px*size*0.5} ${y-uy*size-py*size*0.5} Z`;
 
  }
  return `M ${x} ${y}
          L ${x-ux*size+px*size*0.5} ${y-uy*size+py*size*0.5}
          L ${x-ux*size-px*size*0.5} ${y-uy*size-py*size*0.5} Z`;
}


  const edges=[];
const edges=[];


  function makeConnection(fromNode,toNode,amount,yMid,xOffset){
function makeConnection(fromNode,toNode,amount,yMid,xOffset){


    const g=svgEl("g",{});
  const g=svgEl("g",{});


    const lineA=svgEl("path",{class:"edge-line"});
  const lineA=svgEl("path",{class:"edge-line"});
    const lineB=svgEl("path",{class:"edge-line"});
  const lineB=svgEl("path",{class:"edge-line"});
    const circle=svgEl("circle",{class:"count-circle"});
  const circle=svgEl("circle",{class:"count-circle"});
    const text=svgEl("text",{class:"count-text"});
  const text=svgEl("text",{class:"count-text"});
    const arrow=svgEl("path",{class:"edge-arrow"});
  const arrow=svgEl("path",{class:"edge-arrow"});


    text.textContent=amount;
  text.textContent=amount;


    g.appendChild(lineA);
  g.appendChild(lineA);
    g.appendChild(lineB);
  g.appendChild(lineB);
    g.appendChild(circle);
  g.appendChild(circle);
    g.appendChild(text);
  g.appendChild(text);
    g.appendChild(arrow);
  g.appendChild(arrow);


    svg.appendChild(g);
  svg.appendChild(g);


    let e={
  let e={
      fromNode,
    fromNode,
      toNode,
    toNode,
      amount,
    amount,
      yMid,
    yMid,
      xOffset,
    xOffset,
      circle,
    circle,
      text,
    text,
      lineA,
    lineA,
      lineB,
    lineB,
      arrow
    arrow
    };
  };


    edges.push(e);
  edges.push(e);


    updateEdge(e);
  updateEdge(e);
  }
}


  function updateEdge(e){
function updateEdge(e){


    const cx=(e.fromNode.cx+e.toNode.cx)/2+(e.xOffset||0);
  const cx=(e.fromNode.cx+e.toNode.cx)/2+(e.xOffset||0);
    const cy=e.yMid;
  const cy=e.yMid;
    const R=0.14;
  const R=0.14;


    const pF=intersectRectBorder(e.fromNode,cx,cy);
  const pF=intersectRectBorder(e.fromNode,cx,cy);
    const pT=intersectRectBorder(e.toNode,cx,cy);
  const pT=intersectRectBorder(e.toNode,cx,cy);


    const pCircleIn=pointOnCircle(cx,cy,R,pF.x,pF.y);
  const pCircleIn=pointOnCircle(cx,cy,R,pF.x,pF.y);
    const pCircleOut=pointOnCircle(cx,cy,R,pT.x,pT.y);
  const pCircleOut=pointOnCircle(cx,cy,R,pT.x,pT.y);


    const px=p=>[p.x*scale,p.y*scale+yOffset];
  const px=p=>[p.x*scale,p.y*scale+yOffset];


    const F=px(pF),
  const F=px(pF);
          Ci=px(pCircleIn),
  const Ci=px(pCircleIn);
          Co=px(pCircleOut),
  const Co=px(pCircleOut);
          T=px(pT);
  const T=px(pT);


    e.lineA.setAttribute("d",`M ${F[0]} ${F[1]} L ${Ci[0]} ${Ci[1]}`);
  e.lineA.setAttribute("d",`M ${F[0]} ${F[1]} L ${Ci[0]} ${Ci[1]}`);
    e.lineB.setAttribute("d",`M ${Co[0]} ${Co[1]} L ${T[0]} ${T[1]}`);
  e.lineB.setAttribute("d",`M ${Co[0]} ${Co[1]} L ${T[0]} ${T[1]}`);


    e.circle.setAttribute("cx",cx*scale);
  e.circle.setAttribute("cx",cx*scale);
    e.circle.setAttribute("cy",cy*scale+yOffset);
  e.circle.setAttribute("cy",cy*scale+yOffset);
    e.circle.setAttribute("r",R*scale);
  e.circle.setAttribute("r",R*scale);


    e.text.setAttribute("x",cx*scale-5);
  e.text.setAttribute("x",cx*scale-5);
    e.text.setAttribute("y",cy*scale+yOffset+5);
  e.text.setAttribute("y",cy*scale+yOffset+5);


    let ux=T[0]-Co[0];
  let ux=T[0]-Co[0];
    let uy=T[1]-Co[1];
  let uy=T[1]-Co[1];


    let L=Math.sqrt(ux*ux+uy*uy);
  let L=Math.sqrt(ux*ux+uy*uy);


    if(L<1e-6) L=1;
  if(L<1e-6) L=1;


    ux/=L;
  ux/=L;
    uy/=L;
  uy/=L;


    e.arrow.setAttribute(
  e.arrow.setAttribute("d",makeArrowHead(T[0],T[1],ux,uy,10));
      "d",
}
      makeArrowHead(T[0],T[1],ux,uy,10)
    );
  }


  function updateAllEdges(){
function updateAllEdges(){
    edges.forEach(updateEdge);
  edges.forEach(updateEdge);
  }
}


  const nodes={};
const nodes={};


  nodes.E1=createNode("E1",0,0.5,1.0,0.5,"E1");
nodes.E1=createNode("E1",0,0.5,1.0,0.5,"E1");
  nodes.E2=createNode("E2",2.5,0.5,1.0,0.5,"E2");
nodes.E2=createNode("E2",2.5,0.5,1.0,0.5,"E2");
  nodes.E3=createNode("E3",5.0,0.5,1.0,0.5,"E3");
nodes.E3=createNode("E3",5.0,0.5,1.0,0.5,"E3");
  nodes.E4=createNode("E4",7.5,0.5,1.0,0.5,"E4");
nodes.E4=createNode("E4",7.5,0.5,1.0,0.5,"E4");


  nodes.B1=createNode("B1",0.75,4.5,1.0,0.5,"B1");
nodes.B1=createNode("B1",0.75,4.5,1.0,0.5,"B1");
  nodes.B2=createNode("B2",2.5,4.5,1.0,0.5,"B2");
nodes.B2=createNode("B2",2.5,4.5,1.0,0.5,"B2");
  nodes.B3=createNode("B3",5.0,4.5,1.0,0.5,"B3");
nodes.B3=createNode("B3",5.0,4.5,1.0,0.5,"B3");
  nodes.B4=createNode("B4",7.5,4.5,1.0,0.5,"B4");
nodes.B4=createNode("B4",7.5,4.5,1.0,0.5,"B4");
  nodes.B5=createNode("B5",10,4.5,1.0,0.5,"B5");
nodes.B5=createNode("B5",10,4.5,1.0,0.5,"B5");


  makeConnection(nodes.E1,nodes.B1,"2",2.2,-0.2);
makeConnection(nodes.E1,nodes.B1,"2",2.2,-0.2);
  makeConnection(nodes.E2,nodes.B1,"1",2.2,0.2);
makeConnection(nodes.E2,nodes.B1,"1",2.2,0.2);


  makeConnection(nodes.E1,nodes.B2,"2",2.2,-0.2);
makeConnection(nodes.E1,nodes.B2,"2",2.2,-0.2);
  makeConnection(nodes.E2,nodes.B2,"1",2.2,0.2);
makeConnection(nodes.E2,nodes.B2,"1",2.2,0.2);


  makeConnection(nodes.E1,nodes.B3,"1",2.2,-0.25);
makeConnection(nodes.E1,nodes.B3,"1",2.2,-0.25);
  makeConnection(nodes.E2,nodes.B3,"1",2.2,0.0);
makeConnection(nodes.E2,nodes.B3,"1",2.2,0.0);
  makeConnection(nodes.E3,nodes.B3,"1",2.2,0.25);
makeConnection(nodes.E3,nodes.B3,"1",2.2,0.25);


  makeConnection(nodes.E1,nodes.B4,"2",2.2,-0.3);
makeConnection(nodes.E1,nodes.B4,"2",2.2,-0.3);
  makeConnection(nodes.E3,nodes.B4,"1",2.2,0.0);
makeConnection(nodes.E3,nodes.B4,"1",2.2,0.0);
  makeConnection(nodes.E4,nodes.B4,"1",2.2,0.3);
makeConnection(nodes.E4,nodes.B4,"1",2.2,0.3);


  makeConnection(nodes.E1,nodes.B5,"1",2.2,-0.2);
makeConnection(nodes.E1,nodes.B5,"1",2.2,-0.2);
  makeConnection(nodes.E4,nodes.B5,"2",2.2,0.2);
makeConnection(nodes.E4,nodes.B5,"2",2.2,0.2);


  updateAllEdges();
updateAllEdges();


})();
})();
Zeile 391: Zeile 416:


:<math>
:<math>
A =
A=
\begin{pmatrix}
\begin{pmatrix}
2 & 2 & 1 & 2 & 1 \\
2 & 2 & 1 & 2 & 1 \\
Zeile 402: Zeile 427:
gegeben.
gegeben.


Beispielsweise lässt sich aus der ersten Spalte ablesen, dass zur Herstellung eines Bauteils <math>B_1</math>
=== Produktion von Spielwaren aus Rohstoffen über Zwischenprodukte ===
 
Ein Spielwarenhersteller produziert aus drei Rohstoffen <math>R_1,R_2,R_3</math> zunächst die beiden Zwischenprodukte <math>Z_1,Z_2</math>, aus denen anschließend die drei Endprodukte <math>E_1,E_2,E_3</math> gefertigt werden.
 
Die Pfeile im Gozintographen geben an, wie viele Mengeneinheiten eines Materials zur Produktion einer Mengeneinheit des entstehenden Produkts benötigt werden.
 
<html>
<style>
  .gozinto-wrap2 {
    width:95vw;
    height:70vw;
    max-width:1200px;
    max-height:800px;
    border:0;
    margin:0;
    padding:0;
  }
 
  .gozinto-wrap2 svg {
    width:100%;
    height:100%;
    touch-action:none;
    user-select:none;
    background:white;
  }
</style>
 
<div class="gozinto-wrap2">
<svg id="gozinto_svg"
    viewBox="0 0 1180 700"
    preserveAspectRatio="xMinYMin meet">
</svg>
</div>
 
<script>
(function(){
 
const svg=document.getElementById("gozinto_svg");
 
const scale=100;
const yOffset=0;
const xOffsetGlobal=120;
 
function svgEl(name,attrs){
  const el=document.createElementNS("http://www.w3.org/2000/svg",name);
  for(const k in (attrs||{})) el.setAttribute(k,attrs[k]);
  return el;
}
 
function createNode(id,cx,cy,w,h,label){
 
  cx+=xOffsetGlobal/scale;
 
  const g=svgEl("g",{});
 
  const rect=svgEl("rect",{
    class:"node-rect",
    x:(cx-w/2)*scale,
    y:(cy-h/2)*scale,
    width:w*scale,
    height:h*scale,
    rx:6,
    ry:6
  });
 
  const text=svgEl("text",{
    class:"node-text",
    x:cx*scale,
    y:cy*scale,
    "text-anchor":"middle",
    "dominant-baseline":"middle"
  });
 
  text.textContent=label;
 
  g.appendChild(rect);
  g.appendChild(text);
 
  svg.appendChild(g);
 
  return {cx,cy,w,h};
}
 
function drawArrow(x1,y1,x2,y2,label){
 
  const line=svgEl("line",{
    x1,y1,x2,y2,
    stroke:"black",
    "stroke-width":"2"
  });
 
  svg.appendChild(line);
 
  const text=svgEl("text",{
    x:(x1+x2)/2,
    y:(y1+y2)/2-10,
    class:"count-text",
    "text-anchor":"middle"
  });
 
  text.textContent=label;
 
  svg.appendChild(text);
}
 
const R1=createNode("R1",0,1,1,0.5,"R1");
const R2=createNode("R2",2.5,1,1,0.5,"R2");
const R3=createNode("R3",5,1,1,0.5,"R3");
 
const Z1=createNode("Z1",1.2,3.5,1,0.5,"Z1");
const Z2=createNode("Z2",3.8,3.5,1,0.5,"Z2");
 
const E1=createNode("E1",0.5,6,1,0.5,"E1");
const E2=createNode("E2",2.8,6,1,0.5,"E2");
const E3=createNode("E3",5.1,6,1,0.5,"E3");
 
drawArrow(170,120,240,320,"3");
drawArrow(420,120,240,320,"4");
 
drawArrow(170,120,500,320,"1");
drawArrow(420,120,500,320,"2");
drawArrow(670,120,500,320,"3");
 
drawArrow(240,370,170,570,"2");
drawArrow(240,370,420,570,"1");


* 2 Einheiten von <math>E_1</math>,
drawArrow(500,370,170,570,"1");
* 1 Einheit von <math>E_2</math>,
drawArrow(500,370,420,570,"3");
* 0 Einheiten von <math>E_3</math>,
drawArrow(500,370,670,570,"2");
* 0 Einheiten von <math>E_4</math>


benötigt werden.
})();
</script>
</html>


=== Produktion von Spielwaren aus Rohstoffen über Zwischenprodukte ===
Die vollständigen Mengen seien wie folgt definiert:
 
{| class="wikitable"
! !! Z1 !! Z2
|-
| '''R1''' || 3 || 1
|-
| '''R2''' || 4 || 2
|-
| '''R3''' || 0 || 3
|}
 
{| class="wikitable"
! !! E1 !! E2 !! E3
|-
| '''Z1''' || 2 || 1 || 0
|-
| '''Z2''' || 1 || 3 || 2
|}
 
Aus diesen Tabellen ergibt sich die '''Gozintomatrix Rohstoffe → Endprodukte''' durch Matrixmultiplikation:
 
:<math>
RZ=
\begin{pmatrix}
3 & 1 \\
4 & 2 \\
0 & 3
\end{pmatrix}
</math>
 
:<math>
ZE=
\begin{pmatrix}
2 & 1 & 0 \\
1 & 3 & 2
\end{pmatrix}
</math>
 
:<math>
RE=RZ \cdot ZE
=
\begin{pmatrix}
3 & 1 \\
4 & 2 \\
0 & 3
\end{pmatrix}
\cdot
\begin{pmatrix}
2 & 1 & 0 \\
1 & 3 & 2
\end{pmatrix}
</math>


Ein Spielwarenhersteller produziert aus drei Rohstoffen <math>R_1,R_2,R_3</math> zunächst die beiden Zwischenprodukte <math>Z_1,Z_2</math>, aus denen anschließend die drei Endprodukte <math>E_1,E_2,E_3</math> gefertigt werden.
Berechnung:


Die Pfeile im Gozintographen geben an, wie viele Mengeneinheiten eines Materials zur Produktion einer Mengeneinheit des entstehenden Produkts benötigt werden.
:<math>
RE=
\begin{pmatrix}
7 & 6 & 2 \\
10 & 10 & 4 \\
3 & 9 & 6
\end{pmatrix}
</math>


Beispiel: Für die Herstellung einer Einheit <math>Z_1</math> werden 3 Einheiten <math>R_1</math> und 4 Einheiten <math>R_2</math> benötigt.
Die Matrix zeigt, wie viele Mengeneinheiten der Rohstoffe <math>R_1,R_2,R_3</math> jeweils zur Herstellung einer Einheit der Endprodukte <math>E_1,E_2,E_3</math> notwendig sind.


[[Kategorie:Lineare_Algebra]]
[[Kategorie:Lineare_Algebra]]
[[Kategorie:AHR_WuV_Mathe_GK]]
[[Kategorie:AHR_WuV_Mathe_GK]]

Version vom 27. Mai 2026, 10:27 Uhr

Ein Gozintograph (von engl. goes into = „geht hinein“) ist ein gerichteter Graph, der die Zerlegung eines Endprodukts in seine Einzelteile oder Komponenten beschreibt. Jede Kante stellt dabei eine „Gozinto“-Beziehung dar: Sie zeigt von einer Komponente auf das Produkt, in das sie eingeht. Der Gozintograph ist ein zentrales Hilfsmittel in der Produktionsplanung und Stücklistenverwaltung.

Definition

Ein Gozintograph ist ein gerichteter, azyklischer Graph

[math]\displaystyle{ G=(V,E) }[/math]

mit:

  • [math]\displaystyle{ V }[/math] als Menge der Knoten (Produkte oder Komponenten),
  • [math]\displaystyle{ E \subseteq V \times V }[/math] als Menge der gerichteten Kanten.

Zusätzlich besitzt jede Kante ein Gewicht [math]\displaystyle{ a_{ij} \in \mathbb{N} }[/math]. Eine Kante [math]\displaystyle{ (v_i,v_j)\in E }[/math] mit Gewicht [math]\displaystyle{ a_{ij} }[/math] bedeutet, dass zur Herstellung des Produkts [math]\displaystyle{ v_j }[/math] genau [math]\displaystyle{ a_{ij} }[/math] Einheiten der Komponente [math]\displaystyle{ v_i }[/math] benötigt werden.

Da rekursive Stücklisten ausgeschlossen werden, enthält ein Gozintograph keine Zyklen.

Zusammenhang zu Matrizen

Die Informationen eines Gozintographen lassen sich in einer sogenannten Gozintomatrix darstellen.

Dies ist eine Matrix

[math]\displaystyle{ A=(a_{ij}) }[/math]

bei der das Element [math]\displaystyle{ a_{ij} }[/math] die Anzahl der Einheiten der Komponente [math]\displaystyle{ i }[/math] angibt, die unmittelbar zur Herstellung des Produkts [math]\displaystyle{ j }[/math] benötigt werden.

Unter der Voraussetzung, dass der Gozintograph zyklusfrei ist und [math]\displaystyle{ I-A }[/math] invertierbar ist, kann der Gesamtbedarf aller Komponenten über die Gleichung

[math]\displaystyle{ \mathbf{x}=(I-A)^{-1}\mathbf{y} }[/math]

bestimmt werden, wobei:

  • [math]\displaystyle{ \mathbf{y} }[/math] den Vektor der Endprodukte,
  • [math]\displaystyle{ \mathbf{x} }[/math] den Vektor der insgesamt benötigten Komponentenmengen

beschreibt.

Beispiele

Produktion eines Produkts aus Einzelteilen

Im folgenden Beispiel werden fünf Bauteile [math]\displaystyle{ B_1,B_2,B_3,B_4,B_5 }[/math] aus vier Einzelteilen [math]\displaystyle{ E_1,E_2,E_3,E_4 }[/math] gefertigt. Die Pfeile zeigen, welche Einzelteile in welches Bauteil eingehen. Die Zahlen an den Pfeilen geben die benötigte Stückzahl an.

Die Gozintomatrix zum oberen Gozintographen kann aus folgender Tabelle abgeleitet werden:

B1 B2 B3 B4 B5
E1 2 2 1 2 1
E2 1 1 1 0 0
E3 0 0 1 1 0
E4 0 0 0 1 2

und ist durch

[math]\displaystyle{ A= \begin{pmatrix} 2 & 2 & 1 & 2 & 1 \\ 1 & 1 & 1 & 0 & 0 \\ 0 & 0 & 1 & 1 & 0 \\ 0 & 0 & 0 & 1 & 2 \end{pmatrix} }[/math]

gegeben.

Produktion von Spielwaren aus Rohstoffen über Zwischenprodukte

Ein Spielwarenhersteller produziert aus drei Rohstoffen [math]\displaystyle{ R_1,R_2,R_3 }[/math] zunächst die beiden Zwischenprodukte [math]\displaystyle{ Z_1,Z_2 }[/math], aus denen anschließend die drei Endprodukte [math]\displaystyle{ E_1,E_2,E_3 }[/math] gefertigt werden.

Die Pfeile im Gozintographen geben an, wie viele Mengeneinheiten eines Materials zur Produktion einer Mengeneinheit des entstehenden Produkts benötigt werden.

Die vollständigen Mengen seien wie folgt definiert:

Z1 Z2
R1 3 1
R2 4 2
R3 0 3
E1 E2 E3
Z1 2 1 0
Z2 1 3 2

Aus diesen Tabellen ergibt sich die Gozintomatrix Rohstoffe → Endprodukte durch Matrixmultiplikation:

[math]\displaystyle{ RZ= \begin{pmatrix} 3 & 1 \\ 4 & 2 \\ 0 & 3 \end{pmatrix} }[/math]
[math]\displaystyle{ ZE= \begin{pmatrix} 2 & 1 & 0 \\ 1 & 3 & 2 \end{pmatrix} }[/math]
[math]\displaystyle{ RE=RZ \cdot ZE = \begin{pmatrix} 3 & 1 \\ 4 & 2 \\ 0 & 3 \end{pmatrix} \cdot \begin{pmatrix} 2 & 1 & 0 \\ 1 & 3 & 2 \end{pmatrix} }[/math]

Berechnung:

[math]\displaystyle{ RE= \begin{pmatrix} 7 & 6 & 2 \\ 10 & 10 & 4 \\ 3 & 9 & 6 \end{pmatrix} }[/math]

Die Matrix zeigt, wie viele Mengeneinheiten der Rohstoffe [math]\displaystyle{ R_1,R_2,R_3 }[/math] jeweils zur Herstellung einer Einheit der Endprodukte [math]\displaystyle{ E_1,E_2,E_3 }[/math] notwendig sind.