XPalm model graph
The visualization below is generated from XPalm's default CompositeModel during the documentation build. It is read-only, but you can search the graph, switch between application, object, and execution projections, and select any node or relationship to inspect its configuration.
Inspect the graph from Julia
XPalm assembles the same model with the PlantSimEngine scene/object API:
using XPalm, PlantSimEngine
palm = Palm()
scene = xpalm_scene(palm)
compiled = Advanced.refresh_bindings!(scene)Use PlantSimEngine's structured explanation functions to inspect the compiled model:
Diagnostics.explain_applications(compiled)
Diagnostics.explain_bindings(compiled)
Diagnostics.explain_calls(compiled)
Diagnostics.explain_schedule(compiled)
Diagnostics.explain_writers(compiled)These tables are the authoritative representation of XPalm's application targets, cross-object inputs, hard calls, rates, and variable writers.
Carbon outputs on plants and organs
OrgansCarbonAllocationModel declares carbon_allocation and reserve with PlantSimEngine.Distributed(PlantSimEngine.Default(0.0)) in outputs_. OrganReserveFilling declares its reserve output in the same way. Their OutputTo selectors include both the execution plant and the relevant organs in its subtree. The plant stores the total; each organ stores its own allocation or reserve. Variable names, units, and carbon equations are the same at each step as before this declaration change.
The kernels retrieve destinations by variable name, for example output_targets(context, (:reserve,)). They exclude the plant total from the organ calculation using an object-ID view, then publish the total to the plant's destination column. No particular position of the plant ID is assumed, and new organs join these destinations after growth.