In the following, a group of stars which implement a dynamic map function is introduced. These stars look form the outside pretty much like the common map stars in the HOF domain. However, the DEDynMap star does not have a parameter for the number of multiplications - as it is the buswidth in the HOF domain -, but two additional inputs. These inputs expect events when a new copy of a block is to be put into the topology or is to be taken out of it. So, these stars allow for instantiation and deletion of any block during runtime on demand. Hence, they give the chance to change the topology during the runtime of a simulation.
In the contrary to Ptolemy's HOF stars, these stars have heavily to work and to interact with the scheduler. So, they are only implemented for the DE-domain.
All icons for the stars which are explained below are in a palette mutable.pal, which can be found in $PTOLEMY/src/domains/de/contrib/demo.
The DEDynMap star is always to be used together with DEDynMerge and/or DEDynFork stars in order to adapt the number of portholes and connections automatically during runtime. The master block itself is to be specified textually in the parameters of the DEDynMap star. Alternatively, a graphical version DEDynMapGr is also provided.
The DEDynMap star creates or deletes instances of the master
block and connects their portholes to the multiportholes in DEDynFork
and DEDynMerge. So, these stars separate the runtime mutations
from their outside: All mutations take place between the DEDynFork
and the DEDynMerge stars. The DEDynMap star creates
a new copy of the master block and puts it into the topology each
time it gets fired at the newBlock porthole. It takes a copy out
of the topology and deletes it each time it gets fired at the delBlock
porthole. The copies are identified by an instancenumber. These
stars perform everything needed to mutate the topology, like changing the
number of portholes in DEDynMerge and DEDynFork or setting
up new connections. The user does not need to program anything. These stars
can be used in Ptolemy schematics in the common way: they just are to be
connected with other stars and their states are to be set.