{% extends "dashboard/base.html" %} {% load browse_extras %} {% block title %}Simulations — {{ sim.name }}{% endblock %} {% block extrahead %} {% endblock %} {% block content %}

Models >  {{ sim.name }}

ID {{ sim.id }}
Name {{ sim.name }}
{% if sim.description %}
Description {{ sim.description }}
{% endif %}
Created {{ sim.created_at|date:"d M Y, H:i" }}
Created by {{ sim.created_by }}
play_circle Simulation Runs {% if messages %} {% for message in messages %}
{% if message.tags == 'success' %}check_circle{% else %}error{% endif %} {{ message }}
{% endfor %} {% endif %}
{% csrf_token %}
{% if latest_run %} {% endif %}
{% if sim_runs %} {% for run in sim_runs %} {% endfor %}
# Status Started Duration Status message Results
{{ run.id }} {% if run.status == 'done' %} check_circledone {% elif run.status == 'error' %} errorerror {% elif run.status == 'cancelled' %} cancelcancelled {% elif run.status == 'running' %} running {% else %} schedulerunning {% endif %} {% if run.duration_hms %} {{ run.duration_hms }} {% elif run.status == 'running' or run.status == 'pending' %} {% else %} {% endif %} {{ run.message|default:"—" }} {% if run.output_path %} {% else %} {% endif %} {% if run.status != 'pending' %} {% endif %} {% if run.status != 'pending' and run.status != 'running' %} {% endif %}
{% else %}
No runs yet — click Simulate to start.
{% endif %}
{% if latest_run and latest_run.status == 'pending' or latest_run and latest_run.status == 'running' %} {% endif %}
tune Simulation Settings expand_more
{% if has_wind_linked %}
Simulation start & end
{% for s in sim_settings %} {% if s.editable == 'duration_days' %} {{ s.name }} {% elif s.editable == 'date_range' %} {{ s.name }}
{% else %} {{ s.name }} {% if s.value is None %}—{% else %}{{ s.value|fmt_float }}{% if s.unit %} {{ s.unit }}{% endif %}{% endif %} {% endif %} {% endfor %}
{% endif %}{# has_wind_linked — end of date range group #} {% if has_wind_linked %}
1Hz Data Collection
Collect Date range
{% endif %}{# has_wind_linked — end of 1Hz group #} {% if not has_wind_linked %}
Wind data required
Link at least one Wind Input with an uploaded HDF5 file to enable simulation start & end dates and 1Hz data collection settings.
{% if any_wind_exist %} {# Wind records exist — show add button that opens the multi-select modal #} {# Provide avail JSON so the modal can populate — use same data as the linked WindInput group if present, otherwise the empty-group one #} {% for group in groups_empty %}{% if group.label == 'WindInput' %} {% endif %}{% endfor %} {% else %} {# No wind records at all — redirect to wind data page #} upload_file Upload Wind Data {% endif %}
{% endif %}{# not has_wind_linked #}
{% if sim_hidden_settings %}
expand_more Other fields ({{ sim_hidden_settings|length }})
{% for s in sim_hidden_settings %} {{ s.name }} {% if s.value is None %}—{% elif s.value == True %}True{% elif s.value == False %}False{% else %}{{ s.value|fmt_float }}{% endif %} {% if s.unit %} {{ s.unit }}{% endif %} {% endfor %}
{% endif %}
settings_suggest Controller Code expand_more
Need guidance? See the Dynamic Controller User Guide.
{{ sim.controller_file|default:"default_controller.py" }}
Font
{% for group in groups %}
{{ group.icon }} {{ group.label }} {% if group.label == 'WindInput' %} Start year {% endif %} {{ group.items|length }} expand_more
{% for detail in group.items %}
{% if group.label == 'WindInput' %} drag_indicator {% endif %} {{ detail.obj }} {% if group.label == 'WindInput' %} {{ detail.wind_year }} {% endif %} ID {{ detail.obj.id }} expand_more
{% if detail.field_groups %}
{% for grp in detail.field_groups %} {% if grp.fields %}
{{ grp.group }}
{% for f in grp.fields %} {{ f.label }} {{ f.display }} {% endfor %}
{% endif %} {% endfor %}
{% else %} {% for row in detail.scalar_rows %} {% for field in row %} {% endfor %} {% if row|length == 1 %}{% endif %} {% endfor %}
{{ field.name }} {% if field.value is None %}{% else %}{{ field.value|fmt_float }}{% endif %}
{% endif %} {% if detail.hidden_fields %}
expand_more Other fields ({{ detail.hidden_fields|length }})
{% for f in detail.hidden_fields %} {{ f.label }} {{ f.display }} {% endfor %}
{% endif %}
{% endfor %}
{% endfor %} {% if groups_empty %}

not linked
{% for group in groups_empty %}
{{ group.icon }} {{ group.label }} {% if group.available %} ({{ group.available|length }}) {% endif %}
{% endfor %}
{% endif %}
{% endblock %}