Model Building with Markdown
Markdown-based Model Editing in Chiaha
This video explains how to use ChiAha's markdown-based model editing:
ChiAha's markdown-based editing allows for quick editing with real-time model validation to streamline the process.
In the editor, each section is easily distinguishable with their headers being placed inside of brackets. For example, the model below has three sections: [Buffers], [Constraints], and [Links].
Here, the [Buffers] and [Constraints] sections serve to define all of the nodes within the model, as well as their types. The [Links] section defines how the model flows from node to node.
The standard node defintion involves declaring the node name, followed by a colon and the node description. In the block above, that would mean that the first node is named b1, and its description is Buffer 1. This way you can give shorthand names to your nodes to make linking them in the Links section easier. You will see that the model preview to the right populates the nodes with their description.
Alternatively, you can opt for just one of either the description or name for the node, such as changing b1 to Buffer1 and removing the description, or removing the description from node b2 as seen below:
If opting to just use the description as the node name, spaces cannot be used.
It's also worth noting that if you forego adding a description, the preview on the right will simply just label the node with its name instead.
To add nodes to the model, you simply just add a line and define them in each section similar to the example, and then make sure they are connected to something in the [Links] section at the end. If a node is not connected via the [Links] section, the model preview on the right will warn you that the node must have a target or source. For example, the following block will validate correctly with the new nodes, as they are present in [Links]:
Splits and Merges
This video explains how to use splits and merges:
Splits and Merges are used to either create or consolidate multiple paths in ChiAha Express.
To create a split in our model, we first have to add a [Splits] section, and then create additional nodes to be used at this split. Using the example from before, let's say that we have two different machines that material can flow to after the In-Process Materials node. We will add a 4th [Buffer], as well as a 3rd [Constraint] so that the [Split] flows into both Constraint 2 and Constraint 3, which each respectively flow into Buffer 2 and Buffer 4:
Remember that the model flow must end in a [Buffer].
Adding [Merges] is similar to adding [Splits], as we must again add a new section to our model. The main difference between the two is that [Merges] can have multiple [Links] going into them, while [Splits] have multiple [Links] going out from them.
For our example, let's make it so that after Split 1 flows into Constraint 2 and 3, it then merges together before flowing into Buffer 2. We will also need to remove Buffer 4 since we do not need that in this example anymore:
Units and Conversions
This video explains how to use units and conversions:
Sometimes, certain sections of our model require specific units to function more optimally. ChiAha Express
If we work off of the example we just ended with in the Splits & Merges section, let's go into Buffer 1 and change our Output Units to Pounds. After doing so, clicking into downstream nodes will show that they have also adopted the unit.
If we want to change units further down the line, we must add a [Conversion] node. Let's add a [Conversion] u1 after [Buffer] b3 and before [Split] s1:
If we click into our [Conversion] node u1, we can assign it a conversion factor of 2 and name the new unit to FinishedProducts. Note that units cannot have spaces in them. After doing so, you can see that just like before, the unit for FinishedProducts will populate to the downstream nodes in our model.
Buffers
This video explains buffers:
Buffers are places in the process where material can be stored. They can be the start or end nodes in the process of material, and can even collect the outputs after said processing. Within the model, they can be used to handle material surges if upstream processes are running faster than downstream, or in-process buffers can be used to prevent starvation if the reverse is true and the upstream begins running slower than the downstream.
Within ChiAha Express, we can edit buffer settings in two different places. The first is one we have seen before in our Units and Conversions demo, where we just need to click the buffer itself and can edit the capacity, initial level, and units.
Capacity is the maximum number of units that a buffer can hold. Generally, starting and ending buffers have a capacity set to infinity. In-line buffer capacities can be set to match your real life process, or you can use ChiAha's built in functionality to determine optimal buffer size; this feature will be discussed in the future when going over the different types of experiments you can set up in ChiAha.
The Initial Level is the amount of units present in the buffer at the start of model runtime. This can help the model reach a steady state faster whenever doing a new run, and is a more realistic simulation of l lines that don't clean out buffers between runs.
If you want to edit all the buffers at once, you can click the Buffers tab on the left, and it will show you all 3 fields for every buffer at once.
Constraints
Experiments
To demonstrate the different types of experiments, we will be using the hummus model, which can be downloaded below:
Last updated