flextool 4.2.2__tar.gz → 4.3.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.
Files changed (586) hide show
  1. flextool-4.3.0/MANIFEST.in +29 -0
  2. {flextool-4.2.2 → flextool-4.3.0}/PKG-INFO +7 -1
  3. flextool-4.3.0/_flextool_build.py +76 -0
  4. flextool-4.3.0/docs/advanced_concepts.md +193 -0
  5. flextool-4.3.0/docs/ai_assistant.md +708 -0
  6. flextool-4.3.0/docs/dev/architecture.md +1503 -0
  7. flextool-4.3.0/docs/dev/engine.md +1219 -0
  8. flextool-4.3.0/docs/dev/slack_convention.md +105 -0
  9. flextool-4.3.0/docs/env_vars.md +75 -0
  10. flextool-4.3.0/docs/excel_interface.md +200 -0
  11. flextool-4.3.0/docs/flextool_gui_interface.md +227 -0
  12. flextool-4.3.0/docs/how_to.md +1514 -0
  13. flextool-4.3.0/docs/index.md +58 -0
  14. flextool-4.3.0/docs/install_gui.md +221 -0
  15. flextool-4.3.0/docs/install_toolbox.md +189 -0
  16. flextool-4.3.0/docs/interface_overview.md +121 -0
  17. flextool-4.3.0/docs/reference.md +736 -0
  18. flextool-4.3.0/docs/results.md +295 -0
  19. flextool-4.3.0/docs/solvers/copt.md +134 -0
  20. flextool-4.3.0/docs/solvers/cplex.md +135 -0
  21. flextool-4.3.0/docs/solvers/gurobi.md +134 -0
  22. flextool-4.3.0/docs/solvers/highs.md +139 -0
  23. flextool-4.3.0/docs/solvers/index.md +237 -0
  24. flextool-4.3.0/docs/solvers/xpress.md +121 -0
  25. flextool-4.3.0/docs/spine_database.md +41 -0
  26. flextool-4.3.0/docs/spine_toolbox.md +215 -0
  27. flextool-4.3.0/docs/terminal_workflow.md +567 -0
  28. flextool-4.3.0/docs/tutorial.md +246 -0
  29. {flextool-4.2.2 → flextool-4.3.0}/flextool/_thread_budget.py +47 -7
  30. flextool-4.3.0/flextool/assistant/__init__.py +5 -0
  31. flextool-4.3.0/flextool/assistant/_files.py +742 -0
  32. flextool-4.3.0/flextool/assistant/backends/__init__.py +1 -0
  33. flextool-4.3.0/flextool/assistant/backends/_common.py +78 -0
  34. flextool-4.3.0/flextool/assistant/backends/anthropic_messages.py +287 -0
  35. flextool-4.3.0/flextool/assistant/backends/openai_chat.py +541 -0
  36. flextool-4.3.0/flextool/assistant/budget.py +358 -0
  37. flextool-4.3.0/flextool/assistant/caps.py +267 -0
  38. flextool-4.3.0/flextool/assistant/chat_cli.py +1477 -0
  39. flextool-4.3.0/flextool/assistant/cli.py +213 -0
  40. flextool-4.3.0/flextool/assistant/context.py +250 -0
  41. flextool-4.3.0/flextool/assistant/docs_store.py +326 -0
  42. flextool-4.3.0/flextool/assistant/endpoint.py +232 -0
  43. flextool-4.3.0/flextool/assistant/env_knobs.py +37 -0
  44. flextool-4.3.0/flextool/assistant/errors.py +358 -0
  45. flextool-4.3.0/flextool/assistant/inputs/__init__.py +2 -0
  46. flextool-4.3.0/flextool/assistant/inputs/_db.py +506 -0
  47. flextool-4.3.0/flextool/assistant/inputs/_notes.py +114 -0
  48. flextool-4.3.0/flextool/assistant/inputs/_schema.py +87 -0
  49. flextool-4.3.0/flextool/assistant/inputs/_units.py +75 -0
  50. flextool-4.3.0/flextool/assistant/inputs/_values.py +319 -0
  51. flextool-4.3.0/flextool/assistant/keys.py +439 -0
  52. flextool-4.3.0/flextool/assistant/llm_adapter.py +367 -0
  53. flextool-4.3.0/flextool/assistant/llm_errors.py +871 -0
  54. flextool-4.3.0/flextool/assistant/llm_retry.py +197 -0
  55. flextool-4.3.0/flextool/assistant/mcp_server.py +237 -0
  56. flextool-4.3.0/flextool/assistant/model_check.py +159 -0
  57. flextool-4.3.0/flextool/assistant/model_list_cache.py +211 -0
  58. flextool-4.3.0/flextool/assistant/model_versions.py +136 -0
  59. flextool-4.3.0/flextool/assistant/net.py +504 -0
  60. flextool-4.3.0/flextool/assistant/pacing.py +375 -0
  61. flextool-4.3.0/flextool/assistant/probes.py +721 -0
  62. flextool-4.3.0/flextool/assistant/project.py +191 -0
  63. flextool-4.3.0/flextool/assistant/prompt.py +392 -0
  64. flextool-4.3.0/flextool/assistant/providers.py +350 -0
  65. flextool-4.3.0/flextool/assistant/redact.py +239 -0
  66. flextool-4.3.0/flextool/assistant/registry.py +271 -0
  67. flextool-4.3.0/flextool/assistant/results/__init__.py +1 -0
  68. flextool-4.3.0/flextool/assistant/results/_catalog.py +150 -0
  69. flextool-4.3.0/flextool/assistant/results/_overview.py +296 -0
  70. flextool-4.3.0/flextool/assistant/results/_query.py +649 -0
  71. flextool-4.3.0/flextool/assistant/results/_runs.py +575 -0
  72. flextool-4.3.0/flextool/assistant/results/_slacks.py +183 -0
  73. flextool-4.3.0/flextool/assistant/runtime_context.py +287 -0
  74. flextool-4.3.0/flextool/assistant/session.py +1739 -0
  75. flextool-4.3.0/flextool/assistant/settings.py +241 -0
  76. flextool-4.3.0/flextool/assistant/store.py +1061 -0
  77. flextool-4.3.0/flextool/assistant/textsearch.py +98 -0
  78. flextool-4.3.0/flextool/assistant/thoughts.py +170 -0
  79. flextool-4.3.0/flextool/assistant/tiers.py +405 -0
  80. flextool-4.3.0/flextool/assistant/tools/__init__.py +2 -0
  81. flextool-4.3.0/flextool/assistant/tools/diagnostics.py +212 -0
  82. flextool-4.3.0/flextool/assistant/tools/discovery.py +377 -0
  83. flextool-4.3.0/flextool/assistant/tools/inputs.py +898 -0
  84. flextool-4.3.0/flextool/assistant/tools/orientation.py +205 -0
  85. flextool-4.3.0/flextool/assistant/tools/results.py +626 -0
  86. flextool-4.3.0/flextool/assistant/unit_wording.py +120 -0
  87. flextool-4.3.0/flextool/assistant/usage.py +412 -0
  88. {flextool-4.2.2 → flextool-4.3.0}/flextool/calibrate/_solve.py +26 -4
  89. {flextool-4.2.2 → flextool-4.3.0}/flextool/cli/cmd_execute_flextool_workflow.py +5 -2
  90. {flextool-4.2.2 → flextool-4.3.0}/flextool/cli/cmd_run_flextool.py +220 -20
  91. flextool-4.3.0/flextool/docs_build/__init__.py +133 -0
  92. flextool-4.3.0/flextool/docs_build/__main__.py +66 -0
  93. flextool-4.3.0/flextool/docs_build/catalogue.py +232 -0
  94. flextool-4.3.0/flextool/docs_build/formulation.py +360 -0
  95. flextool-4.3.0/flextool/docs_build/index.py +308 -0
  96. flextool-4.3.0/flextool/docs_build/scope.py +62 -0
  97. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/_behaviour_changes.py +18 -5
  98. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/autoscale/_layer2_types.py +2 -5
  99. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/autoscale/_quantity_types.py +66 -8
  100. flextool-4.3.0/flextool/engine/input/_db_loader.py +169 -0
  101. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/input/_db_reader.py +10 -5
  102. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/model/_commodity_ladder.py +1 -0
  103. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/model/_cumulative_invest.py +6 -4
  104. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/model/_group_slack.py +1 -0
  105. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/model/_online.py +1 -1
  106. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/model/_reserve.py +1 -0
  107. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/output/_parquet_bundle.py +3 -1
  108. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/emit/_dispatchers.py +35 -43
  109. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/emit/_pdt_lookup.py +6 -0
  110. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/flex_data.py +67 -0
  111. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/params/_derived.py +69 -68
  112. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/solve/_acceptance.py +27 -1
  113. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/solve/_benders.py +37 -16
  114. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/solve/_orchestration.py +32 -0
  115. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/solve/_run_model.py +11 -5
  116. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/solve/_solver_dispatch.py +11 -2
  117. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/solve/_subprocess_solve.py +62 -22
  118. {flextool-4.2.2 → flextool-4.3.0}/flextool/env_check.py +3 -2
  119. flextool-4.3.0/flextool/gui/assistant/__init__.py +2 -0
  120. flextool-4.3.0/flextool/gui/assistant/chat_tab.py +641 -0
  121. flextool-4.3.0/flextool/gui/assistant/chat_window.py +1374 -0
  122. flextool-4.3.0/flextool/gui/assistant/entry.py +537 -0
  123. flextool-4.3.0/flextool/gui/assistant/fonts.py +83 -0
  124. flextool-4.3.0/flextool/gui/assistant/gate.py +262 -0
  125. flextool-4.3.0/flextool/gui/assistant/geometry.py +86 -0
  126. flextool-4.3.0/flextool/gui/assistant/gui_state.py +251 -0
  127. flextool-4.3.0/flextool/gui/assistant/markdown_stream.py +180 -0
  128. flextool-4.3.0/flextool/gui/assistant/notices.py +580 -0
  129. flextool-4.3.0/flextool/gui/assistant/settings_dialog.py +1279 -0
  130. flextool-4.3.0/flextool/gui/assistant/strings.py +269 -0
  131. flextool-4.3.0/flextool/gui/assistant/transcript.py +538 -0
  132. flextool-4.3.0/flextool/gui/assistant/worker.py +902 -0
  133. {flextool-4.2.2 → flextool-4.3.0}/flextool/gui/calibrate_jobs.py +33 -3
  134. {flextool-4.2.2 → flextool-4.3.0}/flextool/gui/cli_format.py +35 -6
  135. {flextool-4.2.2 → flextool-4.3.0}/flextool/gui/data_models.py +20 -1
  136. {flextool-4.2.2 → flextool-4.3.0}/flextool/gui/dialogs/file_picker.py +3 -1
  137. {flextool-4.2.2 → flextool-4.3.0}/flextool/gui/dialogs/project_dialog.py +40 -1
  138. {flextool-4.2.2 → flextool-4.3.0}/flextool/gui/execution_manager.py +540 -180
  139. {flextool-4.2.2 → flextool-4.3.0}/flextool/gui/execution_window.py +6 -24
  140. {flextool-4.2.2 → flextool-4.3.0}/flextool/gui/main_window.py +313 -82
  141. {flextool-4.2.2 → flextool-4.3.0}/flextool/gui/output_actions.py +9 -2
  142. {flextool-4.2.2 → flextool-4.3.0}/flextool/gui/plot_canvas.py +47 -6
  143. flextool-4.3.0/flextool/gui/project_utils.py +207 -0
  144. {flextool-4.2.2 → flextool-4.3.0}/flextool/gui/result_viewer.py +108 -1
  145. {flextool-4.2.2 → flextool-4.3.0}/flextool/gui/scenario_lists.py +120 -17
  146. {flextool-4.2.2 → flextool-4.3.0}/flextool/gui/settings_io.py +12 -1
  147. {flextool-4.2.2 → flextool-4.3.0}/flextool/gui/ui_metrics.py +227 -16
  148. flextool-4.3.0/flextool/lean_parquet.py +395 -0
  149. flextool-4.3.0/flextool/process_outputs/_output_meta.py +1072 -0
  150. {flextool-4.2.2 → flextool-4.3.0}/flextool/process_outputs/write_outputs.py +66 -0
  151. {flextool-4.2.2 → flextool-4.3.0}/flextool/representative_periods/netload_iterate.py +1 -0
  152. {flextool-4.2.2 → flextool-4.3.0}/flextool/run_options.py +12 -0
  153. flextool-4.3.0/flextool/run_record/__init__.py +109 -0
  154. flextool-4.3.0/flextool/run_record/_owner.py +1333 -0
  155. flextool-4.3.0/flextool/run_record/_status.py +909 -0
  156. flextool-4.3.0/flextool/run_record/_tee.py +153 -0
  157. {flextool-4.2.2 → flextool-4.3.0}/flextool/scenario_comparison/db_reader.py +91 -12
  158. {flextool-4.2.2 → flextool-4.3.0}/flextool/scenario_comparison/orchestrator.py +33 -7
  159. {flextool-4.2.2 → flextool-4.3.0}/flextool/schemas/canonical_databases/howto_aggregate_output.json +158 -158
  160. {flextool-4.2.2 → flextool-4.3.0}/flextool/schemas/canonical_databases/howto_connections.json +158 -158
  161. {flextool-4.2.2 → flextool-4.3.0}/flextool/schemas/canonical_databases/howto_demand.json +158 -158
  162. {flextool-4.2.2 → flextool-4.3.0}/flextool/schemas/canonical_databases/howto_hydro_reservoir.json +158 -158
  163. {flextool-4.2.2 → flextool-4.3.0}/flextool/schemas/canonical_databases/howto_hydro_reservoir_with_pump.json +158 -158
  164. {flextool-4.2.2 → flextool-4.3.0}/flextool/schemas/canonical_databases/howto_non_sync_and_curtailment.json +158 -158
  165. {flextool-4.2.2 → flextool-4.3.0}/flextool/schemas/canonical_databases/howto_ramp_and_start_up.json +158 -158
  166. {flextool-4.2.2 → flextool-4.3.0}/flextool/schemas/canonical_databases/howto_stochastics.json +158 -158
  167. {flextool-4.2.2 → flextool-4.3.0}/flextool/schemas/canonical_databases/templates_examples.json +158 -158
  168. {flextool-4.2.2 → flextool-4.3.0}/flextool/schemas/canonical_databases/templates_time_settings_only.json +158 -158
  169. {flextool-4.2.2 → flextool-4.3.0}/flextool/schemas/spinedb_schema.json +158 -158
  170. {flextool-4.2.2 → flextool-4.3.0}/flextool/solver_config/highs.opt.template +1 -1
  171. {flextool-4.2.2 → flextool-4.3.0}/flextool/update_flextool/__init__.py +1 -1
  172. {flextool-4.2.2 → flextool-4.3.0}/flextool/update_flextool/db_migration.py +298 -3
  173. {flextool-4.2.2 → flextool-4.3.0}/flextool/update_flextool/self_update.py +1 -1
  174. flextool-4.3.0/flextool/user_dirs.py +39 -0
  175. {flextool-4.2.2 → flextool-4.3.0}/flextool.egg-info/PKG-INFO +7 -1
  176. {flextool-4.2.2 → flextool-4.3.0}/flextool.egg-info/SOURCES.txt +114 -0
  177. {flextool-4.2.2 → flextool-4.3.0}/flextool.egg-info/entry_points.txt +2 -1
  178. {flextool-4.2.2 → flextool-4.3.0}/flextool.egg-info/requires.txt +6 -0
  179. flextool-4.3.0/flextool.egg-info/top_level.txt +3 -0
  180. flextool-4.3.0/flextool_assistant_entry.py +125 -0
  181. flextool-4.3.0/flextool_run_supervisor.py +435 -0
  182. {flextool-4.2.2 → flextool-4.3.0}/pyproject.toml +55 -2
  183. {flextool-4.2.2 → flextool-4.3.0}/tests/test_child_run_argv.py +25 -5
  184. {flextool-4.2.2 → flextool-4.3.0}/tests/test_env_check.py +1 -1
  185. {flextool-4.2.2 → flextool-4.3.0}/tests/test_env_knob_registry.py +91 -6
  186. flextool-4.3.0/tests/test_lean_parquet.py +159 -0
  187. flextool-4.3.0/tests/test_output_column_metadata.py +184 -0
  188. {flextool-4.2.2 → flextool-4.3.0}/tests/test_output_metadata_renderers.py +15 -8
  189. {flextool-4.2.2 → flextool-4.3.0}/tests/test_thread_budget.py +24 -0
  190. flextool-4.3.0/tests/test_user_dirs_isolation.py +156 -0
  191. {flextool-4.2.2 → flextool-4.3.0}/tests/test_v70_migration.py +8 -3
  192. flextool-4.2.2/flextool/engine/input/_db_loader.py +0 -167
  193. flextool-4.2.2/flextool/gui/project_utils.py +0 -100
  194. flextool-4.2.2/flextool/lean_parquet.py +0 -159
  195. flextool-4.2.2/flextool/process_outputs/_output_meta.py +0 -687
  196. flextool-4.2.2/flextool.egg-info/top_level.txt +0 -1
  197. flextool-4.2.2/tests/test_output_column_metadata.py +0 -93
  198. {flextool-4.2.2 → flextool-4.3.0}/LICENSE.txt +0 -0
  199. {flextool-4.2.2 → flextool-4.3.0}/README.md +0 -0
  200. {flextool-4.2.2 → flextool-4.3.0}/flextool/__init__.py +0 -0
  201. {flextool-4.2.2 → flextool-4.3.0}/flextool/_allocator.py +0 -0
  202. {flextool-4.2.2 → flextool-4.3.0}/flextool/_mem_sampler.py +0 -0
  203. {flextool-4.2.2 → flextool-4.3.0}/flextool/_resources.py +0 -0
  204. {flextool-4.2.2 → flextool-4.3.0}/flextool/calibrate/__init__.py +0 -0
  205. {flextool-4.2.2 → flextool-4.3.0}/flextool/calibrate/__main__.py +0 -0
  206. {flextool-4.2.2 → flextool-4.3.0}/flextool/calibrate/_cli.py +0 -0
  207. {flextool-4.2.2 → flextool-4.3.0}/flextool/calibrate/_db_alt.py +0 -0
  208. {flextool-4.2.2 → flextool-4.3.0}/flextool/calibrate/_final_outputs.py +0 -0
  209. {flextool-4.2.2 → flextool-4.3.0}/flextool/calibrate/_guard.py +0 -0
  210. {flextool-4.2.2 → flextool-4.3.0}/flextool/calibrate/_loop.py +0 -0
  211. {flextool-4.2.2 → flextool-4.3.0}/flextool/calibrate/_readers.py +0 -0
  212. {flextool-4.2.2 → flextool-4.3.0}/flextool/calibrate/_report.py +0 -0
  213. {flextool-4.2.2 → flextool-4.3.0}/flextool/calibrate/_sizing.py +0 -0
  214. {flextool-4.2.2 → flextool-4.3.0}/flextool/calibrate/_solve_status.py +0 -0
  215. {flextool-4.2.2 → flextool-4.3.0}/flextool/cli/__init__.py +0 -0
  216. {flextool-4.2.2 → flextool-4.3.0}/flextool/cli/_console.py +0 -0
  217. {flextool-4.2.2 → flextool-4.3.0}/flextool/cli/_timing.py +0 -0
  218. {flextool-4.2.2 → flextool-4.3.0}/flextool/cli/cmd_export_to_tabular.py +0 -0
  219. {flextool-4.2.2 → flextool-4.3.0}/flextool/cli/cmd_import_sensitivities.py +0 -0
  220. {flextool-4.2.2 → flextool-4.3.0}/flextool/cli/cmd_migrate_database.py +0 -0
  221. {flextool-4.2.2 → flextool-4.3.0}/flextool/cli/cmd_open_results_db.py +0 -0
  222. {flextool-4.2.2 → flextool-4.3.0}/flextool/cli/cmd_read_matpower.py +0 -0
  223. {flextool-4.2.2 → flextool-4.3.0}/flextool/cli/cmd_read_old_flextool.py +0 -0
  224. {flextool-4.2.2 → flextool-4.3.0}/flextool/cli/cmd_read_self_describing_tabular_input.py +0 -0
  225. {flextool-4.2.2 → flextool-4.3.0}/flextool/cli/cmd_read_tabular_input.py +0 -0
  226. {flextool-4.2.2 → flextool-4.3.0}/flextool/cli/cmd_scenario_results.py +0 -0
  227. {flextool-4.2.2 → flextool-4.3.0}/flextool/cli/cmd_solve_mps.py +0 -0
  228. {flextool-4.2.2 → flextool-4.3.0}/flextool/cli/cmd_update_flextool.py +0 -0
  229. {flextool-4.2.2 → flextool-4.3.0}/flextool/cli/cmd_write_outputs.py +0 -0
  230. {flextool-4.2.2 → flextool-4.3.0}/flextool/common_utils/__init__.py +0 -0
  231. {flextool-4.2.2 → flextool-4.3.0}/flextool/common_utils/plot_mem_shape.py +0 -0
  232. {flextool-4.2.2 → flextool-4.3.0}/flextool/decomposition/__init__.py +0 -0
  233. {flextool-4.2.2 → flextool-4.3.0}/flextool/decomposition/region_decomposition.py +0 -0
  234. {flextool-4.2.2 → flextool-4.3.0}/flextool/decomposition/region_filter.py +0 -0
  235. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/__init__.py +0 -0
  236. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/_csv_reload/__init__.py +0 -0
  237. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/_csv_reload/_field_seeds.py +0 -0
  238. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/_csv_reload/_meta.py +0 -0
  239. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/_csv_reload/_seed.py +0 -0
  240. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/_csv_reload/_stamp.py +0 -0
  241. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/_csv_reload/_topology.py +0 -0
  242. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/_csv_reload/load.py +0 -0
  243. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/_csv_reload/offline_outputs.py +0 -0
  244. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/autoscale/__init__.py +0 -0
  245. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/autoscale/_config.py +0 -0
  246. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/autoscale/_layer2.py +0 -0
  247. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/autoscale/_report.py +0 -0
  248. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/input/__init__.py +0 -0
  249. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/input/_axis_enums.py +0 -0
  250. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/input/_constants.py +0 -0
  251. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/input/_inmemory_reader.py +0 -0
  252. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/input/_input_source.py +0 -0
  253. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/input/_param_shapes.py +0 -0
  254. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/input/_solve_config.py +0 -0
  255. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/input/_solve_state.py +0 -0
  256. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/input/_spinedb_reader.py +0 -0
  257. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/input/_timeline.py +0 -0
  258. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/input/_timeline_rules.py +0 -0
  259. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/model/__init__.py +0 -0
  260. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/model/_balance_terms.py +0 -0
  261. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/model/_coarse_flows.py +0 -0
  262. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/model/_common.py +0 -0
  263. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/model/_dc_power_flow.py +0 -0
  264. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/model/_delay.py +0 -0
  265. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/model/_exact.py +0 -0
  266. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/model/_lead_time.py +0 -0
  267. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/model/_non_anticipativity.py +0 -0
  268. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/model/_pdt_join.py +0 -0
  269. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/model/_self_discharge.py +0 -0
  270. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/model/_unit_floors.py +0 -0
  271. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/model/core.py +0 -0
  272. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/output/__init__.py +0 -0
  273. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/output/_coarse_flows.py +0 -0
  274. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/output/_dump_csvs.py +0 -0
  275. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/output/_horizon_dump.py +0 -0
  276. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/output/_prices.py +0 -0
  277. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/output/_writer.py +0 -0
  278. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/__init__.py +0 -0
  279. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/_dump_stamp.py +0 -0
  280. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/_flex_data_provider.py +0 -0
  281. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/_input_writer.py +0 -0
  282. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/_invest_seeds.py +0 -0
  283. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/_provider_io.py +0 -0
  284. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/_provider_keys.py +0 -0
  285. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/_provider_translators.py +0 -0
  286. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/_reserve_methods.py +0 -0
  287. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/_solve_context.py +0 -0
  288. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/_stochastic_detect.py +0 -0
  289. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/emit/__init__.py +0 -0
  290. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/emit/_arc_unions.py +0 -0
  291. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/emit/_base_steps.py +0 -0
  292. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/emit/_blocks.py +0 -0
  293. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/emit/_calc_params.py +0 -0
  294. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/emit/_chain_params.py +0 -0
  295. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/emit/_co2_accumulators.py +0 -0
  296. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/emit/_energy_margin.py +0 -0
  297. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/emit/_energy_margin_adder.py +0 -0
  298. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/emit/_entity_annual.py +0 -0
  299. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/emit/_inflow_scaling.py +0 -0
  300. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/emit/_inflow_scaling_checks.py +0 -0
  301. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/emit/_leaf_sets.py +0 -0
  302. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/emit/_lp_scaling.py +0 -0
  303. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/emit/_mid_sets.py +0 -0
  304. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/emit/_pdt_params.py +0 -0
  305. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/emit/_per_solve.py +0 -0
  306. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/emit/_period_calc.py +0 -0
  307. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/emit/_period_params.py +0 -0
  308. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/emit/_reserve_sets.py +0 -0
  309. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/emit/_solve_time.py +0 -0
  310. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/emit/_solve_writers.py +0 -0
  311. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/emit/_vectorize.py +0 -0
  312. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/params/__init__.py +0 -0
  313. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/params/_arithmetic.py +0 -0
  314. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/params/_block.py +0 -0
  315. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/params/_block_layout.py +0 -0
  316. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/params/_branch.py +0 -0
  317. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/params/_coarse.py +0 -0
  318. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/params/_direct.py +0 -0
  319. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/params/_existing.py +0 -0
  320. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/params/_mintime.py +0 -0
  321. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/params/_npv.py +0 -0
  322. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/params/_per_solve_sets.py +0 -0
  323. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/params/_profiles.py +0 -0
  324. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/params/_projection.py +0 -0
  325. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/params/_ramp_links.py +0 -0
  326. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/params/_retire_existing.py +0 -0
  327. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/params/_run_calendar.py +0 -0
  328. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/preprocess/params/_walks.py +0 -0
  329. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/solve/__init__.py +0 -0
  330. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/solve/_carry_routing.py +0 -0
  331. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/solve/_determinism.py +0 -0
  332. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/solve/_handoff.py +0 -0
  333. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/solve/_realization.py +0 -0
  334. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/solve/_realized_overlap.py +0 -0
  335. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/solve/_recursive_solve.py +0 -0
  336. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/solve/_region_filter.py +0 -0
  337. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/solve/_solver_base.py +0 -0
  338. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/solve/_stochastic.py +0 -0
  339. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/solve/_warm.py +0 -0
  340. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine/solve/chain.py +0 -0
  341. {flextool-4.2.2 → flextool-4.3.0}/flextool/engine_polars/__init__.py +0 -0
  342. {flextool-4.2.2 → flextool-4.3.0}/flextool/export_to_tabular/__init__.py +0 -0
  343. {flextool-4.2.2 → flextool-4.3.0}/flextool/export_to_tabular/db_reader.py +0 -0
  344. {flextool-4.2.2 → flextool-4.3.0}/flextool/export_to_tabular/excel_writer.py +0 -0
  345. {flextool-4.2.2 → flextool-4.3.0}/flextool/export_to_tabular/export_settings.yaml +0 -0
  346. {flextool-4.2.2 → flextool-4.3.0}/flextool/export_to_tabular/export_to_excel.py +0 -0
  347. {flextool-4.2.2 → flextool-4.3.0}/flextool/export_to_tabular/formatting.py +0 -0
  348. {flextool-4.2.2 → flextool-4.3.0}/flextool/export_to_tabular/sheet_config.py +0 -0
  349. {flextool-4.2.2 → flextool-4.3.0}/flextool/gui/__init__.py +0 -0
  350. {flextool-4.2.2 → flextool-4.3.0}/flextool/gui/__main__.py +0 -0
  351. {flextool-4.2.2 → flextool-4.3.0}/flextool/gui/calibrate_commands.py +0 -0
  352. {flextool-4.2.2 → flextool-4.3.0}/flextool/gui/check_tree.py +0 -0
  353. {flextool-4.2.2 → flextool-4.3.0}/flextool/gui/config_parser.py +0 -0
  354. {flextool-4.2.2 → flextool-4.3.0}/flextool/gui/db_editor_integration.py +0 -0
  355. {flextool-4.2.2 → flextool-4.3.0}/flextool/gui/db_version_check.py +0 -0
  356. {flextool-4.2.2 → flextool-4.3.0}/flextool/gui/dialogs/__init__.py +0 -0
  357. {flextool-4.2.2 → flextool-4.3.0}/flextool/gui/dialogs/add_dialog.py +0 -0
  358. {flextool-4.2.2 → flextool-4.3.0}/flextool/gui/dialogs/calibrate_dialog.py +0 -0
  359. {flextool-4.2.2 → flextool-4.3.0}/flextool/gui/dialogs/group_picker.py +0 -0
  360. {flextool-4.2.2 → flextool-4.3.0}/flextool/gui/dialogs/migration_consent_dialog.py +0 -0
  361. {flextool-4.2.2 → flextool-4.3.0}/flextool/gui/dialogs/migration_progress_dialog.py +0 -0
  362. {flextool-4.2.2 → flextool-4.3.0}/flextool/gui/dialogs/plot_dialog.py +0 -0
  363. {flextool-4.2.2 → flextool-4.3.0}/flextool/gui/dialogs/plot_settings_picker.py +0 -0
  364. {flextool-4.2.2 → flextool-4.3.0}/flextool/gui/dialogs/update_dialog.py +0 -0
  365. {flextool-4.2.2 → flextool-4.3.0}/flextool/gui/downsampling.py +0 -0
  366. {flextool-4.2.2 → flextool-4.3.0}/flextool/gui/error_handling.py +0 -0
  367. {flextool-4.2.2 → flextool-4.3.0}/flextool/gui/hover_tooltip.py +0 -0
  368. {flextool-4.2.2 → flextool-4.3.0}/flextool/gui/input_sources.py +0 -0
  369. {flextool-4.2.2 → flextool-4.3.0}/flextool/gui/network_graph.py +0 -0
  370. {flextool-4.2.2 → flextool-4.3.0}/flextool/gui/output_log_window.py +0 -0
  371. {flextool-4.2.2 → flextool-4.3.0}/flextool/gui/platform_utils.py +0 -0
  372. {flextool-4.2.2 → flextool-4.3.0}/flextool/gui/plot_cache.py +0 -0
  373. {flextool-4.2.2 → flextool-4.3.0}/flextool/gui/plot_config_reader.py +0 -0
  374. {flextool-4.2.2 → flextool-4.3.0}/flextool/gui/scenario_key.py +0 -0
  375. {flextool-4.2.2 → flextool-4.3.0}/flextool/gui/solve_reader.py +0 -0
  376. {flextool-4.2.2 → flextool-4.3.0}/flextool/gui/tree_reorder.py +0 -0
  377. {flextool-4.2.2 → flextool-4.3.0}/flextool/input_derivation/__init__.py +0 -0
  378. {flextool-4.2.2 → flextool-4.3.0}/flextool/input_derivation/_commodity_ladder.py +0 -0
  379. {flextool-4.2.2 → flextool-4.3.0}/flextool/input_derivation/_commodity_ladder_sets.py +0 -0
  380. {flextool-4.2.2 → flextool-4.3.0}/flextool/input_derivation/_dc_power_flow.py +0 -0
  381. {flextool-4.2.2 → flextool-4.3.0}/flextool/input_derivation/_method_constants.py +0 -0
  382. {flextool-4.2.2 → flextool-4.3.0}/flextool/input_derivation/_process_method.py +0 -0
  383. {flextool-4.2.2 → flextool-4.3.0}/flextool/input_derivation/_specs.py +0 -0
  384. {flextool-4.2.2 → flextool-4.3.0}/flextool/input_derivation/_validators.py +0 -0
  385. {flextool-4.2.2 → flextool-4.3.0}/flextool/model_builder/__init__.py +0 -0
  386. {flextool-4.2.2 → flextool-4.3.0}/flextool/model_builder/build_model.py +0 -0
  387. {flextool-4.2.2 → flextool-4.3.0}/flextool/model_builder/encoding.py +0 -0
  388. {flextool-4.2.2 → flextool-4.3.0}/flextool/model_builder/names.py +0 -0
  389. {flextool-4.2.2 → flextool-4.3.0}/flextool/model_builder/profiles.py +0 -0
  390. {flextool-4.2.2 → flextool-4.3.0}/flextool/plot_outputs/__init__.py +0 -0
  391. {flextool-4.2.2 → flextool-4.3.0}/flextool/plot_outputs/axis_helpers.py +0 -0
  392. {flextool-4.2.2 → flextool-4.3.0}/flextool/plot_outputs/color_template.py +0 -0
  393. {flextool-4.2.2 → flextool-4.3.0}/flextool/plot_outputs/config.py +0 -0
  394. {flextool-4.2.2 → flextool-4.3.0}/flextool/plot_outputs/format_helpers.py +0 -0
  395. {flextool-4.2.2 → flextool-4.3.0}/flextool/plot_outputs/legend_helpers.py +0 -0
  396. {flextool-4.2.2 → flextool-4.3.0}/flextool/plot_outputs/orchestrator.py +0 -0
  397. {flextool-4.2.2 → flextool-4.3.0}/flextool/plot_outputs/perf.py +0 -0
  398. {flextool-4.2.2 → flextool-4.3.0}/flextool/plot_outputs/plan.py +0 -0
  399. {flextool-4.2.2 → flextool-4.3.0}/flextool/plot_outputs/plot_bars.py +0 -0
  400. {flextool-4.2.2 → flextool-4.3.0}/flextool/plot_outputs/plot_bars_detail.py +0 -0
  401. {flextool-4.2.2 → flextool-4.3.0}/flextool/plot_outputs/plot_lines.py +0 -0
  402. {flextool-4.2.2 → flextool-4.3.0}/flextool/plot_outputs/shared_manifest.py +0 -0
  403. {flextool-4.2.2 → flextool-4.3.0}/flextool/plot_outputs/subplot_helpers.py +0 -0
  404. {flextool-4.2.2 → flextool-4.3.0}/flextool/process_inputs/__init__.py +0 -0
  405. {flextool-4.2.2 → flextool-4.3.0}/flextool/process_inputs/import_old_excel_input.json +0 -0
  406. {flextool-4.2.2 → flextool-4.3.0}/flextool/process_inputs/read_matpower.py +0 -0
  407. {flextool-4.2.2 → flextool-4.3.0}/flextool/process_inputs/read_old_flextool.py +0 -0
  408. {flextool-4.2.2 → flextool-4.3.0}/flextool/process_inputs/read_self_describing_excel.py +0 -0
  409. {flextool-4.2.2 → flextool-4.3.0}/flextool/process_inputs/read_tabular_with_specification.py +0 -0
  410. {flextool-4.2.2 → flextool-4.3.0}/flextool/process_inputs/write_old_flextool_to_db.py +0 -0
  411. {flextool-4.2.2 → flextool-4.3.0}/flextool/process_inputs/write_self_describing_to_db.py +0 -0
  412. {flextool-4.2.2 → flextool-4.3.0}/flextool/process_inputs/write_to_input_db.py +0 -0
  413. {flextool-4.2.2 → flextool-4.3.0}/flextool/process_outputs/__init__.py +0 -0
  414. {flextool-4.2.2 → flextool-4.3.0}/flextool/process_outputs/_annualize.py +0 -0
  415. {flextool-4.2.2 → flextool-4.3.0}/flextool/process_outputs/_fan_labels.py +0 -0
  416. {flextool-4.2.2 → flextool-4.3.0}/flextool/process_outputs/_inmemory_helpers.py +0 -0
  417. {flextool-4.2.2 → flextool-4.3.0}/flextool/process_outputs/_timeline_breaks.py +0 -0
  418. {flextool-4.2.2 → flextool-4.3.0}/flextool/process_outputs/calc_capacity_flows.py +0 -0
  419. {flextool-4.2.2 → flextool-4.3.0}/flextool/process_outputs/calc_connections.py +0 -0
  420. {flextool-4.2.2 → flextool-4.3.0}/flextool/process_outputs/calc_costs.py +0 -0
  421. {flextool-4.2.2 → flextool-4.3.0}/flextool/process_outputs/calc_group_flows.py +0 -0
  422. {flextool-4.2.2 → flextool-4.3.0}/flextool/process_outputs/calc_slacks.py +0 -0
  423. {flextool-4.2.2 → flextool-4.3.0}/flextool/process_outputs/calc_storage_vre.py +0 -0
  424. {flextool-4.2.2 → flextool-4.3.0}/flextool/process_outputs/drop_levels.py +0 -0
  425. {flextool-4.2.2 → flextool-4.3.0}/flextool/process_outputs/handoff_writers.py +0 -0
  426. {flextool-4.2.2 → flextool-4.3.0}/flextool/process_outputs/out_ancillary.py +0 -0
  427. {flextool-4.2.2 → flextool-4.3.0}/flextool/process_outputs/out_capacity.py +0 -0
  428. {flextool-4.2.2 → flextool-4.3.0}/flextool/process_outputs/out_costs.py +0 -0
  429. {flextool-4.2.2 → flextool-4.3.0}/flextool/process_outputs/out_flowgroup.py +0 -0
  430. {flextool-4.2.2 → flextool-4.3.0}/flextool/process_outputs/out_flows.py +0 -0
  431. {flextool-4.2.2 → flextool-4.3.0}/flextool/process_outputs/out_group.py +0 -0
  432. {flextool-4.2.2 → flextool-4.3.0}/flextool/process_outputs/out_node.py +0 -0
  433. {flextool-4.2.2 → flextool-4.3.0}/flextool/process_outputs/persist_realized_slice.py +0 -0
  434. {flextool-4.2.2 → flextool-4.3.0}/flextool/process_outputs/process_results.py +0 -0
  435. {flextool-4.2.2 → flextool-4.3.0}/flextool/process_outputs/read_highs_solution.py +0 -0
  436. {flextool-4.2.2 → flextool-4.3.0}/flextool/process_outputs/read_parameters.py +0 -0
  437. {flextool-4.2.2 → flextool-4.3.0}/flextool/process_outputs/read_sets.py +0 -0
  438. {flextool-4.2.2 → flextool-4.3.0}/flextool/process_outputs/read_variables.py +0 -0
  439. {flextool-4.2.2 → flextool-4.3.0}/flextool/process_outputs/solve_order.py +0 -0
  440. {flextool-4.2.2 → flextool-4.3.0}/flextool/process_outputs/spinedb_replay.py +0 -0
  441. {flextool-4.2.2 → flextool-4.3.0}/flextool/process_outputs/union_realized_slice.py +0 -0
  442. {flextool-4.2.2 → flextool-4.3.0}/flextool/process_outputs/write_spinedb.py +0 -0
  443. {flextool-4.2.2 → flextool-4.3.0}/flextool/representative_periods/__init__.py +0 -0
  444. {flextool-4.2.2 → flextool-4.3.0}/flextool/representative_periods/clustering.py +0 -0
  445. {flextool-4.2.2 → flextool-4.3.0}/flextool/representative_periods/force_include.py +0 -0
  446. {flextool-4.2.2 → flextool-4.3.0}/flextool/representative_periods/netload.py +0 -0
  447. {flextool-4.2.2 → flextool-4.3.0}/flextool/representative_periods/netload_inputs.py +0 -0
  448. {flextool-4.2.2 → flextool-4.3.0}/flextool/representative_periods/preprocess.py +0 -0
  449. {flextool-4.2.2 → flextool-4.3.0}/flextool/representative_periods/scenario_stack.py +0 -0
  450. {flextool-4.2.2 → flextool-4.3.0}/flextool/representative_periods/weights.py +0 -0
  451. {flextool-4.2.2 → flextool-4.3.0}/flextool/scenario_comparison/__init__.py +0 -0
  452. {flextool-4.2.2 → flextool-4.3.0}/flextool/scenario_comparison/config_builder.py +0 -0
  453. {flextool-4.2.2 → flextool-4.3.0}/flextool/scenario_comparison/constants.py +0 -0
  454. {flextool-4.2.2 → flextool-4.3.0}/flextool/scenario_comparison/data_models.py +0 -0
  455. {flextool-4.2.2 → flextool-4.3.0}/flextool/scenario_comparison/dispatch_data.py +0 -0
  456. {flextool-4.2.2 → flextool-4.3.0}/flextool/scenario_comparison/dispatch_mappings.py +0 -0
  457. {flextool-4.2.2 → flextool-4.3.0}/flextool/scenario_comparison/dispatch_plots.py +0 -0
  458. {flextool-4.2.2 → flextool-4.3.0}/flextool/scenario_comparison/input_entity_colors.py +0 -0
  459. {flextool-4.2.2 → flextool-4.3.0}/flextool/scenario_comparison/plan_union.py +0 -0
  460. {flextool-4.2.2 → flextool-4.3.0}/flextool/scenario_comparison/plot_settings_seed.py +0 -0
  461. {flextool-4.2.2 → flextool-4.3.0}/flextool/schemas/AXIS_CONTRACT.md +0 -0
  462. {flextool-4.2.2 → flextool-4.3.0}/flextool/schemas/comparison_settings_template.json +0 -0
  463. {flextool-4.2.2 → flextool-4.3.0}/flextool/schemas/default_plot_settings.yaml +0 -0
  464. {flextool-4.2.2 → flextool-4.3.0}/flextool/schemas/default_plots.yaml +0 -0
  465. {flextool-4.2.2 → flextool-4.3.0}/flextool/schemas/flextool_axis_contract.json +0 -0
  466. {flextool-4.2.2 → flextool-4.3.0}/flextool/schemas/flextool_axis_contract.schema.json +0 -0
  467. {flextool-4.2.2 → flextool-4.3.0}/flextool/schemas/old_flextool_import_template.json +0 -0
  468. {flextool-4.2.2 → flextool-4.3.0}/flextool/schemas/output_info_template.json +0 -0
  469. {flextool-4.2.2 → flextool-4.3.0}/flextool/schemas/output_settings_template.json +0 -0
  470. {flextool-4.2.2 → flextool-4.3.0}/flextool/schemas/pre_v26/flextool_template_constant_default.json +0 -0
  471. {flextool-4.2.2 → flextool-4.3.0}/flextool/schemas/pre_v26/flextool_template_default_optional_output.json +0 -0
  472. {flextool-4.2.2 → flextool-4.3.0}/flextool/schemas/pre_v26/flextool_template_default_value.json +0 -0
  473. {flextool-4.2.2 → flextool-4.3.0}/flextool/schemas/pre_v26/flextool_template_drop_down.json +0 -0
  474. {flextool-4.2.2 → flextool-4.3.0}/flextool/schemas/pre_v26/flextool_template_lifetime_method.json +0 -0
  475. {flextool-4.2.2 → flextool-4.3.0}/flextool/schemas/pre_v26/flextool_template_optional_outputs.json +0 -0
  476. {flextool-4.2.2 → flextool-4.3.0}/flextool/schemas/pre_v26/flextool_template_output_node_flows.json +0 -0
  477. {flextool-4.2.2 → flextool-4.3.0}/flextool/schemas/pre_v26/flextool_template_results_master.json +0 -0
  478. {flextool-4.2.2 → flextool-4.3.0}/flextool/schemas/pre_v26/flextool_template_rolling_start_remove.json +0 -0
  479. {flextool-4.2.2 → flextool-4.3.0}/flextool/schemas/pre_v26/flextool_template_rolling_window.json +0 -0
  480. {flextool-4.2.2 → flextool-4.3.0}/flextool/schemas/pre_v26/flextool_template_storage_binding_defaults.json +0 -0
  481. {flextool-4.2.2 → flextool-4.3.0}/flextool/schemas/pre_v26/flextool_template_v2.json +0 -0
  482. {flextool-4.2.2 → flextool-4.3.0}/flextool/schemas/pre_v26/flextool_template_v25.json +0 -0
  483. {flextool-4.2.2 → flextool-4.3.0}/flextool/schemas/spinedb_results_schema.json +0 -0
  484. {flextool-4.2.2 → flextool-4.3.0}/flextool/solver_config/copt.opt.template +0 -0
  485. {flextool-4.2.2 → flextool-4.3.0}/flextool/solver_config/cplex.opt.template +0 -0
  486. {flextool-4.2.2 → flextool-4.3.0}/flextool/solver_config/gurobi.opt.template +0 -0
  487. {flextool-4.2.2 → flextool-4.3.0}/flextool/solver_config/xpress.opt.template +0 -0
  488. {flextool-4.2.2 → flextool-4.3.0}/flextool/spinedb_backend/__init__.py +0 -0
  489. {flextool-4.2.2 → flextool-4.3.0}/flextool/spinedb_backend/_axis_enums.py +0 -0
  490. {flextool-4.2.2 → flextool-4.3.0}/flextool/spinedb_backend/_backend.py +0 -0
  491. {flextool-4.2.2 → flextool-4.3.0}/flextool/update_flextool/bundle_install.py +0 -0
  492. {flextool-4.2.2 → flextool-4.3.0}/flextool/update_flextool/canonical_databases.py +0 -0
  493. {flextool-4.2.2 → flextool-4.3.0}/flextool/update_flextool/db_handle.py +0 -0
  494. {flextool-4.2.2 → flextool-4.3.0}/flextool/update_flextool/ensure_settings_db.py +0 -0
  495. {flextool-4.2.2 → flextool-4.3.0}/flextool/update_flextool/export_database.py +0 -0
  496. {flextool-4.2.2 → flextool-4.3.0}/flextool/update_flextool/extend_tests_fixture.py +0 -0
  497. {flextool-4.2.2 → flextool-4.3.0}/flextool/update_flextool/fixture_schema.py +0 -0
  498. {flextool-4.2.2 → flextool-4.3.0}/flextool/update_flextool/generate_canonical.py +0 -0
  499. {flextool-4.2.2 → flextool-4.3.0}/flextool/update_flextool/initialize_database.py +0 -0
  500. {flextool-4.2.2 → flextool-4.3.0}/flextool/update_flextool/install_info.py +0 -0
  501. {flextool-4.2.2 → flextool-4.3.0}/flextool/update_flextool/sync_master_json_template.py +0 -0
  502. {flextool-4.2.2 → flextool-4.3.0}/flextool/update_flextool/test_fixtures.py +0 -0
  503. {flextool-4.2.2 → flextool-4.3.0}/flextool.egg-info/dependency_links.txt +0 -0
  504. {flextool-4.2.2 → flextool-4.3.0}/setup.cfg +0 -0
  505. {flextool-4.2.2 → flextool-4.3.0}/tests/test_bar_layout.py +0 -0
  506. {flextool-4.2.2 → flextool-4.3.0}/tests/test_bar_sub_pixel_labels.py +0 -0
  507. {flextool-4.2.2 → flextool-4.3.0}/tests/test_blocks.py +0 -0
  508. {flextool-4.2.2 → flextool-4.3.0}/tests/test_branch_weights.py +0 -0
  509. {flextool-4.2.2 → flextool-4.3.0}/tests/test_ci_shard.py +0 -0
  510. {flextool-4.2.2 → flextool-4.3.0}/tests/test_color_template.py +0 -0
  511. {flextool-4.2.2 → flextool-4.3.0}/tests/test_commodity_ladder_rolling.py +0 -0
  512. {flextool-4.2.2 → flextool-4.3.0}/tests/test_comparison_excel.py +0 -0
  513. {flextool-4.2.2 → flextool-4.3.0}/tests/test_comparison_project_root.py +0 -0
  514. {flextool-4.2.2 → flextool-4.3.0}/tests/test_complete_period_share_reduction.py +0 -0
  515. {flextool-4.2.2 → flextool-4.3.0}/tests/test_connection_node_warnings.py +0 -0
  516. {flextool-4.2.2 → flextool-4.3.0}/tests/test_console_run_tool.py +0 -0
  517. {flextool-4.2.2 → flextool-4.3.0}/tests/test_cost_aggregation_semantics.py +0 -0
  518. {flextool-4.2.2 → flextool-4.3.0}/tests/test_cost_breakdown_by_entity.py +0 -0
  519. {flextool-4.2.2 → flextool-4.3.0}/tests/test_csv_dump_roundtrip.py +0 -0
  520. {flextool-4.2.2 → flextool-4.3.0}/tests/test_dc_power_flow.py +0 -0
  521. {flextool-4.2.2 → flextool-4.3.0}/tests/test_dispatch_consumer_and_connection_signs.py +0 -0
  522. {flextool-4.2.2 → flextool-4.3.0}/tests/test_dispatch_node_debug_and_tree.py +0 -0
  523. {flextool-4.2.2 → flextool-4.3.0}/tests/test_dispatch_order_specials.py +0 -0
  524. {flextool-4.2.2 → flextool-4.3.0}/tests/test_dispatch_scenario_tag.py +0 -0
  525. {flextool-4.2.2 → flextool-4.3.0}/tests/test_ensure_settings_db.py +0 -0
  526. {flextool-4.2.2 → flextool-4.3.0}/tests/test_entity_unitsize_invariant.py +0 -0
  527. {flextool-4.2.2 → flextool-4.3.0}/tests/test_entity_universe_carrier.py +0 -0
  528. {flextool-4.2.2 → flextool-4.3.0}/tests/test_export_to_tabular.py +0 -0
  529. {flextool-4.2.2 → flextool-4.3.0}/tests/test_extend_tests_fixture.py +0 -0
  530. {flextool-4.2.2 → flextool-4.3.0}/tests/test_flowgroup_indicators.py +0 -0
  531. {flextool-4.2.2 → flextool-4.3.0}/tests/test_force_include.py +0 -0
  532. {flextool-4.2.2 → flextool-4.3.0}/tests/test_group_output_warnings.py +0 -0
  533. {flextool-4.2.2 → flextool-4.3.0}/tests/test_handoff_writers.py +0 -0
  534. {flextool-4.2.2 → flextool-4.3.0}/tests/test_input_entity_colors.py +0 -0
  535. {flextool-4.2.2 → flextool-4.3.0}/tests/test_lh2_three_region.py +0 -0
  536. {flextool-4.2.2 → flextool-4.3.0}/tests/test_min_load_rolling.py +0 -0
  537. {flextool-4.2.2 → flextool-4.3.0}/tests/test_non_anticipativity.py +0 -0
  538. {flextool-4.2.2 → flextool-4.3.0}/tests/test_old_flextool_importer_schema_drift.py +0 -0
  539. {flextool-4.2.2 → flextool-4.3.0}/tests/test_open_results_db.py +0 -0
  540. {flextool-4.2.2 → flextool-4.3.0}/tests/test_output_csv_names.py +0 -0
  541. {flextool-4.2.2 → flextool-4.3.0}/tests/test_output_work_folder_isolation.py +0 -0
  542. {flextool-4.2.2 → flextool-4.3.0}/tests/test_parameter_group_coverage.py +0 -0
  543. {flextool-4.2.2 → flextool-4.3.0}/tests/test_plan_union.py +0 -0
  544. {flextool-4.2.2 → flextool-4.3.0}/tests/test_plot_draw_order.py +0 -0
  545. {flextool-4.2.2 → flextool-4.3.0}/tests/test_plot_pipeline.py +0 -0
  546. {flextool-4.2.2 → flextool-4.3.0}/tests/test_plot_plan_chunk_reconstruction.py +0 -0
  547. {flextool-4.2.2 → flextool-4.3.0}/tests/test_plot_plan_time_labels_roundtrip.py +0 -0
  548. {flextool-4.2.2 → flextool-4.3.0}/tests/test_plot_settings_seed.py +0 -0
  549. {flextool-4.2.2 → flextool-4.3.0}/tests/test_read_highs_solution.py +0 -0
  550. {flextool-4.2.2 → flextool-4.3.0}/tests/test_recourse_cost_reconciliation.py +0 -0
  551. {flextool-4.2.2 → flextool-4.3.0}/tests/test_regional_filter.py +0 -0
  552. {flextool-4.2.2 → flextool-4.3.0}/tests/test_representative_periods.py +0 -0
  553. {flextool-4.2.2 → flextool-4.3.0}/tests/test_rolling_online_carry.py +0 -0
  554. {flextool-4.2.2 → flextool-4.3.0}/tests/test_rolling_online_mintime_carry.py +0 -0
  555. {flextool-4.2.2 → flextool-4.3.0}/tests/test_rolling_online_minuptime.py +0 -0
  556. {flextool-4.2.2 → flextool-4.3.0}/tests/test_rp_alternative_name.py +0 -0
  557. {flextool-4.2.2 → flextool-4.3.0}/tests/test_rp_force_include_wiring.py +0 -0
  558. {flextool-4.2.2 → flextool-4.3.0}/tests/test_rp_solves_filter.py +0 -0
  559. {flextool-4.2.2 → flextool-4.3.0}/tests/test_run_options.py +0 -0
  560. {flextool-4.2.2 → flextool-4.3.0}/tests/test_scenario_colors.py +0 -0
  561. {flextool-4.2.2 → flextool-4.3.0}/tests/test_scenario_stack.py +0 -0
  562. {flextool-4.2.2 → flextool-4.3.0}/tests/test_scenarios.py +0 -0
  563. {flextool-4.2.2 → flextool-4.3.0}/tests/test_self_describing_reader.py +0 -0
  564. {flextool-4.2.2 → flextool-4.3.0}/tests/test_shared_axis_manifest.py +0 -0
  565. {flextool-4.2.2 → flextool-4.3.0}/tests/test_simple_bar_entity_color.py +0 -0
  566. {flextool-4.2.2 → flextool-4.3.0}/tests/test_solve_config.py +0 -0
  567. {flextool-4.2.2 → flextool-4.3.0}/tests/test_solve_reader.py +0 -0
  568. {flextool-4.2.2 → flextool-4.3.0}/tests/test_stream_concat_temp_cleanup.py +0 -0
  569. {flextool-4.2.2 → flextool-4.3.0}/tests/test_support_load.py +0 -0
  570. {flextool-4.2.2 → flextool-4.3.0}/tests/test_synthesize_invest_dual.py +0 -0
  571. {flextool-4.2.2 → flextool-4.3.0}/tests/test_timeline_breaks.py +0 -0
  572. {flextool-4.2.2 → flextool-4.3.0}/tests/test_timings_csv.py +0 -0
  573. {flextool-4.2.2 → flextool-4.3.0}/tests/test_unidirectional_connection.py +0 -0
  574. {flextool-4.2.2 → flextool-4.3.0}/tests/test_unit_online_dt_columns.py +0 -0
  575. {flextool-4.2.2 → flextool-4.3.0}/tests/test_v52_migration.py +0 -0
  576. {flextool-4.2.2 → flextool-4.3.0}/tests/test_v63_migration.py +0 -0
  577. {flextool-4.2.2 → flextool-4.3.0}/tests/test_v64_migration.py +0 -0
  578. {flextool-4.2.2 → flextool-4.3.0}/tests/test_v65_migration.py +0 -0
  579. {flextool-4.2.2 → flextool-4.3.0}/tests/test_v66_migration.py +0 -0
  580. {flextool-4.2.2 → flextool-4.3.0}/tests/test_v67_migration.py +0 -0
  581. {flextool-4.2.2 → flextool-4.3.0}/tests/test_v68_migration.py +0 -0
  582. {flextool-4.2.2 → flextool-4.3.0}/tests/test_v69_migration.py +0 -0
  583. {flextool-4.2.2 → flextool-4.3.0}/tests/test_workdir_empty_default.py +0 -0
  584. {flextool-4.2.2 → flextool-4.3.0}/tests/test_xlsx_v77_round_trip.py +0 -0
  585. {flextool-4.2.2 → flextool-4.3.0}/tests/test_xlsx_workflow.py +0 -0
  586. {flextool-4.2.2 → flextool-4.3.0}/tests/test_years_represented.py +0 -0
