flextool 4.6.1__tar.gz → 4.6.2__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 (711) hide show
  1. {flextool-4.6.1/flextool.egg-info → flextool-4.6.2}/PKG-INFO +1 -1
  2. {flextool-4.6.1 → flextool-4.6.2}/docs/how_to/basics.md +1 -1
  3. {flextool-4.6.1 → flextool-4.6.2}/docs/reference/connections.md +6 -3
  4. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/model/_balance_terms.py +14 -4
  5. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/model/_cumulative_invest.py +11 -9
  6. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/model/_dc_power_flow.py +38 -5
  7. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/model/_group_slack.py +13 -7
  8. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/model/_reserve.py +49 -17
  9. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/model/core.py +35 -0
  10. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/emit/_period_params.py +10 -1
  11. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/flex_data.py +3 -0
  12. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/params/_derived.py +84 -4
  13. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/params/_direct.py +36 -7
  14. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/solve/_orchestration.py +6 -0
  15. flextool-4.6.2/flextool/gui/dialogs/database_check_dialog.py +54 -0
  16. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/input_sources.py +23 -0
  17. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/main_window.py +9 -0
  18. {flextool-4.6.1 → flextool-4.6.2}/flextool/run_warnings/_engine_specs.py +51 -2
  19. {flextool-4.6.1 → flextool-4.6.2}/flextool/run_warnings/_input_specs.py +31 -1
  20. {flextool-4.6.1 → flextool-4.6.2}/flextool/run_warnings/registry.py +4 -2
  21. {flextool-4.6.1 → flextool-4.6.2}/flextool/update_flextool/db_migration.py +21 -0
  22. flextool-4.6.2/flextool/update_flextool/value_list_history.py +170 -0
  23. {flextool-4.6.1 → flextool-4.6.2/flextool.egg-info}/PKG-INFO +1 -1
  24. {flextool-4.6.1 → flextool-4.6.2}/flextool.egg-info/SOURCES.txt +2 -0
  25. {flextool-4.6.1 → flextool-4.6.2}/pyproject.toml +1 -1
  26. {flextool-4.6.1 → flextool-4.6.2}/LICENSE.txt +0 -0
  27. {flextool-4.6.1 → flextool-4.6.2}/MANIFEST.in +0 -0
  28. {flextool-4.6.1 → flextool-4.6.2}/README.md +0 -0
  29. {flextool-4.6.1 → flextool-4.6.2}/_flextool_build.py +0 -0
  30. {flextool-4.6.1 → flextool-4.6.2}/docs/advanced_concepts.md +0 -0
  31. {flextool-4.6.1 → flextool-4.6.2}/docs/ai_assistant.md +0 -0
  32. {flextool-4.6.1 → flextool-4.6.2}/docs/dev/architecture.md +0 -0
  33. {flextool-4.6.1 → flextool-4.6.2}/docs/dev/engine.md +0 -0
  34. {flextool-4.6.1 → flextool-4.6.2}/docs/dev/slack_convention.md +0 -0
  35. {flextool-4.6.1 → flextool-4.6.2}/docs/env_vars.md +0 -0
  36. {flextool-4.6.1 → flextool-4.6.2}/docs/excel_interface.md +0 -0
  37. {flextool-4.6.1 → flextool-4.6.2}/docs/flextool_gui_interface.md +0 -0
  38. {flextool-4.6.1 → flextool-4.6.2}/docs/how_to/emissions.md +0 -0
  39. {flextool-4.6.1 → flextool-4.6.2}/docs/how_to/index.md +0 -0
  40. {flextool-4.6.1 → flextool-4.6.2}/docs/how_to/investment.md +0 -0
  41. {flextool-4.6.1 → flextool-4.6.2}/docs/how_to/outputs.md +0 -0
  42. {flextool-4.6.1 → flextool-4.6.2}/docs/how_to/performance.md +0 -0
  43. {flextool-4.6.1 → flextool-4.6.2}/docs/how_to/solve_sequences.md +0 -0
  44. {flextool-4.6.1 → flextool-4.6.2}/docs/how_to/stochastics.md +0 -0
  45. {flextool-4.6.1 → flextool-4.6.2}/docs/how_to/storage_hydro.md +0 -0
  46. {flextool-4.6.1 → flextool-4.6.2}/docs/how_to/thermal_chp.md +0 -0
  47. {flextool-4.6.1 → flextool-4.6.2}/docs/index.md +0 -0
  48. {flextool-4.6.1 → flextool-4.6.2}/docs/install_gui.md +0 -0
  49. {flextool-4.6.1 → flextool-4.6.2}/docs/install_toolbox.md +0 -0
  50. {flextool-4.6.1 → flextool-4.6.2}/docs/interface_overview.md +0 -0
  51. {flextool-4.6.1 → flextool-4.6.2}/docs/limitations.md +0 -0
  52. {flextool-4.6.1 → flextool-4.6.2}/docs/reading_results.md +0 -0
  53. {flextool-4.6.1 → flextool-4.6.2}/docs/reference/commodities.md +0 -0
  54. {flextool-4.6.1 → flextool-4.6.2}/docs/reference/entities_and_time.md +0 -0
  55. {flextool-4.6.1 → flextool-4.6.2}/docs/reference/flow_groups.md +0 -0
  56. {flextool-4.6.1 → flextool-4.6.2}/docs/reference/groups.md +0 -0
  57. {flextool-4.6.1 → flextool-4.6.2}/docs/reference/index.md +0 -0
  58. {flextool-4.6.1 → flextool-4.6.2}/docs/reference/nodes.md +0 -0
  59. {flextool-4.6.1 → flextool-4.6.2}/docs/reference/parameter_groups.md +0 -0
  60. {flextool-4.6.1 → flextool-4.6.2}/docs/reference/reserves.md +0 -0
  61. {flextool-4.6.1 → flextool-4.6.2}/docs/reference/units.md +0 -0
  62. {flextool-4.6.1 → flextool-4.6.2}/docs/reference/user_constraints.md +0 -0
  63. {flextool-4.6.1 → flextool-4.6.2}/docs/results.md +0 -0
  64. {flextool-4.6.1 → flextool-4.6.2}/docs/solvers/copt.md +0 -0
  65. {flextool-4.6.1 → flextool-4.6.2}/docs/solvers/cplex.md +0 -0
  66. {flextool-4.6.1 → flextool-4.6.2}/docs/solvers/gurobi.md +0 -0
  67. {flextool-4.6.1 → flextool-4.6.2}/docs/solvers/highs.md +0 -0
  68. {flextool-4.6.1 → flextool-4.6.2}/docs/solvers/index.md +0 -0
  69. {flextool-4.6.1 → flextool-4.6.2}/docs/solvers/xpress.md +0 -0
  70. {flextool-4.6.1 → flextool-4.6.2}/docs/spine_database.md +0 -0
  71. {flextool-4.6.1 → flextool-4.6.2}/docs/spine_toolbox.md +0 -0
  72. {flextool-4.6.1 → flextool-4.6.2}/docs/terminal_workflow.md +0 -0
  73. {flextool-4.6.1 → flextool-4.6.2}/docs/tutorial.md +0 -0
  74. {flextool-4.6.1 → flextool-4.6.2}/flextool/__init__.py +0 -0
  75. {flextool-4.6.1 → flextool-4.6.2}/flextool/_allocator.py +0 -0
  76. {flextool-4.6.1 → flextool-4.6.2}/flextool/_child_python.py +0 -0
  77. {flextool-4.6.1 → flextool-4.6.2}/flextool/_file_lock.py +0 -0
  78. {flextool-4.6.1 → flextool-4.6.2}/flextool/_local_solver_settings.py +0 -0
  79. {flextool-4.6.1 → flextool-4.6.2}/flextool/_mem_sampler.py +0 -0
  80. {flextool-4.6.1 → flextool-4.6.2}/flextool/_process_tree.py +0 -0
  81. {flextool-4.6.1 → flextool-4.6.2}/flextool/_resources.py +0 -0
  82. {flextool-4.6.1 → flextool-4.6.2}/flextool/_safe_text.py +0 -0
  83. {flextool-4.6.1 → flextool-4.6.2}/flextool/_solver_config_source.py +0 -0
  84. {flextool-4.6.1 → flextool-4.6.2}/flextool/_solver_option_rules.py +0 -0
  85. {flextool-4.6.1 → flextool-4.6.2}/flextool/_thread_budget.py +0 -0
  86. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/__init__.py +0 -0
  87. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/_files.py +0 -0
  88. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/backends/__init__.py +0 -0
  89. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/backends/_common.py +0 -0
  90. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/backends/anthropic_messages.py +0 -0
  91. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/backends/openai_chat.py +0 -0
  92. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/budget.py +0 -0
  93. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/caps.py +0 -0
  94. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/chat_cli.py +0 -0
  95. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/cli.py +0 -0
  96. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/context.py +0 -0
  97. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/docs_store.py +0 -0
  98. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/endpoint.py +0 -0
  99. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/env_knobs.py +0 -0
  100. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/errors.py +0 -0
  101. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/inputs/__init__.py +0 -0
  102. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/inputs/_db.py +0 -0
  103. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/inputs/_notes.py +0 -0
  104. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/inputs/_schema.py +0 -0
  105. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/inputs/_units.py +0 -0
  106. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/inputs/_values.py +0 -0
  107. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/keys.py +0 -0
  108. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/llm_adapter.py +0 -0
  109. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/llm_errors.py +0 -0
  110. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/llm_retry.py +0 -0
  111. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/mcp_server.py +0 -0
  112. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/model_check.py +0 -0
  113. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/model_facts.py +0 -0
  114. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/model_list_cache.py +0 -0
  115. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/model_versions.py +0 -0
  116. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/net.py +0 -0
  117. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/pacing.py +0 -0
  118. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/placeholders.py +0 -0
  119. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/probes.py +0 -0
  120. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/project.py +0 -0
  121. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/prompt.py +0 -0
  122. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/providers.py +0 -0
  123. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/redact.py +0 -0
  124. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/registry.py +0 -0
  125. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/results/__init__.py +0 -0
  126. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/results/_catalog.py +0 -0
  127. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/results/_entity.py +0 -0
  128. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/results/_overview.py +0 -0
  129. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/results/_query.py +0 -0
  130. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/results/_runs.py +0 -0
  131. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/results/_slacks.py +0 -0
  132. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/runtime_context.py +0 -0
  133. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/session.py +0 -0
  134. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/settings.py +0 -0
  135. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/store.py +0 -0
  136. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/textsearch.py +0 -0
  137. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/thoughts.py +0 -0
  138. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/tiers.py +0 -0
  139. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/tools/__init__.py +0 -0
  140. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/tools/diagnostics.py +0 -0
  141. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/tools/discovery.py +0 -0
  142. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/tools/explain.py +0 -0
  143. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/tools/inputs.py +0 -0
  144. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/tools/orientation.py +0 -0
  145. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/tools/results.py +0 -0
  146. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/unit_wording.py +0 -0
  147. {flextool-4.6.1 → flextool-4.6.2}/flextool/assistant/usage.py +0 -0
  148. {flextool-4.6.1 → flextool-4.6.2}/flextool/calibrate/__init__.py +0 -0
  149. {flextool-4.6.1 → flextool-4.6.2}/flextool/calibrate/__main__.py +0 -0
  150. {flextool-4.6.1 → flextool-4.6.2}/flextool/calibrate/_cli.py +0 -0
  151. {flextool-4.6.1 → flextool-4.6.2}/flextool/calibrate/_db_alt.py +0 -0
  152. {flextool-4.6.1 → flextool-4.6.2}/flextool/calibrate/_final_outputs.py +0 -0
  153. {flextool-4.6.1 → flextool-4.6.2}/flextool/calibrate/_guard.py +0 -0
  154. {flextool-4.6.1 → flextool-4.6.2}/flextool/calibrate/_loop.py +0 -0
  155. {flextool-4.6.1 → flextool-4.6.2}/flextool/calibrate/_readers.py +0 -0
  156. {flextool-4.6.1 → flextool-4.6.2}/flextool/calibrate/_report.py +0 -0
  157. {flextool-4.6.1 → flextool-4.6.2}/flextool/calibrate/_sizing.py +0 -0
  158. {flextool-4.6.1 → flextool-4.6.2}/flextool/calibrate/_solve.py +0 -0
  159. {flextool-4.6.1 → flextool-4.6.2}/flextool/calibrate/_solve_status.py +0 -0
  160. {flextool-4.6.1 → flextool-4.6.2}/flextool/cli/__init__.py +0 -0
  161. {flextool-4.6.1 → flextool-4.6.2}/flextool/cli/_console.py +0 -0
  162. {flextool-4.6.1 → flextool-4.6.2}/flextool/cli/_timing.py +0 -0
  163. {flextool-4.6.1 → flextool-4.6.2}/flextool/cli/cmd_execute_flextool_workflow.py +0 -0
  164. {flextool-4.6.1 → flextool-4.6.2}/flextool/cli/cmd_export_to_tabular.py +0 -0
  165. {flextool-4.6.1 → flextool-4.6.2}/flextool/cli/cmd_freeze_database.py +0 -0
  166. {flextool-4.6.1 → flextool-4.6.2}/flextool/cli/cmd_import_sensitivities.py +0 -0
  167. {flextool-4.6.1 → flextool-4.6.2}/flextool/cli/cmd_migrate_database.py +0 -0
  168. {flextool-4.6.1 → flextool-4.6.2}/flextool/cli/cmd_open_results_db.py +0 -0
  169. {flextool-4.6.1 → flextool-4.6.2}/flextool/cli/cmd_project_package.py +0 -0
  170. {flextool-4.6.1 → flextool-4.6.2}/flextool/cli/cmd_read_matpower.py +0 -0
  171. {flextool-4.6.1 → flextool-4.6.2}/flextool/cli/cmd_read_old_flextool.py +0 -0
  172. {flextool-4.6.1 → flextool-4.6.2}/flextool/cli/cmd_read_self_describing_tabular_input.py +0 -0
  173. {flextool-4.6.1 → flextool-4.6.2}/flextool/cli/cmd_read_tabular_input.py +0 -0
  174. {flextool-4.6.1 → flextool-4.6.2}/flextool/cli/cmd_run_flextool.py +0 -0
  175. {flextool-4.6.1 → flextool-4.6.2}/flextool/cli/cmd_scenario_results.py +0 -0
  176. {flextool-4.6.1 → flextool-4.6.2}/flextool/cli/cmd_solve_mps.py +0 -0
  177. {flextool-4.6.1 → flextool-4.6.2}/flextool/cli/cmd_time_runs.py +0 -0
  178. {flextool-4.6.1 → flextool-4.6.2}/flextool/cli/cmd_trust_workspace.py +0 -0
  179. {flextool-4.6.1 → flextool-4.6.2}/flextool/cli/cmd_update_flextool.py +0 -0
  180. {flextool-4.6.1 → flextool-4.6.2}/flextool/cli/cmd_write_outputs.py +0 -0
  181. {flextool-4.6.1 → flextool-4.6.2}/flextool/common_utils/__init__.py +0 -0
  182. {flextool-4.6.1 → flextool-4.6.2}/flextool/common_utils/plot_mem_shape.py +0 -0
  183. {flextool-4.6.1 → flextool-4.6.2}/flextool/console_markers.py +0 -0
  184. {flextool-4.6.1 → flextool-4.6.2}/flextool/decomposition/__init__.py +0 -0
  185. {flextool-4.6.1 → flextool-4.6.2}/flextool/decomposition/region_decomposition.py +0 -0
  186. {flextool-4.6.1 → flextool-4.6.2}/flextool/decomposition/region_filter.py +0 -0
  187. {flextool-4.6.1 → flextool-4.6.2}/flextool/docs_build/__init__.py +0 -0
  188. {flextool-4.6.1 → flextool-4.6.2}/flextool/docs_build/__main__.py +0 -0
  189. {flextool-4.6.1 → flextool-4.6.2}/flextool/docs_build/catalogue.py +0 -0
  190. {flextool-4.6.1 → flextool-4.6.2}/flextool/docs_build/formulation.py +0 -0
  191. {flextool-4.6.1 → flextool-4.6.2}/flextool/docs_build/index.py +0 -0
  192. {flextool-4.6.1 → flextool-4.6.2}/flextool/docs_build/parameters.py +0 -0
  193. {flextool-4.6.1 → flextool-4.6.2}/flextool/docs_build/scope.py +0 -0
  194. {flextool-4.6.1 → flextool-4.6.2}/flextool/docs_build/warnings.py +0 -0
  195. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/__init__.py +0 -0
  196. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/_behaviour_changes.py +0 -0
  197. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/_csv_reload/__init__.py +0 -0
  198. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/_csv_reload/_field_seeds.py +0 -0
  199. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/_csv_reload/_meta.py +0 -0
  200. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/_csv_reload/_seed.py +0 -0
  201. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/_csv_reload/_stamp.py +0 -0
  202. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/_csv_reload/_topology.py +0 -0
  203. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/_csv_reload/load.py +0 -0
  204. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/_csv_reload/offline_outputs.py +0 -0
  205. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/autoscale/__init__.py +0 -0
  206. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/autoscale/_config.py +0 -0
  207. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/autoscale/_guard.py +0 -0
  208. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/autoscale/_layer2.py +0 -0
  209. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/autoscale/_layer2_types.py +0 -0
  210. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/autoscale/_quantity_types.py +0 -0
  211. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/autoscale/_report.py +0 -0
  212. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/input/__init__.py +0 -0
  213. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/input/_axis_enums.py +0 -0
  214. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/input/_constants.py +0 -0
  215. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/input/_db_loader.py +0 -0
  216. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/input/_db_reader.py +0 -0
  217. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/input/_inmemory_reader.py +0 -0
  218. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/input/_input_source.py +0 -0
  219. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/input/_lifetime_roles.py +0 -0
  220. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/input/_param_shapes.py +0 -0
  221. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/input/_piecewise_curve.py +0 -0
  222. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/input/_solve_config.py +0 -0
  223. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/input/_solve_state.py +0 -0
  224. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/input/_solve_step_aggregation.py +0 -0
  225. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/input/_spinedb_reader.py +0 -0
  226. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/input/_timeline.py +0 -0
  227. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/input/_timeline_rules.py +0 -0
  228. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/model/__init__.py +0 -0
  229. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/model/_capacity.py +0 -0
  230. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/model/_coarse_flows.py +0 -0
  231. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/model/_commodity_ladder.py +0 -0
  232. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/model/_common.py +0 -0
  233. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/model/_delay.py +0 -0
  234. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/model/_exact.py +0 -0
  235. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/model/_extend.py +0 -0
  236. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/model/_lead_time.py +0 -0
  237. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/model/_non_anticipativity.py +0 -0
  238. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/model/_online.py +0 -0
  239. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/model/_pdt_join.py +0 -0
  240. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/model/_retire_built.py +0 -0
  241. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/model/_self_discharge.py +0 -0
  242. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/model/_unit_floors.py +0 -0
  243. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/output/__init__.py +0 -0
  244. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/output/_benders_slice.py +0 -0
  245. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/output/_capacity_margin.py +0 -0
  246. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/output/_coarse_flows.py +0 -0
  247. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/output/_cohort_capacity.py +0 -0
  248. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/output/_dump_csvs.py +0 -0
  249. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/output/_horizon_dump.py +0 -0
  250. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/output/_parquet_bundle.py +0 -0
  251. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/output/_prices.py +0 -0
  252. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/output/_reserve_report.py +0 -0
  253. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/output/_writer.py +0 -0
  254. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/__init__.py +0 -0
  255. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/_annuity.py +0 -0
  256. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/_co2_methods.py +0 -0
  257. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/_dump_stamp.py +0 -0
  258. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/_flex_data_provider.py +0 -0
  259. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/_input_writer.py +0 -0
  260. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/_invest_seeds.py +0 -0
  261. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/_provider_io.py +0 -0
  262. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/_provider_keys.py +0 -0
  263. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/_provider_translators.py +0 -0
  264. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/_reduce_detail.py +0 -0
  265. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/_reserve_methods.py +0 -0
  266. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/_solve_context.py +0 -0
  267. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/_stochastic_detect.py +0 -0
  268. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/emit/__init__.py +0 -0
  269. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/emit/_arc_unions.py +0 -0
  270. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/emit/_base_steps.py +0 -0
  271. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/emit/_blocks.py +0 -0
  272. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/emit/_calc_params.py +0 -0
  273. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/emit/_capacity_margin_peak.py +0 -0
  274. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/emit/_chain_params.py +0 -0
  275. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/emit/_co2_accumulators.py +0 -0
  276. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/emit/_dispatchers.py +0 -0
  277. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/emit/_energy_margin.py +0 -0
  278. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/emit/_energy_margin_adder.py +0 -0
  279. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/emit/_inflow_scaling.py +0 -0
  280. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/emit/_inflow_scaling_checks.py +0 -0
  281. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/emit/_leaf_sets.py +0 -0
  282. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/emit/_lp_scaling.py +0 -0
  283. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/emit/_mid_sets.py +0 -0
  284. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/emit/_pdt_lookup.py +0 -0
  285. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/emit/_pdt_params.py +0 -0
  286. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/emit/_per_solve.py +0 -0
  287. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/emit/_period_calc.py +0 -0
  288. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/emit/_reserve_sets.py +0 -0
  289. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/emit/_solve_time.py +0 -0
  290. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/emit/_solve_writers.py +0 -0
  291. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/emit/_vectorize.py +0 -0
  292. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/params/__init__.py +0 -0
  293. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/params/_arithmetic.py +0 -0
  294. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/params/_block.py +0 -0
  295. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/params/_block_layout.py +0 -0
  296. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/params/_branch.py +0 -0
  297. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/params/_coarse.py +0 -0
  298. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/params/_cohort_handoff.py +0 -0
  299. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/params/_cohorts.py +0 -0
  300. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/params/_cost_lines.py +0 -0
  301. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/params/_discount.py +0 -0
  302. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/params/_existing.py +0 -0
  303. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/params/_existing_salvage.py +0 -0
  304. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/params/_extend.py +0 -0
  305. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/params/_fixed_costs.py +0 -0
  306. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/params/_lifetime_costs.py +0 -0
  307. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/params/_lifetime_inputs.py +0 -0
  308. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/params/_mintime.py +0 -0
  309. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/params/_npv.py +0 -0
  310. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/params/_per_solve_sets.py +0 -0
  311. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/params/_period_values.py +0 -0
  312. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/params/_piecewise.py +0 -0
  313. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/params/_profiles.py +0 -0
  314. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/params/_projection.py +0 -0
  315. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/params/_ramp_links.py +0 -0
  316. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/params/_report_lines.py +0 -0
  317. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/params/_retire_built.py +0 -0
  318. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/params/_retire_existing.py +0 -0
  319. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/params/_retire_settlement.py +0 -0
  320. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/params/_run_calendar.py +0 -0
  321. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/params/_run_costs.py +0 -0
  322. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/preprocess/params/_walks.py +0 -0
  323. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/solve/__init__.py +0 -0
  324. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/solve/_acceptance.py +0 -0
  325. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/solve/_benders.py +0 -0
  326. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/solve/_benders_final.py +0 -0
  327. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/solve/_carry_routing.py +0 -0
  328. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/solve/_determinism.py +0 -0
  329. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/solve/_handoff.py +0 -0
  330. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/solve/_objective_options.py +0 -0
  331. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/solve/_realization.py +0 -0
  332. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/solve/_realized_overlap.py +0 -0
  333. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/solve/_recursive_solve.py +0 -0
  334. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/solve/_region_filter.py +0 -0
  335. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/solve/_run_model.py +0 -0
  336. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/solve/_solver_base.py +0 -0
  337. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/solve/_solver_catalogue.py +0 -0
  338. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/solve/_solver_dispatch.py +0 -0
  339. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/solve/_solver_outcome.py +0 -0
  340. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/solve/_stochastic.py +0 -0
  341. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/solve/_subprocess_solve.py +0 -0
  342. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/solve/_warm.py +0 -0
  343. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/solve/chain.py +0 -0
  344. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/solve/solver_catalogue/copt.json +0 -0
  345. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/solve/solver_catalogue/cplex.json +0 -0
  346. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/solve/solver_catalogue/gurobi.json +0 -0
  347. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/solve/solver_catalogue/highs.json +0 -0
  348. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine/solve/solver_catalogue/xpress.json +0 -0
  349. {flextool-4.6.1 → flextool-4.6.2}/flextool/engine_polars/__init__.py +0 -0
  350. {flextool-4.6.1 → flextool-4.6.2}/flextool/env_check.py +0 -0
  351. {flextool-4.6.1 → flextool-4.6.2}/flextool/export_to_tabular/__init__.py +0 -0
  352. {flextool-4.6.1 → flextool-4.6.2}/flextool/export_to_tabular/db_reader.py +0 -0
  353. {flextool-4.6.1 → flextool-4.6.2}/flextool/export_to_tabular/excel_writer.py +0 -0
  354. {flextool-4.6.1 → flextool-4.6.2}/flextool/export_to_tabular/export_settings.yaml +0 -0
  355. {flextool-4.6.1 → flextool-4.6.2}/flextool/export_to_tabular/export_to_excel.py +0 -0
  356. {flextool-4.6.1 → flextool-4.6.2}/flextool/export_to_tabular/formatting.py +0 -0
  357. {flextool-4.6.1 → flextool-4.6.2}/flextool/export_to_tabular/sheet_config.py +0 -0
  358. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/__init__.py +0 -0
  359. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/__main__.py +0 -0
  360. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/_menus.py +0 -0
  361. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/assistant/__init__.py +0 -0
  362. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/assistant/chat_tab.py +0 -0
  363. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/assistant/chat_window.py +0 -0
  364. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/assistant/entry.py +0 -0
  365. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/assistant/fonts.py +0 -0
  366. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/assistant/gate.py +0 -0
  367. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/assistant/geometry.py +0 -0
  368. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/assistant/gui_state.py +0 -0
  369. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/assistant/markdown_stream.py +0 -0
  370. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/assistant/notices.py +0 -0
  371. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/assistant/settings_dialog.py +0 -0
  372. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/assistant/strings.py +0 -0
  373. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/assistant/transcript.py +0 -0
  374. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/assistant/worker.py +0 -0
  375. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/calibrate_commands.py +0 -0
  376. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/calibrate_jobs.py +0 -0
  377. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/check_tree.py +0 -0
  378. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/cli_format.py +0 -0
  379. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/config_parser.py +0 -0
  380. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/data_models.py +0 -0
  381. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/db_editor_integration.py +0 -0
  382. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/db_version_check.py +0 -0
  383. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/dialogs/__init__.py +0 -0
  384. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/dialogs/add_dialog.py +0 -0
  385. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/dialogs/calibrate_dialog.py +0 -0
  386. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/dialogs/file_picker.py +0 -0
  387. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/dialogs/group_picker.py +0 -0
  388. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/dialogs/local_solver_settings_dialog.py +0 -0
  389. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/dialogs/migration_consent_dialog.py +0 -0
  390. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/dialogs/migration_progress_dialog.py +0 -0
  391. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/dialogs/plot_dialog.py +0 -0
  392. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/dialogs/plot_settings_picker.py +0 -0
  393. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/dialogs/project_dialog.py +0 -0
  394. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/dialogs/project_package_dialog.py +0 -0
  395. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/dialogs/update_dialog.py +0 -0
  396. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/downsampling.py +0 -0
  397. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/error_handling.py +0 -0
  398. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/execution_manager.py +0 -0
  399. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/execution_window.py +0 -0
  400. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/hover_tooltip.py +0 -0
  401. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/log_view.py +0 -0
  402. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/network_graph.py +0 -0
  403. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/output_actions.py +0 -0
  404. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/output_log_window.py +0 -0
  405. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/platform_utils.py +0 -0
  406. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/plot_cache.py +0 -0
  407. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/plot_canvas.py +0 -0
  408. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/plot_config_reader.py +0 -0
  409. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/project_utils.py +0 -0
  410. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/result_viewer.py +0 -0
  411. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/scenario_key.py +0 -0
  412. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/scenario_lists.py +0 -0
  413. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/settings_io.py +0 -0
  414. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/solve_reader.py +0 -0
  415. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/tree_reorder.py +0 -0
  416. {flextool-4.6.1 → flextool-4.6.2}/flextool/gui/ui_metrics.py +0 -0
  417. {flextool-4.6.1 → flextool-4.6.2}/flextool/input_derivation/__init__.py +0 -0
  418. {flextool-4.6.1 → flextool-4.6.2}/flextool/input_derivation/_commodity_ladder.py +0 -0
  419. {flextool-4.6.1 → flextool-4.6.2}/flextool/input_derivation/_commodity_ladder_sets.py +0 -0
  420. {flextool-4.6.1 → flextool-4.6.2}/flextool/input_derivation/_dc_power_flow.py +0 -0
  421. {flextool-4.6.1 → flextool-4.6.2}/flextool/input_derivation/_method_constants.py +0 -0
  422. {flextool-4.6.1 → flextool-4.6.2}/flextool/input_derivation/_piecewise.py +0 -0
  423. {flextool-4.6.1 → flextool-4.6.2}/flextool/input_derivation/_process_method.py +0 -0
  424. {flextool-4.6.1 → flextool-4.6.2}/flextool/input_derivation/_specs.py +0 -0
  425. {flextool-4.6.1 → flextool-4.6.2}/flextool/input_derivation/_validators.py +0 -0
  426. {flextool-4.6.1 → flextool-4.6.2}/flextool/lean_parquet.py +0 -0
  427. {flextool-4.6.1 → flextool-4.6.2}/flextool/model_builder/__init__.py +0 -0
  428. {flextool-4.6.1 → flextool-4.6.2}/flextool/model_builder/_special.py +0 -0
  429. {flextool-4.6.1 → flextool-4.6.2}/flextool/model_builder/build_model.py +0 -0
  430. {flextool-4.6.1 → flextool-4.6.2}/flextool/model_builder/encoding.py +0 -0
  431. {flextool-4.6.1 → flextool-4.6.2}/flextool/model_builder/names.py +0 -0
  432. {flextool-4.6.1 → flextool-4.6.2}/flextool/model_builder/profiles.py +0 -0
  433. {flextool-4.6.1 → flextool-4.6.2}/flextool/plot_outputs/__init__.py +0 -0
  434. {flextool-4.6.1 → flextool-4.6.2}/flextool/plot_outputs/axis_helpers.py +0 -0
  435. {flextool-4.6.1 → flextool-4.6.2}/flextool/plot_outputs/color_template.py +0 -0
  436. {flextool-4.6.1 → flextool-4.6.2}/flextool/plot_outputs/config.py +0 -0
  437. {flextool-4.6.1 → flextool-4.6.2}/flextool/plot_outputs/format_helpers.py +0 -0
  438. {flextool-4.6.1 → flextool-4.6.2}/flextool/plot_outputs/legend_helpers.py +0 -0
  439. {flextool-4.6.1 → flextool-4.6.2}/flextool/plot_outputs/orchestrator.py +0 -0
  440. {flextool-4.6.1 → flextool-4.6.2}/flextool/plot_outputs/perf.py +0 -0
  441. {flextool-4.6.1 → flextool-4.6.2}/flextool/plot_outputs/plan.py +0 -0
  442. {flextool-4.6.1 → flextool-4.6.2}/flextool/plot_outputs/plot_bars.py +0 -0
  443. {flextool-4.6.1 → flextool-4.6.2}/flextool/plot_outputs/plot_bars_detail.py +0 -0
  444. {flextool-4.6.1 → flextool-4.6.2}/flextool/plot_outputs/plot_lines.py +0 -0
  445. {flextool-4.6.1 → flextool-4.6.2}/flextool/plot_outputs/shared_manifest.py +0 -0
  446. {flextool-4.6.1 → flextool-4.6.2}/flextool/plot_outputs/subplot_helpers.py +0 -0
  447. {flextool-4.6.1 → flextool-4.6.2}/flextool/plot_outputs/unit_labels.py +0 -0
  448. {flextool-4.6.1 → flextool-4.6.2}/flextool/process_inputs/__init__.py +0 -0
  449. {flextool-4.6.1 → flextool-4.6.2}/flextool/process_inputs/import_old_excel_input.json +0 -0
  450. {flextool-4.6.1 → flextool-4.6.2}/flextool/process_inputs/read_matpower.py +0 -0
  451. {flextool-4.6.1 → flextool-4.6.2}/flextool/process_inputs/read_old_flextool.py +0 -0
  452. {flextool-4.6.1 → flextool-4.6.2}/flextool/process_inputs/read_self_describing_excel.py +0 -0
  453. {flextool-4.6.1 → flextool-4.6.2}/flextool/process_inputs/read_tabular_with_specification.py +0 -0
  454. {flextool-4.6.1 → flextool-4.6.2}/flextool/process_inputs/write_old_flextool_to_db.py +0 -0
  455. {flextool-4.6.1 → flextool-4.6.2}/flextool/process_inputs/write_self_describing_to_db.py +0 -0
  456. {flextool-4.6.1 → flextool-4.6.2}/flextool/process_inputs/write_to_input_db.py +0 -0
  457. {flextool-4.6.1 → flextool-4.6.2}/flextool/process_outputs/__init__.py +0 -0
  458. {flextool-4.6.1 → flextool-4.6.2}/flextool/process_outputs/_annualize.py +0 -0
  459. {flextool-4.6.1 → flextool-4.6.2}/flextool/process_outputs/_csv_sidecars.py +0 -0
  460. {flextool-4.6.1 → flextool-4.6.2}/flextool/process_outputs/_excel_writer.py +0 -0
  461. {flextool-4.6.1 → flextool-4.6.2}/flextool/process_outputs/_fan_labels.py +0 -0
  462. {flextool-4.6.1 → flextool-4.6.2}/flextool/process_outputs/_inmemory_helpers.py +0 -0
  463. {flextool-4.6.1 → flextool-4.6.2}/flextool/process_outputs/_output_meta.py +0 -0
  464. {flextool-4.6.1 → flextool-4.6.2}/flextool/process_outputs/_ramp_inputs.py +0 -0
  465. {flextool-4.6.1 → flextool-4.6.2}/flextool/process_outputs/_sheet_names.py +0 -0
  466. {flextool-4.6.1 → flextool-4.6.2}/flextool/process_outputs/_timeline_breaks.py +0 -0
  467. {flextool-4.6.1 → flextool-4.6.2}/flextool/process_outputs/_unit_context.py +0 -0
  468. {flextool-4.6.1 → flextool-4.6.2}/flextool/process_outputs/calc_capacity_flows.py +0 -0
  469. {flextool-4.6.1 → flextool-4.6.2}/flextool/process_outputs/calc_connections.py +0 -0
  470. {flextool-4.6.1 → flextool-4.6.2}/flextool/process_outputs/calc_costs.py +0 -0
  471. {flextool-4.6.1 → flextool-4.6.2}/flextool/process_outputs/calc_group_flows.py +0 -0
  472. {flextool-4.6.1 → flextool-4.6.2}/flextool/process_outputs/calc_piecewise.py +0 -0
  473. {flextool-4.6.1 → flextool-4.6.2}/flextool/process_outputs/calc_ramp_envelope.py +0 -0
  474. {flextool-4.6.1 → flextool-4.6.2}/flextool/process_outputs/calc_slacks.py +0 -0
  475. {flextool-4.6.1 → flextool-4.6.2}/flextool/process_outputs/calc_storage_vre.py +0 -0
  476. {flextool-4.6.1 → flextool-4.6.2}/flextool/process_outputs/drop_levels.py +0 -0
  477. {flextool-4.6.1 → flextool-4.6.2}/flextool/process_outputs/handoff_writers.py +0 -0
  478. {flextool-4.6.1 → flextool-4.6.2}/flextool/process_outputs/out_ancillary.py +0 -0
  479. {flextool-4.6.1 → flextool-4.6.2}/flextool/process_outputs/out_capacity.py +0 -0
  480. {flextool-4.6.1 → flextool-4.6.2}/flextool/process_outputs/out_costs.py +0 -0
  481. {flextool-4.6.1 → flextool-4.6.2}/flextool/process_outputs/out_flowgroup.py +0 -0
  482. {flextool-4.6.1 → flextool-4.6.2}/flextool/process_outputs/out_flows.py +0 -0
  483. {flextool-4.6.1 → flextool-4.6.2}/flextool/process_outputs/out_group.py +0 -0
  484. {flextool-4.6.1 → flextool-4.6.2}/flextool/process_outputs/out_node.py +0 -0
  485. {flextool-4.6.1 → flextool-4.6.2}/flextool/process_outputs/persist_realized_slice.py +0 -0
  486. {flextool-4.6.1 → flextool-4.6.2}/flextool/process_outputs/process_results.py +0 -0
  487. {flextool-4.6.1 → flextool-4.6.2}/flextool/process_outputs/read_highs_solution.py +0 -0
  488. {flextool-4.6.1 → flextool-4.6.2}/flextool/process_outputs/read_parameters.py +0 -0
  489. {flextool-4.6.1 → flextool-4.6.2}/flextool/process_outputs/read_sets.py +0 -0
  490. {flextool-4.6.1 → flextool-4.6.2}/flextool/process_outputs/read_variables.py +0 -0
  491. {flextool-4.6.1 → flextool-4.6.2}/flextool/process_outputs/reduced_cells.py +0 -0
  492. {flextool-4.6.1 → flextool-4.6.2}/flextool/process_outputs/solve_order.py +0 -0
  493. {flextool-4.6.1 → flextool-4.6.2}/flextool/process_outputs/spinedb_replay.py +0 -0
  494. {flextool-4.6.1 → flextool-4.6.2}/flextool/process_outputs/union_realized_slice.py +0 -0
  495. {flextool-4.6.1 → flextool-4.6.2}/flextool/process_outputs/write_outputs.py +0 -0
  496. {flextool-4.6.1 → flextool-4.6.2}/flextool/process_outputs/write_spinedb.py +0 -0
  497. {flextool-4.6.1 → flextool-4.6.2}/flextool/project_package.py +0 -0
  498. {flextool-4.6.1 → flextool-4.6.2}/flextool/representative_periods/__init__.py +0 -0
  499. {flextool-4.6.1 → flextool-4.6.2}/flextool/representative_periods/clustering.py +0 -0
  500. {flextool-4.6.1 → flextool-4.6.2}/flextool/representative_periods/force_include.py +0 -0
  501. {flextool-4.6.1 → flextool-4.6.2}/flextool/representative_periods/netload.py +0 -0
  502. {flextool-4.6.1 → flextool-4.6.2}/flextool/representative_periods/netload_inputs.py +0 -0
  503. {flextool-4.6.1 → flextool-4.6.2}/flextool/representative_periods/netload_iterate.py +0 -0
  504. {flextool-4.6.1 → flextool-4.6.2}/flextool/representative_periods/preprocess.py +0 -0
  505. {flextool-4.6.1 → flextool-4.6.2}/flextool/representative_periods/scenario_stack.py +0 -0
  506. {flextool-4.6.1 → flextool-4.6.2}/flextool/representative_periods/weights.py +0 -0
  507. {flextool-4.6.1 → flextool-4.6.2}/flextool/run_options.py +0 -0
  508. {flextool-4.6.1 → flextool-4.6.2}/flextool/run_record/__init__.py +0 -0
  509. {flextool-4.6.1 → flextool-4.6.2}/flextool/run_record/_owner.py +0 -0
  510. {flextool-4.6.1 → flextool-4.6.2}/flextool/run_record/_status.py +0 -0
  511. {flextool-4.6.1 → flextool-4.6.2}/flextool/run_record/_tee.py +0 -0
  512. {flextool-4.6.1 → flextool-4.6.2}/flextool/run_warnings/__init__.py +0 -0
  513. {flextool-4.6.1 → flextool-4.6.2}/flextool/run_warnings/_behaviour_specs.py +0 -0
  514. {flextool-4.6.1 → flextool-4.6.2}/flextool/safe_names.py +0 -0
  515. {flextool-4.6.1 → flextool-4.6.2}/flextool/scenario_comparison/__init__.py +0 -0
  516. {flextool-4.6.1 → flextool-4.6.2}/flextool/scenario_comparison/config_builder.py +0 -0
  517. {flextool-4.6.1 → flextool-4.6.2}/flextool/scenario_comparison/constants.py +0 -0
  518. {flextool-4.6.1 → flextool-4.6.2}/flextool/scenario_comparison/data_models.py +0 -0
  519. {flextool-4.6.1 → flextool-4.6.2}/flextool/scenario_comparison/db_reader.py +0 -0
  520. {flextool-4.6.1 → flextool-4.6.2}/flextool/scenario_comparison/dispatch_data.py +0 -0
  521. {flextool-4.6.1 → flextool-4.6.2}/flextool/scenario_comparison/dispatch_mappings.py +0 -0
  522. {flextool-4.6.1 → flextool-4.6.2}/flextool/scenario_comparison/dispatch_plots.py +0 -0
  523. {flextool-4.6.1 → flextool-4.6.2}/flextool/scenario_comparison/input_entity_colors.py +0 -0
  524. {flextool-4.6.1 → flextool-4.6.2}/flextool/scenario_comparison/orchestrator.py +0 -0
  525. {flextool-4.6.1 → flextool-4.6.2}/flextool/scenario_comparison/plan_union.py +0 -0
  526. {flextool-4.6.1 → flextool-4.6.2}/flextool/scenario_comparison/plot_settings_seed.py +0 -0
  527. {flextool-4.6.1 → flextool-4.6.2}/flextool/scenario_comparison/ramp_plots.py +0 -0
  528. {flextool-4.6.1 → flextool-4.6.2}/flextool/schemas/AXIS_CONTRACT.md +0 -0
  529. {flextool-4.6.1 → flextool-4.6.2}/flextool/schemas/canonical_databases/howto_aggregate_output.json +0 -0
  530. {flextool-4.6.1 → flextool-4.6.2}/flextool/schemas/canonical_databases/howto_connections.json +0 -0
  531. {flextool-4.6.1 → flextool-4.6.2}/flextool/schemas/canonical_databases/howto_demand.json +0 -0
  532. {flextool-4.6.1 → flextool-4.6.2}/flextool/schemas/canonical_databases/howto_hydro_reservoir.json +0 -0
  533. {flextool-4.6.1 → flextool-4.6.2}/flextool/schemas/canonical_databases/howto_hydro_reservoir_with_pump.json +0 -0
  534. {flextool-4.6.1 → flextool-4.6.2}/flextool/schemas/canonical_databases/howto_non_sync_and_curtailment.json +0 -0
  535. {flextool-4.6.1 → flextool-4.6.2}/flextool/schemas/canonical_databases/howto_ramp_and_start_up.json +0 -0
  536. {flextool-4.6.1 → flextool-4.6.2}/flextool/schemas/canonical_databases/howto_stochastics.json +0 -0
  537. {flextool-4.6.1 → flextool-4.6.2}/flextool/schemas/canonical_databases/templates_examples.json +0 -0
  538. {flextool-4.6.1 → flextool-4.6.2}/flextool/schemas/canonical_databases/templates_time_settings_only.json +0 -0
  539. {flextool-4.6.1 → flextool-4.6.2}/flextool/schemas/comparison_settings_template.json +0 -0
  540. {flextool-4.6.1 → flextool-4.6.2}/flextool/schemas/default_plot_settings.yaml +0 -0
  541. {flextool-4.6.1 → flextool-4.6.2}/flextool/schemas/default_plots.yaml +0 -0
  542. {flextool-4.6.1 → flextool-4.6.2}/flextool/schemas/flextool_axis_contract.json +0 -0
  543. {flextool-4.6.1 → flextool-4.6.2}/flextool/schemas/flextool_axis_contract.schema.json +0 -0
  544. {flextool-4.6.1 → flextool-4.6.2}/flextool/schemas/old_flextool_import_template.json +0 -0
  545. {flextool-4.6.1 → flextool-4.6.2}/flextool/schemas/output_info_template.json +0 -0
  546. {flextool-4.6.1 → flextool-4.6.2}/flextool/schemas/output_settings_template.json +0 -0
  547. {flextool-4.6.1 → flextool-4.6.2}/flextool/schemas/pre_v26/flextool_template_constant_default.json +0 -0
  548. {flextool-4.6.1 → flextool-4.6.2}/flextool/schemas/pre_v26/flextool_template_default_optional_output.json +0 -0
  549. {flextool-4.6.1 → flextool-4.6.2}/flextool/schemas/pre_v26/flextool_template_default_value.json +0 -0
  550. {flextool-4.6.1 → flextool-4.6.2}/flextool/schemas/pre_v26/flextool_template_drop_down.json +0 -0
  551. {flextool-4.6.1 → flextool-4.6.2}/flextool/schemas/pre_v26/flextool_template_lifetime_method.json +0 -0
  552. {flextool-4.6.1 → flextool-4.6.2}/flextool/schemas/pre_v26/flextool_template_optional_outputs.json +0 -0
  553. {flextool-4.6.1 → flextool-4.6.2}/flextool/schemas/pre_v26/flextool_template_output_node_flows.json +0 -0
  554. {flextool-4.6.1 → flextool-4.6.2}/flextool/schemas/pre_v26/flextool_template_results_master.json +0 -0
  555. {flextool-4.6.1 → flextool-4.6.2}/flextool/schemas/pre_v26/flextool_template_rolling_start_remove.json +0 -0
  556. {flextool-4.6.1 → flextool-4.6.2}/flextool/schemas/pre_v26/flextool_template_rolling_window.json +0 -0
  557. {flextool-4.6.1 → flextool-4.6.2}/flextool/schemas/pre_v26/flextool_template_storage_binding_defaults.json +0 -0
  558. {flextool-4.6.1 → flextool-4.6.2}/flextool/schemas/pre_v26/flextool_template_v2.json +0 -0
  559. {flextool-4.6.1 → flextool-4.6.2}/flextool/schemas/pre_v26/flextool_template_v25.json +0 -0
  560. {flextool-4.6.1 → flextool-4.6.2}/flextool/schemas/spinedb_results_schema.json +0 -0
  561. {flextool-4.6.1 → flextool-4.6.2}/flextool/schemas/spinedb_schema.json +0 -0
  562. {flextool-4.6.1 → flextool-4.6.2}/flextool/solver_config/copt.opt.template +0 -0
  563. {flextool-4.6.1 → flextool-4.6.2}/flextool/solver_config/cplex.opt.template +0 -0
  564. {flextool-4.6.1 → flextool-4.6.2}/flextool/solver_config/gurobi.opt.template +0 -0
  565. {flextool-4.6.1 → flextool-4.6.2}/flextool/solver_config/highs.opt.template +0 -0
  566. {flextool-4.6.1 → flextool-4.6.2}/flextool/solver_config/xpress.opt.template +0 -0
  567. {flextool-4.6.1 → flextool-4.6.2}/flextool/spinedb_backend/__init__.py +0 -0
  568. {flextool-4.6.1 → flextool-4.6.2}/flextool/spinedb_backend/_axis_enums.py +0 -0
  569. {flextool-4.6.1 → flextool-4.6.2}/flextool/spinedb_backend/_backend.py +0 -0
  570. {flextool-4.6.1 → flextool-4.6.2}/flextool/sqlite_url.py +0 -0
  571. {flextool-4.6.1 → flextool-4.6.2}/flextool/timeline_pieces.py +0 -0
  572. {flextool-4.6.1 → flextool-4.6.2}/flextool/units_of_measure.py +0 -0
  573. {flextool-4.6.1 → flextool-4.6.2}/flextool/update_flextool/__init__.py +0 -0
  574. {flextool-4.6.1 → flextool-4.6.2}/flextool/update_flextool/bundle_install.py +0 -0
  575. {flextool-4.6.1 → flextool-4.6.2}/flextool/update_flextool/canonical_databases.py +0 -0
  576. {flextool-4.6.1 → flextool-4.6.2}/flextool/update_flextool/db_handle.py +0 -0
  577. {flextool-4.6.1 → flextool-4.6.2}/flextool/update_flextool/ensure_settings_db.py +0 -0
  578. {flextool-4.6.1 → flextool-4.6.2}/flextool/update_flextool/export_database.py +0 -0
  579. {flextool-4.6.1 → flextool-4.6.2}/flextool/update_flextool/extend_tests_fixture.py +0 -0
  580. {flextool-4.6.1 → flextool-4.6.2}/flextool/update_flextool/fixture_schema.py +0 -0
  581. {flextool-4.6.1 → flextool-4.6.2}/flextool/update_flextool/frozen.py +0 -0
  582. {flextool-4.6.1 → flextool-4.6.2}/flextool/update_flextool/generate_canonical.py +0 -0
  583. {flextool-4.6.1 → flextool-4.6.2}/flextool/update_flextool/initialize_database.py +0 -0
  584. {flextool-4.6.1 → flextool-4.6.2}/flextool/update_flextool/install_info.py +0 -0
  585. {flextool-4.6.1 → flextool-4.6.2}/flextool/update_flextool/migrate_before_run.py +0 -0
  586. {flextool-4.6.1 → flextool-4.6.2}/flextool/update_flextool/migration_backup.py +0 -0
  587. {flextool-4.6.1 → flextool-4.6.2}/flextool/update_flextool/self_update.py +0 -0
  588. {flextool-4.6.1 → flextool-4.6.2}/flextool/update_flextool/sync_master_json_template.py +0 -0
  589. {flextool-4.6.1 → flextool-4.6.2}/flextool/update_flextool/test_fixtures.py +0 -0
  590. {flextool-4.6.1 → flextool-4.6.2}/flextool/user_dirs.py +0 -0
  591. {flextool-4.6.1 → flextool-4.6.2}/flextool.egg-info/dependency_links.txt +0 -0
  592. {flextool-4.6.1 → flextool-4.6.2}/flextool.egg-info/entry_points.txt +0 -0
  593. {flextool-4.6.1 → flextool-4.6.2}/flextool.egg-info/requires.txt +0 -0
  594. {flextool-4.6.1 → flextool-4.6.2}/flextool.egg-info/top_level.txt +0 -0
  595. {flextool-4.6.1 → flextool-4.6.2}/flextool_assistant_entry.py +0 -0
  596. {flextool-4.6.1 → flextool-4.6.2}/flextool_run_supervisor.py +0 -0
  597. {flextool-4.6.1 → flextool-4.6.2}/setup.cfg +0 -0
  598. {flextool-4.6.1 → flextool-4.6.2}/tests/test_bar_layout.py +0 -0
  599. {flextool-4.6.1 → flextool-4.6.2}/tests/test_bar_sub_pixel_labels.py +0 -0
  600. {flextool-4.6.1 → flextool-4.6.2}/tests/test_blocks.py +0 -0
  601. {flextool-4.6.1 → flextool-4.6.2}/tests/test_branch_weights.py +0 -0
  602. {flextool-4.6.1 → flextool-4.6.2}/tests/test_child_python_safe_path.py +0 -0
  603. {flextool-4.6.1 → flextool-4.6.2}/tests/test_child_run_argv.py +0 -0
  604. {flextool-4.6.1 → flextool-4.6.2}/tests/test_ci_shard.py +0 -0
  605. {flextool-4.6.1 → flextool-4.6.2}/tests/test_color_template.py +0 -0
  606. {flextool-4.6.1 → flextool-4.6.2}/tests/test_commodity_ladder_rolling.py +0 -0
  607. {flextool-4.6.1 → flextool-4.6.2}/tests/test_comparison_excel.py +0 -0
  608. {flextool-4.6.1 → flextool-4.6.2}/tests/test_comparison_project_root.py +0 -0
  609. {flextool-4.6.1 → flextool-4.6.2}/tests/test_comparison_results_registry.py +0 -0
  610. {flextool-4.6.1 → flextool-4.6.2}/tests/test_complete_period_share_reduction.py +0 -0
  611. {flextool-4.6.1 → flextool-4.6.2}/tests/test_connection_node_warnings.py +0 -0
  612. {flextool-4.6.1 → flextool-4.6.2}/tests/test_console_run_tool.py +0 -0
  613. {flextool-4.6.1 → flextool-4.6.2}/tests/test_cost_aggregation_semantics.py +0 -0
  614. {flextool-4.6.1 → flextool-4.6.2}/tests/test_cost_breakdown_by_entity.py +0 -0
  615. {flextool-4.6.1 → flextool-4.6.2}/tests/test_csv_dump_roundtrip.py +0 -0
  616. {flextool-4.6.1 → flextool-4.6.2}/tests/test_dc_power_flow.py +0 -0
  617. {flextool-4.6.1 → flextool-4.6.2}/tests/test_dependency_caps.py +0 -0
  618. {flextool-4.6.1 → flextool-4.6.2}/tests/test_dispatch_consumer_and_connection_signs.py +0 -0
  619. {flextool-4.6.1 → flextool-4.6.2}/tests/test_dispatch_multi_period.py +0 -0
  620. {flextool-4.6.1 → flextool-4.6.2}/tests/test_dispatch_node_debug_and_tree.py +0 -0
  621. {flextool-4.6.1 → flextool-4.6.2}/tests/test_dispatch_order_specials.py +0 -0
  622. {flextool-4.6.1 → flextool-4.6.2}/tests/test_dispatch_scenario_tag.py +0 -0
  623. {flextool-4.6.1 → flextool-4.6.2}/tests/test_ensure_settings_db.py +0 -0
  624. {flextool-4.6.1 → flextool-4.6.2}/tests/test_entity_unitsize_invariant.py +0 -0
  625. {flextool-4.6.1 → flextool-4.6.2}/tests/test_entity_universe_carrier.py +0 -0
  626. {flextool-4.6.1 → flextool-4.6.2}/tests/test_env_check.py +0 -0
  627. {flextool-4.6.1 → flextool-4.6.2}/tests/test_env_knob_registry.py +0 -0
  628. {flextool-4.6.1 → flextool-4.6.2}/tests/test_excel_text_cells.py +0 -0
  629. {flextool-4.6.1 → flextool-4.6.2}/tests/test_execution_log_lint.py +0 -0
  630. {flextool-4.6.1 → flextool-4.6.2}/tests/test_export_to_tabular.py +0 -0
  631. {flextool-4.6.1 → flextool-4.6.2}/tests/test_extend_tests_fixture.py +0 -0
  632. {flextool-4.6.1 → flextool-4.6.2}/tests/test_flowgroup_indicators.py +0 -0
  633. {flextool-4.6.1 → flextool-4.6.2}/tests/test_force_include.py +0 -0
  634. {flextool-4.6.1 → flextool-4.6.2}/tests/test_group_output_warnings.py +0 -0
  635. {flextool-4.6.1 → flextool-4.6.2}/tests/test_handoff_writers.py +0 -0
  636. {flextool-4.6.1 → flextool-4.6.2}/tests/test_input_entity_colors.py +0 -0
  637. {flextool-4.6.1 → flextool-4.6.2}/tests/test_lean_parquet.py +0 -0
  638. {flextool-4.6.1 → flextool-4.6.2}/tests/test_lh2_three_region.py +0 -0
  639. {flextool-4.6.1 → flextool-4.6.2}/tests/test_min_load_rolling.py +0 -0
  640. {flextool-4.6.1 → flextool-4.6.2}/tests/test_model_builder_invest.py +0 -0
  641. {flextool-4.6.1 → flextool-4.6.2}/tests/test_model_builder_special_functions.py +0 -0
  642. {flextool-4.6.1 → flextool-4.6.2}/tests/test_non_anticipativity.py +0 -0
  643. {flextool-4.6.1 → flextool-4.6.2}/tests/test_old_flextool_importer_schema_drift.py +0 -0
  644. {flextool-4.6.1 → flextool-4.6.2}/tests/test_open_results_db.py +0 -0
  645. {flextool-4.6.1 → flextool-4.6.2}/tests/test_output_column_metadata.py +0 -0
  646. {flextool-4.6.1 → flextool-4.6.2}/tests/test_output_csv_names.py +0 -0
  647. {flextool-4.6.1 → flextool-4.6.2}/tests/test_output_metadata_renderers.py +0 -0
  648. {flextool-4.6.1 → flextool-4.6.2}/tests/test_output_work_folder_isolation.py +0 -0
  649. {flextool-4.6.1 → flextool-4.6.2}/tests/test_parameter_group_coverage.py +0 -0
  650. {flextool-4.6.1 → flextool-4.6.2}/tests/test_period_share_of_year_output.py +0 -0
  651. {flextool-4.6.1 → flextool-4.6.2}/tests/test_piecewise_validation.py +0 -0
  652. {flextool-4.6.1 → flextool-4.6.2}/tests/test_plan_union.py +0 -0
  653. {flextool-4.6.1 → flextool-4.6.2}/tests/test_plot_draw_order.py +0 -0
  654. {flextool-4.6.1 → flextool-4.6.2}/tests/test_plot_gaps.py +0 -0
  655. {flextool-4.6.1 → flextool-4.6.2}/tests/test_plot_pipeline.py +0 -0
  656. {flextool-4.6.1 → flextool-4.6.2}/tests/test_plot_plan_chunk_reconstruction.py +0 -0
  657. {flextool-4.6.1 → flextool-4.6.2}/tests/test_plot_plan_time_labels_roundtrip.py +0 -0
  658. {flextool-4.6.1 → flextool-4.6.2}/tests/test_plot_settings_seed.py +0 -0
  659. {flextool-4.6.1 → flextool-4.6.2}/tests/test_project_package_cli.py +0 -0
  660. {flextool-4.6.1 → flextool-4.6.2}/tests/test_ramp_histogram.py +0 -0
  661. {flextool-4.6.1 → flextool-4.6.2}/tests/test_read_highs_solution.py +0 -0
  662. {flextool-4.6.1 → flextool-4.6.2}/tests/test_recourse_cost_reconciliation.py +0 -0
  663. {flextool-4.6.1 → flextool-4.6.2}/tests/test_regional_filter.py +0 -0
  664. {flextool-4.6.1 → flextool-4.6.2}/tests/test_representative_periods.py +0 -0
  665. {flextool-4.6.1 → flextool-4.6.2}/tests/test_rolling_online_carry.py +0 -0
  666. {flextool-4.6.1 → flextool-4.6.2}/tests/test_rolling_online_mintime_carry.py +0 -0
  667. {flextool-4.6.1 → flextool-4.6.2}/tests/test_rolling_online_minuptime.py +0 -0
  668. {flextool-4.6.1 → flextool-4.6.2}/tests/test_rp_alternative_name.py +0 -0
  669. {flextool-4.6.1 → flextool-4.6.2}/tests/test_rp_force_include_wiring.py +0 -0
  670. {flextool-4.6.1 → flextool-4.6.2}/tests/test_rp_solves_filter.py +0 -0
  671. {flextool-4.6.1 → flextool-4.6.2}/tests/test_run_options.py +0 -0
  672. {flextool-4.6.1 → flextool-4.6.2}/tests/test_safe_names.py +0 -0
  673. {flextool-4.6.1 → flextool-4.6.2}/tests/test_safe_text.py +0 -0
  674. {flextool-4.6.1 → flextool-4.6.2}/tests/test_scenario_colors.py +0 -0
  675. {flextool-4.6.1 → flextool-4.6.2}/tests/test_scenario_stack.py +0 -0
  676. {flextool-4.6.1 → flextool-4.6.2}/tests/test_scenarios.py +0 -0
  677. {flextool-4.6.1 → flextool-4.6.2}/tests/test_self_describing_reader.py +0 -0
  678. {flextool-4.6.1 → flextool-4.6.2}/tests/test_shared_axis_manifest.py +0 -0
  679. {flextool-4.6.1 → flextool-4.6.2}/tests/test_simple_bar_entity_color.py +0 -0
  680. {flextool-4.6.1 → flextool-4.6.2}/tests/test_solve_config.py +0 -0
  681. {flextool-4.6.1 → flextool-4.6.2}/tests/test_solve_reader.py +0 -0
  682. {flextool-4.6.1 → flextool-4.6.2}/tests/test_specification_excel_import.py +0 -0
  683. {flextool-4.6.1 → flextool-4.6.2}/tests/test_sqlite_url.py +0 -0
  684. {flextool-4.6.1 → flextool-4.6.2}/tests/test_stochastic_co2_total_price.py +0 -0
  685. {flextool-4.6.1 → flextool-4.6.2}/tests/test_stream_concat_temp_cleanup.py +0 -0
  686. {flextool-4.6.1 → flextool-4.6.2}/tests/test_support_load.py +0 -0
  687. {flextool-4.6.1 → flextool-4.6.2}/tests/test_synthesize_invest_dual.py +0 -0
  688. {flextool-4.6.1 → flextool-4.6.2}/tests/test_thread_budget.py +0 -0
  689. {flextool-4.6.1 → flextool-4.6.2}/tests/test_time_runs.py +0 -0
  690. {flextool-4.6.1 → flextool-4.6.2}/tests/test_timeline_breaks.py +0 -0
  691. {flextool-4.6.1 → flextool-4.6.2}/tests/test_timings_csv.py +0 -0
  692. {flextool-4.6.1 → flextool-4.6.2}/tests/test_toolbox_specs.py +0 -0
  693. {flextool-4.6.1 → flextool-4.6.2}/tests/test_unidirectional_connection.py +0 -0
  694. {flextool-4.6.1 → flextool-4.6.2}/tests/test_unit_online_dt_columns.py +0 -0
  695. {flextool-4.6.1 → flextool-4.6.2}/tests/test_units_of_measure.py +0 -0
  696. {flextool-4.6.1 → flextool-4.6.2}/tests/test_units_of_measure_validators.py +0 -0
  697. {flextool-4.6.1 → flextool-4.6.2}/tests/test_user_dirs_isolation.py +0 -0
  698. {flextool-4.6.1 → flextool-4.6.2}/tests/test_v52_migration.py +0 -0
  699. {flextool-4.6.1 → flextool-4.6.2}/tests/test_v63_migration.py +0 -0
  700. {flextool-4.6.1 → flextool-4.6.2}/tests/test_v64_migration.py +0 -0
  701. {flextool-4.6.1 → flextool-4.6.2}/tests/test_v65_migration.py +0 -0
  702. {flextool-4.6.1 → flextool-4.6.2}/tests/test_v66_migration.py +0 -0
  703. {flextool-4.6.1 → flextool-4.6.2}/tests/test_v67_migration.py +0 -0
  704. {flextool-4.6.1 → flextool-4.6.2}/tests/test_v68_migration.py +0 -0
  705. {flextool-4.6.1 → flextool-4.6.2}/tests/test_v69_migration.py +0 -0
  706. {flextool-4.6.1 → flextool-4.6.2}/tests/test_v70_migration.py +0 -0
  707. {flextool-4.6.1 → flextool-4.6.2}/tests/test_workdir_empty_default.py +0 -0
  708. {flextool-4.6.1 → flextool-4.6.2}/tests/test_xlsx_startup_input_round_trip.py +0 -0
  709. {flextool-4.6.1 → flextool-4.6.2}/tests/test_xlsx_v77_round_trip.py +0 -0
  710. {flextool-4.6.1 → flextool-4.6.2}/tests/test_xlsx_workflow.py +0 -0
  711. {flextool-4.6.1 → flextool-4.6.2}/tests/test_years_represented.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flextool
