flextool 4.5.2__tar.gz → 4.6.1__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 (715) hide show
  1. {flextool-4.5.2/flextool.egg-info → flextool-4.6.1}/PKG-INFO +5 -4
  2. {flextool-4.5.2 → flextool-4.6.1}/README.md +1 -1
  3. flextool-4.6.1/docs/advanced_concepts.md +212 -0
  4. {flextool-4.5.2 → flextool-4.6.1}/docs/dev/architecture.md +61 -20
  5. {flextool-4.5.2 → flextool-4.6.1}/docs/dev/engine.md +151 -17
  6. {flextool-4.5.2 → flextool-4.6.1}/docs/env_vars.md +1 -0
  7. {flextool-4.5.2 → flextool-4.6.1}/docs/how_to/emissions.md +1 -1
  8. {flextool-4.5.2 → flextool-4.6.1}/docs/how_to/investment.md +86 -15
  9. {flextool-4.5.2 → flextool-4.6.1}/docs/how_to/performance.md +26 -0
  10. {flextool-4.5.2 → flextool-4.6.1}/docs/how_to/solve_sequences.md +16 -10
  11. {flextool-4.5.2 → flextool-4.6.1}/docs/how_to/stochastics.md +6 -6
  12. {flextool-4.5.2 → flextool-4.6.1}/docs/how_to/storage_hydro.md +3 -3
  13. {flextool-4.5.2 → flextool-4.6.1}/docs/how_to/thermal_chp.md +5 -5
  14. {flextool-4.5.2 → flextool-4.6.1}/docs/index.md +1 -1
  15. {flextool-4.5.2 → flextool-4.6.1}/docs/limitations.md +3 -3
  16. {flextool-4.5.2 → flextool-4.6.1}/docs/reading_results.md +2 -1
  17. {flextool-4.5.2 → flextool-4.6.1}/docs/reference/connections.md +11 -7
  18. {flextool-4.5.2 → flextool-4.6.1}/docs/reference/entities_and_time.md +9 -9
  19. {flextool-4.5.2 → flextool-4.6.1}/docs/reference/flow_groups.md +2 -0
  20. {flextool-4.5.2 → flextool-4.6.1}/docs/reference/groups.md +3 -3
  21. {flextool-4.5.2 → flextool-4.6.1}/docs/reference/nodes.md +42 -16
  22. {flextool-4.5.2 → flextool-4.6.1}/docs/reference/parameter_groups.md +5 -5
  23. {flextool-4.5.2 → flextool-4.6.1}/docs/reference/units.md +60 -22
  24. {flextool-4.5.2 → flextool-4.6.1}/docs/reference/user_constraints.md +3 -1
  25. {flextool-4.5.2 → flextool-4.6.1}/docs/results.md +124 -39
  26. {flextool-4.5.2 → flextool-4.6.1}/docs/spine_toolbox.md +1 -1
  27. {flextool-4.5.2 → flextool-4.6.1}/docs/terminal_workflow.md +6 -4
  28. {flextool-4.5.2 → flextool-4.6.1}/docs/tutorial.md +7 -4
  29. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/results/_catalog.py +7 -0
  30. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/results/_entity.py +3 -2
  31. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/results/_overview.py +2 -1
  32. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/tools/diagnostics.py +7 -1
  33. {flextool-4.5.2 → flextool-4.6.1}/flextool/cli/_console.py +23 -0
  34. {flextool-4.5.2 → flextool-4.6.1}/flextool/cli/cmd_run_flextool.py +62 -28
  35. {flextool-4.5.2 → flextool-4.6.1}/flextool/cli/cmd_time_runs.py +5 -5
  36. flextool-4.6.1/flextool/console_markers.py +16 -0
  37. {flextool-4.5.2 → flextool-4.6.1}/flextool/docs_build/__init__.py +6 -2
  38. {flextool-4.5.2 → flextool-4.6.1}/flextool/docs_build/parameters.py +1 -1
  39. {flextool-4.5.2 → flextool-4.6.1}/flextool/docs_build/scope.py +4 -1
  40. flextool-4.6.1/flextool/docs_build/warnings.py +57 -0
  41. flextool-4.6.1/flextool/engine/_behaviour_changes.py +300 -0
  42. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/autoscale/_guard.py +40 -18
  43. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/autoscale/_layer2.py +6 -0
  44. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/autoscale/_layer2_types.py +49 -11
  45. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/autoscale/_quantity_types.py +61 -10
  46. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/autoscale/_report.py +2 -2
  47. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/input/_axis_enums.py +9 -1
  48. flextool-4.6.1/flextool/engine/input/_lifetime_roles.py +118 -0
  49. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/input/_param_shapes.py +55 -25
  50. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/input/_solve_config.py +7 -8
  51. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/input/_solve_state.py +3 -0
  52. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/input/_solve_step_aggregation.py +32 -29
  53. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/input/_timeline.py +15 -14
  54. flextool-4.6.1/flextool/engine/model/_capacity.py +161 -0
  55. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/model/_common.py +6 -4
  56. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/model/_cumulative_invest.py +153 -101
  57. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/model/_dc_power_flow.py +10 -2
  58. flextool-4.6.1/flextool/engine/model/_extend.py +328 -0
  59. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/model/_group_slack.py +46 -18
  60. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/model/_non_anticipativity.py +7 -18
  61. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/model/_online.py +136 -54
  62. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/model/_reserve.py +51 -68
  63. flextool-4.6.1/flextool/engine/model/_retire_built.py +400 -0
  64. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/model/_self_discharge.py +257 -10
  65. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/model/core.py +1694 -353
  66. flextool-4.6.1/flextool/engine/output/_benders_slice.py +134 -0
  67. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/output/_capacity_margin.py +15 -17
  68. flextool-4.6.1/flextool/engine/output/_cohort_capacity.py +273 -0
  69. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/output/_dump_csvs.py +6 -22
  70. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/output/_horizon_dump.py +1 -1
  71. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/output/_parquet_bundle.py +39 -9
  72. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/output/_writer.py +7 -10
  73. flextool-4.6.1/flextool/engine/preprocess/_annuity.py +129 -0
  74. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/_invest_seeds.py +5 -6
  75. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/_provider_keys.py +15 -14
  76. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/_provider_translators.py +38 -16
  77. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/_reduce_detail.py +4 -5
  78. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/_solve_context.py +4 -51
  79. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/emit/_arc_unions.py +14 -107
  80. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/emit/_blocks.py +3 -4
  81. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/emit/_chain_params.py +102 -339
  82. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/emit/_dispatchers.py +4 -30
  83. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/emit/_inflow_scaling.py +8 -10
  84. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/emit/_inflow_scaling_checks.py +7 -12
  85. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/emit/_pdt_params.py +1 -1
  86. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/emit/_per_solve.py +73 -118
  87. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/emit/_period_calc.py +23 -21
  88. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/emit/_solve_time.py +8 -21
  89. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/emit/_solve_writers.py +1 -10
  90. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/flex_data.py +679 -718
  91. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/params/_coarse.py +35 -62
  92. flextool-4.6.1/flextool/engine/preprocess/params/_cohort_handoff.py +290 -0
  93. flextool-4.6.1/flextool/engine/preprocess/params/_cohorts.py +1233 -0
  94. flextool-4.6.1/flextool/engine/preprocess/params/_cost_lines.py +54 -0
  95. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/params/_derived.py +360 -764
  96. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/params/_direct.py +3 -1
  97. flextool-4.6.1/flextool/engine/preprocess/params/_discount.py +687 -0
  98. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/params/_existing.py +90 -851
  99. flextool-4.6.1/flextool/engine/preprocess/params/_existing_salvage.py +393 -0
  100. flextool-4.6.1/flextool/engine/preprocess/params/_extend.py +575 -0
  101. flextool-4.6.1/flextool/engine/preprocess/params/_fixed_costs.py +392 -0
  102. flextool-4.6.1/flextool/engine/preprocess/params/_lifetime_costs.py +257 -0
  103. flextool-4.6.1/flextool/engine/preprocess/params/_lifetime_inputs.py +467 -0
  104. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/params/_mintime.py +33 -21
  105. flextool-4.6.1/flextool/engine/preprocess/params/_npv.py +975 -0
  106. flextool-4.6.1/flextool/engine/preprocess/params/_period_values.py +167 -0
  107. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/params/_ramp_links.py +28 -0
  108. flextool-4.6.1/flextool/engine/preprocess/params/_report_lines.py +69 -0
  109. flextool-4.6.1/flextool/engine/preprocess/params/_retire_built.py +313 -0
  110. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/params/_retire_existing.py +80 -28
  111. flextool-4.6.1/flextool/engine/preprocess/params/_retire_settlement.py +431 -0
  112. flextool-4.6.1/flextool/engine/preprocess/params/_run_calendar.py +245 -0
  113. flextool-4.6.1/flextool/engine/preprocess/params/_run_costs.py +380 -0
  114. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/params/_walks.py +23 -66
  115. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/solve/_benders.py +61 -41
  116. flextool-4.6.1/flextool/engine/solve/_benders_final.py +177 -0
  117. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/solve/_carry_routing.py +70 -17
  118. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/solve/_handoff.py +60 -46
  119. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/solve/_orchestration.py +509 -169
  120. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/solve/_realization.py +54 -20
  121. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/solve/_realized_overlap.py +54 -31
  122. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/solve/_region_filter.py +185 -28
  123. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/solve/_run_model.py +1100 -60
  124. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/solve/_solver_dispatch.py +13 -0
  125. flextool-4.6.1/flextool/engine/solve/_solver_outcome.py +277 -0
  126. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/solve/_stochastic.py +20 -25
  127. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/solve/_subprocess_solve.py +31 -13
  128. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/solve/_warm.py +7 -7
  129. {flextool-4.5.2 → flextool-4.6.1}/flextool/export_to_tabular/export_settings.yaml +18 -9
  130. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/db_version_check.py +2 -2
  131. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/execution_manager.py +6 -4
  132. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/execution_window.py +16 -126
  133. flextool-4.6.1/flextool/gui/log_view.py +383 -0
  134. {flextool-4.5.2 → flextool-4.6.1}/flextool/input_derivation/__init__.py +6 -2
  135. {flextool-4.5.2 → flextool-4.6.1}/flextool/input_derivation/_commodity_ladder.py +11 -24
  136. {flextool-4.5.2 → flextool-4.6.1}/flextool/input_derivation/_dc_power_flow.py +9 -25
  137. {flextool-4.5.2 → flextool-4.6.1}/flextool/input_derivation/_process_method.py +10 -19
  138. {flextool-4.5.2 → flextool-4.6.1}/flextool/input_derivation/_specs.py +39 -21
  139. {flextool-4.5.2 → flextool-4.6.1}/flextool/input_derivation/_validators.py +273 -274
  140. {flextool-4.5.2 → flextool-4.6.1}/flextool/model_builder/build_model.py +4 -4
  141. {flextool-4.5.2 → flextool-4.6.1}/flextool/plot_outputs/orchestrator.py +6 -1
  142. {flextool-4.5.2 → flextool-4.6.1}/flextool/process_inputs/import_old_excel_input.json +578 -0
  143. {flextool-4.5.2 → flextool-4.6.1}/flextool/process_inputs/read_matpower.py +1 -1
  144. {flextool-4.5.2 → flextool-4.6.1}/flextool/process_inputs/read_tabular_with_specification.py +449 -61
  145. {flextool-4.5.2 → flextool-4.6.1}/flextool/process_inputs/write_old_flextool_to_db.py +6 -2
  146. {flextool-4.5.2 → flextool-4.6.1}/flextool/process_inputs/write_to_input_db.py +163 -12
  147. {flextool-4.5.2 → flextool-4.6.1}/flextool/process_outputs/_fan_labels.py +24 -0
  148. {flextool-4.5.2 → flextool-4.6.1}/flextool/process_outputs/_output_meta.py +131 -24
  149. {flextool-4.5.2 → flextool-4.6.1}/flextool/process_outputs/calc_costs.py +185 -153
  150. {flextool-4.5.2 → flextool-4.6.1}/flextool/process_outputs/calc_piecewise.py +12 -9
  151. {flextool-4.5.2 → flextool-4.6.1}/flextool/process_outputs/calc_storage_vre.py +16 -19
  152. {flextool-4.5.2 → flextool-4.6.1}/flextool/process_outputs/drop_levels.py +10 -7
  153. {flextool-4.5.2 → flextool-4.6.1}/flextool/process_outputs/handoff_writers.py +19 -262
  154. {flextool-4.5.2 → flextool-4.6.1}/flextool/process_outputs/out_ancillary.py +4 -1
  155. {flextool-4.5.2 → flextool-4.6.1}/flextool/process_outputs/out_capacity.py +117 -0
  156. {flextool-4.5.2 → flextool-4.6.1}/flextool/process_outputs/out_costs.py +54 -56
  157. {flextool-4.5.2 → flextool-4.6.1}/flextool/process_outputs/out_node.py +6 -0
  158. {flextool-4.5.2 → flextool-4.6.1}/flextool/process_outputs/persist_realized_slice.py +19 -22
  159. {flextool-4.5.2 → flextool-4.6.1}/flextool/process_outputs/read_highs_solution.py +229 -64
  160. {flextool-4.5.2 → flextool-4.6.1}/flextool/process_outputs/read_parameters.py +106 -107
  161. {flextool-4.5.2 → flextool-4.6.1}/flextool/process_outputs/read_sets.py +33 -37
  162. {flextool-4.5.2 → flextool-4.6.1}/flextool/process_outputs/read_variables.py +50 -1
  163. {flextool-4.5.2 → flextool-4.6.1}/flextool/process_outputs/solve_order.py +6 -0
  164. {flextool-4.5.2 → flextool-4.6.1}/flextool/process_outputs/union_realized_slice.py +3 -3
  165. {flextool-4.5.2 → flextool-4.6.1}/flextool/process_outputs/write_outputs.py +236 -178
  166. {flextool-4.5.2 → flextool-4.6.1}/flextool/process_outputs/write_spinedb.py +6 -0
  167. {flextool-4.5.2 → flextool-4.6.1}/flextool/run_options.py +8 -0
  168. {flextool-4.5.2 → flextool-4.6.1}/flextool/run_record/__init__.py +5 -1
  169. {flextool-4.5.2 → flextool-4.6.1}/flextool/run_record/_owner.py +22 -1
  170. {flextool-4.5.2 → flextool-4.6.1}/flextool/run_record/_status.py +87 -12
  171. {flextool-4.5.2 → flextool-4.6.1}/flextool/run_record/_tee.py +27 -1
  172. flextool-4.6.1/flextool/run_warnings/__init__.py +441 -0
  173. flextool-4.6.1/flextool/run_warnings/_behaviour_specs.py +416 -0
  174. flextool-4.6.1/flextool/run_warnings/_engine_specs.py +1051 -0
  175. flextool-4.6.1/flextool/run_warnings/_input_specs.py +401 -0
  176. flextool-4.6.1/flextool/run_warnings/registry.py +143 -0
  177. {flextool-4.5.2 → flextool-4.6.1}/flextool/scenario_comparison/data_models.py +7 -0
  178. {flextool-4.5.2 → flextool-4.6.1}/flextool/schemas/canonical_databases/howto_aggregate_output.json +457 -107
  179. {flextool-4.5.2 → flextool-4.6.1}/flextool/schemas/canonical_databases/howto_connections.json +457 -107
  180. {flextool-4.5.2 → flextool-4.6.1}/flextool/schemas/canonical_databases/howto_demand.json +457 -107
  181. {flextool-4.5.2 → flextool-4.6.1}/flextool/schemas/canonical_databases/howto_hydro_reservoir.json +457 -107
  182. {flextool-4.5.2 → flextool-4.6.1}/flextool/schemas/canonical_databases/howto_hydro_reservoir_with_pump.json +457 -107
  183. {flextool-4.5.2 → flextool-4.6.1}/flextool/schemas/canonical_databases/howto_non_sync_and_curtailment.json +457 -107
  184. {flextool-4.5.2 → flextool-4.6.1}/flextool/schemas/canonical_databases/howto_ramp_and_start_up.json +457 -107
  185. {flextool-4.5.2 → flextool-4.6.1}/flextool/schemas/canonical_databases/howto_stochastics.json +457 -107
  186. {flextool-4.5.2 → flextool-4.6.1}/flextool/schemas/canonical_databases/templates_examples.json +492 -142
  187. {flextool-4.5.2 → flextool-4.6.1}/flextool/schemas/canonical_databases/templates_time_settings_only.json +457 -107
  188. {flextool-4.5.2 → flextool-4.6.1}/flextool/schemas/default_plot_settings.yaml +10 -4
  189. {flextool-4.5.2 → flextool-4.6.1}/flextool/schemas/default_plots.yaml +7 -0
  190. {flextool-4.5.2 → flextool-4.6.1}/flextool/schemas/flextool_axis_contract.json +3 -3
  191. {flextool-4.5.2 → flextool-4.6.1}/flextool/schemas/spinedb_results_schema.json +27 -3
  192. {flextool-4.5.2 → flextool-4.6.1}/flextool/schemas/spinedb_schema.json +439 -107
  193. {flextool-4.5.2 → flextool-4.6.1}/flextool/update_flextool/__init__.py +1 -1
  194. {flextool-4.5.2 → flextool-4.6.1}/flextool/update_flextool/canonical_databases.py +9 -3
  195. {flextool-4.5.2 → flextool-4.6.1}/flextool/update_flextool/db_migration.py +1591 -156
  196. {flextool-4.5.2 → flextool-4.6.1}/flextool/update_flextool/migration_backup.py +4 -4
  197. {flextool-4.5.2 → flextool-4.6.1}/flextool/update_flextool/sync_master_json_template.py +8 -2
  198. {flextool-4.5.2 → flextool-4.6.1/flextool.egg-info}/PKG-INFO +5 -4
  199. {flextool-4.5.2 → flextool-4.6.1}/flextool.egg-info/SOURCES.txt +33 -1
  200. {flextool-4.5.2 → flextool-4.6.1}/flextool.egg-info/requires.txt +3 -2
  201. {flextool-4.5.2 → flextool-4.6.1}/pyproject.toml +17 -9
  202. {flextool-4.5.2 → flextool-4.6.1}/tests/test_color_template.py +3 -1
  203. {flextool-4.5.2 → flextool-4.6.1}/tests/test_connection_node_warnings.py +7 -11
  204. {flextool-4.5.2 → flextool-4.6.1}/tests/test_console_run_tool.py +44 -0
  205. {flextool-4.5.2 → flextool-4.6.1}/tests/test_cost_aggregation_semantics.py +40 -15
  206. {flextool-4.5.2 → flextool-4.6.1}/tests/test_cost_breakdown_by_entity.py +10 -56
  207. {flextool-4.5.2 → flextool-4.6.1}/tests/test_dc_power_flow.py +8 -9
  208. {flextool-4.5.2 → flextool-4.6.1}/tests/test_entity_universe_carrier.py +4 -4
  209. flextool-4.6.1/tests/test_execution_log_lint.py +256 -0
  210. {flextool-4.5.2 → flextool-4.6.1}/tests/test_group_output_warnings.py +36 -9
  211. {flextool-4.5.2 → flextool-4.6.1}/tests/test_handoff_writers.py +0 -90
  212. {flextool-4.5.2 → flextool-4.6.1}/tests/test_piecewise_validation.py +53 -47
  213. {flextool-4.5.2 → flextool-4.6.1}/tests/test_recourse_cost_reconciliation.py +12 -8
  214. {flextool-4.5.2 → flextool-4.6.1}/tests/test_representative_periods.py +6 -5
  215. {flextool-4.5.2 → flextool-4.6.1}/tests/test_rolling_online_carry.py +27 -26
  216. {flextool-4.5.2 → flextool-4.6.1}/tests/test_rolling_online_minuptime.py +28 -18
  217. {flextool-4.5.2 → flextool-4.6.1}/tests/test_run_options.py +3 -0
  218. {flextool-4.5.2 → flextool-4.6.1}/tests/test_scenarios.py +51 -1
  219. flextool-4.6.1/tests/test_specification_excel_import.py +330 -0
  220. flextool-4.6.1/tests/test_stochastic_co2_total_price.py +200 -0
  221. {flextool-4.5.2 → flextool-4.6.1}/tests/test_units_of_measure_validators.py +16 -18
  222. {flextool-4.5.2 → flextool-4.6.1}/tests/test_workdir_empty_default.py +0 -1
  223. {flextool-4.5.2 → flextool-4.6.1}/tests/test_years_represented.py +2 -2
  224. flextool-4.5.2/docs/advanced_concepts.md +0 -213
  225. flextool-4.5.2/flextool/engine/_behaviour_changes.py +0 -483
  226. flextool-4.5.2/flextool/engine/preprocess/_annuity.py +0 -79
  227. flextool-4.5.2/flextool/engine/preprocess/emit/_entity_annual.py +0 -442
  228. flextool-4.5.2/flextool/engine/preprocess/params/_npv.py +0 -2241
  229. flextool-4.5.2/flextool/engine/preprocess/params/_run_calendar.py +0 -140
  230. {flextool-4.5.2 → flextool-4.6.1}/LICENSE.txt +0 -0
  231. {flextool-4.5.2 → flextool-4.6.1}/MANIFEST.in +0 -0
  232. {flextool-4.5.2 → flextool-4.6.1}/_flextool_build.py +0 -0
  233. {flextool-4.5.2 → flextool-4.6.1}/docs/ai_assistant.md +0 -0
  234. {flextool-4.5.2 → flextool-4.6.1}/docs/dev/slack_convention.md +0 -0
  235. {flextool-4.5.2 → flextool-4.6.1}/docs/excel_interface.md +0 -0
  236. {flextool-4.5.2 → flextool-4.6.1}/docs/flextool_gui_interface.md +0 -0
  237. {flextool-4.5.2 → flextool-4.6.1}/docs/how_to/basics.md +0 -0
  238. {flextool-4.5.2 → flextool-4.6.1}/docs/how_to/index.md +0 -0
  239. {flextool-4.5.2 → flextool-4.6.1}/docs/how_to/outputs.md +0 -0
  240. {flextool-4.5.2 → flextool-4.6.1}/docs/install_gui.md +0 -0
  241. {flextool-4.5.2 → flextool-4.6.1}/docs/install_toolbox.md +0 -0
  242. {flextool-4.5.2 → flextool-4.6.1}/docs/interface_overview.md +0 -0
  243. {flextool-4.5.2 → flextool-4.6.1}/docs/reference/commodities.md +0 -0
  244. {flextool-4.5.2 → flextool-4.6.1}/docs/reference/index.md +0 -0
  245. {flextool-4.5.2 → flextool-4.6.1}/docs/reference/reserves.md +0 -0
  246. {flextool-4.5.2 → flextool-4.6.1}/docs/solvers/copt.md +0 -0
  247. {flextool-4.5.2 → flextool-4.6.1}/docs/solvers/cplex.md +0 -0
  248. {flextool-4.5.2 → flextool-4.6.1}/docs/solvers/gurobi.md +0 -0
  249. {flextool-4.5.2 → flextool-4.6.1}/docs/solvers/highs.md +0 -0
  250. {flextool-4.5.2 → flextool-4.6.1}/docs/solvers/index.md +0 -0
  251. {flextool-4.5.2 → flextool-4.6.1}/docs/solvers/xpress.md +0 -0
  252. {flextool-4.5.2 → flextool-4.6.1}/docs/spine_database.md +0 -0
  253. {flextool-4.5.2 → flextool-4.6.1}/flextool/__init__.py +0 -0
  254. {flextool-4.5.2 → flextool-4.6.1}/flextool/_allocator.py +0 -0
  255. {flextool-4.5.2 → flextool-4.6.1}/flextool/_child_python.py +0 -0
  256. {flextool-4.5.2 → flextool-4.6.1}/flextool/_file_lock.py +0 -0
  257. {flextool-4.5.2 → flextool-4.6.1}/flextool/_local_solver_settings.py +0 -0
  258. {flextool-4.5.2 → flextool-4.6.1}/flextool/_mem_sampler.py +0 -0
  259. {flextool-4.5.2 → flextool-4.6.1}/flextool/_process_tree.py +0 -0
  260. {flextool-4.5.2 → flextool-4.6.1}/flextool/_resources.py +0 -0
  261. {flextool-4.5.2 → flextool-4.6.1}/flextool/_safe_text.py +0 -0
  262. {flextool-4.5.2 → flextool-4.6.1}/flextool/_solver_config_source.py +0 -0
  263. {flextool-4.5.2 → flextool-4.6.1}/flextool/_solver_option_rules.py +0 -0
  264. {flextool-4.5.2 → flextool-4.6.1}/flextool/_thread_budget.py +0 -0
  265. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/__init__.py +0 -0
  266. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/_files.py +0 -0
  267. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/backends/__init__.py +0 -0
  268. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/backends/_common.py +0 -0
  269. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/backends/anthropic_messages.py +0 -0
  270. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/backends/openai_chat.py +0 -0
  271. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/budget.py +0 -0
  272. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/caps.py +0 -0
  273. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/chat_cli.py +0 -0
  274. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/cli.py +0 -0
  275. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/context.py +0 -0
  276. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/docs_store.py +0 -0
  277. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/endpoint.py +0 -0
  278. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/env_knobs.py +0 -0
  279. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/errors.py +0 -0
  280. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/inputs/__init__.py +0 -0
  281. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/inputs/_db.py +0 -0
  282. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/inputs/_notes.py +0 -0
  283. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/inputs/_schema.py +0 -0
  284. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/inputs/_units.py +0 -0
  285. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/inputs/_values.py +0 -0
  286. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/keys.py +0 -0
  287. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/llm_adapter.py +0 -0
  288. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/llm_errors.py +0 -0
  289. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/llm_retry.py +0 -0
  290. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/mcp_server.py +0 -0
  291. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/model_check.py +0 -0
  292. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/model_facts.py +0 -0
  293. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/model_list_cache.py +0 -0
  294. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/model_versions.py +0 -0
  295. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/net.py +0 -0
  296. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/pacing.py +0 -0
  297. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/placeholders.py +0 -0
  298. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/probes.py +0 -0
  299. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/project.py +0 -0
  300. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/prompt.py +0 -0
  301. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/providers.py +0 -0
  302. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/redact.py +0 -0
  303. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/registry.py +0 -0
  304. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/results/__init__.py +0 -0
  305. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/results/_query.py +0 -0
  306. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/results/_runs.py +0 -0
  307. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/results/_slacks.py +0 -0
  308. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/runtime_context.py +0 -0
  309. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/session.py +0 -0
  310. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/settings.py +0 -0
  311. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/store.py +0 -0
  312. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/textsearch.py +0 -0
  313. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/thoughts.py +0 -0
  314. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/tiers.py +0 -0
  315. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/tools/__init__.py +0 -0
  316. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/tools/discovery.py +0 -0
  317. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/tools/explain.py +0 -0
  318. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/tools/inputs.py +0 -0
  319. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/tools/orientation.py +0 -0
  320. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/tools/results.py +0 -0
  321. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/unit_wording.py +0 -0
  322. {flextool-4.5.2 → flextool-4.6.1}/flextool/assistant/usage.py +0 -0
  323. {flextool-4.5.2 → flextool-4.6.1}/flextool/calibrate/__init__.py +0 -0
  324. {flextool-4.5.2 → flextool-4.6.1}/flextool/calibrate/__main__.py +0 -0
  325. {flextool-4.5.2 → flextool-4.6.1}/flextool/calibrate/_cli.py +0 -0
  326. {flextool-4.5.2 → flextool-4.6.1}/flextool/calibrate/_db_alt.py +0 -0
  327. {flextool-4.5.2 → flextool-4.6.1}/flextool/calibrate/_final_outputs.py +0 -0
  328. {flextool-4.5.2 → flextool-4.6.1}/flextool/calibrate/_guard.py +0 -0
  329. {flextool-4.5.2 → flextool-4.6.1}/flextool/calibrate/_loop.py +0 -0
  330. {flextool-4.5.2 → flextool-4.6.1}/flextool/calibrate/_readers.py +0 -0
  331. {flextool-4.5.2 → flextool-4.6.1}/flextool/calibrate/_report.py +0 -0
  332. {flextool-4.5.2 → flextool-4.6.1}/flextool/calibrate/_sizing.py +0 -0
  333. {flextool-4.5.2 → flextool-4.6.1}/flextool/calibrate/_solve.py +0 -0
  334. {flextool-4.5.2 → flextool-4.6.1}/flextool/calibrate/_solve_status.py +0 -0
  335. {flextool-4.5.2 → flextool-4.6.1}/flextool/cli/__init__.py +0 -0
  336. {flextool-4.5.2 → flextool-4.6.1}/flextool/cli/_timing.py +0 -0
  337. {flextool-4.5.2 → flextool-4.6.1}/flextool/cli/cmd_execute_flextool_workflow.py +0 -0
  338. {flextool-4.5.2 → flextool-4.6.1}/flextool/cli/cmd_export_to_tabular.py +0 -0
  339. {flextool-4.5.2 → flextool-4.6.1}/flextool/cli/cmd_freeze_database.py +0 -0
  340. {flextool-4.5.2 → flextool-4.6.1}/flextool/cli/cmd_import_sensitivities.py +0 -0
  341. {flextool-4.5.2 → flextool-4.6.1}/flextool/cli/cmd_migrate_database.py +0 -0
  342. {flextool-4.5.2 → flextool-4.6.1}/flextool/cli/cmd_open_results_db.py +0 -0
  343. {flextool-4.5.2 → flextool-4.6.1}/flextool/cli/cmd_project_package.py +0 -0
  344. {flextool-4.5.2 → flextool-4.6.1}/flextool/cli/cmd_read_matpower.py +0 -0
  345. {flextool-4.5.2 → flextool-4.6.1}/flextool/cli/cmd_read_old_flextool.py +0 -0
  346. {flextool-4.5.2 → flextool-4.6.1}/flextool/cli/cmd_read_self_describing_tabular_input.py +0 -0
  347. {flextool-4.5.2 → flextool-4.6.1}/flextool/cli/cmd_read_tabular_input.py +0 -0
  348. {flextool-4.5.2 → flextool-4.6.1}/flextool/cli/cmd_scenario_results.py +0 -0
  349. {flextool-4.5.2 → flextool-4.6.1}/flextool/cli/cmd_solve_mps.py +0 -0
  350. {flextool-4.5.2 → flextool-4.6.1}/flextool/cli/cmd_trust_workspace.py +0 -0
  351. {flextool-4.5.2 → flextool-4.6.1}/flextool/cli/cmd_update_flextool.py +0 -0
  352. {flextool-4.5.2 → flextool-4.6.1}/flextool/cli/cmd_write_outputs.py +0 -0
  353. {flextool-4.5.2 → flextool-4.6.1}/flextool/common_utils/__init__.py +0 -0
  354. {flextool-4.5.2 → flextool-4.6.1}/flextool/common_utils/plot_mem_shape.py +0 -0
  355. {flextool-4.5.2 → flextool-4.6.1}/flextool/decomposition/__init__.py +0 -0
  356. {flextool-4.5.2 → flextool-4.6.1}/flextool/decomposition/region_decomposition.py +0 -0
  357. {flextool-4.5.2 → flextool-4.6.1}/flextool/decomposition/region_filter.py +0 -0
  358. {flextool-4.5.2 → flextool-4.6.1}/flextool/docs_build/__main__.py +0 -0
  359. {flextool-4.5.2 → flextool-4.6.1}/flextool/docs_build/catalogue.py +0 -0
  360. {flextool-4.5.2 → flextool-4.6.1}/flextool/docs_build/formulation.py +0 -0
  361. {flextool-4.5.2 → flextool-4.6.1}/flextool/docs_build/index.py +0 -0
  362. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/__init__.py +0 -0
  363. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/_csv_reload/__init__.py +0 -0
  364. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/_csv_reload/_field_seeds.py +0 -0
  365. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/_csv_reload/_meta.py +0 -0
  366. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/_csv_reload/_seed.py +0 -0
  367. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/_csv_reload/_stamp.py +0 -0
  368. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/_csv_reload/_topology.py +0 -0
  369. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/_csv_reload/load.py +0 -0
  370. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/_csv_reload/offline_outputs.py +0 -0
  371. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/autoscale/__init__.py +0 -0
  372. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/autoscale/_config.py +0 -0
  373. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/input/__init__.py +0 -0
  374. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/input/_constants.py +0 -0
  375. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/input/_db_loader.py +0 -0
  376. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/input/_db_reader.py +0 -0
  377. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/input/_inmemory_reader.py +0 -0
  378. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/input/_input_source.py +0 -0
  379. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/input/_piecewise_curve.py +0 -0
  380. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/input/_spinedb_reader.py +0 -0
  381. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/input/_timeline_rules.py +0 -0
  382. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/model/__init__.py +0 -0
  383. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/model/_balance_terms.py +0 -0
  384. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/model/_coarse_flows.py +0 -0
  385. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/model/_commodity_ladder.py +0 -0
  386. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/model/_delay.py +0 -0
  387. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/model/_exact.py +0 -0
  388. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/model/_lead_time.py +0 -0
  389. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/model/_pdt_join.py +0 -0
  390. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/model/_unit_floors.py +0 -0
  391. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/output/__init__.py +0 -0
  392. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/output/_coarse_flows.py +0 -0
  393. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/output/_prices.py +0 -0
  394. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/output/_reserve_report.py +0 -0
  395. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/__init__.py +0 -0
  396. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/_co2_methods.py +0 -0
  397. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/_dump_stamp.py +0 -0
  398. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/_flex_data_provider.py +0 -0
  399. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/_input_writer.py +0 -0
  400. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/_provider_io.py +0 -0
  401. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/_reserve_methods.py +0 -0
  402. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/_stochastic_detect.py +0 -0
  403. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/emit/__init__.py +0 -0
  404. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/emit/_base_steps.py +0 -0
  405. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/emit/_calc_params.py +0 -0
  406. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/emit/_capacity_margin_peak.py +0 -0
  407. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/emit/_co2_accumulators.py +0 -0
  408. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/emit/_energy_margin.py +0 -0
  409. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/emit/_energy_margin_adder.py +0 -0
  410. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/emit/_leaf_sets.py +0 -0
  411. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/emit/_lp_scaling.py +0 -0
  412. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/emit/_mid_sets.py +0 -0
  413. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/emit/_pdt_lookup.py +0 -0
  414. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/emit/_period_params.py +0 -0
  415. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/emit/_reserve_sets.py +0 -0
  416. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/emit/_vectorize.py +0 -0
  417. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/params/__init__.py +0 -0
  418. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/params/_arithmetic.py +0 -0
  419. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/params/_block.py +0 -0
  420. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/params/_block_layout.py +0 -0
  421. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/params/_branch.py +0 -0
  422. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/params/_per_solve_sets.py +0 -0
  423. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/params/_piecewise.py +0 -0
  424. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/params/_profiles.py +0 -0
  425. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/preprocess/params/_projection.py +0 -0
  426. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/solve/__init__.py +0 -0
  427. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/solve/_acceptance.py +0 -0
  428. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/solve/_determinism.py +0 -0
  429. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/solve/_objective_options.py +0 -0
  430. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/solve/_recursive_solve.py +0 -0
  431. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/solve/_solver_base.py +0 -0
  432. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/solve/_solver_catalogue.py +0 -0
  433. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/solve/chain.py +0 -0
  434. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/solve/solver_catalogue/copt.json +0 -0
  435. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/solve/solver_catalogue/cplex.json +0 -0
  436. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/solve/solver_catalogue/gurobi.json +0 -0
  437. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/solve/solver_catalogue/highs.json +0 -0
  438. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine/solve/solver_catalogue/xpress.json +0 -0
  439. {flextool-4.5.2 → flextool-4.6.1}/flextool/engine_polars/__init__.py +0 -0
  440. {flextool-4.5.2 → flextool-4.6.1}/flextool/env_check.py +0 -0
  441. {flextool-4.5.2 → flextool-4.6.1}/flextool/export_to_tabular/__init__.py +0 -0
  442. {flextool-4.5.2 → flextool-4.6.1}/flextool/export_to_tabular/db_reader.py +0 -0
  443. {flextool-4.5.2 → flextool-4.6.1}/flextool/export_to_tabular/excel_writer.py +0 -0
  444. {flextool-4.5.2 → flextool-4.6.1}/flextool/export_to_tabular/export_to_excel.py +0 -0
  445. {flextool-4.5.2 → flextool-4.6.1}/flextool/export_to_tabular/formatting.py +0 -0
  446. {flextool-4.5.2 → flextool-4.6.1}/flextool/export_to_tabular/sheet_config.py +0 -0
  447. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/__init__.py +0 -0
  448. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/__main__.py +0 -0
  449. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/_menus.py +0 -0
  450. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/assistant/__init__.py +0 -0
  451. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/assistant/chat_tab.py +0 -0
  452. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/assistant/chat_window.py +0 -0
  453. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/assistant/entry.py +0 -0
  454. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/assistant/fonts.py +0 -0
  455. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/assistant/gate.py +0 -0
  456. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/assistant/geometry.py +0 -0
  457. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/assistant/gui_state.py +0 -0
  458. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/assistant/markdown_stream.py +0 -0
  459. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/assistant/notices.py +0 -0
  460. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/assistant/settings_dialog.py +0 -0
  461. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/assistant/strings.py +0 -0
  462. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/assistant/transcript.py +0 -0
  463. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/assistant/worker.py +0 -0
  464. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/calibrate_commands.py +0 -0
  465. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/calibrate_jobs.py +0 -0
  466. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/check_tree.py +0 -0
  467. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/cli_format.py +0 -0
  468. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/config_parser.py +0 -0
  469. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/data_models.py +0 -0
  470. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/db_editor_integration.py +0 -0
  471. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/dialogs/__init__.py +0 -0
  472. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/dialogs/add_dialog.py +0 -0
  473. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/dialogs/calibrate_dialog.py +0 -0
  474. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/dialogs/file_picker.py +0 -0
  475. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/dialogs/group_picker.py +0 -0
  476. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/dialogs/local_solver_settings_dialog.py +0 -0
  477. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/dialogs/migration_consent_dialog.py +0 -0
  478. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/dialogs/migration_progress_dialog.py +0 -0
  479. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/dialogs/plot_dialog.py +0 -0
  480. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/dialogs/plot_settings_picker.py +0 -0
  481. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/dialogs/project_dialog.py +0 -0
  482. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/dialogs/project_package_dialog.py +0 -0
  483. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/dialogs/update_dialog.py +0 -0
  484. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/downsampling.py +0 -0
  485. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/error_handling.py +0 -0
  486. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/hover_tooltip.py +0 -0
  487. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/input_sources.py +0 -0
  488. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/main_window.py +0 -0
  489. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/network_graph.py +0 -0
  490. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/output_actions.py +0 -0
  491. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/output_log_window.py +0 -0
  492. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/platform_utils.py +0 -0
  493. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/plot_cache.py +0 -0
  494. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/plot_canvas.py +0 -0
  495. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/plot_config_reader.py +0 -0
  496. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/project_utils.py +0 -0
  497. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/result_viewer.py +0 -0
  498. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/scenario_key.py +0 -0
  499. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/scenario_lists.py +0 -0
  500. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/settings_io.py +0 -0
  501. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/solve_reader.py +0 -0
  502. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/tree_reorder.py +0 -0
  503. {flextool-4.5.2 → flextool-4.6.1}/flextool/gui/ui_metrics.py +0 -0
  504. {flextool-4.5.2 → flextool-4.6.1}/flextool/input_derivation/_commodity_ladder_sets.py +0 -0
  505. {flextool-4.5.2 → flextool-4.6.1}/flextool/input_derivation/_method_constants.py +0 -0
  506. {flextool-4.5.2 → flextool-4.6.1}/flextool/input_derivation/_piecewise.py +0 -0
  507. {flextool-4.5.2 → flextool-4.6.1}/flextool/lean_parquet.py +0 -0
  508. {flextool-4.5.2 → flextool-4.6.1}/flextool/model_builder/__init__.py +0 -0
  509. {flextool-4.5.2 → flextool-4.6.1}/flextool/model_builder/_special.py +0 -0
  510. {flextool-4.5.2 → flextool-4.6.1}/flextool/model_builder/encoding.py +0 -0
  511. {flextool-4.5.2 → flextool-4.6.1}/flextool/model_builder/names.py +0 -0
  512. {flextool-4.5.2 → flextool-4.6.1}/flextool/model_builder/profiles.py +0 -0
  513. {flextool-4.5.2 → flextool-4.6.1}/flextool/plot_outputs/__init__.py +0 -0
  514. {flextool-4.5.2 → flextool-4.6.1}/flextool/plot_outputs/axis_helpers.py +0 -0
  515. {flextool-4.5.2 → flextool-4.6.1}/flextool/plot_outputs/color_template.py +0 -0
  516. {flextool-4.5.2 → flextool-4.6.1}/flextool/plot_outputs/config.py +0 -0
  517. {flextool-4.5.2 → flextool-4.6.1}/flextool/plot_outputs/format_helpers.py +0 -0
  518. {flextool-4.5.2 → flextool-4.6.1}/flextool/plot_outputs/legend_helpers.py +0 -0
  519. {flextool-4.5.2 → flextool-4.6.1}/flextool/plot_outputs/perf.py +0 -0
  520. {flextool-4.5.2 → flextool-4.6.1}/flextool/plot_outputs/plan.py +0 -0
  521. {flextool-4.5.2 → flextool-4.6.1}/flextool/plot_outputs/plot_bars.py +0 -0
  522. {flextool-4.5.2 → flextool-4.6.1}/flextool/plot_outputs/plot_bars_detail.py +0 -0
  523. {flextool-4.5.2 → flextool-4.6.1}/flextool/plot_outputs/plot_lines.py +0 -0
  524. {flextool-4.5.2 → flextool-4.6.1}/flextool/plot_outputs/shared_manifest.py +0 -0
  525. {flextool-4.5.2 → flextool-4.6.1}/flextool/plot_outputs/subplot_helpers.py +0 -0
  526. {flextool-4.5.2 → flextool-4.6.1}/flextool/plot_outputs/unit_labels.py +0 -0
  527. {flextool-4.5.2 → flextool-4.6.1}/flextool/process_inputs/__init__.py +0 -0
  528. {flextool-4.5.2 → flextool-4.6.1}/flextool/process_inputs/read_old_flextool.py +0 -0
  529. {flextool-4.5.2 → flextool-4.6.1}/flextool/process_inputs/read_self_describing_excel.py +0 -0
  530. {flextool-4.5.2 → flextool-4.6.1}/flextool/process_inputs/write_self_describing_to_db.py +0 -0
  531. {flextool-4.5.2 → flextool-4.6.1}/flextool/process_outputs/__init__.py +0 -0
  532. {flextool-4.5.2 → flextool-4.6.1}/flextool/process_outputs/_annualize.py +0 -0
  533. {flextool-4.5.2 → flextool-4.6.1}/flextool/process_outputs/_csv_sidecars.py +0 -0
  534. {flextool-4.5.2 → flextool-4.6.1}/flextool/process_outputs/_excel_writer.py +0 -0
  535. {flextool-4.5.2 → flextool-4.6.1}/flextool/process_outputs/_inmemory_helpers.py +0 -0
  536. {flextool-4.5.2 → flextool-4.6.1}/flextool/process_outputs/_ramp_inputs.py +0 -0
  537. {flextool-4.5.2 → flextool-4.6.1}/flextool/process_outputs/_sheet_names.py +0 -0
  538. {flextool-4.5.2 → flextool-4.6.1}/flextool/process_outputs/_timeline_breaks.py +0 -0
  539. {flextool-4.5.2 → flextool-4.6.1}/flextool/process_outputs/_unit_context.py +0 -0
  540. {flextool-4.5.2 → flextool-4.6.1}/flextool/process_outputs/calc_capacity_flows.py +0 -0
  541. {flextool-4.5.2 → flextool-4.6.1}/flextool/process_outputs/calc_connections.py +0 -0
  542. {flextool-4.5.2 → flextool-4.6.1}/flextool/process_outputs/calc_group_flows.py +0 -0
  543. {flextool-4.5.2 → flextool-4.6.1}/flextool/process_outputs/calc_ramp_envelope.py +0 -0
  544. {flextool-4.5.2 → flextool-4.6.1}/flextool/process_outputs/calc_slacks.py +0 -0
  545. {flextool-4.5.2 → flextool-4.6.1}/flextool/process_outputs/out_flowgroup.py +0 -0
  546. {flextool-4.5.2 → flextool-4.6.1}/flextool/process_outputs/out_flows.py +0 -0
  547. {flextool-4.5.2 → flextool-4.6.1}/flextool/process_outputs/out_group.py +0 -0
  548. {flextool-4.5.2 → flextool-4.6.1}/flextool/process_outputs/process_results.py +0 -0
  549. {flextool-4.5.2 → flextool-4.6.1}/flextool/process_outputs/reduced_cells.py +0 -0
  550. {flextool-4.5.2 → flextool-4.6.1}/flextool/process_outputs/spinedb_replay.py +0 -0
  551. {flextool-4.5.2 → flextool-4.6.1}/flextool/project_package.py +0 -0
  552. {flextool-4.5.2 → flextool-4.6.1}/flextool/representative_periods/__init__.py +0 -0
  553. {flextool-4.5.2 → flextool-4.6.1}/flextool/representative_periods/clustering.py +0 -0
  554. {flextool-4.5.2 → flextool-4.6.1}/flextool/representative_periods/force_include.py +0 -0
  555. {flextool-4.5.2 → flextool-4.6.1}/flextool/representative_periods/netload.py +0 -0
  556. {flextool-4.5.2 → flextool-4.6.1}/flextool/representative_periods/netload_inputs.py +0 -0
  557. {flextool-4.5.2 → flextool-4.6.1}/flextool/representative_periods/netload_iterate.py +0 -0
  558. {flextool-4.5.2 → flextool-4.6.1}/flextool/representative_periods/preprocess.py +0 -0
  559. {flextool-4.5.2 → flextool-4.6.1}/flextool/representative_periods/scenario_stack.py +0 -0
  560. {flextool-4.5.2 → flextool-4.6.1}/flextool/representative_periods/weights.py +0 -0
  561. {flextool-4.5.2 → flextool-4.6.1}/flextool/safe_names.py +0 -0
  562. {flextool-4.5.2 → flextool-4.6.1}/flextool/scenario_comparison/__init__.py +0 -0
  563. {flextool-4.5.2 → flextool-4.6.1}/flextool/scenario_comparison/config_builder.py +0 -0
  564. {flextool-4.5.2 → flextool-4.6.1}/flextool/scenario_comparison/constants.py +0 -0
  565. {flextool-4.5.2 → flextool-4.6.1}/flextool/scenario_comparison/db_reader.py +0 -0
  566. {flextool-4.5.2 → flextool-4.6.1}/flextool/scenario_comparison/dispatch_data.py +0 -0
  567. {flextool-4.5.2 → flextool-4.6.1}/flextool/scenario_comparison/dispatch_mappings.py +0 -0
  568. {flextool-4.5.2 → flextool-4.6.1}/flextool/scenario_comparison/dispatch_plots.py +0 -0
  569. {flextool-4.5.2 → flextool-4.6.1}/flextool/scenario_comparison/input_entity_colors.py +0 -0
  570. {flextool-4.5.2 → flextool-4.6.1}/flextool/scenario_comparison/orchestrator.py +0 -0
  571. {flextool-4.5.2 → flextool-4.6.1}/flextool/scenario_comparison/plan_union.py +0 -0
  572. {flextool-4.5.2 → flextool-4.6.1}/flextool/scenario_comparison/plot_settings_seed.py +0 -0
  573. {flextool-4.5.2 → flextool-4.6.1}/flextool/scenario_comparison/ramp_plots.py +0 -0
  574. {flextool-4.5.2 → flextool-4.6.1}/flextool/schemas/AXIS_CONTRACT.md +0 -0
  575. {flextool-4.5.2 → flextool-4.6.1}/flextool/schemas/comparison_settings_template.json +0 -0
  576. {flextool-4.5.2 → flextool-4.6.1}/flextool/schemas/flextool_axis_contract.schema.json +0 -0
  577. {flextool-4.5.2 → flextool-4.6.1}/flextool/schemas/old_flextool_import_template.json +0 -0
  578. {flextool-4.5.2 → flextool-4.6.1}/flextool/schemas/output_info_template.json +0 -0
  579. {flextool-4.5.2 → flextool-4.6.1}/flextool/schemas/output_settings_template.json +0 -0
  580. {flextool-4.5.2 → flextool-4.6.1}/flextool/schemas/pre_v26/flextool_template_constant_default.json +0 -0
  581. {flextool-4.5.2 → flextool-4.6.1}/flextool/schemas/pre_v26/flextool_template_default_optional_output.json +0 -0
  582. {flextool-4.5.2 → flextool-4.6.1}/flextool/schemas/pre_v26/flextool_template_default_value.json +0 -0
  583. {flextool-4.5.2 → flextool-4.6.1}/flextool/schemas/pre_v26/flextool_template_drop_down.json +0 -0
  584. {flextool-4.5.2 → flextool-4.6.1}/flextool/schemas/pre_v26/flextool_template_lifetime_method.json +0 -0
  585. {flextool-4.5.2 → flextool-4.6.1}/flextool/schemas/pre_v26/flextool_template_optional_outputs.json +0 -0
  586. {flextool-4.5.2 → flextool-4.6.1}/flextool/schemas/pre_v26/flextool_template_output_node_flows.json +0 -0
  587. {flextool-4.5.2 → flextool-4.6.1}/flextool/schemas/pre_v26/flextool_template_results_master.json +0 -0
  588. {flextool-4.5.2 → flextool-4.6.1}/flextool/schemas/pre_v26/flextool_template_rolling_start_remove.json +0 -0
  589. {flextool-4.5.2 → flextool-4.6.1}/flextool/schemas/pre_v26/flextool_template_rolling_window.json +0 -0
  590. {flextool-4.5.2 → flextool-4.6.1}/flextool/schemas/pre_v26/flextool_template_storage_binding_defaults.json +0 -0
  591. {flextool-4.5.2 → flextool-4.6.1}/flextool/schemas/pre_v26/flextool_template_v2.json +0 -0
  592. {flextool-4.5.2 → flextool-4.6.1}/flextool/schemas/pre_v26/flextool_template_v25.json +0 -0
  593. {flextool-4.5.2 → flextool-4.6.1}/flextool/solver_config/copt.opt.template +0 -0
  594. {flextool-4.5.2 → flextool-4.6.1}/flextool/solver_config/cplex.opt.template +0 -0
  595. {flextool-4.5.2 → flextool-4.6.1}/flextool/solver_config/gurobi.opt.template +0 -0
  596. {flextool-4.5.2 → flextool-4.6.1}/flextool/solver_config/highs.opt.template +0 -0
  597. {flextool-4.5.2 → flextool-4.6.1}/flextool/solver_config/xpress.opt.template +0 -0
  598. {flextool-4.5.2 → flextool-4.6.1}/flextool/spinedb_backend/__init__.py +0 -0
  599. {flextool-4.5.2 → flextool-4.6.1}/flextool/spinedb_backend/_axis_enums.py +0 -0
  600. {flextool-4.5.2 → flextool-4.6.1}/flextool/spinedb_backend/_backend.py +0 -0
  601. {flextool-4.5.2 → flextool-4.6.1}/flextool/sqlite_url.py +0 -0
  602. {flextool-4.5.2 → flextool-4.6.1}/flextool/timeline_pieces.py +0 -0
  603. {flextool-4.5.2 → flextool-4.6.1}/flextool/units_of_measure.py +0 -0
  604. {flextool-4.5.2 → flextool-4.6.1}/flextool/update_flextool/bundle_install.py +0 -0
  605. {flextool-4.5.2 → flextool-4.6.1}/flextool/update_flextool/db_handle.py +0 -0
  606. {flextool-4.5.2 → flextool-4.6.1}/flextool/update_flextool/ensure_settings_db.py +0 -0
  607. {flextool-4.5.2 → flextool-4.6.1}/flextool/update_flextool/export_database.py +0 -0
  608. {flextool-4.5.2 → flextool-4.6.1}/flextool/update_flextool/extend_tests_fixture.py +0 -0
  609. {flextool-4.5.2 → flextool-4.6.1}/flextool/update_flextool/fixture_schema.py +0 -0
  610. {flextool-4.5.2 → flextool-4.6.1}/flextool/update_flextool/frozen.py +0 -0
  611. {flextool-4.5.2 → flextool-4.6.1}/flextool/update_flextool/generate_canonical.py +0 -0
  612. {flextool-4.5.2 → flextool-4.6.1}/flextool/update_flextool/initialize_database.py +0 -0
  613. {flextool-4.5.2 → flextool-4.6.1}/flextool/update_flextool/install_info.py +0 -0
  614. {flextool-4.5.2 → flextool-4.6.1}/flextool/update_flextool/migrate_before_run.py +0 -0
  615. {flextool-4.5.2 → flextool-4.6.1}/flextool/update_flextool/self_update.py +0 -0
  616. {flextool-4.5.2 → flextool-4.6.1}/flextool/update_flextool/test_fixtures.py +0 -0
  617. {flextool-4.5.2 → flextool-4.6.1}/flextool/user_dirs.py +0 -0
  618. {flextool-4.5.2 → flextool-4.6.1}/flextool.egg-info/dependency_links.txt +0 -0
  619. {flextool-4.5.2 → flextool-4.6.1}/flextool.egg-info/entry_points.txt +0 -0
  620. {flextool-4.5.2 → flextool-4.6.1}/flextool.egg-info/top_level.txt +0 -0
  621. {flextool-4.5.2 → flextool-4.6.1}/flextool_assistant_entry.py +0 -0
  622. {flextool-4.5.2 → flextool-4.6.1}/flextool_run_supervisor.py +0 -0
  623. {flextool-4.5.2 → flextool-4.6.1}/setup.cfg +0 -0
  624. {flextool-4.5.2 → flextool-4.6.1}/tests/test_bar_layout.py +0 -0
  625. {flextool-4.5.2 → flextool-4.6.1}/tests/test_bar_sub_pixel_labels.py +0 -0
  626. {flextool-4.5.2 → flextool-4.6.1}/tests/test_blocks.py +0 -0
  627. {flextool-4.5.2 → flextool-4.6.1}/tests/test_branch_weights.py +0 -0
  628. {flextool-4.5.2 → flextool-4.6.1}/tests/test_child_python_safe_path.py +0 -0
  629. {flextool-4.5.2 → flextool-4.6.1}/tests/test_child_run_argv.py +0 -0
  630. {flextool-4.5.2 → flextool-4.6.1}/tests/test_ci_shard.py +0 -0
  631. {flextool-4.5.2 → flextool-4.6.1}/tests/test_commodity_ladder_rolling.py +0 -0
  632. {flextool-4.5.2 → flextool-4.6.1}/tests/test_comparison_excel.py +0 -0
  633. {flextool-4.5.2 → flextool-4.6.1}/tests/test_comparison_project_root.py +0 -0
  634. {flextool-4.5.2 → flextool-4.6.1}/tests/test_comparison_results_registry.py +0 -0
  635. {flextool-4.5.2 → flextool-4.6.1}/tests/test_complete_period_share_reduction.py +0 -0
  636. {flextool-4.5.2 → flextool-4.6.1}/tests/test_csv_dump_roundtrip.py +0 -0
  637. {flextool-4.5.2 → flextool-4.6.1}/tests/test_dependency_caps.py +0 -0
  638. {flextool-4.5.2 → flextool-4.6.1}/tests/test_dispatch_consumer_and_connection_signs.py +0 -0
  639. {flextool-4.5.2 → flextool-4.6.1}/tests/test_dispatch_multi_period.py +0 -0
  640. {flextool-4.5.2 → flextool-4.6.1}/tests/test_dispatch_node_debug_and_tree.py +0 -0
  641. {flextool-4.5.2 → flextool-4.6.1}/tests/test_dispatch_order_specials.py +0 -0
  642. {flextool-4.5.2 → flextool-4.6.1}/tests/test_dispatch_scenario_tag.py +0 -0
  643. {flextool-4.5.2 → flextool-4.6.1}/tests/test_ensure_settings_db.py +0 -0
  644. {flextool-4.5.2 → flextool-4.6.1}/tests/test_entity_unitsize_invariant.py +0 -0
  645. {flextool-4.5.2 → flextool-4.6.1}/tests/test_env_check.py +0 -0
  646. {flextool-4.5.2 → flextool-4.6.1}/tests/test_env_knob_registry.py +0 -0
  647. {flextool-4.5.2 → flextool-4.6.1}/tests/test_excel_text_cells.py +0 -0
  648. {flextool-4.5.2 → flextool-4.6.1}/tests/test_export_to_tabular.py +0 -0
  649. {flextool-4.5.2 → flextool-4.6.1}/tests/test_extend_tests_fixture.py +0 -0
  650. {flextool-4.5.2 → flextool-4.6.1}/tests/test_flowgroup_indicators.py +0 -0
  651. {flextool-4.5.2 → flextool-4.6.1}/tests/test_force_include.py +0 -0
  652. {flextool-4.5.2 → flextool-4.6.1}/tests/test_input_entity_colors.py +0 -0
  653. {flextool-4.5.2 → flextool-4.6.1}/tests/test_lean_parquet.py +0 -0
  654. {flextool-4.5.2 → flextool-4.6.1}/tests/test_lh2_three_region.py +0 -0
  655. {flextool-4.5.2 → flextool-4.6.1}/tests/test_min_load_rolling.py +0 -0
  656. {flextool-4.5.2 → flextool-4.6.1}/tests/test_model_builder_invest.py +0 -0
  657. {flextool-4.5.2 → flextool-4.6.1}/tests/test_model_builder_special_functions.py +0 -0
  658. {flextool-4.5.2 → flextool-4.6.1}/tests/test_non_anticipativity.py +0 -0
  659. {flextool-4.5.2 → flextool-4.6.1}/tests/test_old_flextool_importer_schema_drift.py +0 -0
  660. {flextool-4.5.2 → flextool-4.6.1}/tests/test_open_results_db.py +0 -0
  661. {flextool-4.5.2 → flextool-4.6.1}/tests/test_output_column_metadata.py +0 -0
  662. {flextool-4.5.2 → flextool-4.6.1}/tests/test_output_csv_names.py +0 -0
  663. {flextool-4.5.2 → flextool-4.6.1}/tests/test_output_metadata_renderers.py +0 -0
  664. {flextool-4.5.2 → flextool-4.6.1}/tests/test_output_work_folder_isolation.py +0 -0
  665. {flextool-4.5.2 → flextool-4.6.1}/tests/test_parameter_group_coverage.py +0 -0
  666. {flextool-4.5.2 → flextool-4.6.1}/tests/test_period_share_of_year_output.py +0 -0
  667. {flextool-4.5.2 → flextool-4.6.1}/tests/test_plan_union.py +0 -0
  668. {flextool-4.5.2 → flextool-4.6.1}/tests/test_plot_draw_order.py +0 -0
  669. {flextool-4.5.2 → flextool-4.6.1}/tests/test_plot_gaps.py +0 -0
  670. {flextool-4.5.2 → flextool-4.6.1}/tests/test_plot_pipeline.py +0 -0
  671. {flextool-4.5.2 → flextool-4.6.1}/tests/test_plot_plan_chunk_reconstruction.py +0 -0
  672. {flextool-4.5.2 → flextool-4.6.1}/tests/test_plot_plan_time_labels_roundtrip.py +0 -0
  673. {flextool-4.5.2 → flextool-4.6.1}/tests/test_plot_settings_seed.py +0 -0
  674. {flextool-4.5.2 → flextool-4.6.1}/tests/test_project_package_cli.py +0 -0
  675. {flextool-4.5.2 → flextool-4.6.1}/tests/test_ramp_histogram.py +0 -0
  676. {flextool-4.5.2 → flextool-4.6.1}/tests/test_read_highs_solution.py +0 -0
  677. {flextool-4.5.2 → flextool-4.6.1}/tests/test_regional_filter.py +0 -0
  678. {flextool-4.5.2 → flextool-4.6.1}/tests/test_rolling_online_mintime_carry.py +0 -0
  679. {flextool-4.5.2 → flextool-4.6.1}/tests/test_rp_alternative_name.py +0 -0
  680. {flextool-4.5.2 → flextool-4.6.1}/tests/test_rp_force_include_wiring.py +0 -0
  681. {flextool-4.5.2 → flextool-4.6.1}/tests/test_rp_solves_filter.py +0 -0
  682. {flextool-4.5.2 → flextool-4.6.1}/tests/test_safe_names.py +0 -0
  683. {flextool-4.5.2 → flextool-4.6.1}/tests/test_safe_text.py +0 -0
  684. {flextool-4.5.2 → flextool-4.6.1}/tests/test_scenario_colors.py +0 -0
  685. {flextool-4.5.2 → flextool-4.6.1}/tests/test_scenario_stack.py +0 -0
  686. {flextool-4.5.2 → flextool-4.6.1}/tests/test_self_describing_reader.py +0 -0
  687. {flextool-4.5.2 → flextool-4.6.1}/tests/test_shared_axis_manifest.py +0 -0
  688. {flextool-4.5.2 → flextool-4.6.1}/tests/test_simple_bar_entity_color.py +0 -0
  689. {flextool-4.5.2 → flextool-4.6.1}/tests/test_solve_config.py +0 -0
  690. {flextool-4.5.2 → flextool-4.6.1}/tests/test_solve_reader.py +0 -0
  691. {flextool-4.5.2 → flextool-4.6.1}/tests/test_sqlite_url.py +0 -0
  692. {flextool-4.5.2 → flextool-4.6.1}/tests/test_stream_concat_temp_cleanup.py +0 -0
  693. {flextool-4.5.2 → flextool-4.6.1}/tests/test_support_load.py +0 -0
  694. {flextool-4.5.2 → flextool-4.6.1}/tests/test_synthesize_invest_dual.py +0 -0
  695. {flextool-4.5.2 → flextool-4.6.1}/tests/test_thread_budget.py +0 -0
  696. {flextool-4.5.2 → flextool-4.6.1}/tests/test_time_runs.py +0 -0
  697. {flextool-4.5.2 → flextool-4.6.1}/tests/test_timeline_breaks.py +0 -0
  698. {flextool-4.5.2 → flextool-4.6.1}/tests/test_timings_csv.py +0 -0
  699. {flextool-4.5.2 → flextool-4.6.1}/tests/test_toolbox_specs.py +0 -0
  700. {flextool-4.5.2 → flextool-4.6.1}/tests/test_unidirectional_connection.py +0 -0
  701. {flextool-4.5.2 → flextool-4.6.1}/tests/test_unit_online_dt_columns.py +0 -0
  702. {flextool-4.5.2 → flextool-4.6.1}/tests/test_units_of_measure.py +0 -0
  703. {flextool-4.5.2 → flextool-4.6.1}/tests/test_user_dirs_isolation.py +0 -0
  704. {flextool-4.5.2 → flextool-4.6.1}/tests/test_v52_migration.py +0 -0
  705. {flextool-4.5.2 → flextool-4.6.1}/tests/test_v63_migration.py +0 -0
  706. {flextool-4.5.2 → flextool-4.6.1}/tests/test_v64_migration.py +0 -0
  707. {flextool-4.5.2 → flextool-4.6.1}/tests/test_v65_migration.py +0 -0
  708. {flextool-4.5.2 → flextool-4.6.1}/tests/test_v66_migration.py +0 -0
  709. {flextool-4.5.2 → flextool-4.6.1}/tests/test_v67_migration.py +0 -0
  710. {flextool-4.5.2 → flextool-4.6.1}/tests/test_v68_migration.py +0 -0
  711. {flextool-4.5.2 → flextool-4.6.1}/tests/test_v69_migration.py +0 -0
  712. {flextool-4.5.2 → flextool-4.6.1}/tests/test_v70_migration.py +0 -0
  713. {flextool-4.5.2 → flextool-4.6.1}/tests/test_xlsx_startup_input_round_trip.py +0 -0
  714. {flextool-4.5.2 → flextool-4.6.1}/tests/test_xlsx_v77_round_trip.py +0 -0
  715. {flextool-4.5.2 → flextool-4.6.1}/tests/test_xlsx_workflow.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flextool
