Last active
December 3, 2024 18:26
-
-
Save kenwebb/b44684cacc9b37a378eafb5d9bfb4508 to your computer and use it in GitHub Desktop.
Industrial Dynamics - Chapter 15 - Xholonish - DataCollector
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!--Xholon Workbook http://www.primordion.com/Xholon/gwt/ MIT License, Copyright (C) Ken Webb, Tue Dec 03 2024 13:26:03 GMT-0500 (Eastern Standard Time)--> | |
<XholonWorkbook> | |
<Notes><![CDATA[ | |
Xholon | |
------ | |
Title: Industrial Dynamics - Chapter 15 - Xholonish - DataCollector | |
Description: | |
Url: http://www.primordion.com/Xholon/gwt/ | |
InternalName: b44684cacc9b37a378eafb5d9bfb4508 | |
Keywords: | |
My Notes | |
-------- | |
29 Nov 2024 | |
A DataCollect instance collects data that is broadcast from a Retail, Distributor, or Factory (or other) Xholon Workbook (browser tab). | |
It might do any of the following: | |
- generate a Sequence Diagram showing the flow of data between workbooks | |
- generate a chart showing data values over time | |
- etc. | |
Perhaps Retail, Distributor, Factory instance could broadcast a 301 message when they process a message from anyone else. | |
- they would be able to send: signal, sender name, receiver name, all or part of the data | |
- the main thing that only the instance that processes a message knows, is who the receiver is | |
- DataCollector could readily construct a Sequence Diagram once it has all of this data | |
Maybe use a different broadcastChannel name. | |
- use "proddist" for broadcasts between Retail, Distributor, Factory | |
- use "datacollector" for broadcasts to DataChannel | |
- could think of this as being part of or analogous to Network Management | |
### Sequence Diagram | |
title Industrial Dynamics - Chapter 15 - Xholonish - DataCollector | |
# To view sequence diagram, paste this text into http://www.websequencediagrams.com/ | |
# Created by: Xholon http://www.primordion.com/Xholon/ | |
# Date: 1730565942493 Fri Nov 29 12:45:42 GMT-400 2024 | |
one:factory_46->distributor_46: 202[{"dtype":"SSF","dval":3.1234},{"dtype":"UOF","dval":3.1235},{"dtype":"DFF","dval":3.1236}] | |
one:factory_46->distributor_46: 202[{"dtype":"SSF","dval":4.1234},{"dtype":"UOF","dval":5.1235},{"dtype":"DFF","dval":2.1236}] | |
- the above works when I paste it into https://www.websequencediagrams.com/app | |
### References | |
() Jay Forrester, Industrial Dynamics, 1961 | |
() see also SubtreeGenerator | |
]]></Notes> | |
<_-.XholonClass> | |
<DynamicalSystem> | |
<!-- Production - Factory System, chapters 2, 15 --> | |
<ProdDistSystem/> | |
</DynamicalSystem> | |
<DataCollector/> | |
</_-.XholonClass> | |
<xholonClassDetails> | |
<Avatar><Color>red</Color></Avatar> | |
</xholonClassDetails> | |
<ProdDistSystem> | |
<DataCollector/> | |
</ProdDistSystem> | |
<DataCollectorbehavior implName="org.primordion.xholon.base.Behavior_gwtjs"><![CDATA[ | |
var me; | |
var beh = { | |
postConfigure: function() { | |
me = this.cnode.parent(); | |
bchan = new BroadcastChannel("proddist"); | |
bchan.onmessage = (event) => { | |
console.log(event); // this works | |
switch (event.data.signal) { | |
case 101: // R -> D | |
case 102: // D -> R | |
case 201: // D -> F | |
case 202: | |
case 301: // R|D|F -> DataCollector (messages specifically directed to DataCollector | |
me.msg(event.data.signal, JSON.stringify(event.data.data), event.data.sender); | |
break; | |
default: break; | |
} | |
} | |
}, | |
processReceivedMessage: function(msg) { | |
me.println(msg.signal + " " + msg.data + " " + msg.sender); | |
}, | |
act: function() { | |
me.println(me.name()); | |
} | |
} | |
//# sourceURL=DataCollectorbehavior.js | |
]]></DataCollectorbehavior> | |
<SvgClient><Attribute_String roleName="svgUri"><![CDATA[data:image/svg+xml, | |
<svg width="100" height="50" xmlns="http://www.w3.org/2000/svg"> | |
<g> | |
<title>DataCollector</title> | |
<rect id="DynamicalSystem/DataCollector" fill="#98FB98" height="50" width="50" x="25" y="0"/> | |
<g> | |
<title>DataCollector</title> | |
<rect id="DynamicalSystem/DataCollector" fill="#6AB06A" height="50" width="10" x="80" y="0"/> | |
</g> | |
</g> | |
</svg> | |
]]></Attribute_String><Attribute_String roleName="setup">${MODELNAME_DEFAULT},${SVGURI_DEFAULT}</Attribute_String></SvgClient> | |
</XholonWorkbook> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment