flextool 4.3.0__tar.gz → 4.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- flextool-4.4.0/MANIFEST.in +50 -0
- flextool-4.4.0/PKG-INFO +245 -0
- flextool-4.4.0/docs/advanced_concepts.md +213 -0
- flextool-4.4.0/docs/ai_assistant.md +777 -0
- flextool-4.4.0/docs/dev/architecture.md +1667 -0
- flextool-4.4.0/docs/dev/engine.md +1300 -0
- flextool-4.4.0/docs/dev/slack_convention.md +105 -0
- flextool-4.4.0/docs/env_vars.md +83 -0
- flextool-4.4.0/docs/excel_interface.md +204 -0
- flextool-4.4.0/docs/flextool_gui_interface.md +275 -0
- flextool-4.4.0/docs/how_to/basics.md +173 -0
- flextool-4.4.0/docs/how_to/emissions.md +171 -0
- flextool-4.4.0/docs/how_to/index.md +81 -0
- flextool-4.4.0/docs/how_to/investment.md +291 -0
- flextool-4.4.0/docs/how_to/outputs.md +194 -0
- flextool-4.4.0/docs/how_to/performance.md +93 -0
- flextool-4.4.0/docs/how_to/solve_sequences.md +413 -0
- flextool-4.4.0/docs/how_to/stochastics.md +169 -0
- flextool-4.4.0/docs/how_to/storage_hydro.md +297 -0
- flextool-4.4.0/docs/how_to/thermal_chp.md +387 -0
- flextool-4.4.0/docs/index.md +58 -0
- flextool-4.4.0/docs/install_gui.md +218 -0
- flextool-4.4.0/docs/install_toolbox.md +183 -0
- flextool-4.4.0/docs/limitations.md +103 -0
- flextool-4.4.0/docs/reading_results.md +79 -0
- flextool-4.4.0/docs/reference/commodities.md +13 -0
- flextool-4.4.0/docs/reference/connections.md +53 -0
- flextool-4.4.0/docs/reference/entities_and_time.md +366 -0
- flextool-4.4.0/docs/reference/flow_groups.md +39 -0
- flextool-4.4.0/docs/reference/groups.md +150 -0
- flextool-4.4.0/docs/reference/index.md +15 -0
- flextool-4.4.0/docs/reference/nodes.md +144 -0
- flextool-4.4.0/docs/reference/parameter_groups.md +149 -0
- flextool-4.4.0/docs/reference/reserves.md +84 -0
- flextool-4.4.0/docs/reference/units.md +217 -0
- flextool-4.4.0/docs/reference/user_constraints.md +113 -0
- flextool-4.4.0/docs/results.md +421 -0
- flextool-4.4.0/docs/solvers/copt.md +136 -0
- flextool-4.4.0/docs/solvers/cplex.md +158 -0
- flextool-4.4.0/docs/solvers/gurobi.md +158 -0
- flextool-4.4.0/docs/solvers/highs.md +142 -0
- flextool-4.4.0/docs/solvers/index.md +913 -0
- flextool-4.4.0/docs/solvers/xpress.md +171 -0
- flextool-4.4.0/docs/spine_database.md +41 -0
- flextool-4.4.0/docs/spine_toolbox.md +235 -0
- flextool-4.4.0/docs/terminal_workflow.md +790 -0
- flextool-4.4.0/docs/tutorial.md +284 -0
- flextool-4.4.0/flextool/_child_python.py +54 -0
- flextool-4.4.0/flextool/_file_lock.py +140 -0
- flextool-4.4.0/flextool/_local_solver_settings.py +911 -0
- flextool-4.4.0/flextool/_process_tree.py +126 -0
- flextool-4.4.0/flextool/_safe_text.py +83 -0
- flextool-4.4.0/flextool/_solver_config_source.py +1058 -0
- flextool-4.4.0/flextool/_solver_option_rules.py +251 -0
- flextool-4.4.0/flextool/_thread_budget.py +410 -0
- flextool-4.4.0/flextool/assistant/__init__.py +14 -0
- flextool-4.4.0/flextool/assistant/backends/openai_chat.py +560 -0
- flextool-4.4.0/flextool/assistant/budget.py +381 -0
- flextool-4.4.0/flextool/assistant/caps.py +268 -0
- flextool-4.4.0/flextool/assistant/chat_cli.py +1592 -0
- flextool-4.4.0/flextool/assistant/context.py +255 -0
- flextool-4.4.0/flextool/assistant/errors.py +393 -0
- flextool-4.4.0/flextool/assistant/inputs/_db.py +550 -0
- flextool-4.4.0/flextool/assistant/inputs/_notes.py +276 -0
- flextool-4.4.0/flextool/assistant/inputs/_units.py +298 -0
- flextool-4.4.0/flextool/assistant/llm_adapter.py +373 -0
- flextool-4.4.0/flextool/assistant/llm_errors.py +895 -0
- flextool-4.4.0/flextool/assistant/llm_retry.py +220 -0
- flextool-4.4.0/flextool/assistant/mcp_server.py +237 -0
- flextool-4.4.0/flextool/assistant/model_facts.py +819 -0
- flextool-4.4.0/flextool/assistant/placeholders.py +123 -0
- flextool-4.4.0/flextool/assistant/prompt.py +436 -0
- flextool-4.4.0/flextool/assistant/providers.py +357 -0
- flextool-4.4.0/flextool/assistant/registry.py +291 -0
- flextool-4.4.0/flextool/assistant/results/_catalog.py +286 -0
- flextool-4.4.0/flextool/assistant/results/_entity.py +693 -0
- flextool-4.4.0/flextool/assistant/results/_overview.py +306 -0
- flextool-4.4.0/flextool/assistant/results/_query.py +708 -0
- flextool-4.4.0/flextool/assistant/results/_runs.py +611 -0
- flextool-4.4.0/flextool/assistant/results/_slacks.py +234 -0
- flextool-4.4.0/flextool/assistant/session.py +1948 -0
- flextool-4.4.0/flextool/assistant/store.py +1065 -0
- flextool-4.4.0/flextool/assistant/tools/diagnostics.py +214 -0
- flextool-4.4.0/flextool/assistant/tools/discovery.py +421 -0
- flextool-4.4.0/flextool/assistant/tools/explain.py +396 -0
- flextool-4.4.0/flextool/assistant/tools/inputs.py +956 -0
- flextool-4.4.0/flextool/assistant/tools/orientation.py +226 -0
- flextool-4.4.0/flextool/assistant/tools/results.py +698 -0
- flextool-4.4.0/flextool/assistant/unit_wording.py +170 -0
- flextool-4.4.0/flextool/assistant/usage.py +508 -0
- flextool-4.4.0/flextool/calibrate/__main__.py +12 -0
- flextool-4.4.0/flextool/calibrate/_cli.py +360 -0
- flextool-4.4.0/flextool/calibrate/_db_alt.py +168 -0
- flextool-4.4.0/flextool/calibrate/_loop.py +585 -0
- flextool-4.4.0/flextool/calibrate/_readers.py +226 -0
- flextool-4.4.0/flextool/calibrate/_report.py +267 -0
- flextool-4.4.0/flextool/calibrate/_sizing.py +700 -0
- flextool-4.4.0/flextool/calibrate/_solve.py +185 -0
- flextool-4.4.0/flextool/cli/_console.py +114 -0
- flextool-4.4.0/flextool/cli/cmd_execute_flextool_workflow.py +244 -0
- flextool-4.4.0/flextool/cli/cmd_freeze_database.py +72 -0
- flextool-4.4.0/flextool/cli/cmd_import_sensitivities.py +99 -0
- flextool-4.4.0/flextool/cli/cmd_migrate_database.py +67 -0
- flextool-4.4.0/flextool/cli/cmd_open_results_db.py +261 -0
- flextool-4.4.0/flextool/cli/cmd_project_package.py +178 -0
- flextool-4.4.0/flextool/cli/cmd_read_old_flextool.py +113 -0
- flextool-4.4.0/flextool/cli/cmd_read_tabular_input.py +83 -0
- flextool-4.4.0/flextool/cli/cmd_run_flextool.py +1402 -0
- flextool-4.4.0/flextool/cli/cmd_scenario_results.py +317 -0
- flextool-4.4.0/flextool/cli/cmd_solve_mps.py +225 -0
- flextool-4.4.0/flextool/cli/cmd_time_runs.py +521 -0
- flextool-4.4.0/flextool/cli/cmd_trust_workspace.py +196 -0
- flextool-4.4.0/flextool/cli/cmd_write_outputs.py +145 -0
- flextool-4.4.0/flextool/docs_build/__init__.py +137 -0
- flextool-4.4.0/flextool/docs_build/__main__.py +116 -0
- flextool-4.4.0/flextool/docs_build/formulation.py +360 -0
- flextool-4.4.0/flextool/docs_build/index.py +308 -0
- flextool-4.4.0/flextool/docs_build/parameters.py +613 -0
- flextool-4.4.0/flextool/docs_build/scope.py +91 -0
- flextool-4.4.0/flextool/engine/_behaviour_changes.py +474 -0
- flextool-4.4.0/flextool/engine/_csv_reload/load.py +70 -0
- flextool-4.4.0/flextool/engine/_csv_reload/offline_outputs.py +186 -0
- flextool-4.4.0/flextool/engine/autoscale/_layer2.py +1415 -0
- flextool-4.4.0/flextool/engine/autoscale/_layer2_types.py +792 -0
- flextool-4.4.0/flextool/engine/autoscale/_quantity_types.py +756 -0
- flextool-4.4.0/flextool/engine/input/_db_loader.py +188 -0
- flextool-4.4.0/flextool/engine/input/_db_reader.py +184 -0
- flextool-4.4.0/flextool/engine/input/_inmemory_reader.py +247 -0
- flextool-4.4.0/flextool/engine/input/_param_shapes.py +3533 -0
- flextool-4.4.0/flextool/engine/input/_solve_config.py +1854 -0
- flextool-4.4.0/flextool/engine/input/_solve_state.py +291 -0
- flextool-4.4.0/flextool/engine/input/_solve_step_aggregation.py +612 -0
- flextool-4.4.0/flextool/engine/input/_spinedb_reader.py +1882 -0
- flextool-4.4.0/flextool/engine/input/_timeline.py +1866 -0
- flextool-4.4.0/flextool/engine/model/_balance_terms.py +223 -0
- flextool-4.4.0/flextool/engine/model/_coarse_flows.py +529 -0
- flextool-4.4.0/flextool/engine/model/_commodity_ladder.py +655 -0
- flextool-4.4.0/flextool/engine/model/_cumulative_invest.py +940 -0
- flextool-4.4.0/flextool/engine/model/_dc_power_flow.py +345 -0
- flextool-4.4.0/flextool/engine/model/_exact.py +157 -0
- flextool-4.4.0/flextool/engine/model/_group_slack.py +1466 -0
- flextool-4.4.0/flextool/engine/model/_non_anticipativity.py +448 -0
- flextool-4.4.0/flextool/engine/model/_online.py +1060 -0
- flextool-4.4.0/flextool/engine/model/_reserve.py +1828 -0
- flextool-4.4.0/flextool/engine/model/_self_discharge.py +482 -0
- flextool-4.4.0/flextool/engine/model/core.py +5615 -0
- flextool-4.4.0/flextool/engine/output/_capacity_margin.py +100 -0
- flextool-4.4.0/flextool/engine/output/_coarse_flows.py +184 -0
- flextool-4.4.0/flextool/engine/output/_dump_csvs.py +799 -0
- flextool-4.4.0/flextool/engine/output/_horizon_dump.py +278 -0
- flextool-4.4.0/flextool/engine/output/_parquet_bundle.py +786 -0
- flextool-4.4.0/flextool/engine/output/_reserve_report.py +124 -0
- flextool-4.4.0/flextool/engine/output/_writer.py +611 -0
- flextool-4.4.0/flextool/engine/preprocess/_annuity.py +79 -0
- flextool-4.4.0/flextool/engine/preprocess/_co2_methods.py +18 -0
- flextool-4.4.0/flextool/engine/preprocess/_provider_keys.py +220 -0
- flextool-4.4.0/flextool/engine/preprocess/_reduce_detail.py +771 -0
- flextool-4.4.0/flextool/engine/preprocess/_reserve_methods.py +82 -0
- flextool-4.4.0/flextool/engine/preprocess/emit/_arc_unions.py +1670 -0
- flextool-4.4.0/flextool/engine/preprocess/emit/_base_steps.py +76 -0
- flextool-4.4.0/flextool/engine/preprocess/emit/_capacity_margin_peak.py +220 -0
- flextool-4.4.0/flextool/engine/preprocess/emit/_chain_params.py +753 -0
- flextool-4.4.0/flextool/engine/preprocess/emit/_co2_accumulators.py +571 -0
- flextool-4.4.0/flextool/engine/preprocess/emit/_dispatchers.py +682 -0
- flextool-4.4.0/flextool/engine/preprocess/emit/_energy_margin_adder.py +323 -0
- flextool-4.4.0/flextool/engine/preprocess/emit/_entity_annual.py +442 -0
- flextool-4.4.0/flextool/engine/preprocess/emit/_inflow_scaling_checks.py +275 -0
- flextool-4.4.0/flextool/engine/preprocess/emit/_leaf_sets.py +561 -0
- flextool-4.4.0/flextool/engine/preprocess/emit/_pdt_lookup.py +1192 -0
- flextool-4.4.0/flextool/engine/preprocess/emit/_pdt_params.py +790 -0
- flextool-4.4.0/flextool/engine/preprocess/emit/_per_solve.py +852 -0
- flextool-4.4.0/flextool/engine/preprocess/emit/_period_calc.py +591 -0
- flextool-4.4.0/flextool/engine/preprocess/emit/_period_params.py +2567 -0
- flextool-4.4.0/flextool/engine/preprocess/emit/_reserve_sets.py +645 -0
- flextool-4.4.0/flextool/engine/preprocess/emit/_solve_time.py +324 -0
- flextool-4.4.0/flextool/engine/preprocess/emit/_solve_writers.py +1383 -0
- flextool-4.4.0/flextool/engine/preprocess/emit/_vectorize.py +465 -0
- flextool-4.4.0/flextool/engine/preprocess/flex_data.py +8230 -0
- flextool-4.4.0/flextool/engine/preprocess/params/_arithmetic.py +547 -0
- flextool-4.4.0/flextool/engine/preprocess/params/_branch.py +2117 -0
- flextool-4.4.0/flextool/engine/preprocess/params/_coarse.py +495 -0
- flextool-4.4.0/flextool/engine/preprocess/params/_derived.py +10094 -0
- flextool-4.4.0/flextool/engine/preprocess/params/_direct.py +3110 -0
- flextool-4.4.0/flextool/engine/preprocess/params/_existing.py +1907 -0
- flextool-4.4.0/flextool/engine/preprocess/params/_npv.py +2241 -0
- flextool-4.4.0/flextool/engine/preprocess/params/_profiles.py +1023 -0
- flextool-4.4.0/flextool/engine/preprocess/params/_projection.py +2096 -0
- flextool-4.4.0/flextool/engine/preprocess/params/_ramp_links.py +277 -0
- flextool-4.4.0/flextool/engine/preprocess/params/_walks.py +493 -0
- flextool-4.4.0/flextool/engine/solve/_acceptance.py +782 -0
- flextool-4.4.0/flextool/engine/solve/_benders.py +3533 -0
- flextool-4.4.0/flextool/engine/solve/_carry_routing.py +405 -0
- flextool-4.4.0/flextool/engine/solve/_handoff.py +264 -0
- flextool-4.4.0/flextool/engine/solve/_objective_options.py +243 -0
- flextool-4.4.0/flextool/engine/solve/_orchestration.py +5327 -0
- flextool-4.4.0/flextool/engine/solve/_realization.py +409 -0
- flextool-4.4.0/flextool/engine/solve/_realized_overlap.py +283 -0
- flextool-4.4.0/flextool/engine/solve/_recursive_solve.py +910 -0
- flextool-4.4.0/flextool/engine/solve/_region_filter.py +2601 -0
- flextool-4.4.0/flextool/engine/solve/_run_model.py +1945 -0
- flextool-4.4.0/flextool/engine/solve/_solver_base.py +42 -0
- flextool-4.4.0/flextool/engine/solve/_solver_catalogue.py +233 -0
- flextool-4.4.0/flextool/engine/solve/_solver_dispatch.py +1847 -0
- flextool-4.4.0/flextool/engine/solve/_stochastic.py +1185 -0
- flextool-4.4.0/flextool/engine/solve/_subprocess_solve.py +2900 -0
- flextool-4.4.0/flextool/engine/solve/_warm.py +524 -0
- flextool-4.4.0/flextool/engine/solve/chain.py +249 -0
- flextool-4.4.0/flextool/engine/solve/solver_catalogue/copt.json +85 -0
- flextool-4.4.0/flextool/engine/solve/solver_catalogue/cplex.json +196 -0
- flextool-4.4.0/flextool/engine/solve/solver_catalogue/gurobi.json +222 -0
- flextool-4.4.0/flextool/engine/solve/solver_catalogue/highs.json +159 -0
- flextool-4.4.0/flextool/engine/solve/solver_catalogue/xpress.json +832 -0
- flextool-4.4.0/flextool/env_check.py +1218 -0
- flextool-4.4.0/flextool/export_to_tabular/db_reader.py +242 -0
- flextool-4.4.0/flextool/export_to_tabular/export_settings.yaml +402 -0
- flextool-4.4.0/flextool/export_to_tabular/export_to_excel.py +243 -0
- flextool-4.4.0/flextool/gui/__main__.py +122 -0
- flextool-4.4.0/flextool/gui/assistant/chat_tab.py +842 -0
- flextool-4.4.0/flextool/gui/assistant/notices.py +588 -0
- flextool-4.4.0/flextool/gui/assistant/strings.py +289 -0
- flextool-4.4.0/flextool/gui/assistant/transcript.py +737 -0
- flextool-4.4.0/flextool/gui/assistant/worker.py +974 -0
- flextool-4.4.0/flextool/gui/calibrate_commands.py +211 -0
- flextool-4.4.0/flextool/gui/calibrate_jobs.py +540 -0
- flextool-4.4.0/flextool/gui/cli_format.py +114 -0
- flextool-4.4.0/flextool/gui/data_models.py +374 -0
- flextool-4.4.0/flextool/gui/db_version_check.py +325 -0
- flextool-4.4.0/flextool/gui/dialogs/add_dialog.py +923 -0
- flextool-4.4.0/flextool/gui/dialogs/calibrate_dialog.py +1270 -0
- flextool-4.4.0/flextool/gui/dialogs/local_solver_settings_dialog.py +325 -0
- flextool-4.4.0/flextool/gui/dialogs/migration_consent_dialog.py +209 -0
- flextool-4.4.0/flextool/gui/dialogs/plot_dialog.py +489 -0
- flextool-4.4.0/flextool/gui/dialogs/plot_settings_picker.py +2185 -0
- flextool-4.4.0/flextool/gui/dialogs/project_dialog.py +509 -0
- flextool-4.4.0/flextool/gui/dialogs/project_package_dialog.py +549 -0
- flextool-4.4.0/flextool/gui/execution_manager.py +2075 -0
- flextool-4.4.0/flextool/gui/execution_window.py +1377 -0
- flextool-4.4.0/flextool/gui/input_sources.py +912 -0
- flextool-4.4.0/flextool/gui/main_window.py +6711 -0
- flextool-4.4.0/flextool/gui/network_graph.py +217 -0
- flextool-4.4.0/flextool/gui/output_actions.py +404 -0
- flextool-4.4.0/flextool/gui/output_log_window.py +161 -0
- flextool-4.4.0/flextool/gui/platform_utils.py +456 -0
- flextool-4.4.0/flextool/gui/project_utils.py +225 -0
- flextool-4.4.0/flextool/gui/result_viewer.py +4507 -0
- flextool-4.4.0/flextool/gui/scenario_lists.py +646 -0
- flextool-4.4.0/flextool/gui/settings_io.py +410 -0
- flextool-4.4.0/flextool/input_derivation/__init__.py +397 -0
- flextool-4.4.0/flextool/input_derivation/_dc_power_flow.py +416 -0
- flextool-4.4.0/flextool/input_derivation/_specs.py +1177 -0
- flextool-4.4.0/flextool/input_derivation/_validators.py +3058 -0
- flextool-4.4.0/flextool/lean_parquet.py +431 -0
- flextool-4.4.0/flextool/model_builder/build_model.py +603 -0
- flextool-4.4.0/flextool/plot_outputs/color_template.py +904 -0
- flextool-4.4.0/flextool/plot_outputs/config.py +199 -0
- flextool-4.4.0/flextool/plot_outputs/format_helpers.py +489 -0
- flextool-4.4.0/flextool/plot_outputs/orchestrator.py +1210 -0
- flextool-4.4.0/flextool/plot_outputs/plan.py +1869 -0
- flextool-4.4.0/flextool/plot_outputs/plot_bars.py +1543 -0
- flextool-4.4.0/flextool/plot_outputs/plot_lines.py +1071 -0
- flextool-4.4.0/flextool/plot_outputs/shared_manifest.py +588 -0
- flextool-4.4.0/flextool/plot_outputs/unit_labels.py +238 -0
- flextool-4.4.0/flextool/process_inputs/read_matpower.py +453 -0
- flextool-4.4.0/flextool/process_inputs/read_old_flextool.py +1342 -0
- flextool-4.4.0/flextool/process_inputs/write_old_flextool_to_db.py +4014 -0
- flextool-4.4.0/flextool/process_inputs/write_to_input_db.py +271 -0
- flextool-4.4.0/flextool/process_outputs/_annualize.py +89 -0
- flextool-4.4.0/flextool/process_outputs/_csv_sidecars.py +137 -0
- flextool-4.4.0/flextool/process_outputs/_excel_writer.py +310 -0
- flextool-4.4.0/flextool/process_outputs/_output_meta.py +1838 -0
- flextool-4.4.0/flextool/process_outputs/_sheet_names.py +66 -0
- flextool-4.4.0/flextool/process_outputs/_unit_context.py +102 -0
- flextool-4.4.0/flextool/process_outputs/calc_capacity_flows.py +169 -0
- flextool-4.4.0/flextool/process_outputs/calc_costs.py +530 -0
- flextool-4.4.0/flextool/process_outputs/calc_group_flows.py +263 -0
- flextool-4.4.0/flextool/process_outputs/calc_slacks.py +165 -0
- flextool-4.4.0/flextool/process_outputs/calc_storage_vre.py +209 -0
- flextool-4.4.0/flextool/process_outputs/drop_levels.py +390 -0
- flextool-4.4.0/flextool/process_outputs/out_ancillary.py +705 -0
- flextool-4.4.0/flextool/process_outputs/out_costs.py +410 -0
- flextool-4.4.0/flextool/process_outputs/out_flowgroup.py +190 -0
- flextool-4.4.0/flextool/process_outputs/out_flows.py +350 -0
- flextool-4.4.0/flextool/process_outputs/out_group.py +565 -0
- flextool-4.4.0/flextool/process_outputs/out_node.py +206 -0
- flextool-4.4.0/flextool/process_outputs/read_highs_solution.py +1997 -0
- flextool-4.4.0/flextool/process_outputs/read_parameters.py +1880 -0
- flextool-4.4.0/flextool/process_outputs/read_sets.py +1389 -0
- flextool-4.4.0/flextool/process_outputs/read_variables.py +426 -0
- flextool-4.4.0/flextool/process_outputs/reduced_cells.py +180 -0
- flextool-4.4.0/flextool/process_outputs/solve_order.py +121 -0
- flextool-4.4.0/flextool/process_outputs/spinedb_replay.py +420 -0
- flextool-4.4.0/flextool/process_outputs/write_outputs.py +1504 -0
- flextool-4.4.0/flextool/process_outputs/write_spinedb.py +1292 -0
- flextool-4.4.0/flextool/project_package.py +1647 -0
- flextool-4.4.0/flextool/representative_periods/netload_iterate.py +736 -0
- flextool-4.4.0/flextool/representative_periods/preprocess.py +951 -0
- flextool-4.4.0/flextool/run_options.py +571 -0
- flextool-4.4.0/flextool/run_record/__init__.py +111 -0
- flextool-4.4.0/flextool/run_record/_owner.py +1334 -0
- flextool-4.4.0/flextool/run_record/_status.py +955 -0
- flextool-4.4.0/flextool/run_record/_tee.py +161 -0
- flextool-4.4.0/flextool/safe_names.py +129 -0
- flextool-4.4.0/flextool/scenario_comparison/data_models.py +258 -0
- flextool-4.4.0/flextool/scenario_comparison/db_reader.py +481 -0
- flextool-4.4.0/flextool/scenario_comparison/dispatch_data.py +1048 -0
- flextool-4.4.0/flextool/scenario_comparison/dispatch_plots.py +805 -0
- flextool-4.4.0/flextool/scenario_comparison/input_entity_colors.py +321 -0
- flextool-4.4.0/flextool/scenario_comparison/orchestrator.py +570 -0
- flextool-4.4.0/flextool/schemas/canonical_databases/howto_aggregate_output.json +7504 -0
- flextool-4.4.0/flextool/schemas/canonical_databases/howto_connections.json +6845 -0
- flextool-4.4.0/flextool/schemas/canonical_databases/howto_demand.json +6780 -0
- flextool-4.4.0/flextool/schemas/canonical_databases/howto_hydro_reservoir.json +7478 -0
- flextool-4.4.0/flextool/schemas/canonical_databases/howto_hydro_reservoir_with_pump.json +7159 -0
- flextool-4.4.0/flextool/schemas/canonical_databases/howto_non_sync_and_curtailment.json +7065 -0
- flextool-4.4.0/flextool/schemas/canonical_databases/howto_ramp_and_start_up.json +6946 -0
- flextool-4.4.0/flextool/schemas/canonical_databases/howto_stochastics.json +7323 -0
- flextool-4.4.0/flextool/schemas/canonical_databases/templates_examples.json +17711 -0
- flextool-4.4.0/flextool/schemas/canonical_databases/templates_time_settings_only.json +6612 -0
- flextool-4.4.0/flextool/schemas/default_plot_settings.yaml +281 -0
- flextool-4.4.0/flextool/schemas/default_plots.yaml +2416 -0
- flextool-4.4.0/flextool/schemas/old_flextool_import_template.json +4443 -0
- flextool-4.4.0/flextool/schemas/spinedb_results_schema.json +653 -0
- flextool-4.4.0/flextool/schemas/spinedb_schema.json +5528 -0
- flextool-4.4.0/flextool/solver_config/copt.opt.template +23 -0
- flextool-4.4.0/flextool/solver_config/cplex.opt.template +28 -0
- flextool-4.4.0/flextool/solver_config/gurobi.opt.template +27 -0
- flextool-4.4.0/flextool/solver_config/xpress.opt.template +27 -0
- flextool-4.4.0/flextool/spinedb_backend/_backend.py +1147 -0
- flextool-4.4.0/flextool/sqlite_url.py +141 -0
- flextool-4.4.0/flextool/timeline_pieces.py +310 -0
- flextool-4.4.0/flextool/units_of_measure.py +286 -0
- flextool-4.4.0/flextool/update_flextool/__init__.py +12 -0
- flextool-4.4.0/flextool/update_flextool/canonical_databases.py +328 -0
- flextool-4.4.0/flextool/update_flextool/db_handle.py +63 -0
- flextool-4.4.0/flextool/update_flextool/db_migration.py +10348 -0
- flextool-4.4.0/flextool/update_flextool/export_database.py +112 -0
- flextool-4.4.0/flextool/update_flextool/fixture_schema.py +308 -0
- flextool-4.4.0/flextool/update_flextool/frozen.py +494 -0
- flextool-4.4.0/flextool/update_flextool/initialize_database.py +55 -0
- flextool-4.4.0/flextool/update_flextool/install_info.py +264 -0
- flextool-4.4.0/flextool/update_flextool/migrate_before_run.py +158 -0
- flextool-4.4.0/flextool/update_flextool/self_update.py +628 -0
- flextool-4.4.0/flextool/update_flextool/sync_master_json_template.py +127 -0
- flextool-4.4.0/flextool/user_dirs.py +83 -0
- flextool-4.4.0/flextool.egg-info/PKG-INFO +245 -0
- flextool-4.4.0/flextool.egg-info/SOURCES.txt +661 -0
- flextool-4.4.0/flextool.egg-info/entry_points.txt +22 -0
- flextool-4.4.0/flextool.egg-info/requires.txt +41 -0
- flextool-4.4.0/flextool_run_supervisor.py +463 -0
- flextool-4.4.0/pyproject.toml +347 -0
- flextool-4.4.0/tests/test_child_python_safe_path.py +97 -0
- flextool-4.4.0/tests/test_child_run_argv.py +116 -0
- flextool-4.4.0/tests/test_ci_shard.py +68 -0
- flextool-4.4.0/tests/test_comparison_excel.py +142 -0
- flextool-4.4.0/tests/test_comparison_project_root.py +209 -0
- flextool-4.4.0/tests/test_comparison_results_registry.py +67 -0
- flextool-4.4.0/tests/test_console_run_tool.py +131 -0
- flextool-4.4.0/tests/test_cost_aggregation_semantics.py +1099 -0
- flextool-4.4.0/tests/test_dependency_caps.py +109 -0
- flextool-4.4.0/tests/test_dispatch_multi_period.py +268 -0
- flextool-4.4.0/tests/test_env_check.py +1059 -0
- flextool-4.4.0/tests/test_env_knob_registry.py +276 -0
- flextool-4.4.0/tests/test_excel_text_cells.py +60 -0
- flextool-4.4.0/tests/test_export_to_tabular.py +1509 -0
- flextool-4.4.0/tests/test_flowgroup_indicators.py +331 -0
- flextool-4.4.0/tests/test_lean_parquet.py +170 -0
- flextool-4.4.0/tests/test_model_builder_invest.py +55 -0
- flextool-4.4.0/tests/test_open_results_db.py +282 -0
- flextool-4.4.0/tests/test_output_metadata_renderers.py +256 -0
- flextool-4.4.0/tests/test_output_work_folder_isolation.py +321 -0
- flextool-4.4.0/tests/test_period_share_of_year_output.py +81 -0
- flextool-4.4.0/tests/test_plot_gaps.py +118 -0
- flextool-4.4.0/tests/test_plot_pipeline.py +1507 -0
- flextool-4.4.0/tests/test_project_package_cli.py +849 -0
- flextool-4.4.0/tests/test_recourse_cost_reconciliation.py +103 -0
- flextool-4.4.0/tests/test_representative_periods.py +436 -0
- flextool-4.4.0/tests/test_run_options.py +243 -0
- flextool-4.4.0/tests/test_safe_names.py +156 -0
- flextool-4.4.0/tests/test_safe_text.py +84 -0
- flextool-4.4.0/tests/test_scenarios.py +515 -0
- flextool-4.4.0/tests/test_solve_config.py +141 -0
- flextool-4.4.0/tests/test_sqlite_url.py +202 -0
- flextool-4.4.0/tests/test_thread_budget.py +306 -0
- flextool-4.4.0/tests/test_time_runs.py +133 -0
- flextool-4.4.0/tests/test_timings_csv.py +156 -0
- flextool-4.4.0/tests/test_toolbox_specs.py +37 -0
- flextool-4.4.0/tests/test_unit_online_dt_columns.py +170 -0
- flextool-4.4.0/tests/test_units_of_measure.py +199 -0
- flextool-4.4.0/tests/test_units_of_measure_validators.py +211 -0
- flextool-4.4.0/tests/test_user_dirs_isolation.py +210 -0
- flextool-4.4.0/tests/test_xlsx_startup_input_round_trip.py +82 -0
- flextool-4.4.0/tests/test_xlsx_v77_round_trip.py +177 -0
- flextool-4.3.0/MANIFEST.in +0 -29
- flextool-4.3.0/PKG-INFO +0 -245
- flextool-4.3.0/docs/advanced_concepts.md +0 -193
- flextool-4.3.0/docs/ai_assistant.md +0 -708
- flextool-4.3.0/docs/dev/architecture.md +0 -1503
- flextool-4.3.0/docs/dev/engine.md +0 -1219
- flextool-4.3.0/docs/dev/slack_convention.md +0 -105
- flextool-4.3.0/docs/env_vars.md +0 -75
- flextool-4.3.0/docs/excel_interface.md +0 -200
- flextool-4.3.0/docs/flextool_gui_interface.md +0 -227
- flextool-4.3.0/docs/how_to.md +0 -1514
- flextool-4.3.0/docs/index.md +0 -58
- flextool-4.3.0/docs/install_gui.md +0 -221
- flextool-4.3.0/docs/install_toolbox.md +0 -189
- flextool-4.3.0/docs/reference.md +0 -736
- flextool-4.3.0/docs/results.md +0 -295
- flextool-4.3.0/docs/solvers/copt.md +0 -134
- flextool-4.3.0/docs/solvers/cplex.md +0 -135
- flextool-4.3.0/docs/solvers/gurobi.md +0 -134
- flextool-4.3.0/docs/solvers/highs.md +0 -139
- flextool-4.3.0/docs/solvers/index.md +0 -237
- flextool-4.3.0/docs/solvers/xpress.md +0 -121
- flextool-4.3.0/docs/spine_database.md +0 -41
- flextool-4.3.0/docs/spine_toolbox.md +0 -215
- flextool-4.3.0/docs/terminal_workflow.md +0 -567
- flextool-4.3.0/docs/tutorial.md +0 -246
- flextool-4.3.0/flextool/_thread_budget.py +0 -343
- flextool-4.3.0/flextool/assistant/__init__.py +0 -5
- flextool-4.3.0/flextool/assistant/backends/openai_chat.py +0 -541
- flextool-4.3.0/flextool/assistant/budget.py +0 -358
- flextool-4.3.0/flextool/assistant/caps.py +0 -267
- flextool-4.3.0/flextool/assistant/chat_cli.py +0 -1477
- flextool-4.3.0/flextool/assistant/context.py +0 -250
- flextool-4.3.0/flextool/assistant/errors.py +0 -358
- flextool-4.3.0/flextool/assistant/inputs/_db.py +0 -506
- flextool-4.3.0/flextool/assistant/inputs/_notes.py +0 -114
- flextool-4.3.0/flextool/assistant/inputs/_units.py +0 -75
- flextool-4.3.0/flextool/assistant/llm_adapter.py +0 -367
- flextool-4.3.0/flextool/assistant/llm_errors.py +0 -871
- flextool-4.3.0/flextool/assistant/llm_retry.py +0 -197
- flextool-4.3.0/flextool/assistant/mcp_server.py +0 -237
- flextool-4.3.0/flextool/assistant/prompt.py +0 -392
- flextool-4.3.0/flextool/assistant/providers.py +0 -350
- flextool-4.3.0/flextool/assistant/registry.py +0 -271
- flextool-4.3.0/flextool/assistant/results/_catalog.py +0 -150
- flextool-4.3.0/flextool/assistant/results/_overview.py +0 -296
- flextool-4.3.0/flextool/assistant/results/_query.py +0 -649
- flextool-4.3.0/flextool/assistant/results/_runs.py +0 -575
- flextool-4.3.0/flextool/assistant/results/_slacks.py +0 -183
- flextool-4.3.0/flextool/assistant/session.py +0 -1739
- flextool-4.3.0/flextool/assistant/store.py +0 -1061
- flextool-4.3.0/flextool/assistant/tools/diagnostics.py +0 -212
- flextool-4.3.0/flextool/assistant/tools/discovery.py +0 -377
- flextool-4.3.0/flextool/assistant/tools/inputs.py +0 -898
- flextool-4.3.0/flextool/assistant/tools/orientation.py +0 -205
- flextool-4.3.0/flextool/assistant/tools/results.py +0 -626
- flextool-4.3.0/flextool/assistant/unit_wording.py +0 -120
- flextool-4.3.0/flextool/assistant/usage.py +0 -412
- flextool-4.3.0/flextool/calibrate/__main__.py +0 -11
- flextool-4.3.0/flextool/calibrate/_cli.py +0 -328
- flextool-4.3.0/flextool/calibrate/_db_alt.py +0 -167
- flextool-4.3.0/flextool/calibrate/_loop.py +0 -562
- flextool-4.3.0/flextool/calibrate/_readers.py +0 -223
- flextool-4.3.0/flextool/calibrate/_report.py +0 -263
- flextool-4.3.0/flextool/calibrate/_sizing.py +0 -699
- flextool-4.3.0/flextool/calibrate/_solve.py +0 -168
- flextool-4.3.0/flextool/cli/_console.py +0 -51
- flextool-4.3.0/flextool/cli/cmd_execute_flextool_workflow.py +0 -210
- flextool-4.3.0/flextool/cli/cmd_import_sensitivities.py +0 -75
- flextool-4.3.0/flextool/cli/cmd_migrate_database.py +0 -13
- flextool-4.3.0/flextool/cli/cmd_open_results_db.py +0 -264
- flextool-4.3.0/flextool/cli/cmd_read_old_flextool.py +0 -63
- flextool-4.3.0/flextool/cli/cmd_read_tabular_input.py +0 -81
- flextool-4.3.0/flextool/cli/cmd_run_flextool.py +0 -1297
- flextool-4.3.0/flextool/cli/cmd_scenario_results.py +0 -285
- flextool-4.3.0/flextool/cli/cmd_solve_mps.py +0 -174
- flextool-4.3.0/flextool/cli/cmd_write_outputs.py +0 -126
- flextool-4.3.0/flextool/docs_build/__init__.py +0 -133
- flextool-4.3.0/flextool/docs_build/__main__.py +0 -66
- flextool-4.3.0/flextool/docs_build/formulation.py +0 -360
- flextool-4.3.0/flextool/docs_build/index.py +0 -308
- flextool-4.3.0/flextool/docs_build/scope.py +0 -62
- flextool-4.3.0/flextool/engine/_behaviour_changes.py +0 -361
- flextool-4.3.0/flextool/engine/_csv_reload/load.py +0 -64
- flextool-4.3.0/flextool/engine/_csv_reload/offline_outputs.py +0 -185
- flextool-4.3.0/flextool/engine/autoscale/_layer2.py +0 -1317
- flextool-4.3.0/flextool/engine/autoscale/_layer2_types.py +0 -768
- flextool-4.3.0/flextool/engine/autoscale/_quantity_types.py +0 -735
- flextool-4.3.0/flextool/engine/input/_db_loader.py +0 -169
- flextool-4.3.0/flextool/engine/input/_db_reader.py +0 -132
- flextool-4.3.0/flextool/engine/input/_inmemory_reader.py +0 -225
- flextool-4.3.0/flextool/engine/input/_param_shapes.py +0 -3101
- flextool-4.3.0/flextool/engine/input/_solve_config.py +0 -1273
- flextool-4.3.0/flextool/engine/input/_solve_state.py +0 -283
- flextool-4.3.0/flextool/engine/input/_spinedb_reader.py +0 -1803
- flextool-4.3.0/flextool/engine/input/_timeline.py +0 -1892
- flextool-4.3.0/flextool/engine/model/_balance_terms.py +0 -96
- flextool-4.3.0/flextool/engine/model/_coarse_flows.py +0 -521
- flextool-4.3.0/flextool/engine/model/_commodity_ladder.py +0 -649
- flextool-4.3.0/flextool/engine/model/_cumulative_invest.py +0 -937
- flextool-4.3.0/flextool/engine/model/_dc_power_flow.py +0 -332
- flextool-4.3.0/flextool/engine/model/_exact.py +0 -155
- flextool-4.3.0/flextool/engine/model/_group_slack.py +0 -736
- flextool-4.3.0/flextool/engine/model/_non_anticipativity.py +0 -377
- flextool-4.3.0/flextool/engine/model/_online.py +0 -1058
- flextool-4.3.0/flextool/engine/model/_reserve.py +0 -1505
- flextool-4.3.0/flextool/engine/model/_self_discharge.py +0 -479
- flextool-4.3.0/flextool/engine/model/core.py +0 -4925
- flextool-4.3.0/flextool/engine/output/_coarse_flows.py +0 -183
- flextool-4.3.0/flextool/engine/output/_dump_csvs.py +0 -796
- flextool-4.3.0/flextool/engine/output/_horizon_dump.py +0 -274
- flextool-4.3.0/flextool/engine/output/_parquet_bundle.py +0 -738
- flextool-4.3.0/flextool/engine/output/_writer.py +0 -578
- flextool-4.3.0/flextool/engine/preprocess/_provider_keys.py +0 -217
- flextool-4.3.0/flextool/engine/preprocess/_reserve_methods.py +0 -80
- flextool-4.3.0/flextool/engine/preprocess/emit/_arc_unions.py +0 -1676
- flextool-4.3.0/flextool/engine/preprocess/emit/_base_steps.py +0 -74
- flextool-4.3.0/flextool/engine/preprocess/emit/_chain_params.py +0 -752
- flextool-4.3.0/flextool/engine/preprocess/emit/_co2_accumulators.py +0 -515
- flextool-4.3.0/flextool/engine/preprocess/emit/_dispatchers.py +0 -682
- flextool-4.3.0/flextool/engine/preprocess/emit/_energy_margin_adder.py +0 -291
- flextool-4.3.0/flextool/engine/preprocess/emit/_entity_annual.py +0 -449
- flextool-4.3.0/flextool/engine/preprocess/emit/_inflow_scaling_checks.py +0 -275
- flextool-4.3.0/flextool/engine/preprocess/emit/_leaf_sets.py +0 -571
- flextool-4.3.0/flextool/engine/preprocess/emit/_pdt_lookup.py +0 -778
- flextool-4.3.0/flextool/engine/preprocess/emit/_pdt_params.py +0 -787
- flextool-4.3.0/flextool/engine/preprocess/emit/_per_solve.py +0 -879
- flextool-4.3.0/flextool/engine/preprocess/emit/_period_calc.py +0 -555
- flextool-4.3.0/flextool/engine/preprocess/emit/_period_params.py +0 -2498
- flextool-4.3.0/flextool/engine/preprocess/emit/_reserve_sets.py +0 -637
- flextool-4.3.0/flextool/engine/preprocess/emit/_solve_time.py +0 -320
- flextool-4.3.0/flextool/engine/preprocess/emit/_solve_writers.py +0 -1319
- flextool-4.3.0/flextool/engine/preprocess/emit/_vectorize.py +0 -438
- flextool-4.3.0/flextool/engine/preprocess/flex_data.py +0 -8007
- flextool-4.3.0/flextool/engine/preprocess/params/_arithmetic.py +0 -547
- flextool-4.3.0/flextool/engine/preprocess/params/_branch.py +0 -2116
- flextool-4.3.0/flextool/engine/preprocess/params/_coarse.py +0 -458
- flextool-4.3.0/flextool/engine/preprocess/params/_derived.py +0 -10303
- flextool-4.3.0/flextool/engine/preprocess/params/_direct.py +0 -2560
- flextool-4.3.0/flextool/engine/preprocess/params/_existing.py +0 -1860
- flextool-4.3.0/flextool/engine/preprocess/params/_npv.py +0 -2029
- flextool-4.3.0/flextool/engine/preprocess/params/_profiles.py +0 -937
- flextool-4.3.0/flextool/engine/preprocess/params/_projection.py +0 -2020
- flextool-4.3.0/flextool/engine/preprocess/params/_ramp_links.py +0 -258
- flextool-4.3.0/flextool/engine/preprocess/params/_walks.py +0 -488
- flextool-4.3.0/flextool/engine/solve/_acceptance.py +0 -420
- flextool-4.3.0/flextool/engine/solve/_benders.py +0 -3515
- flextool-4.3.0/flextool/engine/solve/_carry_routing.py +0 -400
- flextool-4.3.0/flextool/engine/solve/_handoff.py +0 -254
- flextool-4.3.0/flextool/engine/solve/_orchestration.py +0 -5025
- flextool-4.3.0/flextool/engine/solve/_realization.py +0 -381
- flextool-4.3.0/flextool/engine/solve/_realized_overlap.py +0 -279
- flextool-4.3.0/flextool/engine/solve/_recursive_solve.py +0 -777
- flextool-4.3.0/flextool/engine/solve/_region_filter.py +0 -2461
- flextool-4.3.0/flextool/engine/solve/_run_model.py +0 -1802
- flextool-4.3.0/flextool/engine/solve/_solver_base.py +0 -36
- flextool-4.3.0/flextool/engine/solve/_solver_dispatch.py +0 -595
- flextool-4.3.0/flextool/engine/solve/_stochastic.py +0 -882
- flextool-4.3.0/flextool/engine/solve/_subprocess_solve.py +0 -1917
- flextool-4.3.0/flextool/engine/solve/_warm.py +0 -523
- flextool-4.3.0/flextool/engine/solve/chain.py +0 -248
- flextool-4.3.0/flextool/env_check.py +0 -1177
- flextool-4.3.0/flextool/export_to_tabular/db_reader.py +0 -240
- flextool-4.3.0/flextool/export_to_tabular/export_settings.yaml +0 -405
- flextool-4.3.0/flextool/export_to_tabular/export_to_excel.py +0 -228
- flextool-4.3.0/flextool/gui/__main__.py +0 -118
- flextool-4.3.0/flextool/gui/assistant/chat_tab.py +0 -641
- flextool-4.3.0/flextool/gui/assistant/notices.py +0 -580
- flextool-4.3.0/flextool/gui/assistant/strings.py +0 -269
- flextool-4.3.0/flextool/gui/assistant/transcript.py +0 -538
- flextool-4.3.0/flextool/gui/assistant/worker.py +0 -902
- flextool-4.3.0/flextool/gui/calibrate_commands.py +0 -190
- flextool-4.3.0/flextool/gui/calibrate_jobs.py +0 -455
- flextool-4.3.0/flextool/gui/cli_format.py +0 -112
- flextool-4.3.0/flextool/gui/data_models.py +0 -367
- flextool-4.3.0/flextool/gui/db_version_check.py +0 -270
- flextool-4.3.0/flextool/gui/dialogs/add_dialog.py +0 -1098
- flextool-4.3.0/flextool/gui/dialogs/calibrate_dialog.py +0 -1265
- flextool-4.3.0/flextool/gui/dialogs/migration_consent_dialog.py +0 -106
- flextool-4.3.0/flextool/gui/dialogs/plot_dialog.py +0 -459
- flextool-4.3.0/flextool/gui/dialogs/plot_settings_picker.py +0 -2184
- flextool-4.3.0/flextool/gui/dialogs/project_dialog.py +0 -465
- flextool-4.3.0/flextool/gui/execution_manager.py +0 -2065
- flextool-4.3.0/flextool/gui/execution_window.py +0 -1368
- flextool-4.3.0/flextool/gui/input_sources.py +0 -730
- flextool-4.3.0/flextool/gui/main_window.py +0 -6400
- flextool-4.3.0/flextool/gui/network_graph.py +0 -215
- flextool-4.3.0/flextool/gui/output_actions.py +0 -400
- flextool-4.3.0/flextool/gui/output_log_window.py +0 -159
- flextool-4.3.0/flextool/gui/platform_utils.py +0 -452
- flextool-4.3.0/flextool/gui/project_utils.py +0 -207
- flextool-4.3.0/flextool/gui/result_viewer.py +0 -4447
- flextool-4.3.0/flextool/gui/scenario_lists.py +0 -619
- flextool-4.3.0/flextool/gui/settings_io.py +0 -408
- flextool-4.3.0/flextool/input_derivation/__init__.py +0 -329
- flextool-4.3.0/flextool/input_derivation/_dc_power_flow.py +0 -416
- flextool-4.3.0/flextool/input_derivation/_specs.py +0 -1152
- flextool-4.3.0/flextool/input_derivation/_validators.py +0 -938
- flextool-4.3.0/flextool/lean_parquet.py +0 -395
- flextool-4.3.0/flextool/model_builder/build_model.py +0 -590
- flextool-4.3.0/flextool/plot_outputs/color_template.py +0 -888
- flextool-4.3.0/flextool/plot_outputs/config.py +0 -171
- flextool-4.3.0/flextool/plot_outputs/format_helpers.py +0 -419
- flextool-4.3.0/flextool/plot_outputs/orchestrator.py +0 -1145
- flextool-4.3.0/flextool/plot_outputs/plan.py +0 -1793
- flextool-4.3.0/flextool/plot_outputs/plot_bars.py +0 -1510
- flextool-4.3.0/flextool/plot_outputs/plot_lines.py +0 -951
- flextool-4.3.0/flextool/plot_outputs/shared_manifest.py +0 -564
- flextool-4.3.0/flextool/process_inputs/read_matpower.py +0 -452
- flextool-4.3.0/flextool/process_inputs/read_old_flextool.py +0 -1288
- flextool-4.3.0/flextool/process_inputs/write_old_flextool_to_db.py +0 -3078
- flextool-4.3.0/flextool/process_inputs/write_to_input_db.py +0 -270
- flextool-4.3.0/flextool/process_outputs/_annualize.py +0 -55
- flextool-4.3.0/flextool/process_outputs/_output_meta.py +0 -1072
- flextool-4.3.0/flextool/process_outputs/calc_capacity_flows.py +0 -98
- flextool-4.3.0/flextool/process_outputs/calc_costs.py +0 -501
- flextool-4.3.0/flextool/process_outputs/calc_group_flows.py +0 -192
- flextool-4.3.0/flextool/process_outputs/calc_slacks.py +0 -113
- flextool-4.3.0/flextool/process_outputs/calc_storage_vre.py +0 -183
- flextool-4.3.0/flextool/process_outputs/drop_levels.py +0 -342
- flextool-4.3.0/flextool/process_outputs/out_ancillary.py +0 -582
- flextool-4.3.0/flextool/process_outputs/out_costs.py +0 -408
- flextool-4.3.0/flextool/process_outputs/out_flowgroup.py +0 -189
- flextool-4.3.0/flextool/process_outputs/out_flows.py +0 -325
- flextool-4.3.0/flextool/process_outputs/out_group.py +0 -475
- flextool-4.3.0/flextool/process_outputs/out_node.py +0 -200
- flextool-4.3.0/flextool/process_outputs/read_highs_solution.py +0 -1908
- flextool-4.3.0/flextool/process_outputs/read_parameters.py +0 -1830
- flextool-4.3.0/flextool/process_outputs/read_sets.py +0 -1325
- flextool-4.3.0/flextool/process_outputs/read_variables.py +0 -410
- flextool-4.3.0/flextool/process_outputs/solve_order.py +0 -65
- flextool-4.3.0/flextool/process_outputs/spinedb_replay.py +0 -412
- flextool-4.3.0/flextool/process_outputs/write_outputs.py +0 -1449
- flextool-4.3.0/flextool/process_outputs/write_spinedb.py +0 -1277
- flextool-4.3.0/flextool/representative_periods/netload_iterate.py +0 -724
- flextool-4.3.0/flextool/representative_periods/preprocess.py +0 -949
- flextool-4.3.0/flextool/run_options.py +0 -490
- flextool-4.3.0/flextool/run_record/__init__.py +0 -109
- flextool-4.3.0/flextool/run_record/_owner.py +0 -1333
- flextool-4.3.0/flextool/run_record/_status.py +0 -909
- flextool-4.3.0/flextool/run_record/_tee.py +0 -153
- flextool-4.3.0/flextool/scenario_comparison/data_models.py +0 -225
- flextool-4.3.0/flextool/scenario_comparison/db_reader.py +0 -469
- flextool-4.3.0/flextool/scenario_comparison/dispatch_data.py +0 -1002
- flextool-4.3.0/flextool/scenario_comparison/dispatch_plots.py +0 -691
- flextool-4.3.0/flextool/scenario_comparison/input_entity_colors.py +0 -319
- flextool-4.3.0/flextool/scenario_comparison/orchestrator.py +0 -478
- flextool-4.3.0/flextool/schemas/canonical_databases/howto_aggregate_output.json +0 -7192
- flextool-4.3.0/flextool/schemas/canonical_databases/howto_connections.json +0 -6533
- flextool-4.3.0/flextool/schemas/canonical_databases/howto_demand.json +0 -6450
- flextool-4.3.0/flextool/schemas/canonical_databases/howto_hydro_reservoir.json +0 -7166
- flextool-4.3.0/flextool/schemas/canonical_databases/howto_hydro_reservoir_with_pump.json +0 -6847
- flextool-4.3.0/flextool/schemas/canonical_databases/howto_non_sync_and_curtailment.json +0 -6753
- flextool-4.3.0/flextool/schemas/canonical_databases/howto_ramp_and_start_up.json +0 -6634
- flextool-4.3.0/flextool/schemas/canonical_databases/howto_stochastics.json +0 -7011
- flextool-4.3.0/flextool/schemas/canonical_databases/templates_examples.json +0 -14561
- flextool-4.3.0/flextool/schemas/canonical_databases/templates_time_settings_only.json +0 -6300
- flextool-4.3.0/flextool/schemas/default_plot_settings.yaml +0 -271
- flextool-4.3.0/flextool/schemas/default_plots.yaml +0 -2367
- flextool-4.3.0/flextool/schemas/old_flextool_import_template.json +0 -4443
- flextool-4.3.0/flextool/schemas/spinedb_results_schema.json +0 -605
- flextool-4.3.0/flextool/schemas/spinedb_schema.json +0 -5294
- flextool-4.3.0/flextool/solver_config/copt.opt.template +0 -18
- flextool-4.3.0/flextool/solver_config/cplex.opt.template +0 -25
- flextool-4.3.0/flextool/solver_config/gurobi.opt.template +0 -18
- flextool-4.3.0/flextool/solver_config/xpress.opt.template +0 -26
- flextool-4.3.0/flextool/spinedb_backend/_backend.py +0 -1104
- flextool-4.3.0/flextool/update_flextool/__init__.py +0 -12
- flextool-4.3.0/flextool/update_flextool/canonical_databases.py +0 -278
- flextool-4.3.0/flextool/update_flextool/db_handle.py +0 -26
- flextool-4.3.0/flextool/update_flextool/db_migration.py +0 -9408
- flextool-4.3.0/flextool/update_flextool/export_database.py +0 -111
- flextool-4.3.0/flextool/update_flextool/fixture_schema.py +0 -307
- flextool-4.3.0/flextool/update_flextool/initialize_database.py +0 -52
- flextool-4.3.0/flextool/update_flextool/install_info.py +0 -262
- flextool-4.3.0/flextool/update_flextool/self_update.py +0 -503
- flextool-4.3.0/flextool/update_flextool/sync_master_json_template.py +0 -126
- flextool-4.3.0/flextool/user_dirs.py +0 -39
- flextool-4.3.0/flextool.egg-info/PKG-INFO +0 -245
- flextool-4.3.0/flextool.egg-info/SOURCES.txt +0 -578
- flextool-4.3.0/flextool.egg-info/entry_points.txt +0 -18
- flextool-4.3.0/flextool.egg-info/requires.txt +0 -41
- flextool-4.3.0/flextool_run_supervisor.py +0 -435
- flextool-4.3.0/pyproject.toml +0 -326
- flextool-4.3.0/tests/test_child_run_argv.py +0 -112
- flextool-4.3.0/tests/test_ci_shard.py +0 -66
- flextool-4.3.0/tests/test_comparison_excel.py +0 -139
- flextool-4.3.0/tests/test_comparison_project_root.py +0 -195
- flextool-4.3.0/tests/test_console_run_tool.py +0 -107
- flextool-4.3.0/tests/test_cost_aggregation_semantics.py +0 -1099
- flextool-4.3.0/tests/test_env_check.py +0 -991
- flextool-4.3.0/tests/test_env_knob_registry.py +0 -273
- flextool-4.3.0/tests/test_export_to_tabular.py +0 -1495
- flextool-4.3.0/tests/test_flowgroup_indicators.py +0 -325
- flextool-4.3.0/tests/test_lean_parquet.py +0 -159
- flextool-4.3.0/tests/test_open_results_db.py +0 -278
- flextool-4.3.0/tests/test_output_metadata_renderers.py +0 -259
- flextool-4.3.0/tests/test_output_work_folder_isolation.py +0 -321
- flextool-4.3.0/tests/test_plot_pipeline.py +0 -1326
- flextool-4.3.0/tests/test_recourse_cost_reconciliation.py +0 -103
- flextool-4.3.0/tests/test_representative_periods.py +0 -435
- flextool-4.3.0/tests/test_run_options.py +0 -224
- flextool-4.3.0/tests/test_scenarios.py +0 -515
- flextool-4.3.0/tests/test_solve_config.py +0 -141
- flextool-4.3.0/tests/test_thread_budget.py +0 -199
- flextool-4.3.0/tests/test_timings_csv.py +0 -150
- flextool-4.3.0/tests/test_unit_online_dt_columns.py +0 -170
- flextool-4.3.0/tests/test_user_dirs_isolation.py +0 -156
- flextool-4.3.0/tests/test_xlsx_v77_round_trip.py +0 -154
- {flextool-4.3.0 → flextool-4.4.0}/LICENSE.txt +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/README.md +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/_flextool_build.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/docs/interface_overview.md +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/__init__.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/_allocator.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/_mem_sampler.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/_resources.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/assistant/_files.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/assistant/backends/__init__.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/assistant/backends/_common.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/assistant/backends/anthropic_messages.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/assistant/cli.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/assistant/docs_store.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/assistant/endpoint.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/assistant/env_knobs.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/assistant/inputs/__init__.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/assistant/inputs/_schema.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/assistant/inputs/_values.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/assistant/keys.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/assistant/model_check.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/assistant/model_list_cache.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/assistant/model_versions.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/assistant/net.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/assistant/pacing.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/assistant/probes.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/assistant/project.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/assistant/redact.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/assistant/results/__init__.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/assistant/runtime_context.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/assistant/settings.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/assistant/textsearch.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/assistant/thoughts.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/assistant/tiers.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/assistant/tools/__init__.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/calibrate/__init__.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/calibrate/_final_outputs.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/calibrate/_guard.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/calibrate/_solve_status.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/cli/__init__.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/cli/_timing.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/cli/cmd_export_to_tabular.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/cli/cmd_read_matpower.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/cli/cmd_read_self_describing_tabular_input.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/cli/cmd_update_flextool.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/common_utils/__init__.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/common_utils/plot_mem_shape.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/decomposition/__init__.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/decomposition/region_decomposition.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/decomposition/region_filter.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/docs_build/catalogue.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/engine/__init__.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/engine/_csv_reload/__init__.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/engine/_csv_reload/_field_seeds.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/engine/_csv_reload/_meta.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/engine/_csv_reload/_seed.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/engine/_csv_reload/_stamp.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/engine/_csv_reload/_topology.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/engine/autoscale/__init__.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/engine/autoscale/_config.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/engine/autoscale/_report.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/engine/input/__init__.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/engine/input/_axis_enums.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/engine/input/_constants.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/engine/input/_input_source.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/engine/input/_timeline_rules.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/engine/model/__init__.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/engine/model/_common.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/engine/model/_delay.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/engine/model/_lead_time.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/engine/model/_pdt_join.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/engine/model/_unit_floors.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/engine/output/__init__.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/engine/output/_prices.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/engine/preprocess/__init__.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/engine/preprocess/_dump_stamp.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/engine/preprocess/_flex_data_provider.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/engine/preprocess/_input_writer.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/engine/preprocess/_invest_seeds.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/engine/preprocess/_provider_io.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/engine/preprocess/_provider_translators.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/engine/preprocess/_solve_context.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/engine/preprocess/_stochastic_detect.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/engine/preprocess/emit/__init__.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/engine/preprocess/emit/_blocks.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/engine/preprocess/emit/_calc_params.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/engine/preprocess/emit/_energy_margin.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/engine/preprocess/emit/_inflow_scaling.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/engine/preprocess/emit/_lp_scaling.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/engine/preprocess/emit/_mid_sets.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/engine/preprocess/params/__init__.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/engine/preprocess/params/_block.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/engine/preprocess/params/_block_layout.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/engine/preprocess/params/_mintime.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/engine/preprocess/params/_per_solve_sets.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/engine/preprocess/params/_retire_existing.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/engine/preprocess/params/_run_calendar.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/engine/solve/__init__.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/engine/solve/_determinism.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/engine_polars/__init__.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/export_to_tabular/__init__.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/export_to_tabular/excel_writer.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/export_to_tabular/formatting.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/export_to_tabular/sheet_config.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/gui/__init__.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/gui/assistant/__init__.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/gui/assistant/chat_window.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/gui/assistant/entry.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/gui/assistant/fonts.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/gui/assistant/gate.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/gui/assistant/geometry.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/gui/assistant/gui_state.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/gui/assistant/markdown_stream.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/gui/assistant/settings_dialog.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/gui/check_tree.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/gui/config_parser.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/gui/db_editor_integration.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/gui/dialogs/__init__.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/gui/dialogs/file_picker.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/gui/dialogs/group_picker.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/gui/dialogs/migration_progress_dialog.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/gui/dialogs/update_dialog.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/gui/downsampling.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/gui/error_handling.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/gui/hover_tooltip.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/gui/plot_cache.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/gui/plot_canvas.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/gui/plot_config_reader.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/gui/scenario_key.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/gui/solve_reader.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/gui/tree_reorder.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/gui/ui_metrics.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/input_derivation/_commodity_ladder.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/input_derivation/_commodity_ladder_sets.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/input_derivation/_method_constants.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/input_derivation/_process_method.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/model_builder/__init__.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/model_builder/encoding.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/model_builder/names.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/model_builder/profiles.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/plot_outputs/__init__.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/plot_outputs/axis_helpers.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/plot_outputs/legend_helpers.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/plot_outputs/perf.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/plot_outputs/plot_bars_detail.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/plot_outputs/subplot_helpers.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/process_inputs/__init__.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/process_inputs/import_old_excel_input.json +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/process_inputs/read_self_describing_excel.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/process_inputs/read_tabular_with_specification.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/process_inputs/write_self_describing_to_db.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/process_outputs/__init__.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/process_outputs/_fan_labels.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/process_outputs/_inmemory_helpers.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/process_outputs/_timeline_breaks.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/process_outputs/calc_connections.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/process_outputs/handoff_writers.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/process_outputs/out_capacity.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/process_outputs/persist_realized_slice.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/process_outputs/process_results.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/process_outputs/union_realized_slice.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/representative_periods/__init__.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/representative_periods/clustering.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/representative_periods/force_include.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/representative_periods/netload.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/representative_periods/netload_inputs.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/representative_periods/scenario_stack.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/representative_periods/weights.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/scenario_comparison/__init__.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/scenario_comparison/config_builder.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/scenario_comparison/constants.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/scenario_comparison/dispatch_mappings.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/scenario_comparison/plan_union.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/scenario_comparison/plot_settings_seed.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/schemas/AXIS_CONTRACT.md +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/schemas/comparison_settings_template.json +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/schemas/flextool_axis_contract.json +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/schemas/flextool_axis_contract.schema.json +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/schemas/output_info_template.json +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/schemas/output_settings_template.json +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/schemas/pre_v26/flextool_template_constant_default.json +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/schemas/pre_v26/flextool_template_default_optional_output.json +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/schemas/pre_v26/flextool_template_default_value.json +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/schemas/pre_v26/flextool_template_drop_down.json +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/schemas/pre_v26/flextool_template_lifetime_method.json +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/schemas/pre_v26/flextool_template_optional_outputs.json +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/schemas/pre_v26/flextool_template_output_node_flows.json +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/schemas/pre_v26/flextool_template_results_master.json +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/schemas/pre_v26/flextool_template_rolling_start_remove.json +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/schemas/pre_v26/flextool_template_rolling_window.json +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/schemas/pre_v26/flextool_template_storage_binding_defaults.json +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/schemas/pre_v26/flextool_template_v2.json +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/schemas/pre_v26/flextool_template_v25.json +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/solver_config/highs.opt.template +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/spinedb_backend/__init__.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/spinedb_backend/_axis_enums.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/update_flextool/bundle_install.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/update_flextool/ensure_settings_db.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/update_flextool/extend_tests_fixture.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/update_flextool/generate_canonical.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool/update_flextool/test_fixtures.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool.egg-info/dependency_links.txt +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool.egg-info/top_level.txt +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/flextool_assistant_entry.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/setup.cfg +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_bar_layout.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_bar_sub_pixel_labels.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_blocks.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_branch_weights.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_color_template.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_commodity_ladder_rolling.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_complete_period_share_reduction.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_connection_node_warnings.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_cost_breakdown_by_entity.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_csv_dump_roundtrip.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_dc_power_flow.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_dispatch_consumer_and_connection_signs.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_dispatch_node_debug_and_tree.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_dispatch_order_specials.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_dispatch_scenario_tag.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_ensure_settings_db.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_entity_unitsize_invariant.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_entity_universe_carrier.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_extend_tests_fixture.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_force_include.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_group_output_warnings.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_handoff_writers.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_input_entity_colors.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_lh2_three_region.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_min_load_rolling.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_non_anticipativity.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_old_flextool_importer_schema_drift.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_output_column_metadata.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_output_csv_names.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_parameter_group_coverage.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_plan_union.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_plot_draw_order.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_plot_plan_chunk_reconstruction.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_plot_plan_time_labels_roundtrip.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_plot_settings_seed.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_read_highs_solution.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_regional_filter.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_rolling_online_carry.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_rolling_online_mintime_carry.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_rolling_online_minuptime.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_rp_alternative_name.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_rp_force_include_wiring.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_rp_solves_filter.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_scenario_colors.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_scenario_stack.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_self_describing_reader.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_shared_axis_manifest.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_simple_bar_entity_color.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_solve_reader.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_stream_concat_temp_cleanup.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_support_load.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_synthesize_invest_dual.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_timeline_breaks.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_unidirectional_connection.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_v52_migration.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_v63_migration.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_v64_migration.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_v65_migration.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_v66_migration.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_v67_migration.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_v68_migration.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_v69_migration.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_v70_migration.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_workdir_empty_default.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_xlsx_workflow.py +0 -0
- {flextool-4.3.0 → flextool-4.4.0}/tests/test_years_represented.py +0 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# The sdist carries what the wheel build needs beyond the package: the build step that copies the
|
|
2
|
+
# documentation into the package (_flextool_build.py, setuptools cmdclass build_py) and the Markdown files it
|
|
3
|
+
# copies. The list equals CURATED_DOCS of flextool/docs_build/scope.py (tests/docs/test_generated_docs.py).
|
|
4
|
+
include _flextool_build.py
|
|
5
|
+
include docs/index.md
|
|
6
|
+
include docs/interface_overview.md
|
|
7
|
+
include docs/install_gui.md
|
|
8
|
+
include docs/install_toolbox.md
|
|
9
|
+
include docs/tutorial.md
|
|
10
|
+
include docs/reference/index.md
|
|
11
|
+
include docs/reference/entities_and_time.md
|
|
12
|
+
include docs/reference/nodes.md
|
|
13
|
+
include docs/reference/units.md
|
|
14
|
+
include docs/reference/connections.md
|
|
15
|
+
include docs/reference/commodities.md
|
|
16
|
+
include docs/reference/groups.md
|
|
17
|
+
include docs/reference/flow_groups.md
|
|
18
|
+
include docs/reference/reserves.md
|
|
19
|
+
include docs/reference/user_constraints.md
|
|
20
|
+
include docs/reference/parameter_groups.md
|
|
21
|
+
include docs/how_to/index.md
|
|
22
|
+
include docs/how_to/basics.md
|
|
23
|
+
include docs/how_to/storage_hydro.md
|
|
24
|
+
include docs/how_to/thermal_chp.md
|
|
25
|
+
include docs/how_to/investment.md
|
|
26
|
+
include docs/how_to/solve_sequences.md
|
|
27
|
+
include docs/how_to/stochastics.md
|
|
28
|
+
include docs/how_to/emissions.md
|
|
29
|
+
include docs/how_to/outputs.md
|
|
30
|
+
include docs/how_to/performance.md
|
|
31
|
+
include docs/results.md
|
|
32
|
+
include docs/reading_results.md
|
|
33
|
+
include docs/advanced_concepts.md
|
|
34
|
+
include docs/limitations.md
|
|
35
|
+
include docs/flextool_gui_interface.md
|
|
36
|
+
include docs/spine_toolbox.md
|
|
37
|
+
include docs/spine_database.md
|
|
38
|
+
include docs/excel_interface.md
|
|
39
|
+
include docs/terminal_workflow.md
|
|
40
|
+
include docs/ai_assistant.md
|
|
41
|
+
include docs/env_vars.md
|
|
42
|
+
include docs/solvers/index.md
|
|
43
|
+
include docs/solvers/highs.md
|
|
44
|
+
include docs/solvers/gurobi.md
|
|
45
|
+
include docs/solvers/cplex.md
|
|
46
|
+
include docs/solvers/xpress.md
|
|
47
|
+
include docs/solvers/copt.md
|
|
48
|
+
include docs/dev/architecture.md
|
|
49
|
+
include docs/dev/slack_convention.md
|
|
50
|
+
include docs/dev/engine.md
|
flextool-4.4.0/PKG-INFO
ADDED
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: flextool
|
|
3
|
+
Version: 4.4.0
|
|
4
|
+
Summary: IRENA FlexTool is an energy and power systems model for understanding the role of variable power generation in future energy systems.
|
|
5
|
+
Author: IRENA FlexTool contributors
|
|
6
|
+
License: © International Renewable Energy Agency 2018-2022
|
|
7
|
+
|
|
8
|
+
The FlexTool is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License
|
|
9
|
+
as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
|
10
|
+
|
|
11
|
+
The FlexTool is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
12
|
+
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
|
13
|
+
|
|
14
|
+
You should have received a copy of the GNU Lesser General Public License along with the FlexTool.
|
|
15
|
+
If not, see <https://www.gnu.org/licenses/>.
|
|
16
|
+
|
|
17
|
+
Author: Juha Kiviluoma (2017-2022), VTT Technical Research Centre of Finland
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
-----------------------------------------------
|
|
23
|
+
IRENA FlexTool uses the HiGHS solver, which has its own license.
|
|
24
|
+
HiGHS is licensed with MIT license. Please see https://github.com/ERGO-Code/HiGHS for more information.
|
|
25
|
+
Project-URL: Documentation, https://irena-flextool.github.io/flextool/
|
|
26
|
+
Project-URL: Repository, https://github.com/irena-flextool/flextool
|
|
27
|
+
Project-URL: Issues, https://github.com/irena-flextool/flextool/issues
|
|
28
|
+
Keywords: energy-systems,optimization,linear-programming,mixed-integer-programming,power-systems,investment-planning,highs,spine
|
|
29
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
30
|
+
Classifier: Intended Audience :: Science/Research
|
|
31
|
+
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
|
|
32
|
+
Classifier: Operating System :: OS Independent
|
|
33
|
+
Classifier: Programming Language :: Python :: 3
|
|
34
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
35
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
36
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
37
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
38
|
+
Classifier: Topic :: Scientific/Engineering
|
|
39
|
+
Requires-Python: >=3.11
|
|
40
|
+
Description-Content-Type: text/markdown
|
|
41
|
+
License-File: LICENSE.txt
|
|
42
|
+
Requires-Dist: polar-high>=3.14.0
|
|
43
|
+
Requires-Dist: highspy<1.16,>=1.15.1
|
|
44
|
+
Requires-Dist: polars<3,>=1.40
|
|
45
|
+
Requires-Dist: pandas<4,>=2.2.3
|
|
46
|
+
Requires-Dist: spinedb-api<0.37,>=0.36.5
|
|
47
|
+
Requires-Dist: openpyxl
|
|
48
|
+
Requires-Dist: odfpy
|
|
49
|
+
Requires-Dist: python-calamine
|
|
50
|
+
Requires-Dist: xlsxwriter
|
|
51
|
+
Requires-Dist: pyyaml
|
|
52
|
+
Requires-Dist: matplotlib
|
|
53
|
+
Requires-Dist: psutil
|
|
54
|
+
Requires-Dist: sv-ttk
|
|
55
|
+
Requires-Dist: screeninfo
|
|
56
|
+
Requires-Dist: pywin32; sys_platform == "win32"
|
|
57
|
+
Requires-Dist: platformdirs>=4
|
|
58
|
+
Requires-Dist: jsonschema>=4.18
|
|
59
|
+
Requires-Dist: mcp<3,>=2.3
|
|
60
|
+
Requires-Dist: anthropic<3,>=2.6
|
|
61
|
+
Requires-Dist: openai<4,>=3.46
|
|
62
|
+
Requires-Dist: keyring>=25
|
|
63
|
+
Provides-Extra: toolbox
|
|
64
|
+
Requires-Dist: spinetoolbox; extra == "toolbox"
|
|
65
|
+
Provides-Extra: viewer
|
|
66
|
+
Requires-Dist: tsdownsample>=0.1.3; extra == "viewer"
|
|
67
|
+
Requires-Dist: networkx>=3.0; extra == "viewer"
|
|
68
|
+
Provides-Extra: compat
|
|
69
|
+
Requires-Dist: polars[rtcompat]<3,>=1.40; extra == "compat"
|
|
70
|
+
Provides-Extra: engine-polars
|
|
71
|
+
Provides-Extra: dev
|
|
72
|
+
Requires-Dist: pytest>=8.0; extra == "dev"
|
|
73
|
+
Requires-Dist: pytest-timeout>=2.3; extra == "dev"
|
|
74
|
+
Requires-Dist: pytest-xdist>=3.0; extra == "dev"
|
|
75
|
+
Requires-Dist: ruff>=0.5; extra == "dev"
|
|
76
|
+
Dynamic: license-file
|
|
77
|
+
|
|
78
|
+
[](https://pypi.org/project/flextool/)
|
|
79
|
+
[](https://irena-flextool.github.io/flextool/)
|
|
80
|
+
[](https://www.python.org/downloads/release/python-3120/)
|
|
81
|
+
|
|
82
|
+

|
|
83
|
+
|
|
84
|
+
IRENA FlexTool is an energy and power systems model for understanding the role of variable power generation in future energy systems. It performs capacity expansion planning as well as operational planning.
|
|
85
|
+
|
|
86
|
+
> [!NOTE]
|
|
87
|
+
> The previous `master` branch is deprecated and no longer updated — `main` is
|
|
88
|
+
> now FlexTool. If you still run FlexTool from `master`, migrate with a fresh
|
|
89
|
+
> parallel install (separate directory and venv); see
|
|
90
|
+
> [Installation](#installation) so your existing setup is left untouched.
|
|
91
|
+
|
|
92
|
+
## What's new
|
|
93
|
+
|
|
94
|
+
- **A lot faster.** The model build and pre-processing now run as pure Python
|
|
95
|
+
instead of the previous GLPSOL-based text pre-processing and AMPL-style model
|
|
96
|
+
translation. There is no LP file written to disk and re-read between build and
|
|
97
|
+
solve.
|
|
98
|
+
- **Automatic problem scaling.** The `polar-high` matrix layer automatically
|
|
99
|
+
scales the optimisation problem before it reaches the solver. Better numerical
|
|
100
|
+
conditioning often speeds up the HiGHS solve considerably — sometimes
|
|
101
|
+
dramatically — so total run time usually improves well beyond the faster build
|
|
102
|
+
alone. The solver is still HiGHS; the gain comes from handing it a
|
|
103
|
+
better-conditioned problem.
|
|
104
|
+
- **A new, easy-to-use interface.** The **FlexTool GUI** is a standalone
|
|
105
|
+
application (`python -m flextool.gui`) that manages projects and input
|
|
106
|
+
sources, runs scenarios, and lets you **browse the results** — a result viewer
|
|
107
|
+
reads outputs directly and supports single-scenario, scenario-comparison, and
|
|
108
|
+
network-graph views with keyboard navigation. See the
|
|
109
|
+
[FlexTool GUI guide](https://irena-flextool.github.io/flextool/flextool_gui_interface/).
|
|
110
|
+
- **Spine Toolbox is still a parallel interface.** Advanced users who build
|
|
111
|
+
multi-tool workflows or integrate FlexTool with other models can keep using
|
|
112
|
+
the [Spine Toolbox workflow](https://irena-flextool.github.io/flextool/spine_toolbox/).
|
|
113
|
+
- **The same model and data.** Existing input databases continue to work; the
|
|
114
|
+
change is in how the matrix is generated and solved, not in the model
|
|
115
|
+
formulation.
|
|
116
|
+
|
|
117
|
+
This is IRENA FlexTool v4 (see the current version in CHANGELOG.md). Report any bugs or difficulties in the [issue tracker](https://github.com/irena-flextool/flextool/issues).
|
|
118
|
+
The previous version of IRENA FlexTool can be found in https://www.irena.org/energytransition/Energy-System-Models-and-Data/IRENA-FlexTool.
|
|
119
|
+
|
|
120
|
+
## Under the hood: Rust-based matrix generation
|
|
121
|
+
|
|
122
|
+
FlexTool is a thin Python layer over a Rust engine. It reads its input data and
|
|
123
|
+
builds the optimisation matrix as [polars](https://pola.rs/) DataFrames via
|
|
124
|
+
[`polar-high`](https://github.com/nodal-tools/polar-high), then solves with
|
|
125
|
+
[HiGHS](https://highs.dev/). Variables and parameters are polars frames, so
|
|
126
|
+
multiplications become joins and aggregations become group-bys — the heavy
|
|
127
|
+
coefficient work runs inside polars' Rust core rather than as per-coefficient
|
|
128
|
+
Python objects, and the matrix goes straight to HiGHS through `highspy` with no
|
|
129
|
+
intermediate LP/MPS file. `polar-high` is a general-purpose, domain-free
|
|
130
|
+
modelling layer published separately (Apache-2.0, `pip install polar-high`); it
|
|
131
|
+
also applies the automatic problem scaling noted above, and its
|
|
132
|
+
[benchmark](https://nodal-tools.fi/polar-high/compare/benchmark/) compares it
|
|
133
|
+
against linopy and Pyomo on the same HiGHS solver.
|
|
134
|
+
|
|
135
|
+
## Installation
|
|
136
|
+
|
|
137
|
+
### Check your Python (and possibly install it)
|
|
138
|
+
|
|
139
|
+
FlexTool requires **Python 3.11+**, 64-bit Windows 10 or 11, Linux or macOS, and on
|
|
140
|
+
Intel/AMD computers a processor with SSE4.2 and POPCNT (x86-64-v2: Intel Core
|
|
141
|
+
i3/i5/i7 from 2009 on, AMD FX or Ryzen; not Core 2 or Phenom II). A processor with
|
|
142
|
+
AVX2 (most from 2013 on) runs the fastest build. Windows 7 and 8.1 cannot run FlexTool 4.
|
|
143
|
+
If a library reports "DLL load failed" on Windows, install the Microsoft Visual C++ Redistributable (x64, https://aka.ms/vs/17/release/vc_redist.x64.exe).
|
|
144
|
+
|
|
145
|
+
Open a terminal (Windows: Command Prompt or PowerShell; macOS: Terminal; Linux: your shell)
|
|
146
|
+
and check which Python you have:
|
|
147
|
+
|
|
148
|
+
| Platform | Command |
|
|
149
|
+
|---|---|
|
|
150
|
+
| Windows | `py --version` (falls back to `python --version`) |
|
|
151
|
+
| macOS / Linux | `python3 --version` |
|
|
152
|
+
|
|
153
|
+
The output looks like `Python 3.12.4`. If the command is not found, prints
|
|
154
|
+
something below 3.11, or (on Windows) opens the Microsoft Store, install Python
|
|
155
|
+
from https://www.python.org/downloads/ — on Windows tick
|
|
156
|
+
**"Add python.exe to PATH"** in the installer. Then close and reopen the
|
|
157
|
+
terminal so the new PATH takes effect.
|
|
158
|
+
|
|
159
|
+
> On Windows, use `py` in place of `python` in the commands below if `python`
|
|
160
|
+
> is not recognised. If several versions are installed, `py -3.11 --version`
|
|
161
|
+
> (or `-3.12`, …) picks a specific one, and `py -0` lists them all.
|
|
162
|
+
> On macOS/Linux, `python` often means Python 2 or does not exist at all, so
|
|
163
|
+
> use `python3`. Inside an activated virtual environment, plain `python` always
|
|
164
|
+
> means that environment's Python on every platform.
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
### Install from PyPI (recommended)
|
|
168
|
+
|
|
169
|
+
Install FlexTool into a virtual environment to keep its packages separate from
|
|
170
|
+
other Python applications. If you want to install into the base Python (perhaps
|
|
171
|
+
because you do not otherwise use Python), just run the last `pip install`
|
|
172
|
+
command from below.
|
|
173
|
+
|
|
174
|
+
```
|
|
175
|
+
python -m venv .venv # Windows: py -m venv .venv
|
|
176
|
+
# macOS/Linux: python3 -m venv .venv
|
|
177
|
+
# activate — Windows PowerShell: .\.venv\Scripts\Activate.ps1
|
|
178
|
+
# Windows CMD: .\.venv\Scripts\activate.bat
|
|
179
|
+
# Linux / macOS: . .venv/bin/activate
|
|
180
|
+
python -m pip install --upgrade pip
|
|
181
|
+
pip install "flextool[toolbox,viewer]"
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
The `[toolbox,viewer]` extras add the Spine Toolbox database editor (for editing
|
|
185
|
+
and viewing input and result databases) and the network-graph result view. To
|
|
186
|
+
install without Spine Toolbox (edit/view data in a spreadsheet only), you can
|
|
187
|
+
use plain `pip install flextool`.
|
|
188
|
+
|
|
189
|
+
On a processor without AVX2 (for example a Celeron/Pentium laptop up to about 2021, an
|
|
190
|
+
Intel Core from before 2013 or an AMD FX), add the `compat` extra:
|
|
191
|
+
`pip install "flextool[toolbox,viewer,compat]"`. It installs the compatible build of the
|
|
192
|
+
`polars` data library, which is about 10-30% slower but runs on any x86-64-v2 processor.
|
|
193
|
+
When FlexTool finds such a processor without the compatible build, it says why and gives
|
|
194
|
+
the pip command: in a terminal it asks "Run it now? [y/N]" and installs only on yes;
|
|
195
|
+
without a terminal (a Spine Toolbox tool, CI) it stops with that message; the GUI asks at
|
|
196
|
+
startup, before it loads polars (in its terminal, or in a yes/no dialog from a shortcut), and `flextool-update` installs it. `python -m flextool.env_check`
|
|
197
|
+
reports what it found.
|
|
198
|
+
|
|
199
|
+
Your prompt should now show `(.venv)`. Verify with `python --version` — it
|
|
200
|
+
should report 3.11 or newer.
|
|
201
|
+
|
|
202
|
+
(If PowerShell blocks the activate script, run once per user:
|
|
203
|
+
`Set-ExecutionPolicy -Scope CurrentUser RemoteSigned`.)
|
|
204
|
+
|
|
205
|
+
Launch the FlexTool GUI:
|
|
206
|
+
|
|
207
|
+
```
|
|
208
|
+
flextool
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
— equivalently `python -m flextool.gui`. The GUI creates and manages your
|
|
212
|
+
projects and input databases; to seed the bundled template and example
|
|
213
|
+
databases (handy for the CLI or Spine Toolbox workflows) run `flextool-update`.
|
|
214
|
+
|
|
215
|
+
### Install from source (developers / latest `main`)
|
|
216
|
+
|
|
217
|
+
To participate in FlexTool development — or to run the not-yet-released `main`
|
|
218
|
+
— clone the repo and install it editable:
|
|
219
|
+
|
|
220
|
+
```powershell
|
|
221
|
+
git clone https://github.com/irena-flextool/flextool.git
|
|
222
|
+
cd flextool
|
|
223
|
+
python -m venv .venv
|
|
224
|
+
.\.venv\Scripts\Activate.ps1 # Linux / macOS: . .venv/bin/activate
|
|
225
|
+
python -m pip install --upgrade pip
|
|
226
|
+
pip install -e .
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
The editable install picks up source changes on `git pull`; re-run
|
|
230
|
+
`pip install -e .` only when a dependency pin in `pyproject.toml` changes.
|
|
231
|
+
|
|
232
|
+
### Update FlexTool:
|
|
233
|
+
|
|
234
|
+
```
|
|
235
|
+
# If using virtual environment (venv), then activate venv first:
|
|
236
|
+
# Windows PowerShell: .\.venv\Scripts\Activate.ps1
|
|
237
|
+
# Windows CMD: .\.venv\Scripts\activate.bat
|
|
238
|
+
# Linux / macOS: . .venv/bin/activate
|
|
239
|
+
pip install --upgrade flextool
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
## [Documentation](https://irena-flextool.github.io/flextool/) and [installation](https://irena-flextool.github.io/flextool/install_toolbox/)
|
|
243
|
+
|
|
244
|
+
> [!IMPORTANT]
|
|
245
|
+
> Installation, user guide and ***documentation*** can be found at: https://irena-flextool.github.io/flextool/.
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
# Advanced Concepts
|
|
2
|
+
|
|
3
|
+
## Penalties
|
|
4
|
+
|
|
5
|
+
FlexTool uses penalty (slack) variables to relax constraints that might otherwise cause infeasibility. Each penalty has a very high cost in the objective function that makes the optimizer try to avoid these violations unless no other option is viable.
|
|
6
|
+
|
|
7
|
+
### How penalties work
|
|
8
|
+
|
|
9
|
+
When a constraint cannot be satisfied (e.g., demand exceeds available supply), a slack variable absorbs the deficit. The cost of this violation is added to the objective function. The penalty cost should therefore be set high enough to prevent violations unless there is genuinely no feasible alternative, but not so high that it causes numerical issues. The penalty could also be based on perceived cost of the violation: e.g. value of lost load in case of node balance violation.
|
|
10
|
+
|
|
11
|
+
### Penalty scaling with time
|
|
12
|
+
|
|
13
|
+
Most penalties scale with the duration of the violation -- a 3-hour violation costs 3 times as much as a 1-hour violation. The table below summarizes how each penalty is treated:
|
|
14
|
+
|
|
15
|
+
| Penalty parameter | Unit | Constraint type | Scales with step_duration | Notes |
|
|
16
|
+
|---|---|---|---|---|
|
|
17
|
+
| `penalty_up` (node) | CUR/MWh | Energy balance | Yes | Cost per MWh of energy not served |
|
|
18
|
+
| `penalty_down` (node) | CUR/MWh | Energy balance | Yes | Cost per MWh of excess energy |
|
|
19
|
+
| `penalty_reserve` (reserve group) | CUR/MW | Reserve requirement | Yes | Cost per MW-hour of reserve shortfall |
|
|
20
|
+
| `penalty_inertia` (group) | CUR/MWs | Inertia requirement | Yes | Cost per MWs-hour of inertia shortfall |
|
|
21
|
+
| `penalty_non_synchronous` (group) | CUR/MWh | Non-synchronous limit | Yes | Cost per MWh of non-sync limit violation |
|
|
22
|
+
| `penalty_capacity_margin` (group) | CUR/kW | Capacity margin | No | Cost per kW of capacity shortfall per period. Analogous to investment cost -- but not annualized. It still has operational inflation adjustment. |
|
|
23
|
+
|
|
24
|
+
### Capacity margin penalty
|
|
25
|
+
|
|
26
|
+
The capacity margin penalty is different from the others: it represents the cost of not having sufficient installed capacity. It is analogous to an investment cost (CUR/kW) but is NOT annualized over a lifetime like actual investments. Instead, it applies as a lump cost per period. This means a `penalty_capacity_margin` of 1000 CUR/kW is much more expensive than an `invest_cost` of 1000 CUR/kW (which would be annualized to roughly 50-100 CUR/kW/year depending on lifetime and discount rate). Set the penalty to reflect the annual cost of capacity shortfall, not the total investment cost.
|
|
27
|
+
|
|
28
|
+
## Economic Modelling
|
|
29
|
+
|
|
30
|
+
### Overview
|
|
31
|
+
|
|
32
|
+
FlexTool minimizes total system cost over a planning horizon. The economic framework uses two key rates:
|
|
33
|
+
|
|
34
|
+
- **`inflation_rate`** (model-level): Adjusts for general price level changes over time. Whether to use inlfation_rate depends on whether you use real or nominal values elsewhere in the input data - be consistent.
|
|
35
|
+
- **`discount_rate`** (per technology): Reflects the financing cost and risk of each investment
|
|
36
|
+
|
|
37
|
+
### Real vs nominal values
|
|
38
|
+
|
|
39
|
+
Economic values can be expressed in two ways:
|
|
40
|
+
|
|
41
|
+
- **Real (constant prices)**: All values are expressed in today's money. A power plant that costs 1000 EUR/kW today still costs 1000 EUR/kW in 2040 in real terms -- the purchasing power is the same.
|
|
42
|
+
- **Nominal (current prices)**: Values include inflation. The same plant might cost 1300 EUR/kW in 2040 at 2% annual inflation, even though its real cost hasn't changed.
|
|
43
|
+
|
|
44
|
+
**Example**: A coal plant costs 1500 EUR/kW today. At 2% inflation:
|
|
45
|
+
|
|
46
|
+
- Real cost in 2035: 1500 EUR/kW (unchanged)
|
|
47
|
+
- Nominal cost in 2035: 1500 x (1.02)^10 = 1829 EUR/kW approximately
|
|
48
|
+
|
|
49
|
+
**Rule**: Never mix real and nominal values in the same model. If `inflation_rate` = 0, all inputs must be in real terms. If `inflation_rate` > 0, all inputs must be in nominal terms.
|
|
50
|
+
|
|
51
|
+
### The inflation rate
|
|
52
|
+
|
|
53
|
+
The model-level `inflation_rate` parameter (default: 0) adjusts all future costs to a common price base. It applies uniformly to all cost types: investment costs, fuel costs, fixed O&M, penalties, etc.
|
|
54
|
+
|
|
55
|
+
- **Real inputs** (most common): Set `inflation_rate` = 0. All costs in all years use today's prices. A fuel cost of 50 EUR/MWh means the same purchasing power whether it occurs in 2025 or 2040. To discount future costs with a social discount rate, set `inflation_rate` to that rate instead (see [Discounting between milestone years](#discounting-between-milestone-years)).
|
|
56
|
+
- **Nominal inputs**: Set `inflation_rate` to expected inflation (e.g., 0.02 for 2%). The model deflates future costs: a nominal cost of 60 EUR/MWh in 2035 is treated as 60 / (1.02)^10 = 49.2 EUR/MWh approximately in today's money.
|
|
57
|
+
|
|
58
|
+
The inflation rate applies via the factor `1 / (1 + inflation_rate)^years`. Investment costs are assumed to occur at the beginning of each year; operational costs at the middle of the year (adjustable with `inflation_offset_investment` and `inflation_offset_operations`).
|
|
59
|
+
|
|
60
|
+
### Discounting between milestone years
|
|
61
|
+
|
|
62
|
+
**Only `inflation_rate` discounts.** FlexTool discounts the costs of later periods (milestone years) with the `model` parameter `inflation_rate` and nothing else. Each period's costs are multiplied by a discount factor: the sum, over the years the period represents, of `1 / (1 + inflation_rate)^years_from_start`. The per-technology `discount_rate` does not discount between periods: it only turns an `invest_cost` into a yearly payment (see [The discount rate](#the-discount-rate-per-technology)).
|
|
63
|
+
|
|
64
|
+
**How the years are counted.** The years from the start of the run come from `years_represented`: a period starts after the years that the periods before it represent. The period names are only labels, so *p2030* is not read as the year 2030. Give each milestone the number of years until the next milestone (for example 5 for *p2025* when the next period is *p2030*). Investment costs are discounted from the start of a year (`inflation_offset_investment`, default 0), operating costs from the middle of it (`inflation_offset_operations`, default 0.5).
|
|
65
|
+
|
|
66
|
+
**With `inflation_rate` 0 there is no discounting.** A cost in 2040 then weighs the same as the same cost in 2025: each period's yearly costs are only multiplied by its `years_represented`. This is right for a model in real terms that should not prefer earlier or later costs, but it is not what most planning studies want.
|
|
67
|
+
|
|
68
|
+
**A social discount rate.** In a model with real (constant-price) inputs, enter the social discount rate as `inflation_rate`, for example 0.05 for 5 %. The model applies the same factor whether the rate stands for inflation or for time preference, so the discounted costs are then present values at that rate. Keep the per-technology `discount_rate` at the real cost of capital of each technology. In a model with nominal inputs, use the combined rate: (1 + inflation) × (1 + social discount rate) − 1.
|
|
69
|
+
|
|
70
|
+
**Where to see it.** `summary_solve.csv` lists the *Operational discount factor* and the *Investment discount factor* of each period. The cost results come both annualized (one year of the period, not discounted) and discounted (present value over the years the periods represent); see [Costs](results.md#costs).
|
|
71
|
+
|
|
72
|
+
### The discount rate (per technology)
|
|
73
|
+
|
|
74
|
+
Each unit, connection, and storage node can have its own `discount_rate` parameter (default: 0.05, i.e., 5%). This represents the **weighted average cost of capital (WACC)** -- the return that investors require to finance the technology.
|
|
75
|
+
|
|
76
|
+
The discount rate converts a lump-sum investment cost into annual payments over the technology's lifetime using the standard annuity formula:
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
annual_payment = invest_cost * discount_rate / (1 - (1 / (1 + discount_rate))^lifetime)
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
A `discount_rate` of 0 gives the straight-line annuity `invest_cost / lifetime` (no interest). Without a value the rate is 0.05; a negative rate is an input error. The `lifetime` has no default: it is required when the entity invests or retires with a cost (`invest_cost`, `salvage_value`), and when its `lifetime_method` is `reinvest_choice` or `no_investment` (also for existing capacity without investment), since the capacity then ends after the lifetime.
|
|
83
|
+
|
|
84
|
+
An `invest_method` other than `not_allowed` offers investment (retirement) in every investment period, also without an `invest_cost` (`salvage_value`) or where it is 0: that capacity has no annuity, and its `fixed_cost` still counts (a retirement saves it). A 0 in an `invest_cost` map therefore does not block investment in that period; to forbid investment in a period, use a period method (`invest_period`, `invest_period_total` or their `invest_retire_` forms) and set `invest_max_period` 0 for it; the other methods do not use `invest_max_period`. With neither `invest_cost` nor `fixed_cost` any invested amount is optimal, so the result is arbitrary. A zero-cost investment needs a `lifetime` only with `lifetime_method` `reinvest_choice` or `no_investment`.
|
|
85
|
+
|
|
86
|
+
**Example**: A solar plant costs 800 EUR/kW with a 25-year lifetime and 5% discount rate:
|
|
87
|
+
```
|
|
88
|
+
annual_payment = 800 * 0.05 / (1 - 1/1.05^25) = 800 * 0.0710 = 56.8 EUR/kW/year approximately
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Different technologies can have different discount rates reflecting their risk profiles:
|
|
92
|
+
|
|
93
|
+
- Low risk (e.g., established solar PV): 3-5%
|
|
94
|
+
- Medium risk (e.g., natural gas turbine): 5-7%
|
|
95
|
+
- High risk (e.g., novel technology): 8-12%
|
|
96
|
+
|
|
97
|
+
### Consistency between rates
|
|
98
|
+
|
|
99
|
+
The `discount_rate` and `inflation_rate` must use the same price basis across one model instance (either real or nominal):
|
|
100
|
+
|
|
101
|
+
| Inputs | inflation_rate | discount_rate (entity) |
|
|
102
|
+
|--------|---------------|----------------------|
|
|
103
|
+
| Real (constant prices) | 0, or the social discount rate | Real WACC (e.g., 5%) |
|
|
104
|
+
| Nominal (current and future prices) | Expected inflation (e.g., 2%) | Nominal WACC (e.g., 7%) |
|
|
105
|
+
|
|
106
|
+
The relationship between real and nominal rates follows the Fisher equation:
|
|
107
|
+
```
|
|
108
|
+
(1 + nominal_rate) = (1 + real_rate) * (1 + inflation_rate)
|
|
109
|
+
```
|
|
110
|
+
Approximation: nominal = real + inflation approximately (e.g., 5% + 2% = 7%).
|
|
111
|
+
|
|
112
|
+
### Fixed costs
|
|
113
|
+
|
|
114
|
+
Fixed costs (`fixed_cost` parameter on units, connections, and nodes) represent annual operation and maintenance costs that are incurred regardless of how much the asset is used. They are expressed in CUR/kW/year (or CUR/kWh/year for storage).
|
|
115
|
+
|
|
116
|
+
For **existing** assets, fixed costs are applied each year with inflation adjustment.
|
|
117
|
+
|
|
118
|
+
For **invested** assets, the fixed cost is paid in every period the new capacity operates within the model horizon: until its `lifetime` ends, or in every later period with `lifetime_method` *reinvest_automatic*. Each period's fixed cost is discounted like the other costs of that period. Years after the model horizon are not counted, the same as for the investment annuity, so the investment decision weighs the costs of the years the model covers. In the results, these costs are reported as a separate line item (*fixed cost invested*) from the investment annuity.
|
|
119
|
+
|
|
120
|
+
### Summary of economic parameters
|
|
121
|
+
|
|
122
|
+
| Parameter | Level | Default | Description |
|
|
123
|
+
|-----------|-------|---------|-------------|
|
|
124
|
+
| `inflation_rate` | Model | 0 | General inflation rate. Set to 0 for real inputs. |
|
|
125
|
+
| `inflation_offset_investment` | Model | 0 | When in the year investment costs occur (0 = start) |
|
|
126
|
+
| `inflation_offset_operations` | Model | 0.5 | When in the year operational costs occur (0.5 = middle) |
|
|
127
|
+
| `discount_rate` | Entity | 0.05 | Technology-specific WACC for annualizing investments; 0 gives invest_cost / lifetime |
|
|
128
|
+
| `invest_cost` | Entity | - | Overnight investment cost [CUR/kW] |
|
|
129
|
+
| `lifetime` | Entity | - | Economic lifetime [years]; required when the entity invests or retires with a cost |
|
|
130
|
+
| `fixed_cost` | Entity | - | Annual fixed O&M cost [CUR/kW/year] |
|
|
131
|
+
| `salvage_value` | Entity | - | Residual value at end of life [CUR/kW] |
|
|
132
|
+
|
|
133
|
+
### How multi-year periods are handled internally
|
|
134
|
+
|
|
135
|
+
A period can represent multiple years via the `years_represented` parameter on the solve entity. For example, a period `p2025` with `years_represented = 5` means that the modelled timeline (e.g., one representative week) stands in for 5 full years (2025-2029).
|
|
136
|
+
|
|
137
|
+
Internally, FlexTool expands this into per-year entries. A period with `years_represented = 5` becomes 5 rows in the solve data, each representing 1 year at a different distance from the start of the run (the first period of the model's first solve; a later solve counts the years of the earlier solves' periods first). The inflation factor then sums the per-year inflation adjustments:
|
|
138
|
+
|
|
139
|
+
```
|
|
140
|
+
inflation_factor = Σ_y p_years_represented[d,y] × 1/(1 + inflation_rate)^(years_from_run_start[d,y] + p_years_represented[d,y] × offset)
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
where `years_from_run_start[d,y]` is the start of year `y` of period `d` (a fractional year counts as its fraction: after a period of 2.5 years the next one starts at 2.5) and `offset` is `inflation_offset_investment` or `inflation_offset_operations`.
|
|
144
|
+
|
|
145
|
+
With `inflation_rate = 0`, each term contributes `p_years_represented[d,y] × 1 = 1`, and the sum equals `years_represented` (i.e., 5). With `inflation_rate = 2%`, each year is deflated slightly more, giving a sum of approximately 4.81.
|
|
146
|
+
|
|
147
|
+
This mechanism also supports fractional values. With `years_represented = 0.5` (half-year resolution for investment decisions), the inflation factor is `0.5 × 1/(1+π)^y`, correctly counting only half a year of costs.
|
|
148
|
+
|
|
149
|
+
In the objective function, operational costs follow this pattern:
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
cost_per_timestep × step_duration × inflation_factor / period_share_of_year
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
where `period_share_of_year = hours_in_period / 8760` converts the modelled period to an annual equivalent, and the inflation factor then scales across all represented years. Investment costs follow a similar pattern using a separate inflation factor that accounts for investment timing.
|
|
156
|
+
|
|
157
|
+
### Using periods that are not one year long
|
|
158
|
+
|
|
159
|
+
A period does not have to represent exactly one year. It can be shorter
|
|
160
|
+
(e.g. a half-year period for six-monthly investment decisions) or stand in
|
|
161
|
+
for several years (see *How multi-year periods are handled internally*).
|
|
162
|
+
FlexTool keeps the accounting correct for any period length — you mostly
|
|
163
|
+
just need to know what is scaled and what is not.
|
|
164
|
+
|
|
165
|
+
#### What a period's length means
|
|
166
|
+
|
|
167
|
+
Each period has a length derived from its modelled timeline,
|
|
168
|
+
`period_share_of_year = hours_in_period / 8760`. Investment granularity is set separately
|
|
169
|
+
with `years_represented` on the solve — including fractional values such
|
|
170
|
+
as `years_represented = 0.5` for half-year steps.
|
|
171
|
+
|
|
172
|
+
#### What stays correct automatically
|
|
173
|
+
|
|
174
|
+
- **Operating costs and energy balances are absolute.** They are summed
|
|
175
|
+
over the timesteps actually in the period, so a shorter period simply
|
|
176
|
+
incurs less; a longer one, more. No year constant enters these totals.
|
|
177
|
+
- **Annual (per-year) parameters are prorated by period length.** Annual
|
|
178
|
+
`fixed_cost`, for instance, is applied as `fixed_cost × period_share`, so
|
|
179
|
+
a half-year period pays half a year of fixed cost. Investment annuities
|
|
180
|
+
and discounting likewise use the period's (possibly fractional) year
|
|
181
|
+
count.
|
|
182
|
+
|
|
183
|
+
#### What "annualised" in the results means
|
|
184
|
+
|
|
185
|
+
The `..._annualized` result columns divide a period's totals by
|
|
186
|
+
`period_share_of_year` to express them as a per-year rate. This is only a
|
|
187
|
+
reporting convenience so that periods of different lengths can be compared
|
|
188
|
+
on the same footing — it does **not** change the optimisation or the
|
|
189
|
+
period totals. If you want the actual amount incurred in the period, read
|
|
190
|
+
the plain (non-annualised) total.
|
|
191
|
+
|
|
192
|
+
#### When NOT to rely on inflow scaling
|
|
193
|
+
|
|
194
|
+
The `inflow_method` options `scale_to_annual_flow`, `scale_in_proportion`
|
|
195
|
+
and `scale_to_annual_and_peak_flow` assume the modelled timeline is a
|
|
196
|
+
representative year: they normalise the inflow by its sum over (one year
|
|
197
|
+
of) the timeline. If your timeline is **not** a representative year — a
|
|
198
|
+
non-representative sub-year slice, or several years with genuinely
|
|
199
|
+
different shapes — do not use these methods. Instead provide an accurate
|
|
200
|
+
absolute inflow time series and leave `inflow_method` at its default
|
|
201
|
+
(`use_original`); then no annual assumption is applied to your inflow.
|
|
202
|
+
|
|
203
|
+
(There is no equivalent "scale to annual" for `profile`-based limits such
|
|
204
|
+
as capacity factors. A capacity factor is bounded by installed capacity,
|
|
205
|
+
so there is no easy way to scale it accurately.)
|
|
206
|
+
|
|
207
|
+
#### One approximation to be aware of
|
|
208
|
+
|
|
209
|
+
When a single period represents multiple years (`years_represented > 1`),
|
|
210
|
+
costs within that period are discounted at the period's single point in
|
|
211
|
+
time rather than year by year. The totals remain correct; only the
|
|
212
|
+
within-period discounting is approximated. Use shorter periods (more of
|
|
213
|
+
them) if you need finer discounting resolution.
|