Replies: 9 comments 15 replies
-
|
Great stuff @nhniina - this level of exhaustivity is really great to assess these changes. I have some comments:
But again, thank you so much for going through all this. |
Beta Was this translation helpful? Give feedback.
-
|
Here is a list with some of the toolbox/spinedb_api requirements we identified in our last meeting:
Also, these are some issues related to SpineOpt/Interface.
|
Beta Was this translation helpful? Give feedback.
-
|
Summarising the plan forward
|
Beta Was this translation helpful? Give feedback.
-
|
So just a quick progress update:
Next steps:
|
Beta Was this translation helpful? Give feedback.
-
|
Another progress update:
Next steps would be to:
|
Beta Was this translation helpful? Give feedback.
-
|
Not sure if this is the best place to discuss, but it's the first potentially relevant place I found. I tried running our SpineH2IRL model in the SpineOpt datastructure_update branch and SpineInterface #139_attempt4 branch This is how I got on: Running SpineOpt...
WARNING: using JuMP.Parameter in module SpineInterface conflicts with an existing identifier.
[SpineOpt version 0.11.0 (git hash: f22bcade0ad554ad0ac359480db7357a555a0ddb)]
[SpineInterface version 0.16.1 (git hash: df1bb5088b6576e3aab6c81fb84017dc53498185)]
Execution started at 2025-12-16T10:24:39.329
Reading input data from sqlite:///C:\Workspace\Spine\Projects\Pathways_Model_Test\.spinetoolbox\items\pathway_scenario_db\H2_IRL_AllScen.sqlite?spinedbfilter=cfg%3Ascenario%3AHN...
Upgrading data structure to the latest version...
Replacing `use_economic_representation` and `use_milestone_years`
by `multiyear_economic_discounting`...
Parameter value list `multiyear_economic_discounting_value_list` already exists
Running several migrations to update the class structure and to rename, modify and move parameters...
Creating superclasses...
Note: Check entity alternatives in classes related to the unit_flow superclass...
Update ordering of multidimensional classes...
there's already a parameter_definition with {'entity_class_name': 'unit_flow__user_constraint', 'name': 'graph_view_position'}
there's already a parameter_definition with {'entity_class_name': 'unit_flow__user_constraint', 'name': 'unit_flow_coefficient'}
Renaming parameters...
there's already a parameter_definition with {'entity_class_name': 'unit', 'name': 'out_of_service_count_fix'}
Renaming classes...
Moving parameters to multidimensional classes...
non-existent elements in byname ('H2_ELECTRO_PB (1)', 'H2_DUB', 'EL_PB_220_4462', 'H2_ELECTRO_PB (1)') for class unit_flow__unit_flow
ERROR: LoadError:
Stacktrace:
[1] error()
@ Base .\error.jl:44
[2] check_run_request_return_value(value_to_be_checked::Vector{Any}, log_level::Int64, print_value::Bool)
@ SpineOpt c:\workspace\spine\SpineOpt\src\data_structure\versions\major_upgrade_to_17.jl:375
[3] check_run_request_return_value(value_to_be_checked::Vector{Any}, log_level::Int64)
@ SpineOpt c:\workspace\spine\SpineOpt\src\data_structure\versions\major_upgrade_to_17.jl:371
[4] move_parameter_to_multidimensional_class(db_url::URIs.URI, old_class_name::String, old_par_name::String, new_class_name::String, new_par_name::String, mapping::Vector{Int64}, log_level::Int64)
@ SpineOpt c:\workspace\spine\SpineOpt\src\data_structure\versions\major_upgrade_to_17.jl:732
[5] move_parameters_to_multidimensional_classes(db_url::URIs.URI, parameters_to_multidimensional_classes::Vector{Tuple{Tuple{String, String}, Tuple{String, String, Vector{Int64}}}}, log_level::Int64)
@ SpineOpt c:\workspace\spine\SpineOpt\src\data_structure\versions\major_upgrade_to_17.jl:680
[6] major_upgrade_to_17(db_url::URIs.URI, log_level::Int64)
@ SpineOpt c:\workspace\spine\SpineOpt\src\data_structure\versions\major_upgrade_to_17.jl:355
[7] _run_migration(url::URIs.URI, version::Int64, log_level::Int64)
@ SpineOpt c:\workspace\spine\SpineOpt\src\data_structure\migration.jl:119
[8] (::SpineOpt.var"#593#594"{Int64})(clean_url::URIs.URI)
@ SpineOpt c:\workspace\spine\SpineOpt\src\data_structure\migration.jl:109
[9] (::SpineInterface.var"#214#215"{SpineOpt.var"#593#594"{Int64}})(db::URIs.URI)
@ SpineInterface c:\workspace\spine\SpineInterface\src\api\db.jl:776
[10] _db(f::SpineInterface.var"#214#215"{SpineOpt.var"#593#594"{Int64}}, url::String; upgrade::Bool)
@ SpineInterface c:\workspace\spine\SpineInterface\src\api\db.jl:817
[11] _db
@ c:\workspace\spine\SpineInterface\src\api\db.jl:814 [inlined]
[12] without_filters
@ c:\workspace\spine\SpineInterface\src\api\db.jl:771 [inlined]
[13] run_migrations
@ c:\workspace\spine\SpineOpt\src\data_structure\migration.jl:108 [inlined]
[14] #_do_upgrade_db#85
@ c:\workspace\spine\SpineOpt\src\run_spineopt.jl:333 [inlined]
[15] _do_upgrade_db
@ c:\workspace\spine\SpineOpt\src\run_spineopt.jl:331 [inlined]
[16] _check_version(url_in::String; log_level::Int64, upgrade::Bool)
@ SpineOpt c:\workspace\spine\SpineOpt\src\run_spineopt.jl:325
[17] _check_version
@ c:\workspace\spine\SpineOpt\src\run_spineopt.jl:315 [inlined]
[18] prepare_spineopt(url_in::String; log_level::Int64, upgrade::Bool, filters::Dict{String, String}, templates::Tuple{}, mip_solver::Nothing, lp_solver::Nothing, use_direct_model::Bool, use_model_names::Bool, add_bridges::Bool)
@ SpineOpt c:\workspace\spine\SpineOpt\src\run_spineopt.jl:264
[19] prepare_spineopt
@ c:\workspace\spine\SpineOpt\src\run_spineopt.jl:251 [inlined]
[20] _run_spineopt(f::SpineOpt.var"#64#65", url_in::String, url_out::String; upgrade::Bool, filters::Dict{String, String}, templates::Tuple{}, mip_solver::Nothing, lp_solver::Nothing, use_direct_model::Bool, use_model_names::Bool, add_bridges::Bool, log_level::Int64, alternative::String, kwargs::@Kwargs{optimize::Bool, update_names::Bool, write_as_roll::Int64, resume_file_path::Nothing})
@ SpineOpt c:\workspace\spine\SpineOpt\src\run_spineopt.jl:149
[21] #67
@ c:\workspace\spine\SpineOpt\src\run_spineopt.jl:104 [inlined]
[22] _log_to_file
@ c:\workspace\spine\SpineOpt\src\util\misc.jl:271 [inlined]
[23] #run_spineopt#66
@ c:\workspace\spine\SpineOpt\src\run_spineopt.jl:103 [inlined]
[24] #run_spineopt#63
@ c:\workspace\spine\SpineOpt\src\run_spineopt.jl:67 [inlined]
[25] top-level scope
@ C:\Users\xxxx\.spinetoolbox\work\run_spineopt_local__bad54b2f84fa483d8c41307f472f53e3__toolbox\run_spineopt.jl:3
[26] include(fname::String)
@ Main .\sysimg.jl:38
[27] top-level scope
@ none:1
in expression starting at C:\Users\xxxx\.spinetoolbox\work\run_spineopt_local__bad54b2f84fa483d8c41307f472f53e3__toolbox\run_spineopt.jl:3
julia> |
Beta Was this translation helpful? Give feedback.
-
|
We're getting further: 2-element Vector{String}:
"http://127.0.0.1:1742"
"http://127.0.0.1:1744"
WARNING: using JuMP.parameter_value in module SpineInterface conflicts with an existing identifier.
Running SpineOpt...
WARNING: using JuMP.Parameter in module SpineInterface conflicts with an existing identifier.
[SpineOpt version 0.11.0 (git hash: f22bcade0ad554ad0ac359480db7357a555a0ddb)]
[SpineInterface version 0.16.1 (git hash: df1bb5088b6576e3aab6c81fb84017dc53498185)]
Execution started at 2025-12-16T12:40:11.164
Reading input data from sqlite:///C:\Workspace\Spine\Projects\Pathways_Model_Test\.spinetoolbox\items\pathway_scenario_db\H2_IRL_AllScen.sqlite?spinedbfilter=cfg%3Ascenario%3AHN...
Upgrading data structure to the latest version...
Replacing `use_economic_representation` and `use_milestone_years`
by `multiyear_economic_discounting`...
Parameter value list `multiyear_economic_discounting_value_list` already exists
Running several migrations to update the class structure and to rename, modify and move parameters...
Creating superclasses...
Note: Check entity alternatives in classes related to the unit_flow superclass...
Update ordering of multidimensional classes...
there's already a parameter_definition with {'entity_class_name': 'unit_flow__user_constraint', 'name': 'graph_view_position'}
there's already a parameter_definition with {'entity_class_name': 'unit_flow__user_constraint', 'name': 'unit_flow_coefficient'}
Renaming parameters...
there's already a parameter_definition with {'entity_class_name': 'unit', 'name': 'out_of_service_count_fix'}
Renaming classes...
Moving parameters to multidimensional classes...
there's already a parameter_definition with {'entity_class_name': 'unit_flow__unit_flow', 'name': 'constraint_equality_flow_ratio'}
there's already a parameter_definition with {'entity_class_name': 'unit_flow__unit_flow', 'name': 'constraint_equality_flow_ratio'}
there's already a parameter_definition with {'entity_class_name': 'unit_flow__unit_flow', 'name': 'constraint_equality_flow_ratio'}
there's already a parameter_definition with {'entity_class_name': 'unit_flow__unit_flow', 'name': 'constraint_greater_than_flow_ratio'}
there's already a parameter_definition with {'entity_class_name': 'unit_flow__unit_flow', 'name': 'constraint_greater_than_flow_ratio'}
there's already a parameter_definition with {'entity_class_name': 'unit_flow__unit_flow', 'name': 'constraint_greater_than_flow_ratio'}
there's already a parameter_definition with {'entity_class_name': 'unit_flow__unit_flow', 'name': 'constraint_less_than_flow_ratio'}
there's already a parameter_definition with {'entity_class_name': 'unit_flow__unit_flow', 'name': 'constraint_less_than_flow_ratio'}
there's already a parameter_definition with {'entity_class_name': 'unit_flow__unit_flow', 'name': 'constraint_less_than_flow_ratio'}
there's already a parameter_definition with {'entity_class_name': 'unit_flow__unit_flow', 'name': 'constraint_equality_online_coefficient'}
there's already a parameter_definition with {'entity_class_name': 'unit_flow__unit_flow', 'name': 'constraint_equality_online_coefficient'}
there's already a parameter_definition with {'entity_class_name': 'unit_flow__unit_flow', 'name': 'constraint_equality_online_coefficient'}
there's already a parameter_definition with {'entity_class_name': 'unit_flow__unit_flow', 'name': 'constraint_greater_than_online_coefficient'}
there's already a parameter_definition with {'entity_class_name': 'unit_flow__unit_flow', 'name': 'constraint_greater_than_online_coefficient'}
there's already a parameter_definition with {'entity_class_name': 'unit_flow__unit_flow', 'name': 'constraint_greater_than_online_coefficient'}
there's already a parameter_definition with {'entity_class_name': 'unit_flow__unit_flow', 'name': 'constraint_less_than_online_coefficient'}
there's already a parameter_definition with {'entity_class_name': 'unit_flow__unit_flow', 'name': 'constraint_less_than_online_coefficient'}
there's already a parameter_definition with {'entity_class_name': 'unit_flow__unit_flow', 'name': 'constraint_less_than_online_coefficient'}
there's already a parameter_definition with {'entity_class_name': 'unit_flow__user_constraint', 'name': 'coefficient_for_unit_flow'}
Removing classes...
Renaming parameter value lists...
Renaming list values...
Merging variable type lists...
there's already a parameter_value_list with {'name': 'variable_type_list'}
Could not rename list unit_online_variable_type_list.
value integer of investment_variable_type2 for ('H2_GAL_SHAN',) is not in variable_type_list
ERROR: LoadError:
Stacktrace:
[1] error()
@ Base .\error.jl:44
[2] check_run_request_return_value(value_to_be_checked::Vector{Any}, log_level::Int64, print_value::Bool)
@ SpineOpt c:\workspace\spine\SpineOpt\src\data_structure\versions\major_upgrade_to_17.jl:375
[3] check_run_request_return_value(value_to_be_checked::Vector{Any}, log_level::Int64)
@ SpineOpt c:\workspace\spine\SpineOpt\src\data_structure\versions\major_upgrade_to_17.jl:371
[4] merge_variable_type_lists(db_url::URIs.URI, log_level::Int64)
@ SpineOpt c:\workspace\spine\SpineOpt\src\data_structure\versions\major_upgrade_to_17.jl:864
[5] major_upgrade_to_17(db_url::URIs.URI, log_level::Int64)
@ SpineOpt c:\workspace\spine\SpineOpt\src\data_structure\versions\major_upgrade_to_17.jl:363
[6] _run_migration(url::URIs.URI, version::Int64, log_level::Int64)
@ SpineOpt c:\workspace\spine\SpineOpt\src\data_structure\migration.jl:119
[7] (::SpineOpt.var"#593#594"{Int64})(clean_url::URIs.URI)
@ SpineOpt c:\workspace\spine\SpineOpt\src\data_structure\migration.jl:109
[8] (::SpineInterface.var"#214#215"{SpineOpt.var"#593#594"{Int64}})(db::URIs.URI)
@ SpineInterface c:\workspace\spine\SpineInterface\src\api\db.jl:776
[9] _db(f::SpineInterface.var"#214#215"{SpineOpt.var"#593#594"{Int64}}, url::String; upgrade::Bool)
@ SpineInterface c:\workspace\spine\SpineInterface\src\api\db.jl:817
[10] _db
@ c:\workspace\spine\SpineInterface\src\api\db.jl:814 [inlined]
[11] without_filters
@ c:\workspace\spine\SpineInterface\src\api\db.jl:771 [inlined]
[12] run_migrations
@ c:\workspace\spine\SpineOpt\src\data_structure\migration.jl:108 [inlined]
[13] #_do_upgrade_db#85
@ c:\workspace\spine\SpineOpt\src\run_spineopt.jl:333 [inlined]
[14] _do_upgrade_db
@ c:\workspace\spine\SpineOpt\src\run_spineopt.jl:331 [inlined]
[15] _check_version(url_in::String; log_level::Int64, upgrade::Bool)
@ SpineOpt c:\workspace\spine\SpineOpt\src\run_spineopt.jl:325
[16] _check_version
@ c:\workspace\spine\SpineOpt\src\run_spineopt.jl:315 [inlined]
[17] prepare_spineopt(url_in::String; log_level::Int64, upgrade::Bool, filters::Dict{String, String}, templates::Tuple{}, mip_solver::Nothing, lp_solver::Nothing, use_direct_model::Bool, use_model_names::Bool, add_bridges::Bool)
@ SpineOpt c:\workspace\spine\SpineOpt\src\run_spineopt.jl:264
[18] prepare_spineopt
@ c:\workspace\spine\SpineOpt\src\run_spineopt.jl:251 [inlined]
[19] _run_spineopt(f::SpineOpt.var"#64#65", url_in::String, url_out::String; upgrade::Bool, filters::Dict{String, String}, templates::Tuple{}, mip_solver::Nothing, lp_solver::Nothing, use_direct_model::Bool, use_model_names::Bool, add_bridges::Bool, log_level::Int64, alternative::String, kwargs::@Kwargs{optimize::Bool, update_names::Bool, write_as_roll::Int64, resume_file_path::Nothing})
@ SpineOpt c:\workspace\spine\SpineOpt\src\run_spineopt.jl:149
[20] #67
@ c:\workspace\spine\SpineOpt\src\run_spineopt.jl:104 [inlined]
[21] _log_to_file
@ c:\workspace\spine\SpineOpt\src\util\misc.jl:271 [inlined]
[22] #run_spineopt#66
@ c:\workspace\spine\SpineOpt\src\run_spineopt.jl:103 [inlined]
[23] #run_spineopt#63
@ c:\workspace\spine\SpineOpt\src\run_spineopt.jl:67 [inlined]
[24] top-level scope
@ C:\Users\xxxx\.spinetoolbox\work\run_spineopt_local__c33cab4ba3434c6a9191099d6b0d8068__toolbox\run_spineopt.jl:3
[25] include(fname::String)
@ Main .\sysimg.jl:38
[26] top-level scope
@ none:1
in expression starting at C:\Users\xxxx\.spinetoolbox\work\run_spineopt_local__c33cab4ba3434c6a9191099d6b0d8068__toolbox\run_spineopt.jl:3 |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
So I have compared the solution with latest master and the datastructure update branch and there are some differences: <style> </style>
The difference in storage and offshore wind suggests some difference between master and the datastructure update branch regarding the treatment of storage? Did we include something to limit intraday storage level in rep periods? Next step is to look at the model formulation Here are the solution stats differences: Datastructure Update: Master: |
Beta Was this translation helpful? Give feedback.



Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Tasku: These are outdated (2025-12-09).
SpineOpt input data structure will see major changes in the forthcoming versions. The plan for the changes is desribed here.
The following classes will be updated:
In addition, the following new class will be created:
Several parameters will be renamed. They are listed here:
In addition to simple renaming, some parameters will be changed from a flat structure to Map parameters, allowing for easier grouping of parameters that belong to certain features. These are listed here:
A few parameters will be moved from one class to another class. Some of these also renamed at the same time. The parameters that will be moved are:
Finally, some parameters will be moved to another class, the parameter may be renamed, and some calculation may be performed on the parameter. These parameters are the following:
Additional changes
Beta Was this translation helpful? Give feedback.
All reactions