@@ -0,0 +1,29 @@
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.md
11
+ include docs/results.md
12
+ include docs/how_to.md
13
+ include docs/advanced_concepts.md
14
+ include docs/flextool_gui_interface.md
15
+ include docs/spine_toolbox.md
16
+ include docs/spine_database.md
17
+ include docs/excel_interface.md
18
+ include docs/terminal_workflow.md
19
+ include docs/ai_assistant.md
20
+ include docs/env_vars.md
21
+ include docs/solvers/index.md
22
+ include docs/solvers/highs.md
23
+ include docs/solvers/gurobi.md
24
+ include docs/solvers/cplex.md
25
+ include docs/solvers/xpress.md
26
+ include docs/solvers/copt.md
27
+ include docs/dev/architecture.md
28
+ include docs/dev/slack_convention.md
29
+ include docs/dev/engine.md
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flextool
3
- Version: 4.2.2
3
+ Version: 4.3.0
4
4
  Summary: IRENA FlexTool is an energy and power systems model for understanding the role of variable power generation in future energy systems.
5
5
  Author: IRENA FlexTool contributors
6
6
  License: © International Renewable Energy Agency 2018-2022
@@ -54,6 +54,12 @@ Requires-Dist: psutil
54
54
  Requires-Dist: sv-ttk