3
- Version: 4.6.1
3
+ Version: 4.6.2
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
@@ -96,7 +96,7 @@ Typically the model does not want to produce extra energy as it usually has cost
96
96
 
97
97
  *Variable_cost_only* can be used when there are no losses associated with the flow. It allows costs related to the flow, but if losses are to be included, it should not be used.
98
98
 
99
- The *no_losses_no_variable_cost* can be used when the connection has no losses and no variable costs accociated with the flow. It is computationally the most efficient method, as it uses only one variable for the flow (the variable becomes negative for the other direction, but this can work only when there are no losses or variable costs). It also prevents simultanoues flow to both directions.
99
+ The *no_losses_no_variable_cost* can be used when the connection has no losses and no variable costs associated with the flow. It is computationally the most efficient method, as it uses only one variable for the flow (the variable becomes negative for the other direction), so the flow cannot go both ways at the same time. One flow variable also cannot model losses or variable costs: its `other_operational_cost` is ignored (W-0590), and so is its `efficiency` (W-0591), unless the two nodes have different `unit_of_measure` values: then the `efficiency` is a conversion between the units that applies in both directions (e.g. MWh to t; W-0589).
100
100
 
101
101
  The *unidirectional* method restricts the flow to one direction only (from the first node to the second node in `connection__node__node`). It uses a single non-negative variable and supports `efficiency` and `other_operational_cost` in the usual way. Useful for one-way transmission such as controllable HVDC links or commodity pipelines.
