In the course of the previous phases we have modeled the battery production process with a single electrode type. In reality the battery contains the electrodes of two types: anode (negative) and cathode (positive). The preparation processes for these two types are similar enough that they both could be described by the electrode preparation logic we employ in our model. To avoid the duplication of the existing block sequence and make our flowchart concise, we will create a custom block that encapsulates this sequence and use parameters to distinguish between the anode preparation process and cathode preparation process.
But first, we will draw the missing section of the production floor layout where the cathodes are handled.
Prepare the layout
a.
Material item type:
Electrode
b.
Z:
20
c.
Width:
0.5 meter
a.
Visible:
no
b.
Process time:
1 second
c.
Length:
0.5 meter.
We use this code to change the color of the cathode plates passing through the coating station.
a.
Visible:
no
b.
Locations layout:
Arranged.
Add the 3D animation
Now that the layout and animation are ready, we can start making changes in the flowchart.
Create a custom block
If you select the prepareElectrode block in the graphical editor, in its properties you will see all the customized parameters of the initial seven blocks. The labels of the parameters are generated automatically. Our next step will be to correct these labels and adjust the parameters themselves.
Correct the parameter labels of the custom block
To change the parameter's label, select the parameter, go to the
Value editor
section of its properties and type the new label in the
Label
field.
Use this method to change the parameter's labels according to the table below.
Note!
You will see that not all parameters are listed in the table. Do not
worry and skip the unlisted ones, since they will be adjusted
separately.
Parameter name |
New label |
batch_batchSize |
Batch size |
batch_EntityLocation |
Location of plates for batching |
batch_LocationNode |
Batch location |
convey_sourceConveyor |
Electrodes source conveyor |
convey_targetConveyor |
Electrodes target conveyor |
delay_delayTime |
Curing time |
delay_entityLocation |
Curing location |
source_entitiesPerArrival |
Electrodes per arrival |
source_interarrivalTime |
Electrodes interarrival time |
toElectrodeBuffer_destinationNode |
Electrodes buffer |
toElectrodeBuffer_loadingTime |
Time to load at the oven |
toElectrodeBuffer_unloadingTime |
Time to unload at the buffer |
toOven_destinationNode |
Curing oven |
toOven_fleet |
Forklifts fleet |
toOven_loadingTime |
Time to load batch from the conveyor |
toOven_unloadingTime |
Time to unload batch at the oven |
Next, we must deal with the remaining parameters.
This way we'll be able to navigate inside the custom block by double-clicking it during the simulation.
a. Select the
Icon
check-box.
b. In the
Text
field type a stub value, e.g. 0. Next, switch the field to dynamic value editor and type the following expression:
source.out.count()
c. Set the
Color
to blue.
Add the logic behind the cathodes preparation process
a.
Batch size:
100
b.
Location of plates for batching:
cathodePlatesBuffer
c.
Batch location:
cathodePlatesBuffer
d.
Electrodes source conveyor:
cathodeConveyor
e.
Electrodes target conveyor:
cathodeConveyor
f.
Curing time:
2 minutes
g.
Curing location:
cathodeCuringOven
h.
Electrodes per arrival:
200
i.
Electrodes interarrival time:
1.5 hours
j.
Electrodes buffer:
preassembleCathodesBuffer
k.
Time to load at the oven:
0.5 minutes
l.
Time to unload at the buffer:
0.5 minutes
m.
Curing oven:
cathodeCuringOven
n.
Forklifts fleet:
forklifts
o.
Time to load batch from the conveyor:
0.5 minutes
p.
Time to unload batch at the oven:
0.5 minutes
Now
the electrodes of both types are transferred to the assembling station
where they are combined into blocks and put into battery cases. But, as
you can see, even though the single electrodes that pass through the
coating stations change color from the default white
to their respective
peru
and
silver, the batches remain identical. Let's do something about that!
We have the
PlatesBatch
agent that represents both anode batches and cathode batches in our flowchart. We need to add a
parameter
to this agent to help the flowchart blocks distinguish between them.
Since this parameter should describe only a limited number of agent
attributes (anode and cathode), we will use an option list as the
parameter's type.
Create an option list
Add the parameter to the
PlatesBatch agent
The next step is changing the color properties of the batch animation figure.
Define the dynamic change of the color
We use this code to check the value of the
electrodeType
parameter and assign the color to the
rectangle
depending on the result. If the value is
ANODE, the color is
peru. Otherwise, the color is
silver.
Now, let's help our custom block differentiate between the two electrode types.
Reference model:
Lead Acid Battery Production - Phase 7
Phase 6. Delivery to charging location