55
55
  Requires-Dist: screeninfo
56
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
57
63
  Provides-Extra: toolbox
58
64
  Requires-Dist: spinetoolbox; extra == "toolbox"
59
65
  Provides-Extra: viewer
@@ -0,0 +1,76 @@
1
+ """Build step: copy the curated documentation Markdown into the package.
2
+
3
+ ``[tool.setuptools.cmdclass] build_py = "_flextool_build.BuildPy"`` runs this before setuptools' own
4
+ ``build_py``. It copies the Markdown files listed in ``flextool/docs_build/scope.py`` (``CURATED_DOCS``) from
5
+ ``docs/`` into ``<build_lib>/flextool/assistant/_docs/md/``, keeping their folders, so a wheel (also one built
6
+ from the sdist, which ``MANIFEST.in`` gives the docs and this module) carries the documentation the assistant
7
+ indexes on first use. An editable install reads ``docs/`` of its clone instead and copies nothing.
8
+
9
+ Standard library and setuptools only: ``scope.py`` is read by path, because importing ``flextool`` runs its
10
+ ``__init__`` (and its dependencies need not be installed in an isolated build environment).
11
+ """
12
+ from __future__ import annotations
13
+
14
+ import importlib.util
15
+ import shutil
16
+ from pathlib import Path
17
+ from types import ModuleType
18
+
19
+ from setuptools.command.build_py import build_py as _build_py
20
+
21
+ PROJECT_ROOT = Path(__file__).resolve().parent
22
+ SCOPE_FILE = Path("flextool") / "docs_build" / "scope.py"
23
+ DOCS_DIR = "docs"
24
+ # Where the copies go, relative to the build folder (``build_lib``).
25
+ PACKAGED_DOCS = Path("flextool") / "assistant" / "_docs" / "md"
26
+
27
+
28
+ def load_scope(project_root: Path = PROJECT_ROOT) -> ModuleType:
29
+ """``flextool/docs_build/scope.py`` loaded by path, without importing ``flextool``."""
30
+ path = project_root / SCOPE_FILE
31
+ spec = importlib.util.spec_from_file_location("_flextool_docs_scope", path)
32
+ if spec is None or spec.loader is None:
33
+ raise RuntimeError(f"cannot load the documentation scope from {path}")
34
+ module = importlib.util.module_from_spec(spec)
35
+ spec.loader.exec_module(module)
36
+ return module
37
+
38
+
39
+ def copy_docs(build_lib: Path, project_root: Path = PROJECT_ROOT) -> list[Path]:
40
+ """Copy every ``CURATED_DOCS`` file from ``<project_root>/docs`` into ``<build_lib>/flextool/assistant/
41
+ _docs/md``; return the written paths. A file of the scope missing from ``docs/`` fails the build."""
42
+ curated: tuple[str, ...] = load_scope(project_root).CURATED_DOCS
43
+ source = project_root / DOCS_DIR
44
+ missing = [rel for rel in curated if not (source / rel).is_file()]
45
+ if missing:
46
+ raise FileNotFoundError(
47
+ f"documentation files of flextool/docs_build/scope.py missing from {source}: {', '.join(missing)}")
48
+ target = build_lib / PACKAGED_DOCS
49
+ if target.exists():
50
+ shutil.rmtree(target) # a file dropped from the scope must not linger from an earlier build
51
+ written: list[Path] = []
52
+ for rel in curated:
53
+ dest = target / rel
54
+ dest.parent.mkdir(parents=True, exist_ok=True)
55
+ shutil.copyfile(source / rel, dest)
56
+ written.append(dest)
57
+ return written
58
+
59
+
60
+ class BuildPy(_build_py):
61
+ """setuptools ``build_py`` that first copies the curated documentation into the package."""
62
+
63
+ def _copies_docs(self) -> bool:
64
+ return not getattr(self, "editable_mode", False)
65
+
66
+ def run(self) -> None:
67
+ if self._copies_docs():
68
+ copy_docs(Path(self.build_lib))
69
+ super().run()
70
+
71
+ def get_outputs(self, include_bytecode: bool = True) -> list[str]:
72
+ outputs = list(super().get_outputs(include_bytecode))
73
+ if self._copies_docs():
74
+ target = Path(self.build_lib) / PACKAGED_DOCS
75
+ outputs += [str(target / rel) for rel in load_scope().CURATED_DOCS]
76
+ return outputs
@@ -0,0 +1,193 @@
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
+ - Real cost in 2035: 1500 EUR/kW (unchanged)
46
+ - Nominal cost in 2035: 1500 x (1.02)^10 = 1829 EUR/kW approximately
47
+
48
+ **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.
49
+
50
+ ### The inflation rate
51
+
52
+ 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.
53
+
54
+ - **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.
55
+ - **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.
56
+
57
+ 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`).
58
+
59
+ ### The discount rate (per technology)
60
+
61
+ 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.
62
+
63
+ The discount rate converts a lump-sum investment cost into annual payments over the technology's lifetime using the standard annuity formula:
64
+
65
+ ```
66
+ annual_payment = invest_cost * discount_rate / (1 - (1 / (1 + discount_rate))^lifetime)
67
+ ```
68
+
69
+ **Example**: A solar plant costs 800 EUR/kW with a 25-year lifetime and 5% discount rate:
70
+ ```
71
+ annual_payment = 800 * 0.05 / (1 - 1/1.05^25) = 800 * 0.0710 = 56.8 EUR/kW/year approximately
72
+ ```
73
+
74
+ Different technologies can have different discount rates reflecting their risk profiles:
75
+ - Low risk (e.g., established solar PV): 3-5%
76
+ - Medium risk (e.g., natural gas turbine): 5-7%
77
+ - High risk (e.g., novel technology): 8-12%
78
+
79
+ ### Consistency between rates
80
+
81
+ The `discount_rate` and `inflation_rate` must use the same price basis across one model instance (either real or nominal):
82
+
83
+ | Inputs | inflation_rate | discount_rate (entity) |
84
+ |--------|---------------|----------------------|
85
+ | Real (constant prices) | 0 | Real WACC (e.g., 5%) |
86
+ | Nominal (current and future prices) | Expected inflation (e.g., 2%) | Nominal WACC (e.g., 7%) |
87
+
88
+ The relationship between real and nominal rates follows the Fisher equation:
89
+ ```
90
+ (1 + nominal_rate) = (1 + real_rate) * (1 + inflation_rate)
91
+ ```
92
+ Approximation: nominal = real + inflation approximately (e.g., 5% + 2% = 7%).
93
+
94
+ ### Fixed costs
95
+
96
+ 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).
97
+
98
+ For **existing** assets, fixed costs are applied each year with inflation adjustment.
99
+
100
+ For **invested** assets, fixed costs are calculated over the full economic lifetime at the time of the investment decision. This allows the optimizer to correctly weigh the total cost of ownership when deciding whether to invest. In the results, these costs are reported as a separate line item from the investment annuity.
101
+
102
+ ### Summary of economic parameters
103
+
104
+ | Parameter | Level | Default | Description |
105
+ |-----------|-------|---------|-------------|
106
+ | `inflation_rate` | Model | 0 | General inflation rate. Set to 0 for real inputs. |
107
+ | `inflation_offset_investment` | Model | 0 | When in the year investment costs occur (0 = start) |
108
+ | `inflation_offset_operations` | Model | 0.5 | When in the year operational costs occur (0.5 = middle) |
109
+ | `discount_rate` | Entity | 0.05 | Technology-specific WACC for annualizing investments |
110
+ | `invest_cost` | Entity | - | Overnight investment cost [CUR/kW] |
111
+ | `lifetime` | Entity | - | Economic lifetime [years] |
112
+ | `fixed_cost` | Entity | - | Annual fixed O&M cost [CUR/kW/year] |
113
+ | `salvage_value` | Entity | - | Residual value at end of life [CUR/kW] |
114
+
115
+ ### How multi-year periods are handled internally
116
+
117
+ 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).
118
+
119
+ 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 solve start. The inflation factor then sums the per-year inflation adjustments:
120
+
121
+ ```
122
+ inflation_factor = Σ_y p_years_represented[d,y] × 1/(1 + inflation_rate)^years_from_solve[y]
123
+ ```
124
+
125
+ 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.
126
+
127
+ 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.
128
+
129
+ In the objective function, operational costs follow this pattern:
130
+
131
+ ```
132
+ cost_per_timestep × step_duration × inflation_factor / period_share_of_year
133
+ ```
134
+
135
+ 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.
136
+
137
+ ### Using periods that are not one year long
138
+
139
+ A period does not have to represent exactly one year. It can be shorter
140
+ (e.g. a half-year period for six-monthly investment decisions) or stand in
141
+ for several years (see *How multi-year periods are handled internally*).
142
+ FlexTool keeps the accounting correct for any period length — you mostly
143
+ just need to know what is scaled and what is not.
144
+
145
+ #### What a period's length means
146
+
147
+ Each period has a length derived from its modelled timeline,
148
+ `period_share_of_year = hours_in_period / 8760`. Investment granularity is set separately
149
+ with `years_represented` on the solve — including fractional values such
150
+ as `years_represented = 0.5` for half-year steps.
151
+
152
+ #### What stays correct automatically
153
+
154
+ - **Operating costs and energy balances are absolute.** They are summed
155
+ over the timesteps actually in the period, so a shorter period simply
156
+ incurs less; a longer one, more. No year constant enters these totals.
157
+ - **Annual (per-year) parameters are prorated by period length.** Annual
158
+ `fixed_cost`, for instance, is applied as `fixed_cost × period_share`, so
159
+ a half-year period pays half a year of fixed cost. Investment annuities
160
+ and discounting likewise use the period's (possibly fractional) year
161
+ count.
162
+
163
+ #### What "annualised" in the results means
164
+
165
+ The `..._annualized` result columns divide a period's totals by
166
+ `period_share_of_year` to express them as a per-year rate. This is only a
167
+ reporting convenience so that periods of different lengths can be compared
168
+ on the same footing — it does **not** change the optimisation or the
169
+ period totals. If you want the actual amount incurred in the period, read
170
+ the plain (non-annualised) total.
171
+
172
+ #### When NOT to rely on inflow scaling
173
+
174
+ The `inflow_method` options `scale_to_annual_flow`, `scale_in_proportion`
175
+ and `scale_to_annual_and_peak_flow` assume the modelled timeline is a
176
+ representative year: they normalise the inflow by its sum over (one year
177
+ of) the timeline. If your timeline is **not** a representative year — a
178
+ non-representative sub-year slice, or several years with genuinely
179
+ different shapes — do not use these methods. Instead provide an accurate
180
+ absolute inflow time series and leave `inflow_method` at its default
181
+ (`use_original`); then no annual assumption is applied to your inflow.
182
+
183
+ (There is no equivalent "scale to annual" for `profile`-based limits such
184
+ as capacity factors. A capacity factor is bounded by installed capacity,
185
+ so there is no easy way to scale it accurately.)
186
+
187
+ #### One approximation to be aware of
188
+
189
+ When a single period represents multiple years (`years_represented > 1`),
190
+ costs within that period are discounted at the period's single point in
191
+ time rather than year by year. The totals remain correct; only the
192
+ within-period discounting is approximated. Use shorter periods (more of
193
+ them) if you need finer discounting resolution.