102
102
 
@@ -4,7 +4,10 @@ Connections can transfer energy between two nodes. Parameters for the connection
4
4
 
5
5
  ## Defining how the connection functions
6
6
 
7
- - `transfer_method` to define the way the connection transfers energy between the nodes
7
+ - `transfer_method` to define the way the connection transfers energy between the nodes: *regular* (default), *exact*, *variable_cost_only*, *no_losses_no_variable_cost* or *unidirectional* (see [the basics](../how_to/basics.md)). A *no_losses_no_variable_cost* connection (and a line of a `dc_power_flow_with_angles` group, which uses it internally) carries both directions in one signed flow, so it cannot have different values in the two directions:
8
+ - it cannot model losses (a loss one way would be a gain the other way), so its `efficiency` is ignored (treated as 1, with a warning: W-0591) when the two nodes have the same `unit_of_measure` or either has none, and always on a line of a `dc_power_flow_with_angles` group. For losses, use *regular* or *exact*.
9
+ - between nodes with different `unit_of_measure` values, the `efficiency` is a conversion between the units (e.g. MWh to t), the same in both directions: the flow f arriving at the second node takes f / `efficiency` from the first, and in the reverse direction the first node gets f / `efficiency` for the f taken from the second. FlexTool warns about it (W-0589).
10
+ - its `other_operational_cost` is ignored (it would be a cost one way and a revenue the other), with a warning (W-0590). For a variable cost, use *variable_cost_only*, *regular* or *exact*.
8
11
  - `startup_method` gives the connection online capacity. *linear*: the online capacity is anything between 0 and the built capacity; *binary*: whole units of the connection (of `virtual_unitsize`, else the whole connection), computationally more demanding. The connection's flow in each direction is limited by its online capacity × availability, its reserve by its online capacity, and `startup_cost` is paid per MW brought online. Connections have no minimum load or minimum up/down times. Not available for connections in a `dc_power_flow_with_angles` group, other than `is_DC` connections (an error: switching a DC power-flow line off would need line-switching constraints).
