Managing model components
In order to develop a CLEM simulation you will need to manage the various components needed to define your system. CLEM currently offers a wide range of components for you to use from resources to activities, filters and timers. Managing components involves building a visual simulation tree in the user interface. There are often a number of ways to represent different aspects you wish to model and all are equally acceptable. Here we provide a range of actions you will need to take to create your simulation tree of components.
CLEM model components are all displayed with an icon and using the CLEM colour scheme as follows:
Resources, resource types, resource add-ons and parameterisation, transmutations
Activities, Activity add-ons
Filters, timers and limiters
External data management

There are a number of ways to add components to your simulation tree structure:

To add a new (unparameterised) component to the simulation tree structure, right click (Windows) the component in the tree you wish to place the new component under and select Add model... from the pop-up menu options. When you select this option the main area will fill with a list of components to add. This list will only display those components that can be added under the parent component.

You can copy (CTRL+C Windows, CMD C iOS, right click select Copy) any component and after selecting the new parent, paste (CTRL+V Windows, CMD C iOS, or right click and select Paste) to create a new copy of the original. The name and properties of this new component can then be edited.

With two APSIMx files (or an APSIMx file and a toolbox) open in split screen mode (see The user interface), you can drag components between the two split windows. You will only be able to drop the component onto a parent component that will accept the dropped component type.
Drag and drop functionality can also be performed within a single APSIMx file. Dragging components within the same parent will perform a move while dragging across different parents you will replicate the copy and paste functionality.

Any component can be moved up or down within a branch using (CTRL+ up arrow and CTRL+ down arrow, or right click Move up and Move down)

As the display name of the component is used in reporting and output, it is useful to provide each component with a suitable name. Components in the simulation tree structure can be renamed by right clicking the component and selecting rename from the menu.
Component names can only contain alpha-numeric characters and the space character (e.g. a-z,A-Z,0-9 and space)

You can delete a selected component from the tree by hitting the delete key, or right clicking the component and selecting delete from the options.

Rather than adding and deleting components to explore the outcomes of your simulation, you can simply set whether a component is considered in the simulation by setting the Enabled state found in the component menu when the component in the simulation tree is right clicked. Any component with Enabled unchecked will be ignored and displayed with a strike through the name (e.g. ComponentName) and semi-transparent in the summary information display. This process applies to the selected component and all components below that branch in the simulation tree and can be applied to resources, activities, reports and even folders providing a convenient way of excluding aspects already parameterised from the simulation.

Many users will find it useful to group components in order to hide complexity in the simulation tree structure and keep related activities together. While some activities and resource types must be under a particular parent, you can nest most Activity components under any other Activity component. A better approach is to use a folder component to hold the related components. There is both an APSIM Next Generation folder component and a special CLEM folder. It is recommended that the CLEM folder is used within the CLEM tree structure as it provides additional critical model functionality and filters the available models to those provided by CLEM. It is also useful to group activities that may all have the same filtering or timing applied to them so that only single instances of the filter or timer need to be created.

While components can be identified by their icon and colour scheme, the range of components available and the complexity of some simulations can make identification difficult. When you click on any CLEM component the top section of the main window area will display information about the component (see example below) including the type of component, a description of what the component does, a link to the help documentation for the component (? button).
See next section - Importance of component order