{% set REQUIREMENT_TYPES = [
	(pyesdoc.ontologies.cim.v1.InitialCondition, "Initial Conditions"),
	(pyesdoc.ontologies.cim.v1.BoundaryCondition, "Boundary Conditions"),
	(pyesdoc.ontologies.cim.v1.LateralBoundaryCondition, "Lateral Boundary Conditions"),
	(pyesdoc.ontologies.cim.v1.SpatioTemporalConstraint, "Spatio Temporal Constraints"),
	(pyesdoc.ontologies.cim.v1.OutputRequirement, "Output Requirements"),
] %}

{% for typeof, description in REQUIREMENT_TYPES %}
	{% set requirements = [r for r in doc.requirements if isinstance(r, typeof)] %}
	{% set requirements = sorted(requirements, key=lambda r: r.name.lower() if r.name else str()) %}
	{% if requirements %}
	<section>
		<header>
			<h{{ header }}>{{ description }}</h{{ header }}>
		</header>
		<section>
		{% for requirement in requirements %}
			{% include activity_numerical_requirement.html %}
		{% end %}
		</section>
	</section>
	{% end %}
{% end %}