9
12
  - `invest_method` to define investment and retirement limits: either *not_allowed* or then a combination of
10
13
  - *invest* and/or *retire*
@@ -16,7 +19,7 @@ Connections can transfer energy between two nodes. Parameters for the connection
16
19
  ## Main data items for connections
17
20
 
18
21
  - `existing` - [MW or count] Existing capacity or number of units. If `virtual_unitsize` is given, then `existing` is the number of units (capacity = `existing` × `virtual_unitsize`). Otherwise `existing` is the existing capacity of a single unit (typically in MW). Constant or period.
19
- - `efficiency` - [factor, typically between 0-1] Efficiency of a connection. Constant, period, time or period+time.
22
+ - `efficiency` - [factor, typically between 0-1] Efficiency of a connection. Constant, period, time or period+time. On a *no_losses_no_variable_cost* connection it is ignored, or a unit conversion that applies in both directions between nodes in different units (see `transfer_method`).
20
23
  - `delay` - [hours] Not yet applied to connections (planned). A connection `delay` is ignored: the connection is modelled exactly as if no delay were set (the flow arrives in the same time step) and the model prints a warning naming the connection. To model a delayed flow between two nodes, use a unit with `delay` instead.
21
24
  - `startup_cost` - [CUR/MW] Cost of starting up one MW of capacity (used when `startup_method` activates online variables on the connection). Constant or period.
