{% extends "base.html" %} {% block title %}{% if modelrun.name %}{{ modelrun.name }}{% else %}Model Run #{{ modelrun.id }}{% endif %}{% endblock %} {% block content %}

{% if modelrun.name %} {{ modelrun.name }} #{{ modelrun.id }} {% else %} Model Run #{{ modelrun.id }} {% endif %}

Back to List {% if modelrun.state == 'created' %} {% if request.session.simulation_warning %} {# Warning state - show Start Anyway button #}
{% csrf_token %}
{% else %} {# Normal state - show Run Simulation button #}
{% csrf_token %}
{% endif %} {% endif %} {% if modelrun.state == 'running' or modelrun.state == 'cancelling' %}
{% csrf_token %}
{% endif %} {% if modelrun.can_rerun %}
{% csrf_token %}
{% endif %} {% if modelrun.state != 'running' and modelrun.state != 'cancelling' %} Delete {% endif %}
{% include "steeloweb/partials/messages.html" %} {% if request.session.simulation_warning and modelrun.state == 'created' %} {# Display worker availability warning banner #} {% endif %}
Status Information
Status
{% if modelrun.state == 'running' %} {{ modelrun.get_state_display }} {% if modelrun.appears_stuck %} Appears Stuck {% endif %} {% elif modelrun.state == 'finished' %} {{ modelrun.get_state_display }} {% elif modelrun.state == 'failed' %} {{ modelrun.get_state_display }} {% elif modelrun.state == 'cancelling' %} {{ modelrun.get_state_display }} {% if modelrun.appears_stuck %} Stuck {% endif %} {% elif modelrun.state == 'cancelled' %} {{ modelrun.get_state_display }} {% else %} {{ modelrun.get_state_display }} {% endif %} {% if modelrun.state in 'running,cancelling' %}
Last updated: {{ modelrun.time_since_last_update }}
{% endif %}
Started
{{ modelrun.started_at }}
Finished
{{ modelrun.finished_at|default:"-" }}
Duration
{% if modelrun.finished_at %} {{ modelrun.finished_at|timeuntil:modelrun.started_at }} {% else %} - {% endif %}
{% if log_file_path %}
Performance Log
{{ log_file_path }}
{% endif %}
Simulation Progress
{% if modelrun.state == 'running' or modelrun.state == 'cancelling' %}
{% include "steeloweb/includes/progress_bar.html" with modelrun=modelrun %}
{% else %}
{% include "steeloweb/includes/progress_bar.html" with modelrun=modelrun %}
{% endif %}
Configuration
Data Source:
Data Preparation:
{% if modelrun.data_preparation %} {{ modelrun.data_preparation.name }} {% if modelrun.data_preparation.master_excel %} ({{ modelrun.data_preparation.master_excel.name }}) {% endif %} {% else %} Default data {% endif %}
Configuration:
Years:
{{ modelrun.config.start_year }} - {{ modelrun.config.end_year }}
{% comment %} Demand Scenario field is not yet implemented - shows in form but not used by simulation {% endcomment %} {% if technology_switches %}
Technology Switches:
{% for source, targets in technology_switches.items %} {{ source }} → {{ targets|join:", " }}{% if not forloop.last %}; {% endif %} {% endfor %}
{% endif %} {% if modelrun.config.emissions_boundary %}
Emissions Boundary:
{{ modelrun.config.emissions_boundary }}
{% endif %} {% if modelrun.config.enable_carbon_tax %}
Carbon Tax:
{{ modelrun.config.carbon_tax_amount }} {{ modelrun.config.carbon_tax_currency }}/{{ modelrun.config.carbon_tax_unit }}
{% endif %}
{{ modelrun.config|pprint }}
{% if modelrun.error_message %}
Error
{{ modelrun.error_message }}
{% endif %}
{% if modelrun.results %}
Simulation Results
{% if modelrun.result_csv %} Download Results CSV {% endif %} {% if modelrun.output_directory %} View All Output Files {% endif %}
{% if result_images %} {% endif %} {% if modelrun.simulation_plots.exists %}
Simulation Results
{% for plot in modelrun.simulation_plots.all %} {% endfor %}
{% endif %}
{% else %}
No results available yet. Run the simulation to generate results.
{% endif %}
{% endblock %}