3
- Version: 4.5.2
3
+ Version: 4.6.1
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
@@ -39,7 +39,7 @@ Classifier: Topic :: Scientific/Engineering
39
39
  Requires-Python: >=3.11
40
40
  Description-Content-Type: text/markdown
41
41
  License-File: LICENSE.txt
42
- Requires-Dist: polar-high>=3.15.0
42
+ Requires-Dist: polar-high>=3.16.1
43
43
  Requires-Dist: highspy<1.16,>=1.15.1
44
44
  Requires-Dist: polars<3,>=1.40
45
45
  Requires-Dist: pandas<4,>=2.2.3
@@ -69,10 +69,11 @@ Provides-Extra: compat
69
69
  Requires-Dist: polars[rtcompat]<3,>=1.40; extra == "compat"
70
70
  Provides-Extra: engine-polars
71
71
  Provides-Extra: dev
72
- Requires-Dist: pytest>=8.0; extra == "dev"
72
+ Requires-Dist: pytest<10,>=9.2; extra == "dev"
73
73
  Requires-Dist: pytest-timeout>=2.3; extra == "dev"
74
74
  Requires-Dist: pytest-xdist>=3.0; extra == "dev"
75
75
  Requires-Dist: ruff>=0.5; extra == "dev"
76
+ Requires-Dist: setuptools>=61; extra == "dev"
76
77
  Dynamic: license-file