22
25
  - `reactance` - [p.u.] Per-unit reactance of the transmission line. Used for DC power flow when the enclosing `group__node` has `transfer_method = dc_power_flow_with_angles`.
@@ -26,7 +29,7 @@ Connections can transfer energy between two nodes. Parameters for the connection
26
29
  - `constraint_retired_capacity_coeff` - A map of coefficients (Index: constraint name, value: coefficient). Puts the capacity retired in each period on the left side of the user constraint. Coefficient per MW. See [User constraints](user_constraints.md).
27
30
  - `constraint_in_construction_capacity_coeff` - A map of coefficients (Index: constraint name, value: coefficient). Puts the capacity in construction in each period on the left side of the user constraint. Capacity is in construction from the period of the investment decision until it comes online. It is zero without a construction lead time. Coefficient per MW. See [User constraints](user_constraints.md).
28
31
  - `constraint_online_coeff` - [unit of the constraint per unit online] A map of coefficients (Index: constraint name, value: coefficient). Puts the number of units of the connection online in each time step (both directions together) on the left side of the user constraint. One unit is `virtual_unitsize`; without it, the largest `existing` capacity, else 1000 MW — set `virtual_unitsize` on a connection that is invested in. Needs `startup_method` *linear* or *binary*; a coefficient on a connection without it is an error. With *linear* startup the number is continuous. For MW online, use the unit size as the coefficient. See [User constraints](user_constraints.md).
29
- - `other_operational_cost` - [CUR/MWh] Other operational variable cost for trasferring over the connection. Constant, period, time or period+time.
32
+ - `other_operational_cost` - [CUR/MWh] Other operational variable cost for trasferring over the connection. Constant, period, time or period+time. Ignored on a *no_losses_no_variable_cost* connection (see `transfer_method`).
30
33
  - `fixed_cost` - [CUR/kW/a] Annual fixed cost. New capacity pays it only while it operates. Constant or period.
31
34
  - `invest_cost` - [CUR/kW] Overnight investment cost of new capacity. It is annualized over `payback_time` with `discount_rate`; with `lifetime_method` *reinvest_choice* or *no_reinvestment* that annuity is spread evenly over `lifetime_technical` and paid for each year the capacity is in service (with *reinvest_automatic*: each replacement at the `invest_cost` of the period it comes online, for its years in service). Construction time costs with their interest must be included here. Constant or period: the value of the period when the capacity is built (comes online) is used.
32
35
  - `discount_rate` - [e.g. 0.05 equals 5%] Discount rate for investments (WACC). Reflects the financing cost and risk for this technology. In the same terms as the cost inputs: a real rate for inputs in real prices, a nominal rate for nominal inputs. Not the model's `social_discount_rate`, which weighs costs over time. Constant or period.
@@ -50,7 +50,8 @@ def balance_flow_terms(b: "_Build", *, at_branch: bool = False, nodes: "pl.DataF
50
50
  v_online[p,d,t] · section[p,d,t] · unitsize[p] · Δt[d,t]
51
51
  source_noEff[n,d,t] = − Σ_{(p,n,k) ∈ flow_from_nodeBalance_noEff} v_flow[p,n,k,d,t] · unitsize[p] · Δt[d,t]
52
52
  back_at_sink / back_at_source: the v_flow_back terms of twoway1var_arcs
53
- (_dc_power_flow.nodeBalance_back_flow_terms)
53
+ (_dc_power_flow.nodeBalance_back_flow_terms; at the source × slope on an
54
+ arc of process_source_sink_eff, as the forward flow draws there)
54
55
  startup_su_{lin,int}[n,d,t] = − Σ_{(p,n) ∈ startup_to_balance} v_startup[p,d,t] · startup_energy[p,n,d]
55
56
  · unitsize[p] (an event: no Δt; core._startup_draw)
56
57
  A unit with an efficiency draws flow · slope from its source node; a min_load_efficiency unit also draws its
@@ -135,7 +136,9 @@ def balance_flow_terms(b: "_Build", *, at_branch: bool = False, nodes: "pl.DataF
135
136
  on=["p", "source", "sink"], how="anti")
136
137
  terms.update(_dc_power_flow.nodeBalance_back_flow_terms(
137
138
  back_arcs, var(b.v_flow_back), d.p_unitsize, step_dur, group_nodes=group_nodes,
138
- exclude_arcs=exclude_arcs if exclude_arcs is not None and "g" in exclude_arcs.columns else None))
139
+ exclude_arcs=exclude_arcs if exclude_arcs is not None and "g" in exclude_arcs.columns else None,
140
+ p_slope=None if d.p_slope is None else at_dt(d.p_slope, ("p", "d", "t")),
141
+ slope_arcs=d.process_source_sink_eff))
139
142
  return terms