77
78
 
78
79
  [![PyPI version](https://img.shields.io/pypi/v/flextool.svg)](https://pypi.org/project/flextool/)
@@ -114,7 +115,7 @@ IRENA FlexTool is an energy and power systems model for understanding the role o
114
115
  change is in how the matrix is generated and solved, not in the model
115
116
  formulation.
116
117
 
117
- This is IRENA FlexTool v4 (see the current version in CHANGELOG.md). Report any bugs or difficulties in the [issue tracker](https://github.com/irena-flextool/flextool/issues).
118
+ This is IRENA FlexTool v4 (see the current version in CHANGELOG.md). Report any bugs or difficulties in the [issue tracker](https://github.com/irena-flextool/flextool/issues); ask modelling and usage questions in [GitHub Discussions](https://github.com/irena-flextool/flextool/discussions).
118
119
  The previous version of IRENA FlexTool can be found in https://www.irena.org/energytransition/Energy-System-Models-and-Data/IRENA-FlexTool.
119
120
 
120
121
  ## Under the hood: Rust-based matrix generation
@@ -37,7 +37,7 @@ IRENA FlexTool is an energy and power systems model for understanding the role o
37
37
  change is in how the matrix is generated and solved, not in the model
38
38
  formulation.
39
39
 
40
- This is IRENA FlexTool v4 (see the current version in CHANGELOG.md). Report any bugs or difficulties in the [issue tracker](https://github.com/irena-flextool/flextool/issues).
40
+ This is IRENA FlexTool v4 (see the current version in CHANGELOG.md). Report any bugs or difficulties in the [issue tracker](https://github.com/irena-flextool/flextool/issues); ask modelling and usage questions in [GitHub Discussions](https://github.com/irena-flextool/flextool/discussions).
41
41
  The previous version of IRENA FlexTool can be found in https://www.irena.org/energytransition/Energy-System-Models-and-Data/IRENA-FlexTool.
42
42
 
43
43
  ## Under the hood: Rust-based matrix generation
@@ -0,0 +1,212 @@
1
+ # Advanced Concepts
2
+
3
+ ## Penalties
4
+
5
+ FlexTool uses penalty (slack) variables to relax constraints that might otherwise cause infeasibility. Each penalty has a very high cost in the objective function that makes the optimizer try to avoid these violations unless no other option is viable.
6
+
7
+ ### How penalties work
8
+
9
+ When a constraint cannot be satisfied (e.g., demand exceeds available supply), a slack variable absorbs the deficit. The cost of this violation is added to the objective function. The penalty cost should therefore be set high enough to prevent violations unless there is genuinely no feasible alternative, but not so high that it causes numerical issues. The penalty could also be based on perceived cost of the violation: e.g. value of lost load in case of node balance violation.
10
+
11
+ ### Penalty scaling with time
12
+
13
+ Most penalties scale with the duration of the violation -- a 3-hour violation costs 3 times as much as a 1-hour violation. The table below summarizes how each penalty is treated:
14
+
15
+ | Penalty parameter | Unit | Constraint type | Scales with step_duration | Notes |
16
+ |---|---|---|---|---|
17
+ | `penalty_up` (node) | CUR/MWh | Energy balance | Yes | Cost per MWh of energy not served |
18
+ | `penalty_down` (node) | CUR/MWh | Energy balance | Yes | Cost per MWh of excess energy |
19
+ | `penalty_reserve` (reserve group) | CUR/MW | Reserve requirement | Yes | Cost per MW-hour of reserve shortfall |
20
+ | `penalty_inertia` (group) | CUR/MWs | Inertia requirement | Yes | Cost per MWs-hour of inertia shortfall |
21
+ | `penalty_non_synchronous` (group) | CUR/MWh | Non-synchronous limit | Yes | Cost per MWh of non-sync limit violation |
22
+ | `penalty_capacity_margin` (group) | CUR/kW | Capacity margin | No | Cost per kW of capacity shortfall per period. Analogous to investment cost -- but not annualized. It is still discounted like an operating cost. |
23
+
24
+ ### Capacity margin penalty
25
+
26
+ The capacity margin penalty is different from the others: it represents the cost of not having sufficient installed capacity. It is analogous to an investment cost (CUR/kW) but is NOT annualized over a lifetime like actual investments. Instead, it applies as a lump cost per period. This means a `penalty_capacity_margin` of 1000 CUR/kW is much more expensive than an `invest_cost` of 1000 CUR/kW (which would be annualized to roughly 50-100 CUR/kW/year depending on lifetime and discount rate). Set the penalty to reflect the annual cost of capacity shortfall, not the total investment cost.
27
+
28
+ ## Economic Modelling
29
+
30
+ ### Overview
31
+
32
+ FlexTool minimizes total system cost over a planning horizon. The economic framework uses two kinds of rate:
33
+
34
+ - **`social_discount_rate`** (model-level): the model's time discount rate. It weighs a cost or income in a later year less than the same amount now.
35
+ - **`discount_rate`** (per technology): the investor's rate (WACC). It turns an `invest_cost` into yearly payments and reflects the financing cost and risk of each investment.
36
+
37
+ ### Real vs nominal values
38
+
39
+ Economic values can be expressed in two ways:
40
+
41
+ - **Real (constant prices)**: all values are in the money of one base year. A power plant that costs 1000 EUR/kW today still costs 1000 EUR/kW in 2040 in real terms: the purchasing power is the same.
42
+ - **Nominal (current prices)**: values include inflation. The same plant might cost 1300 EUR/kW in 2040 at 2 % annual inflation, even though its real cost has not changed.
43
+
44
+ **The rule: every cost input and both rates are in the same terms.** FlexTool never converts a rate or a price between real and nominal. The annuity, the salvage credits and the retirement settlement all assume one consistent basis, normally real prices with real rates.
45
+
46
+ | Inputs | `social_discount_rate` (model) | `discount_rate` (entity) |
47
+ |--------|-------------------------------|--------------------------|
48
+ | Real (constant prices) | the real time preference: 0 for none, or e.g. 0.03 | the real WACC, e.g. 0.05 |
49
+ | Nominal (current prices) | (1 + inflation) × (1 + real time preference) − 1, e.g. 1.02 × 1.03 − 1 = 0.0506 | the nominal WACC, e.g. 0.07 |
50
+
51
+ - **`social_discount_rate` is the model's time discounting**, in the terms of the inputs. 0 means no time preference: a cost in a later period weighs the same as the same cost now (with real inputs, inflation is already in the prices). Above 0, later costs and incomes weigh less. With nominal inputs it must include inflation (the combined rate above), or later nominal costs would weigh too much.
52
+ - **The entity `discount_rate` is the investor's rate of return (WACC)**, in the same terms. It turns `invest_cost` into the yearly payments the investor needs. A risk premium belongs here, not in the `social_discount_rate`. With a `discount_rate` above the `social_discount_rate`, money paid back to the investor sooner is cheaper for the model: a shorter `payback_time` with the same `discount_rate` makes the investment cheaper, not dearer (and a retirement, which pays the rest of the loan at once, also changes the cost). With equal rates the timing of the investor's payments does not matter.
53
+
54
+ The Fisher equation relates the two: (1 + nominal rate) = (1 + real rate) × (1 + inflation); approximately, nominal = real + inflation (5 % + 2 % ≈ 7 %).
55
+
56
+ ### The social discount rate
57
+
58
+ The model-level `social_discount_rate` (no value: 0) weighs every cost and income by `1 / (1 + social_discount_rate)^t`, where `t` is the years from the start of the run to the moment the cost falls. It applies uniformly to all cost types: investment payments, fuel costs, fixed O&M, penalties, salvage values, etc. The discounted costs are present values at that rate.
59
+
60
+ The yearly investment payments fall at the start of each year by default (the annual payment is sized for that, see below) and operating costs at the middle of the year: `discount_offset_investment` (default 0) and `discount_offset_operations` (default 0.5) move them within the year.
61
+
62
+ ### Discounting between milestone years
63
+
64
+ **Only `social_discount_rate` discounts.** FlexTool discounts the costs of later periods (milestone years) with the `model` parameter `social_discount_rate` and nothing else. Each period's costs are multiplied by a discount factor: the sum, over the years the period represents, of `1 / (1 + social_discount_rate)^years_from_start`. The per-technology `discount_rate` does not discount between periods: it only turns an `invest_cost` into a yearly payment (see [The discount rate](#the-discount-rate-per-technology)).
65
+
66
+ **How the years are counted.** The years from the start of the run come from `years_represented`: a period starts after the years that the periods before it represent. The period names are only labels, so *p2030* is not read as the year 2030. Give each milestone the number of years until the next milestone (for example 5 for *p2025* when the next period is *p2030*). Investment payments are discounted from the start of a year (`discount_offset_investment`, default 0), operating costs from the middle of it (`discount_offset_operations`, default 0.5).
67
+
68
+ **With `social_discount_rate` 0 there is no discounting.** A cost in 2040 then weighs the same as the same cost in 2025: each period's yearly costs are only multiplied by its `years_represented`. This is right for a model that should not prefer earlier or later costs, but it is not what most planning studies want. Keep the per-technology `discount_rate` at the cost of capital of each technology in either case.
69
+
70
+ **Where to see it.** `summary_solve.csv` lists the *Operational discount factor* and the *Investment discount factor* of each period. The cost results come both annualized (one year of the period, not discounted) and discounted (present value over the years the periods represent); see [Costs](results.md#costs).
71
+
72
+ ### The discount rate (per technology)
73
+
74
+ Each unit, connection, and storage node can have its own `discount_rate` parameter (default: 0.05, i.e., 5%). This represents the **weighted average cost of capital (WACC)** -- the return that investors require to finance the technology.
75
+
76
+ The discount rate converts a lump-sum investment cost into annual payments over the technology's payback time (`payback_time`, else its `lifetime_technical`) using the standard annuity formula:
77
+
78
+ ```
79
+ annual_payment = invest_cost * discount_rate / (1 - (1 / (1 + discount_rate))^payback_time)
80
+ * (1 + discount_rate)^(discount_offset_investment - 1)
81
+ ```
82
+
83
+ The loan is taken when the capacity comes online (`invest_cost` is the overnight cost) and each yearly payment falls
84
+ `discount_offset_investment` years into its service year: at the default 0 at the start of each year, the first one on
85
+ the day the capacity comes online; at 1 at the end of each year. The last factor sizes the payments for that moment,
86
+ so the payments are worth exactly `invest_cost` at the `discount_rate` whatever the offset. For example, invest cost
87
+ 1000, discount rate 5 % and payback time 10 years give 129.50 a year paid at year ends (offset 1) and 129.50 / 1.05 =
88
+ 123.34 a year paid at year starts (offset 0); both are worth 1000 when discounted at 5 % from the moment the capacity
89
+ comes online. The same factor sizes the level salvage credit (below).
90
+
91
+ With `lifetime_method` *reinvest_choice* or *no_reinvestment* the plant pays a level yearly cost over its real lifetime: the present value of the `payback_time` annual payments, discounted at the model `social_discount_rate`, spread evenly over the `lifetime_technical` years, `annual_payment · G(payback_time) / G(lifetime_technical)` with `G(x)` the discounted sum of x years (a fractional last year counts its fraction). It is paid for each year the capacity is in service, from the year it starts to operate to its end of life as `end_of_life_method` rounds it: a 12-year plant whose life is rounded to 10 years pays the yearly cost of the 12-year plant for 10 years, and one rounded to 15 years for 15. The price does not depend on when the plant is built or on the period lengths. `payback_time` and `discount_rate` set only its size: with `discount_rate` equal to `social_discount_rate` the yearly cost is the annuity over `lifetime_technical` whatever the payback time, with a `discount_rate` above it a shorter payback time is cheaper, and below it dearer (see [real vs nominal values](#real-vs-nominal-values)). With *reinvest_automatic* the plant is replaced at its end of life by a new plant with the values of the period the replacement comes online, each plant paying its own level yearly cost (its salvage value netted in) for its years in service, to the end of the model horizon; with constant values, `payback_time` equal to `lifetime_technical` and no `net_salvage_value` this is the annual payment in every year. Years after the model horizon are not counted.
92
+
93
+ The `net_salvage_value` at the end of the real lifetime lowers that yearly cost: its present value at `discount_rate` levelled over the `lifetime_technical` years, `net_salvage_value · (1 + discount_rate)^−lifetime_technical · annual factor`, the same annual factor as the investment (with `payback_time` equal to `lifetime_technical`, the textbook capital recovery with salvage). Existing capacity, whose investment is sunk, holds its salvage value as the same level credit over its service years from the model start. A retirement receives the whole `net_salvage_value` at the start of the retirement period and gives the credits back. Since years after the horizon are not counted, a retirement late in the horizon collects a salvage value whose credits a kept plant would earn mostly after the horizon, so it can pay; this is a consequence of the finite horizon, not a model error. In the cost results the *investment* and *salvage* of capacity that lives past the horizon are these horizon shares (see [Costs](results.md#costs)).
94
+
95
+ A `discount_rate` of 0 gives the straight-line annuity `invest_cost / payback_time` (no interest). Without a value the rate is 0.05; a negative rate is an input error. Neither lifetime has a default: an entity that invests or retires with a cost (`invest_cost`, `net_salvage_value`) needs a `payback_time` or a `lifetime_technical`, and one whose `lifetime_method` is `reinvest_choice` or `no_reinvestment` needs a `lifetime_technical` (also for existing capacity without investment), since the capacity then ends after it.
96
+
97
+ An `invest_method` other than `not_allowed` offers investment (retirement) in every investment period, also without an `invest_cost` (`net_salvage_value`) or where it is 0: that capacity has no annuity, and its `fixed_cost` still counts (a retirement saves it). A 0 in an `invest_cost` map therefore does not block investment in that period; to forbid investment in a period, use a period method (`invest_period`, `invest_period_total` or their `invest_retire_` forms) and set `invest_max_period` 0 for it; the other methods do not use `invest_max_period`. With neither `invest_cost` nor `fixed_cost` any invested amount is optimal, so the result is arbitrary. A zero-cost investment needs a `lifetime_technical` only with `lifetime_method` `reinvest_choice` or `no_reinvestment`.
98
+
99
+ **Example**: A solar plant costs 800 EUR/kW with a 25-year lifetime and 5% discount rate, paid at the start of each year (the default `discount_offset_investment` 0):
100
+ ```
101
+ annual_payment = 800 * 0.05 / (1 - 1/1.05^25) * 1.05^(0 - 1) = 800 * 0.0710 / 1.05 = 54.1 EUR/kW/year approximately
102
+ ```
103
+
104
+ Different technologies can have different discount rates reflecting their risk profiles:
105
+
106
+ - Low risk (e.g., established solar PV): 3-5%
107
+ - Medium risk (e.g., natural gas turbine): 5-7%
108
+ - High risk (e.g., novel technology): 8-12%
109
+
110
+ ### Fixed costs
111
+
112
+ Fixed costs (`fixed_cost` parameter on units, connections, and nodes) represent annual operation and maintenance costs that are incurred regardless of how much the asset is used. They are expressed in CUR/kW/year (or CUR/kWh/year for storage).
113
+
114
+ For **existing** assets, fixed costs are applied each year, discounted like the operating costs.
115
+
116
+ For **invested** assets, the fixed cost is paid in every period the new capacity operates within the model horizon: until its `lifetime_technical` ends, or in every later period with `lifetime_method` *reinvest_automatic* (the same years as the yearly investment cost, see above). It is the `fixed_cost` of each of those periods, as for existing capacity (a period map can let it rise with the age of the fleet), discounted like the other costs of that period. Years after the model horizon are not counted, the same as for the investment annuity, so the investment decision weighs the costs of the years the model covers. In the results, these costs are reported as a separate line item (*fixed cost invested*) from the investment annuity.
117
+
118
+ ### Summary of economic parameters
119
+
120
+ | Parameter | Level | Default | Description |
121
+ |-----------|-------|---------|-------------|
122
+ | `social_discount_rate` | Model | 0 | The model's time discount rate; 0 is no time preference |
123
+ | `discount_offset_investment` | Model | 0 | Where in the year the yearly investment payments and salvage credits fall (0 = start, 1 = end); the annual payment is sized for it |
124
+ | `discount_offset_operations` | Model | 0.5 | Where in the year operating and fixed costs fall (0.5 = middle) |
125
+ | `discount_rate` | Entity | 0.05 | Technology-specific WACC for annualizing investments; 0 gives invest_cost / payback_time |
126
+ | `invest_cost` | Entity | - | Overnight investment cost [CUR/kW] |
127
+ | `lifetime_technical` | Entity | - | How long the capacity operates [years]; required when the entity invests or retires with a cost and has no `payback_time` |
128
+ | `payback_time` | Entity | `lifetime_technical` | Years over which `invest_cost` is annualized |
129
+ | `fixed_cost` | Entity | - | Annual fixed O&M cost [CUR/kW/year] |
130
+ | `net_salvage_value` | Entity | - | Scrap value minus decommissioning cost when the capacity stops operating [CUR/kW] |
131
+
132
+ ### How multi-year periods are handled internally
133
+
134
+ A period can represent multiple years via the `years_represented` parameter on the solve entity. For example, a period `p2025` with `years_represented = 5` means that the modelled timeline (e.g., one representative week) stands in for 5 full years (2025-2029).
135
+
136
+ Internally, FlexTool expands this into per-year entries. A period with `years_represented = 5` becomes 5 rows in the solve data, each representing 1 year at a different distance from the start of the run (the first period of the model's first solve; a later solve counts the years of the earlier solves' periods first). The discount factor then sums the per-year discount factors:
137
+
138
+ ```
139
+ discount_factor = Σ_y p_years_represented[d,y] × 1/(1 + social_discount_rate)^(years_from_run_start[d,y] + p_years_represented[d,y] × offset)
140
+ ```
141
+
142
+ where `years_from_run_start[d,y]` is the start of year `y` of period `d` (a fractional year counts as its fraction: after a period of 2.5 years the next one starts at 2.5) and `offset` is `discount_offset_investment` or `discount_offset_operations`.
143
+
144
+ With `social_discount_rate = 0`, each term contributes `p_years_represented[d,y] × 1 = 1`, and the sum equals `years_represented` (i.e., 5). With `social_discount_rate = 2%`, each later year is discounted slightly more, giving a sum of approximately 4.81 (at offset 0).
145
+
146
+ This mechanism also supports fractional values. With `years_represented = 0.5` (half-year resolution for investment decisions), the discount factor is `0.5 × 1/(1 + social_discount_rate)^y`, correctly counting only half a year of costs.
147
+
148
+ In the objective function, operational costs follow this pattern:
149
+
150
+ ```
151
+ cost_per_timestep × step_duration × discount_factor / period_share_of_year
152
+ ```
153
+
154
+ where `period_share_of_year = hours_in_period / 8760` converts the modelled period to an annual equivalent, and the discount factor then scales across all represented years. Investment costs follow a similar pattern using a separate discount factor that accounts for investment timing (`discount_offset_investment`).
155
+
156
+ ### Using periods that are not one year long
157
+
158
+ A period does not have to represent exactly one year. It can be shorter
159
+ (e.g. a half-year period for six-monthly investment decisions) or stand in
160
+ for several years (see *How multi-year periods are handled internally*).
161
+ FlexTool keeps the accounting correct for any period length — you mostly
162
+ just need to know what is scaled and what is not.
163
+
164
+ #### What a period's length means
165
+
166
+ Each period has a length derived from its modelled timeline,
167
+ `period_share_of_year = hours_in_period / 8760`. Investment granularity is set separately
168
+ with `years_represented` on the solve — including fractional values such
169
+ as `years_represented = 0.5` for half-year steps.
170
+
171
+ #### What stays correct automatically
172
+
173
+ - **Operating costs and energy balances are absolute.** They are summed
174
+ over the timesteps actually in the period, so a shorter period simply
175
+ incurs less; a longer one, more. No year constant enters these totals.
176
+ - **Annual (per-year) parameters are prorated by period length.** Annual
177
+ `fixed_cost`, for instance, is applied as `fixed_cost × period_share`, so
178
+ a half-year period pays half a year of fixed cost. Investment annuities
179
+ and discounting likewise use the period's (possibly fractional) year
180
+ count.
181
+
182
+ #### What "annualised" in the results means
183
+
184
+ The `..._annualized` result columns divide a period's totals by
185
+ `period_share_of_year` to express them as a per-year rate. This is only a
186
+ reporting convenience so that periods of different lengths can be compared
187
+ on the same footing — it does **not** change the optimisation or the
188
+ period totals. If you want the actual amount incurred in the period, read
189
+ the plain (non-annualised) total.
190
+
191
+ #### When NOT to rely on inflow scaling
192
+
193
+ The `inflow_method` options `scale_to_annual_flow`, `scale_in_proportion`
194
+ and `scale_to_annual_and_peak_flow` assume the modelled timeline is a
195
+ representative year: they normalise the inflow by its sum over (one year
196
+ of) the timeline. If your timeline is **not** a representative year — a
197
+ non-representative sub-year slice, or several years with genuinely
198
+ different shapes — do not use these methods. Instead provide an accurate
199
+ absolute inflow time series and leave `inflow_method` at its default
200
+ (`use_original`); then no annual assumption is applied to your inflow.
201
+
202
+ (There is no equivalent "scale to annual" for `profile`-based limits such
203
+ as capacity factors. A capacity factor is bounded by installed capacity,
204
+ so there is no easy way to scale it accurately.)
205
+
206
+ #### One approximation to be aware of
207
+
208
+ When a single period represents multiple years (`years_represented > 1`),
209
+ costs within that period are discounted at the period's single point in
210
+ time rather than year by year. The totals remain correct; only the
211
+ within-period discounting is approximated. Use shorter periods (more of
212
+ them) if you need finer discounting resolution.
@@ -400,7 +400,9 @@ Same `build_flextool` body, three wrappers from `polar_high`:
400
400
  objective is a **valid lower bound** and the loop converges on the
401
401
  optimality gap. This replaces the earlier dual-subgradient scheme, which
402
402
  collapsed greenfield cross-region trade to autarky with an *invalid*
403
- bound. See [decomposition.md](decomposition.md).
403
+ bound. The solve's results come from a final monolithic solve with the
404
+ Benders investments fixed (`--benders-final-solve`, decomposition.md
405
+ §2.9). See [decomposition.md](decomposition.md).
404
406
 
405
407
  #### Feature flags in `build_flextool`
406
408
 
@@ -410,7 +412,9 @@ Same `build_flextool` body, three wrappers from `polar_high`:
410
412
  `objective_terms(b)` summed into the objective. Optional features with
411
413
  their own variables live in their own modules (`_online`, `_unit_floors`,
412
414
  `_reserve`, `_group_slack`, `_cumulative_invest`, `_commodity_ladder`,
413
- `_dc_power_flow`, `_delay`, `_non_anticipativity`). The `model/core.py` module
415
+ `_dc_power_flow`, `_delay`, `_non_anticipativity`); `_capacity` builds the
416
+ capacity in service (investments and retirements counting in each period, from
417
+ the cohort table) once for all of them. The `model/core.py` module
414
418
  docstring maps every variable and equation family; details in
415
419
  [engine.md](engine.md#lp-build-modelpy-and-the-feature-modules).
416
420
 
@@ -481,9 +485,8 @@ relevant key families are declared in `engine/preprocess/_provider_keys.py`:
481
485
 
482
486
  - `HANDOFF_*` — quantities the just-solved problem produces for the next
483
487
  iteration (`fix_storage_quantity/price/usage`, `roll_end_state`,
484
- `realized_invest`, `realized_existing`, `divest_cumulative`,
485
- `cumulative_co2`, `commodity_ladder_cumulative`, `cum_sim_hours`,
486
- `ed_history_realized_first`, `edd_history`).
488
+ `realized_cohort`, `realized_retire`, `realized_commission`, `divest_cumulative`,
489
+ `cumulative_co2`, `commodity_ladder_cumulative`, `cum_sim_hours`).
487
490
  - `INPUT_*` — backend-derived rows the cascade re-reads each iteration.
488
491
  - `SOLVE_DATA_*` — per-solve sets and parameters that the derivation
489
492
  layer produces.
@@ -498,8 +501,8 @@ The output cascade (`flextool/process_outputs/`) has the same contract as the lo
498
501
  values from the sub-solve's `FlexData`, `FlexDataProvider` or `OutputWriterState`, never from `input/` or
499
502
  `solve_data/` on the work folder (item 163, `specs/bugfix/c24/design_163.md`;
500
503
  `test_output_writers_read_no_work_folder_inputs` in `tests/engine/test_meta_provider_invariants.py`, Rule 5). The
501
- five handoff-mirror CSVs under `solve_data/` (`p_entity_divested`, `fix_storage_quantity`, `fix_storage_usage`,
502
- `p_roll_continue_state`, `p_entity_period_existing_capacity`) are write-only `--csv-dump` debug output with no
504
+ four handoff-mirror CSVs under `solve_data/` (`p_entity_divested`, `fix_storage_quantity`, `fix_storage_usage`,
505
+ `p_roll_continue_state`) are write-only `--csv-dump` debug output with no
503
506
  reader anywhere in the engine; `period_capacity.csv` is the one mirror still written on every run (vestigial,
504
507
  always header-only).
505
508
 
@@ -652,7 +655,7 @@ does for ladders) with the usual rules, and unions the groups into one `[entitie
652
655
  (`_axis_frame_resolved`). It raises only where those rules cannot place a group: keys on both axes, or an
653
656
  ambiguous group without a `period_filter`. With every level named, the reader places rows by label and no
654
657
  split happens. When an unnamed map's shape was read from its depth or keys, `resolve_param_shape` prints one
655
- note per (class, parameter) and run (`_behaviour_changes.warn_once`, `print(flush=True)`); ladders are left
658
+ note per (class, parameter) and run (coded, `run_warnings`); ladders are left
656
659
  out (their levels are placed by depth by definition).
657
660
 
658
661
  `_param_shapes` is the **I/O contract only** — it validates user-authored
@@ -704,7 +707,7 @@ raises.
704
707
 
705
708
  Not every DB read goes through `resolve_param_shape`. The **per-entity
706
709
  cascades** in `_derived.py` / `_existing.py` /
707
- `_npv.py` read raw entity params (`source.parameter(...)`) and
710
+ `_lifetime_inputs.py` read raw entity params (`source.parameter(...)`) and
708
711
  must detect the period axis themselves. The failure mode is identical to
709
712
  the resolver's: Spine names a Map's index column with the author's
710
713
  `index_name`, whose spinedb_api *default is the literal string `"x"`*
@@ -1182,6 +1185,9 @@ Every engine run (`cmd_run_flextool.main`, once its scenario and output folder a
1182
1185
  the owner (`RunLogOwner`, `_owner.py`) writes the log from there, hiding the marker. Without an owner (Spine
1183
1186
  Toolbox, `python -m flextool.cli.cmd_run_flextool`, a Python console) the engine copies its own Python streams
1184
1187
  (`_tee.py`, `log_capture: "python"`). The log keeps its first 64 KiB and last `FLEXTOOL_RUN_LOG_MAX_BYTES`.
1188
+ A line for the log only (the scaling guard's report under its coded line: `run_warnings.warn_grouped(...,
1189
+ run_log=True)`) goes through `run_record.write_log_only`: printed with `LOG_ONLY_PREFIX` for an owner, which
1190
+ writes it without the prefix and does not show it; written to the `RunLogWriter` directly without one.
1185
1191
  - When the engine dies without finishing its status (a crash, a kill, a signal), the owner finishes it from the
1186
1192
  exit code (`classify_exit`: `killed`, `interrupted`, `crashed`). Without an owner a reader derives `abandoned` from
1187
1193
  a stale `running` (`effective_state`).
@@ -1415,11 +1421,12 @@ names as before for debug inspection:
1415
1421
 
1416
1422
  | Carrier (`SolveHandoff` field) | Debug-mirror file | Meaning |
1417
1423
  |---|---|---|
1418
- | `realized_invest` | `p_entity_period_existing_capacity.csv` (period column) | New capacity built this solve, in absolute units. |
1419
- | `realized_existing` | `p_entity_period_existing_capacity.csv` (existing column) | Cumulative existing capacity history per `(entity, period)`. |
1424
+ | `realized_cohort` | `produced_handoff/realized_cohort.csv` | The investments realised by the run so far, one row per cohort (investment decision): its start of operation and end of life in years of the run (placed once, by the deciding solve) and its size. A later solve's capacity is its existing cohort (the user's `existing` of each of its periods) plus the carried cohorts in service, minus the carried retirements (`_cohort_handoff.existing_capacity`). |
1425
+ | `realized_retire` | `produced_handoff/realized_retire.csv` | Retired capacity per cohort and realised decision period; counts while the cohort is in service. |
1426
+ | `realized_commission` | *(in-memory only)* | Realised investments with a construction lead time: coming online / in construction in a later solve. |
1420
1427
  | `divest_cumulative` | `p_entity_divested.csv` | Cumulative divest per entity carried forward. |
1421
1428
  | `roll_end_state` / `upward_roll_end_state` | `p_roll_continue_state.csv` | `v_state` at the end of the realized window; the start state of the sub-solves that continue from it, routed by `solve/_carry_routing.py` (the latest realised state at the sub-solve's nesting level or deeper; engine.md "Storage carry routing"). |
1422
- | `roll_end_online` | *(in-memory only)* | Committed jump-end `v_online` per online process (OC1 Carrier 1); the next roll's `online_change` first step (`dt_online_carry`) sees the prior commitment instead of the within-roll cyclic wrap, so a unit that stays committed is not re-charged a startup across the boundary. |
1429
+ | `roll_end_online` | *(in-memory only)* | Committed jump-end `v_online` per online process (OC1 Carrier 1); the next roll's `online_change` first step (`dt_online_carry`) sees the prior commitment instead of a free start, so a unit that stays committed pays no start-up across the boundary and one that was offline does. |
1423
1430
  | `online_history` | *(in-memory only)* | The realized `v_startup`/`v_shutdown` that a minimum up / down time still covers after the solve: the last realized step and its predecessors along `dt_ramp_link`, each with `hours_to_end` (hours from its start to the end of the last realized step); inside a forecasts-only fan under the tied forecast's steps. Rebuilt into `uptime_carry`/`downtime_carry` at the next solve's steps that follow its `dt_ramp_carry` and injected on the `minimum_uptime` RHS / `minimum_downtime` LHS. |
1424
1431
  | `fix_storage_quantity / price / usage` | `fix_storage_*.csv` | Parent-imposed storage quota at the boundary (any subset of the three metrics — each carries its own `(node, period, step)` index, so a separate timesteps carrier is not needed). |
1425
1432
  | `cumulative_co2` | `co2_cum_realized_tonnes.csv` | Running CO2 totals across rolls. |
@@ -1458,13 +1465,46 @@ used to be `SolveHandoff` fields too, populated only by the now-removed
1458
1465
  `capture_post_solve()` disk-read constructor. They were retired when the
1459
1466
  cascade fell through to Provider/CSV reads in all production paths; see
1460
1467
  the docstring of `solve/_handoff.py` for the history.
1468
+ `realized_invest`, `realized_existing` and `realized_divest` (capacity keyed
1469
+ by period: the existing capacity entered once, at the first solve's first
1470
+ period, so a period-varying `existing` was lost in later solves) were replaced
1471
+ by `realized_cohort` / `realized_retire`.
1472
+
1473
+ A realization solve (the deterministic solve after a stochastic one) takes
1474
+ the PIN carriers of its parent: the investments and `fix_online` (the
1475
+ NA-tied units online of the binary units, `online_fix_eq_integer`; linear
1476
+ units online are re-decided, so `online_fix_eq_linear` has no rows). It does not take reserve: it meets
1477
+ the reserve requirements with its own data. A `fix_reserve` carrier with an
1478
+ exact per-unit pin (`reserve_fix_eq`) shipped in 4.2.0–4.6.0 and was
1479
+ removed (it is in git history). A later reserve-market stage that realizes
1480
+ reserve separately should not repeat its mistakes: reserve provision has no
1481
+ cost, so the stochastic solve's per-unit allocation is degenerate (solver
1482
+ noise); an `==` pin is infeasible against the profile, storage-reserve and
1483
+ ramp rows when the realized data is lower; a requirement that varies with
1484
+ the data (stochastic `reservation`, dynamic, n-1) is set day-ahead in a real
1485
+ market, so the stage has to choose between the procured and the recomputed
1486
+ amount; and the per-unit day-ahead tie (`non_anticipativity_reserve`, kept)
1487
+ assumes non-transferable awards. Such a carrier (`fix_online` is the
1488
+ pattern) needs:
1489
+
1490
+ - one row in `SolveHandoff._FIELDS`, `PIN_FIELDS`, `_FIELD_TO_KEY` and
1491
+ `_HANDOFF_EMPTY_SCHEMAS`, and a `handoff/...` key constant in
1492
+ `preprocess/_provider_keys.py` (`HANDOFF_FIX_ONLINE`);
1493
+ - a producer: `online_tie_cells` / `reference_forecasts` are the pattern;
1494
+ - a FlexData field (`p_fix_online`) and its loader from the handoff key;
1495
+ - one entry in `flex_data.coarse_pin_varies`;
1496
+ - its constraint, with an `EQ.` header and a `CONSTRAINT_FAMILIES` entry in
1497
+ `autoscale/_layer2_types.py`;
1498
+ - the field in the `_reduce_detail` field list of the detail level that
1499
+ leaves its variable out (`p_fix_online` sits with the online fields; a
1500
+ reserve carrier goes in `RESERVE_FIELDS`).
1461
1501
 
1462
1502
  ## Solution extraction
1463
1503
 
1464
1504
  `process_outputs.read_highs_solution.VARIABLE_SPECS` declares every
1465
1505
  variable and dual to harvest from the live `highspy.Highs` instance:
1466
1506
  `v_flow`, `v_state`, `v_invest`, `v_divest`, `vq_*`, period / total /
1467
- cumulative invest-cap duals, `co2_max_*` duals, the inflation-adjusted
1507
+ cumulative invest-cap duals, `co2_max_*` duals, the discount-factor-adjusted
1468
1508
  `v_dual_node_balance`, and so on. Each `VariableSpec` carries an
1469
1509
  `unscale_by` field so row / objective scaling is undone before the parquet
1470
1510
  is written.
@@ -1604,12 +1644,13 @@ LP the solver gets can be solved accurately after Layers 2 and 3
1604
1644
  `error`, no database tier; the GUI's Solver options → Scaling guard sends
1605
1645
  the flag): an error raises `ScalingRangeError` (a
1606
1646
  `FlexToolConfigError`, so `cmd_run_flextool` prints it without a
1607
- traceback); `warn` prints it and solves; `off` checks nothing (Layer 3's
1608
- window clip still applies). Warnings print once per run, keyed by base
1609
- solve, Benders region, group, level and the roll's own exponent (if a
1610
- recheck set one), so a later roll's error or new exponent still prints
1611
- (`_behaviour_changes.warn_once`; the once-per-run log of an adjusted
1612
- exponent uses `mark_once`, also reset by `start_run`).
1647
+ traceback); `warn` shows it as a coded warning (W-0544) and solves; `off`
1648
+ checks nothing (Layer 3's window clip still applies). Warnings (W-0543..
1649
+ W-0546: one line naming the solve, the full message in the debug log)
1650
+ show once per run, keyed by base solve, Benders region, group, level and
1651
+ the roll's own exponent (if a recheck set one), so a later roll's error
1652
+ or new exponent still shows (`_behaviour_changes.mark_once`, also used by
1653
+ the once-per-run log of an adjusted exponent; reset by `start_run`).
1613
1654
  * The message names the solve (and roll / region), the spread and window
1614
1655
  at the solve's `primal_feasibility_tolerance`, the family and up to five
1615
1656
  entries at each end (polar-high `locate_extremes`, warning / error only),
@@ -1622,7 +1663,7 @@ LP the solver gets can be solved accurately after Layers 2 and 3
1622
1663
  * `FLEXTOOL_AUTOSCALE_STRICT=1` raises also under `warn` / `off`, but only
1623
1664
  for an error Layer 2 caused (the pre-Layer-2 pool fitted). A failure of
1624
1665
  the check itself (or of the range readout, monolith or Benders region)
1625
- prints "the scaling guard could not run" once per run and the solve goes
1666
+ shows "scaling guard could not run" (W-0547) once per run and the solve goes
1626
1667
  on (re-raised under strict).
1627
1668
  * Where it runs: after Layer 3 on the first solve of each LP shape (cold
1628
1669
  and warm paths; the verdict is cached in `_AutoscaleShapeCacheEntry` and