140
143
 
141
144
 
@@ -151,7 +154,8 @@ def balance_flow_values(d, sol, *, group_nodes: pl.DataFrame,
151
154
 
152
155
  sink_flow = v_flow · unitsize; source_eff = − v_flow · unitsize · slope;
153
156
  source_section = − v_online · section · unitsize; source_noEff = − v_flow · unitsize;
154
- back_at_sink = − v_flow_back · unitsize; back_at_source = + v_flow_back · unitsize
157
+ back_at_sink = − v_flow_back · unitsize; back_at_source = + v_flow_back · unitsize (· slope on an arc of
158
+ process_source_sink_eff)
155
159
 
156
160
  The start-up draw (energy per event, not capacity) is not a term of these rows and is not here.
157
161
 
@@ -215,9 +219,15 @@ def balance_flow_values(d, sol, *, group_nodes: pl.DataFrame,
215
219
  excl = None
216
220
  if exclude_arcs is not None and exclude_arcs.height > 0 and "g" in exclude_arcs.columns:
217
221
  excl = utf8(exclude_arcs.select("g", "p", "source", "sink").unique())
222
+ eff = utf8(d.process_source_sink_eff.select("p", "source", "sink")) if (
223
+ d.p_slope is not None and _has_rows(d.process_source_sink_eff)) else None
218
224
  for term, side, sign in (("back_at_sink", "sink", -1.0), ("back_at_source", "source", 1.0)):
219
225
  at = back.with_columns(n=pl.col(side)).join(gn, on="n", how="inner")
220
226
  if excl is not None:
221
227
  at = at.join(excl, on=["g", "p", "source", "sink"], how="anti")
222
- emit(at.select("g", "n", "p", "source", "sink") if at.height > 0 else None, term, sign, "v_flow_back")
228
+ at = at.select("g", "n", "p", "source", "sink")
229
+ if side == "source" and eff is not None:
230
+ emit(at.join(eff, on=["p", "source", "sink"], how="semi"), term, sign, "v_flow_back", d.p_slope)
231
+ at = at.join(eff, on=["p", "source", "sink"], how="anti")
232
+ emit(at if at.height > 0 else None, term, sign, "v_flow_back")
223
233
  return pl.concat(parts) if parts else empty
@@ -101,7 +101,9 @@ def _group_flow(b: _Build) -> Expr | None:
101
101
  + v_online[p,d,t]·section[p,d,t]·unitsize[p]) [min_load_efficiency units only]
102
102
  − Σ_{(p,s,k,n) ∈ flow_from_n ∩ pss_noEff, (g,p,n) ∈ gpn} v_flow[p,s,k,d,t] · unitsize[p]
103
103
  − Σ_{(p,s,n) ∈ twoway1var_arcs, (g,p,n) ∈ gpn} v_flow_back[p,s,n,d,t] · unitsize[p] [back at sink]
104
- + Σ_{(p,n,k) ∈ twoway1var_arcs, (g,p,n) ∈ gpn} v_flow_back[p,n,k,d,t] · unitsize[p] [back at source]
104
+ + Σ_{(p,n,k) ∈ twoway1var_arcs, (g,p,n) ∈ gpn} v_flow_back[p,n,k,d,t] · unitsize[p] · σ[p,d,t]
105
+ [back at source]
106
+ σ = slope[p,d,t] on an arc of pss_eff, else 1
105
107
  gpn = group_process_node; flow_to_n / flow_from_n carry the sink / source node as n
106
108
  The eff-source term is the same fuel measure as ``nodeBalance_eq`` and the CO2/commodity cost
107
109
  terms (``_eff_fuel_input``): eff sources carry no ``conversion_flow_coeff``, and a
@@ -109,13 +111,12 @@ def _group_flow(b: _Build) -> Expr | None:
109
111
  The v_flow_back terms are the reverse flow of a one-variable two-way arc (``no_losses_no_variable_cost``
110
112
  and DC power flow, twoway1var_arcs; signed flow = v_flow − v_flow_back) with the nodeBalance signs
111
113
  (``_dc_power_flow.nodeBalance_back_flow_terms``), so such a connection counts by its net flow at the
112
- member node, as a two-variable connection does through its reverse arc. The back term carries no
113
- slope while the forward flow's source side goes through ``_eff_fuel_input``, as in nodeBalance_eq. The
114
- arcs are not lossless by construction: a ``no_losses_no_variable_cost`` connection with a user
115
- ``efficiency`` ≠ 1 keeps its slope (1/efficiency) on the forward flow only, so its two directions are
116
- then asymmetric here, in nodeBalance_eq and in the objective, unlike a two-variable connection
117
- (pre-existing; the fix, a warning for efficiency ≠ 1 and ignoring variable_cost, is deferred). With both
118
- ends of the arc in g the terms cancel.
114
+ member node, as a two-variable connection does through its reverse arc. The forward flow's source side
115
+ goes through ``_eff_fuel_input`` (× slope), and so does the back flow's: one signed flow f, f at the sink and
116
+ f · slope at the source in both directions, as in nodeBalance_eq. A one-variable connection cannot model
117
+ losses: its ``efficiency`` ≠ 1 is a unit conversion between nodes in different units (W-0589), else ignored
118
+ (W-0591), and its ``other_operational_cost`` is ignored (W-0590). With both ends of the arc in g and slope 1
119
+ the terms cancel.
119
120
  """
120
121
  d, v_flow = b.d, b.v_flow
121
122
  gpn = d.group_process_node
@@ -141,7 +142,8 @@ def _group_flow(b: _Build) -> Expr | None:
141
142
  parts.append(-Sum(Where(v_flow * d.p_unitsize, arcs), over=("p", "source", "sink", "n")))
142
143
  if b.v_flow_back is not None and _has_rows(b.twoway1var_arcs):
143
144
  back = _dc_power_flow.nodeBalance_back_flow_terms(b.twoway1var_arcs, b.v_flow_back, d.p_unitsize, None,
144
- group_nodes=gpn, group_nodes_on=("p", "n"))
145
+ group_nodes=gpn, group_nodes_on=("p", "n"),
146
+ p_slope=d.p_slope, slope_arcs=d.process_source_sink_eff)
145
147
  for key in ("back_at_sink", "back_at_source"):
146
148
  if key in back:
147
149
  parts.append(Sum(back[key], over=("n",)))
@@ -307,16 +307,38 @@ def _dc_partition(b: _Build, dc_arcs: pl.DataFrame, over: pl.DataFrame) -> "pl.D
307
307
  # Node-balance terms of v_flow_back (used by model/core.py)
308
308
 
309
309
 
310
+ def back_in_split(arcs: pl.DataFrame, d, *, p_col: str = "p", source_col: str = "source"
311
+ ) -> "tuple[pl.DataFrame | None, pl.DataFrame]":
312
+ """``(sloped, plain)``: the reverse-flow ``arcs`` (``p_col``, ``source_col``, sink, ...) whose reverse flow arrives
313
+ at their source as ``v_flow_back · slope`` (an arc of process_source_sink_eff with p_slope, as in
314
+ :func:`nodeBalance_back_flow_terms`) and the others (``v_flow_back``). ``sloped`` None without any; the
315
+ reserve and non-synchronous rows count the reverse infeed with it."""
316
+ eff = getattr(d, "process_source_sink_eff", None)
317
+ if getattr(d, "p_slope", None) is None or not _has_rows(eff) or arcs.height == 0:
318
+ return None, arcs
319
+ keys = eff.select(pl.col("p").alias(p_col), pl.col("source").alias(source_col), "sink").unique()
320
+ sloped = join_aligned(arcs, keys, on=[p_col, source_col, "sink"], how="semi")
321
+ if sloped.height == 0:
322
+ return None, arcs
323
+ return sloped, join_aligned(arcs, keys, on=[p_col, source_col, "sink"], how="anti")
324
+
325
+
310
326
  def nodeBalance_back_flow_terms(arcs: pl.DataFrame | None, v_flow_back: Var | None, p_unitsize: Param,
311
327
  p_step_duration: Param | None, *, group_nodes: pl.DataFrame | None = None,
312
328
  group_nodes_on: tuple[str, ...] = ("n",),
313
- exclude_arcs: pl.DataFrame | None = None) -> dict:
329
+ exclude_arcs: pl.DataFrame | None = None, p_slope: Param | None = None,
330
+ slope_arcs: pl.DataFrame | None = None) -> dict:
314
331
  """The v_flow_back terms of nodeBalance_eq, open dims (n, d, t); {} without reverse flow.
315
332
 
316
333
  back_at_sink[n,d,t] = − Σ_{(p,s,n) ∈ arcs} v_flow_back[p,s,n,d,t] · unitsize[p] · step_duration[d,t]
317
- back_at_source[n,d,t] = + Σ_{(p,n,k) ∈ arcs} v_flow_back[p,n,k,d,t] · unitsize[p] · step_duration[d,t]
334
+ back_at_source[n,d,t] = + Σ_{(p,n,k) ∈ arcs} v_flow_back[p,n,k,d,t] · unitsize[p] · σ[p,d,t] · step_duration[d,t]
335
+ σ = slope[p,d,t] (1 / efficiency) for (p,n,k) ∈ slope_arcs (process_source_sink_eff), else 1
318
336
  The signed flow of an arc is v_flow − v_flow_back, so the reverse flow leaves the sink node and arrives
319
- at the source node. ``arcs`` = every arc with a reverse-flow variable (twoway1var_arcs).
337
+ at the source node. ``arcs`` = every arc with a reverse-flow variable (twoway1var_arcs). The forward flow
338
+ draws v_flow · slope from the source of an arc with an efficiency, so the reverse flow delivers
339
+ v_flow_back · slope there: one signed flow, f at the sink and f · slope at the source in both directions
340
+ (the efficiency of a one-variable connection is a unit conversion between nodes in different units, W-0589;
341
+ otherwise it is ignored and the slope is 1, W-0591).
320
342
  ``p_step_duration`` None: power terms (no step_duration). ``group_nodes`` (g, n): each term only at its
321
343
  (g, n) pairs, open dims (g, n, d, t); ``exclude_arcs`` (g, p, source, sink): those arcs left out for that g
322
344
  (the capacity margin, :func:`flextool.engine.model._balance_terms.balance_flow_terms`).
@@ -348,6 +370,17 @@ def nodeBalance_back_flow_terms(arcs: pl.DataFrame | None, v_flow_back: Var | No
348
370
  terms["back_at_sink"] = -Sum(energy(Where(v_flow_back * p_unitsize, sink_as_n)),
349
371
  over=("p", "source", "sink"))
350
372
  if src_as_n.height > 0:
351
- terms["back_at_source"] = Sum(energy(Where(v_flow_back * p_unitsize, src_as_n)),
352
- over=("p", "source", "sink"))
373
+ sloped = None
374
+ if p_slope is not None and slope_arcs is not None and slope_arcs.height > 0:
375
+ sloped = join_aligned(src_as_n, slope_arcs.select("p", "source", "sink").unique(),
376
+ on=["p", "source", "sink"], how="semi")
377
+ if sloped is None or sloped.height == 0:
378
+ terms["back_at_source"] = Sum(energy(Where(v_flow_back * p_unitsize, src_as_n)),
379
+ over=("p", "source", "sink"))
380
+ else:
381
+ plain = join_aligned(src_as_n, sloped, on=list(src_as_n.columns), how="anti")
382
+ term = Sum(energy(Where(v_flow_back * p_unitsize * p_slope, sloped)), over=("p", "source", "sink"))
383
+ if plain.height > 0:
384
+ term = term + Sum(energy(Where(v_flow_back * p_unitsize, plain)), over=("p", "source", "sink"))
385
+ terms["back_at_source"] = term
353
386
  return terms
@@ -31,7 +31,7 @@ from flextool.engine.input._param_shapes import (
31
31
  )
32
32
  from flextool.engine.preprocess._provider_io import _provider_key
33
33
  from flextool.engine.preprocess.params._cohorts import in_service
34
- from flextool.engine.model import _balance_terms, _coarse_flows, _extend, _retire_built
34
+ from flextool.engine.model import _balance_terms, _coarse_flows, _dc_power_flow, _extend, _retire_built
35
35
  from flextool.engine.model._common import _availability_factor, _has_rows, _indirect_sum_arcs, _var_view
36
36
 
37
37
  if TYPE_CHECKING:
@@ -1387,7 +1387,7 @@ def _eq_non_sync(b: _Build) -> None:
1387
1387
  # ─── EQ. ─── non_sync_constraint ─────────────────────────────────────────
1388
1388
  # ─────────────────────────────────────────────────────────────────────────
1389
1389
  # Σ_{(p,s,k) ∈ in_ns(g)} v_flow[p,s,k,d,t] · unitsize[p] · Δt[d,t] · icap[g,d]
1390
- # + Σ_{(p,s,k) ∈ back_in_ns(g)} v_flow_back[p,s,k,d,t] · unitsize[p] · Δt[d,t] · icap[g,d]
1390
+ # + Σ_{(p,s,k) ∈ back_in_ns(g)} v_flow_back[p,s,k,d,t] · unitsize[p] · σ[p,d,t] · Δt[d,t] · icap[g,d]
1391
1391
  # + Σ_{n ∈ N(g)} positive_inflow[n,d,t] · icap[g,d]
1392
1392
  # − vq_non_synchronous[g,d,t] · Δt[d,t]
1393
1393
  # ≤ ns_limit[g,d,t] · icap[g,d] · ( Σ_{(p,s,k) ∈ out_noEff(g)} v_flow[p,s,k,d,t] · unitsize[p] · Δt[d,t]
@@ -1405,6 +1405,7 @@ def _eq_non_sync(b: _Build) -> None:
1405
1405
  # the solve (a gap is an input error)
1406
1406
  # in_ns(g) = arcs (p,s,k), k ∈ N(g), (p,k) ∈ process_sink_nonSync, (p,g) ∉ inside
1407
1407
  # back_in_ns(g) = twoway1var_arcs (p,s,k), s ∈ N(g), (p,s) ∈ process_sink_nonSync, (p,g) ∉ inside
1408
+ # σ = slope[p,d,t] on an arc of process_source_sink_eff, else 1 (the reverse flow arrives as in nodeBalance_eq)
1408
1409
  # out_*(g) = arcs (p,s,k), s ∈ N(g), (p,g) ∉ inside
1409
1410
  # back_out(g) = twoway1var_arcs (p,s,k), k ∈ N(g), (p,g) ∉ inside
1410
1411
  # process_sink_nonSync = unit arcs with is_non_synchronous ∪ (c,n) for is_DC connections c and their nodes n
@@ -1416,8 +1417,8 @@ def _eq_non_sync(b: _Build) -> None:
1416
1417
  # measured as the energy its nodes deliver to processes, exports and the
1417
1418
  # real demand (an energy margin does not count); the excess is penalised.
1418
1419
  # Flows between nodes of the group are neither (inside). The reverse flow
1419
- # of a one-variable / DC arc arrives at the arc's source and leaves its
1420
- # sink, lossless, as in nodeBalance_eq. The slack has no icap, which makes
1420
+ # of a one-variable / DC arc arrives at the arc's source (× slope on an arc
1421
+ # of process_source_sink_eff) and leaves its sink, as in nodeBalance_eq. The slack has no icap, which makes
1421
1422
  # it a fraction of group_capacity_for_scaling. slope already holds the
1422
1423
  # sink/source coefficient ratio of multi-arc processes.
1423
1424
  # Row rule (coarse steps): a group whose processes are all coarse gets one row per coarse step,
@@ -1434,9 +1435,14 @@ def _eq_non_sync(b: _Build) -> None:
1434
1435
  if back is not None and sink_ns is not None and sink_ns.height > 0:
1435
1436
  back_in = _not_inside(_arcs_at_group(back.join(sink_ns.rename({"sink": "source"}), on=["p", "source"],
1436
1437
  how="inner"), "source", gn_in_gns))
1437
- if back_in.height > 0:
1438
- lhs["incoming_nonSync_back"] = Sum(Where(b.v_flow_back, back_in) * p_us * d.p_step_duration * invc,
1439
- over=("p", "source", "sink"))
1438
+ sloped, plain = _dc_power_flow.back_in_split(back_in, d)
1439
+ terms = ([Sum(Where(b.v_flow_back, sloped) * d.p_slope * p_us * d.p_step_duration * invc,
1440
+ over=("p", "source", "sink"))] if sloped is not None else [])
1441
+ if plain.height > 0:
1442
+ terms.append(Sum(Where(b.v_flow_back, plain) * p_us * d.p_step_duration * invc,
1443
+ over=("p", "source", "sink")))
1444
+ if terms:
1445
+ lhs["incoming_nonSync_back"] = terms[0] if len(terms) == 1 else terms[0] + terms[1]
1440
1446
  p_pos = d.p_positive_inflow
1441
1447
  if p_pos is not None and gn_in_gns.height > 0:
1442
1448
  exo_in = (gn_in_gns.join(p_pos.frame.rename({"value": "v"}), on="n", how="inner")
@@ -22,7 +22,7 @@ from polar_high.engine import Var
22
22
 
23
23
  from flextool.engine.input._axis_enums import rename_to_axis, schema_dtype
24
24
  from flextool.engine.preprocess._provider_io import _provider_key
25
- from flextool.engine.model import _coarse_flows, _extend, _retire_built
25
+ from flextool.engine.model import _coarse_flows, _dc_power_flow, _extend, _retire_built
26
26
  from flextool.engine.model._common import (
27
27
  _connection_procs, _drop_uncapped, _entity_rows, _has_rows, _indirect_input_cap, _utf8_keys, _var_view,
28
28
  )
@@ -586,6 +586,23 @@ def _flow_node_view(v_flow: Var, side: str, extra: "dict[str, str] | None" = Non
586
586
  frame=v_flow.frame.pipe(rename_to_axis, mapping))
587
587
 
588
588
 
589
+ def _back_in_terms(b: "_Build", back_view: Var, arcs: pl.DataFrame, us, ratio, *, p_col: str,
590
+ over: tuple[str, ...], key: str) -> dict:
591
+ """Σ over ``arcs`` (``p_col``, n, sink, ...; n the arc's source) of the reverse flow arriving at n, × ``ratio``,
592
+ MW: ``v_flow_back · unitsize · slope`` on an arc of process_source_sink_eff, as in nodeBalance_eq, else
593
+ ``v_flow_back · unitsize`` (``_dc_power_flow.back_in_split``). Keys ``key`` and ``<key>_noEff``."""
594
+ sloped, plain = _dc_power_flow.back_in_split(arcs, b.d, p_col=p_col, source_col="n")
595
+ terms: dict = {}
596
+ if sloped is not None:
597
+ slope = b.d.p_slope
598
+ if p_col != "p":
599
+ slope = Param((p_col, *slope.dims[1:]), slope.frame.pipe(rename_to_axis, {"p": p_col}))
600
+ terms[key] = Sum(Where(back_view * us * slope * ratio, sloped), over=over)
601
+ if plain.height > 0:
602
+ terms[key if sloped is None else f"{key}_noEff"] = Sum(Where(back_view * us * ratio, plain), over=over)
603
+ return terms
604
+
605
+
589
606
  def _drawn_terms(b: "_Build", flow_view: Var, arcs: pl.DataFrame, us, ratio, *, p_col: str,
590
607
  over: tuple[str, ...]) -> dict:
591
608
  """Σ over ``arcs`` of the flow a process draws from the arc's source node n, × ``ratio``, MW.
@@ -716,7 +733,8 @@ def add_constraints(b: "_Build") -> None:
716
733
  # · ratio[p,r,ud,n]
717
734
  # + Σ_{(p,n,k) ∈ process_source_sink \ eff_out, (p,r,ud,n) ∈ irr_g} v_flow[p,n,k,d,t] · unitsize[p]
718
735
  # · ratio[p,r,ud,n]
719
- # + Σ_{(p,n,k) ∈ twoway1var_arcs, (p,r,ud,n) ∈ irr_g} v_flow_back[p,n,k,d,t] · unitsize[p] · ratio[p,r,ud,n]
736
+ # + Σ_{(p,n,k) ∈ twoway1var_arcs, (p,r,ud,n) ∈ irr_g} v_flow_back[p,n,k,d,t] · unitsize[p] · σ[p,d,t]
737
+ # · ratio[p,r,ud,n]
720
738
  # + Σ_{(p,s,n) ∈ twoway1var_arcs, (p,r,ud,n) ∈ irr_g} v_flow_back[p,s,n,d,t] · unitsize[p] · ratio[p,r,ud,n]
721
739
  # + group_demand[r,ud,g,d,t]
722
740
  # ∀ (r,ud,g) ∈ reserve_upDown_group_method_dynamic, (d,t) ∈ dt
@@ -725,6 +743,7 @@ def add_constraints(b: "_Build") -> None:
725
743
  # energy margin (p_negative_inflow, the real demand), so group_demand is MW in the step
726
744
  # irr_g = process_reserve_upDown_node_increase_reserve_ratio with n ∈ group g
727
745
  # ratio = increase_reserve_ratio; eff_out = process_source_sink_eff
746
+ # σ = slope[p,d,t] on an arc of eff_out, else 1 (the reverse flow arrives as in nodeBalance_eq)
728
747
  # section term only for min_load_efficiency units with online variables (v_online_linear / _integer)
729
748
  # reserve_sum is replaced by v_reserve_total for (r,ud,g) ∈ rug_total
730
749
  # The requirement grows with the flows into and out of the group's nodes
@@ -769,10 +788,8 @@ def add_constraints(b: "_Build") -> None:
769
788
  irr_g, on=["p", "n"], how="inner")
770
789
  back_out = back.pipe(rename_to_axis, {"sink": "n"}).select("p", "source", "n").join(
771
790
  irr_g, on=["p", "n"], how="inner")
772
- if back_in.height > 0:
773
- rhs_terms["dynamic_back_in"] = Sum(Where(
774
- _flow_node_view(b.v_flow_back, "source") * p_unitsize * irr_param, back_in),
775
- over=("p", "n", "sink"))
791
+ rhs_terms |= _back_in_terms(b, _flow_node_view(b.v_flow_back, "source"), back_in, p_unitsize,
792
+ irr_param, p_col="p", over=("p", "n", "sink"), key="dynamic_back_in")
776
793
  if back_out.height > 0:
777
794
  rhs_terms["dynamic_back_out"] = Sum(Where(
778
795
  _flow_node_view(b.v_flow_back, "sink") * p_unitsize * irr_param, back_out),
@@ -800,14 +817,15 @@ def add_constraints(b: "_Build") -> None:
800
817
  # · ratio[f,r,ud,n]
801
818
  # + Σ_{(f,n,k) ∈ process_source_sink \ eff_out, (f,r,ud,n) ∈ lfr_g} v_flow[f,n,k,d,t] · unitsize[f]
802
819
  # · ratio[f,r,ud,n]
803
- # + up: Σ_{(f,n,k) ∈ twoway1var_arcs, (f,r,ud,n) ∈ lfr_g} v_flow_back[f,n,k,d,t] · unitsize[f] · ratio[f,r,ud,n]
820
+ # + up: Σ_{(f,n,k) ∈ twoway1var_arcs, (f,r,ud,n) ∈ lfr_g} v_flow_back[f,n,k,d,t] · unitsize[f] · σ[f,d,t]
821
+ # · ratio[f,r,ud,n]
804
822
  # down: Σ_{(f,s,n) ∈ twoway1var_arcs, (f,r,ud,n) ∈ lfr_g} v_flow_back[f,s,n,d,t] · unitsize[f] · ratio[f,r,ud,n]
805
823
  # ∀ (r,ud,g,f) ∈ fail_g, (d,t) ∈ dt
806
824
  # pruna_g = the providers of the reserve_sum above, per group
807
825
  # lfr_g = process_reserve_upDown_node_large_failure_ratio with n ∈ group g,
808
826
  # (r,ud,g) ∈ reserve_upDown_group_method_n_1 with ud = up / down
809
827
  # fail_g = (r,ud,g,f): f in lfr_g with a flow (v_flow or v_flow_back) into (up) / out of (down) a node of g
810
- # ratio = large_failure_ratio; f is the row dim p_fail; eff_out, section as in the dynamic row
828
+ # ratio = large_failure_ratio; f is the row dim p_fail; eff_out, section, σ as in the dynamic row
811
829
  # Reserve covers the loss of each large process f separately (the largest
812
830
  # failure binds): upward reserve the loss of its output into the group,
813
831
  # downward reserve the loss of its consumption from the group. The
@@ -842,7 +860,11 @@ def add_constraints(b: "_Build") -> None:
842
860
  else:
843
861
  failure_terms = {}
844
862
  fail_back = n1[ud_filter]["fail_back_arcs"]
845
- if fail_back is not None and b.v_flow_back is not None:
863
+ if fail_back is not None and b.v_flow_back is not None and other == "source":
864
+ failure_terms |= _back_in_terms(b, _flow_node_view(b.v_flow_back, other, {"p": "p_fail"}), fail_back,
865
+ us_fail, ratio_fail, p_col="p_fail", over=(side, "n"),
866
+ key="n_1_failure_back")
867
+ elif fail_back is not None and b.v_flow_back is not None:
846
868
  failure_terms["n_1_failure_back"] = Sum(
847
869
  Where(_flow_node_view(b.v_flow_back, other, {"p": "p_fail"}) * us_fail * ratio_fail, fail_back),
848
870
  over=(side, "n"))
@@ -1613,11 +1635,11 @@ def _flows_at_nodes(d, sol, processes: list[str]) -> pl.DataFrame:
1613
1635
  the other arcs are dropped before any join).
1614
1636
 
1615
1637
  ``kind`` ``into``: what arrives at n, ``v_flow · unitsize`` of the arcs whose sink is n and ``v_flow_back ·
1616
- unitsize`` of the one-variable / DC arcs whose source is n. ``kind`` ``drawn``: what leaves n, per arc whose
1617
- source is n ``v_flow · unitsize · slope`` (plus ``v_online · section · unitsize`` of a min_load_efficiency unit
1618
- with online variables) on an arc of process_source_sink_eff, else ``v_flow · unitsize``, and ``v_flow_back ·
1619
- unitsize`` of the one-variable / DC arcs whose sink is n (:func:`_drawn_terms` and the back terms of the
1620
- dynamic and n-1 rows)."""
1638
+ unitsize`` (· slope on an arc of process_source_sink_eff) of the one-variable / DC arcs whose source is n.
1639
+ ``kind`` ``drawn``: what leaves n, per arc whose source is n ``v_flow · unitsize · slope`` (plus ``v_online ·
1640
+ section · unitsize`` of a min_load_efficiency unit with online variables) on an arc of process_source_sink_eff,
1641
+ else ``v_flow · unitsize``, and ``v_flow_back · unitsize`` of the one-variable / DC arcs whose sink is n
1642
+ (:func:`_drawn_terms`, :func:`_back_in_terms` and the back terms of the dynamic and n-1 rows)."""
1621
1643
  cols = ["p", "n", "kind", "d", "t", "value"]
1622
1644
  parts: list[pl.DataFrame] = []
1623
1645
  us = _frame_u8(d.p_unitsize.frame).select("p", pl.col("value").alias("__us"))
@@ -1659,9 +1681,19 @@ def _flows_at_nodes(d, sol, processes: list[str]) -> pl.DataFrame:
1659
1681
  if vb is not None:
1660
1682
  vb = (vb.join(_frame_u8(back.select("p", "source", "sink")).unique(), on=["p", "source", "sink"], how="semi")
1661
1683
  .join(us, on="p", how="inner").with_columns(__mw=pl.col("value") * pl.col("__us")))
1662
- for side, kind in (("source", "into"), ("sink", "drawn")):
1663
- parts.append(vb.select("p", pl.col(side).alias("n"), pl.lit(kind).alias("kind"), "d", "t",
1664
- pl.col("__mw").alias("value")))
1684
+ parts.append(vb.select("p", pl.col("sink").alias("n"), pl.lit("drawn").alias("kind"), "d", "t",
1685
+ pl.col("__mw").alias("value")))
1686
+ # The reverse flow arrives at the source × slope on an arc of process_source_sink_eff (nodeBalance_eq).
1687
+ sloped, plain = _dc_power_flow.back_in_split(vb, d)
1688
+ slope = _param_on_dt(getattr(d, "p_slope", None), d, ["p", "d", "t"], "__slope")
1689
+ if sloped is not None and slope is not None:
1690
+ parts.append(sloped.join(slope, on=["p", "d", "t"], how="inner").select(
1691
+ "p", pl.col("source").alias("n"), pl.lit("into").alias("kind"), "d", "t",
1692
+ (pl.col("__mw") * pl.col("__slope")).alias("value")))
1693
+ else:
1694
+ plain = vb
1695
+ parts.append(plain.select("p", pl.col("source").alias("n"), pl.lit("into").alias("kind"), "d", "t",
1696
+ pl.col("__mw").alias("value")))
1665
1697
  if not parts:
1666
1698
  return pl.DataFrame(schema={**{c: pl.Utf8 for c in cols[:-1]}, "value": pl.Float64})
1667
1699
  # Fixed summation order: the parts in list order, and within a part (two arcs of p at n) the value.
@@ -748,6 +748,7 @@ def _prepare(b: _Build) -> None:
748
748
  b.p_oint_rows = b.p_oint_idx
749
749
  if b.has_proc:
750
750
  b.twoway1var_arcs = _two_way_one_var_arcs(d)
751
+ _warn_one_variable_efficiency(b)
751
752
  procs = [s.select(pl.col("p").cast(pl.Utf8))
752
753
  for s in (d.pd_invest_set if b.has_invest_p else None,
753
754
  d.pd_divest_set if b.has_divest_p else None,
@@ -1085,6 +1086,40 @@ def _validate_storage_start_end_values(d) -> None:
1085
1086
  raise FlexToolConfigError(message)
1086
1087
 
1087
1088
 
1089
+ def _warn_one_variable_efficiency(b: _Build) -> None:
1090
+ """W-0589 (once per solve): the one-variable connections (twoway1var_arcs) with an efficiency ≠ 1 in the solve.
1091
+
1092
+ Their one signed flow takes f · slope at the source and gives f at the sink in both directions
1093
+ (nodeBalance_back_flow_terms), so the efficiency is a conversion (e.g. MWh to t), not a loss. Only the
1094
+ connections between nodes in different units keep it: the load boundary sets the slope of the others to 1
1095
+ (``_derived.apply_one_variable_efficiency``, W-0591). Named: the connection, with its efficiency range over
1096
+ the solve's (d, t) in the details.
1097
+ """
1098
+ d = b.d
1099
+ if not _has_rows(b.twoway1var_arcs) or d.p_slope is None or not _has_rows(d.process_source_sink_eff):
1100
+ return
1101
+ arcs = join_aligned(b.twoway1var_arcs.select("p", "source", "sink"),
1102
+ d.process_source_sink_eff.select("p", "source", "sink"),
1103
+ on=["p", "source", "sink"], how="semi")
1104
+ if arcs.height == 0:
1105
+ return
1106
+ slope = d.p_slope.frame
1107
+ slope = slope.collect() if isinstance(slope, pl.LazyFrame) else slope
1108
+ if _has_rows(getattr(d, "dt", None)):
1109
+ slope = join_aligned(slope, d.dt.select("d", "t").unique(), on=["d", "t"], how="semi")
1110
+ names = sorted({str(p) for p in arcs.get_column("p").to_list()})
1111
+ hit = (slope.filter(pl.col("p").cast(pl.Utf8).is_in(names) & ((pl.col("value") - 1.0).abs() > 1e-9))
1112
+ .group_by(pl.col("p").cast(pl.Utf8))
1113
+ .agg((1.0 / pl.col("value")).min().alias("lo"), (1.0 / pl.col("value")).max().alias("hi"))
1114
+ .sort("p"))
1115
+ if hit.height == 0:
1116
+ return
1117
+ details = {p: (f"efficiency {lo:g}" if lo == hi else f"efficiency {lo:g} to {hi:g}")
1118
+ for p, lo, hi in hit.iter_rows()}
1119
+ from flextool import run_warnings
1120
+ run_warnings.warn_grouped("W-0589", list(details), solve=b.solve_name, details=details)
1121
+
1122
+
1088
1123
  def _two_way_one_var_arcs(d) -> "pl.DataFrame | None":
1089
1124
  """(p, source, sink) arcs whose reverse flow is ``v_flow_back``.
1090
1125
 
@@ -2180,10 +2180,19 @@ def emit_pdtProcess__source__sink__dt_varCost_pair(
2180
2180
  input_dir: Path, solve_data_dir: Path,
2181
2181
  *, provider,
2182
2182
  ) -> None:
2183
- """Emit ``pdtProcess__source__sink__dt_varCost_pair`` to the Provider."""
2183
+ """Emit ``pdtProcess__source__sink__dt_varCost_pair`` to the Provider.
2184
+
2185
+ Without the one-variable connections (``method_2way_1var_off``): their cost is ignored (W-0590,
2186
+ ``_direct.drop_one_variable_connection_cost``), so a CSV reload does not charge it again.
2187
+ """
2188
+ from flextool.engine.preprocess.emit._calc_params import _METHOD_2WAY_1VAR, _read_csv
2184
2189
  basic, _always = _derive_varCost_pair_vectorized(
2185
2190
  input_dir, solve_data_dir, provider=provider,
2186
2191
  )
2192
+ pm = _read_csv(input_dir / "process_method.csv", ["process", "method"], provider=provider)
2193
+ one_var = pm.filter(pl.col("method").cast(pl.Utf8).is_in(sorted(_METHOD_2WAY_1VAR))).get_column("process")
2194
+ if one_var.len() > 0:
2195
+ basic = basic.filter(~pl.col("process").cast(pl.Utf8).is_in(one_var.cast(pl.Utf8).to_list()))
2187
2196
  _emit(provider, "solve_data/pdtProcess__source__sink__dt_varCost.csv",
2188
2197
  basic)
2189
2198
 
@@ -5592,8 +5592,11 @@ def load_flextool(source: "Path | str | FlexInputSource",
5592
5592
  flex_data.p_years_represented_d = _years_represented_boundary(
5593
5593
  getattr(flex_data, "dt", None), db_reader, provider, _wd_yr)
5594
5594
  # piecewise_linear units: the load-boundary step (one authority on every path).
5595
+ from flextool.engine.preprocess.params import _derived as _drv_k1
5595
5596
  from flextool.engine.preprocess.params._piecewise import apply_piecewise_curves
5596
5597
  apply_piecewise_curves(flex_data, db_reader, provider)
5598
+ # One-variable connections: an efficiency that is not a unit conversion is ignored (W-0591).
5599
+ _drv_k1.apply_one_variable_efficiency(flex_data, db_reader, provider)
5597
5600
  elif _dump_hooks is not None:
5598
5601
  # Reader-less CSV reload: the reload's own seeds of the fields the overlay above writes.
5599
5602
  _dump_hooks.field_seeds(flex_data, sd, inp, provider)
@@ -1798,7 +1798,8 @@ def _group_transfer_method_overrides(source: "InputSource") -> "pl.LazyFrame | N
1798
1798
  both endpoints (``connection__node__node``) among the group's nodes; ``dc_power_flow_with_angles`` becomes
1799
1799
  ``no_losses_no_variable_cost`` (the DC lines carry one signed flow) and skips the ``is_DC = yes``
1800
1800
  connections. A connection matched by several groups with different overrides raises (as the input
1801
- derivation does). The process key is the Utf8 column ``_pk``. None when no group overrides anything.
1801
+ derivation does). The process key is the Utf8 column ``_pk``; ``dc_line`` marks the lines of a
1802
+ ``dc_power_flow_with_angles`` group. None when no group overrides anything.
1802
1803
  """
1803
1804
  gtm = _try_param(source, "group", "transfer_method")
1804
1805
  gn = _try_entities(source, "group__node")
@@ -1836,11 +1837,13 @@ def _group_transfer_method_overrides(source: "InputSource") -> "pl.LazyFrame | N
1836
1837
  out = (matched.lazy()
1837
1838
  .with_columns(ct_override=pl.when(pl.col("method") == "dc_power_flow_with_angles")
1838
1839
  .then(pl.lit("no_losses_no_variable_cost")).otherwise(pl.col("method")))
1839
- .group_by("p", maintain_order=True).agg(pl.col("ct_override").first())
1840
+ .group_by("p", maintain_order=True).agg(
1841
+ pl.col("ct_override").first(),
1842
+ (pl.col("method") == "dc_power_flow_with_angles").any().alias("dc_line"))
1840
1843
  .collect())
1841
1844
  if out.height == 0:
1842
1845
  return None
1843
- return out.lazy().select(pl.col("p").alias("_pk"), "ct_override")
1846
+ return out.lazy().select(pl.col("p").alias("_pk"), "ct_override", "dc_line")
1844
1847
 
1845
1848
 
1846
1849
  def _piecewise_flags(source: "InputSource") -> pl.DataFrame:
@@ -2013,7 +2016,7 @@ def _classify_process_method(source: "InputSource") -> pl.DataFrame:
2013
2016
  .join(overrides, on="_pk", how="left")
2014
2017
  .with_columns(ct=pl.when((pl.col("klass") == "connection") & pl.col("ct_override").is_not_null())
2015
2018
  .then(pl.col("ct_override")).otherwise(pl.col("ct")))
2016
- .drop("ct_override", "_pk"))
2019
+ .drop("ct_override", "dc_line", "_pk"))
2017
2020
  if sm_lazy is not None:
2018
2021
  lf = lf.join(sm_lazy, on="p", how="left")
2019
2022
  else:
@@ -2461,6 +2464,83 @@ def p_flow_constraint_coef_from_source(source: "InputSource",
2461
2464
  return Param(("p", "source", "sink", "cn"), joined)
2462
2465
 
2463
2466
 
2467
+ def one_variable_efficiency_ignored(source: "InputSource", classified: pl.DataFrame | None = None) -> set[str]:
2468
+ """The one-variable connections (``method_2way_1var_off``) whose ``efficiency`` is ignored (W-0591).
2469
+
2470
+ One signed flow cannot model losses: a loss one way would be a gain the other way. So the efficiency is
2471
+ ignored on a line of a ``dc_power_flow_with_angles`` group, and on a ``no_losses_no_variable_cost``
2472
+ connection unless both its nodes have an explicit ``unit_of_measure`` and the two differ (then it is a unit
2473
+ conversion, the same both ways: W-0589).
2474
+ """
2475
+ if classified is None:
2476
+ classified = _classify_process_method(source)
2477
+ one_var = {str(p) for p in classified.filter((pl.col("method") == "method_2way_1var_off")
2478
+ & (pl.col("klass") == "connection")).get_column("p").to_list()}
2479
+ cnn = _try_entities(source, "connection__node__node")
2480
+ if not one_var or cnn is None:
2481
+ return set()
2482
+ from flextool import units_of_measure as uom
2483
+ overrides = _group_transfer_method_overrides(source)
2484
+ dc = set() if overrides is None else set(overrides.filter(pl.col("dc_line")).collect().get_column("_pk").to_list())
2485
+ uom_rows = _try_param_explicit(source, "node", "unit_of_measure")
2486
+ units = {} if uom_rows is None else {
2487
+ str(n): uom.normalise(v) for n, v in uom_rows.select(pl.col("name").cast(pl.Utf8), "value").iter_rows()
2488
+ if v is not None and str(v).strip()}
2489
+ ignored = set()
2490
+ for p, n1, n2 in cnn.select(*(pl.col(c).cast(pl.Utf8) for c in ("connection", "node_1", "node_2"))).iter_rows():
2491
+ if p in one_var and (p in dc or units.get(n1) is None or units.get(n1) == units.get(n2)
2492
+ or units.get(n2) is None):
2493
+ ignored.add(p)
2494
+ return ignored
2495
+
2496
+
2497
+ def _one_variable_slope_in_provider(provider, ignored: set[str]) -> None:
2498
+ """The provider's ``solve_data/pdtProcess_slope`` (the emit seed, raw efficiency) gets slope 1 on *ignored*
2499
+ too, so a CSV reload of the run's provider snapshot (or of a light ``dump_csvs`` that takes the slope from it)
2500
+ has the slope of the solved model."""
2501
+ if provider is None:
2502
+ return
2503
+ from flextool.engine.preprocess._flex_data_provider import EvictedFrameError
2504
+ key = "solve_data/pdtProcess_slope"
2505
+ try:
2506
+ seed = provider.get(key)
2507
+ except EvictedFrameError:
2508
+ return
2509
+ if seed is None or seed.height == 0 or "process" not in seed.columns:
2510
+ return
2511
+ hit = pl.col("process").cast(pl.Utf8).is_in(sorted(ignored))
2512
+ one = pl.lit(repr(1.0)) if seed.schema["value"] == pl.Utf8 else pl.lit(1.0)
2513
+ provider.put(key, seed.with_columns(value=pl.when(hit).then(one).otherwise(pl.col("value"))))
2514
+
2515
+
2516
+ def apply_one_variable_efficiency(flex_data: object, source: "InputSource", provider=None) -> None:
2517
+ """The load-boundary step of K-1: ``p_slope`` is 1 on the one-variable connections whose efficiency is
2518
+ ignored (:func:`one_variable_efficiency_ignored`), so the LP and the results are those of efficiency 1 on
2519
+ every path (single, rolling, synthetic sub-solves); W-0591 once per solve names those with an efficiency ≠ 1.
2520
+ """
2521
+ slope = getattr(flex_data, "p_slope", None)
2522
+ if slope is None:
2523
+ return
2524
+ ignored = one_variable_efficiency_ignored(source)
2525
+ if not ignored:
2526
+ return
2527
+ _one_variable_slope_in_provider(provider, ignored)
2528
+ frame = slope.frame.collect() if isinstance(slope.frame, pl.LazyFrame) else slope.frame
2529
+ hit = pl.col("p").cast(pl.Utf8).is_in(sorted(ignored))
2530
+ changed = frame.filter(hit & (pl.col("value") != 1.0))
2531
+ if changed.height == 0:
2532
+ return
2533
+ flex_data.p_slope = Param(slope.dims, frame.with_columns(
2534
+ value=pl.when(hit).then(pl.lit(1.0)).otherwise(pl.col("value"))), name=slope.name)
2535
+ details = {str(p): f"efficiency {lo:g}" if lo == hi else f"efficiency {lo:g} to {hi:g}"
2536
+ for p, lo, hi in changed.group_by(pl.col("p").cast(pl.Utf8))
2537
+ .agg((1.0 / pl.col("value")).min().alias("lo"), (1.0 / pl.col("value")).max().alias("hi"))
2538
+ .sort("p").iter_rows()}
2539
+ from flextool import run_warnings
2540
+ solve = _read_active_solve(Path("."), provider=provider) if provider is not None else None
2541
+ run_warnings.warn_grouped("W-0591", list(details), solve=solve, details=details)
2542
+
2543
+
2464
2544
  # ---------------------------------------------------------------------------
2465
2545
  # §3.3.4 — p_slope (efficiency-curve slope)
2466
2546
  # ---------------------------------------------------------------------------