Closed DillonJ closed 1 year ago
@manuelma I wonder could you take a look at this?
julia> # Running julia spine_periods_opt.jl http://127.0.0.1:58650 http://127.0.0.1:58653
2-element Vector{String}:
"http://127.0.0.1:58650"
"http://127.0.0.1:58653"
WARNING: using JuMP.parameter_value in module SpineInterface conflicts with an existing identifier.
WARNING: using JuMP.Parameter in module SpineInterface conflicts with an existing identifier.
WARNING: both JuMP and SpineInterface export "Parameter"; uses of it in module SpinePeriods must be qualified
[ Info: Reading database...
[ Info: Initializing model...
[ Info: Generating SpinePeriods temporal structure...
[ Info: Preprocessing data structure...
WARNING: both JuMP and SpineInterface export "parameter_value"; uses of it in module SpinePeriods must be qualified
ERROR: LoadError: UndefVarError: `parameter_value` not defined
Stacktrace:
[1] (::SpinePeriods.var"#3#6"{SpineInterface.Object})(u::SpineInterface.Object)
@ SpinePeriods .\none:0
[2] iterate
@ .\generator.jl:47 [inlined]
[3] _all(f::Base.var"#372#374", itr::Base.Generator{Vector{SpineInterface.Object}, SpinePeriods.var"#3#6"{SpineInterface.Object}}, #unused#::Colon)
@ Base .\reduce.jl:1282
[4] all
@ .\reduce.jl:1278 [inlined]
[5] Dict(kv::Base.Generator{Vector{SpineInterface.Object}, SpinePeriods.var"#3#6"{SpineInterface.Object}})
@ Base .\dict.jl:111
[6] generate_resources()
@ SpinePeriods C:\Workspace\Spine\SpinePeriods.jl\src\preprocess_data_structure.jl:59
[7] preprocess_data_structure
@ C:\Workspace\Spine\SpinePeriods.jl\src\preprocess_data_structure.jl:23 [inlined]
[8] run_spine_periods_ordering(url_in::String, out_file::String; with_optimizer::MathOptInterface.OptimizerWithAttributes, alternative::String)
@ SpinePeriods C:\Workspace\Spine\SpinePeriods.jl\src\run_spine_periods_ordering.jl:18
[9] run_spine_periods_ordering
@ C:\Workspace\Spine\SpinePeriods.jl\src\run_spine_periods_ordering.jl:6 [inlined]
[10] run_spine_periods(url_in::String, out_file::String; with_optimizer::MathOptInterface.OptimizerWithAttributes, alternative::String)
@ SpinePeriods C:\Workspace\Spine\SpinePeriods.jl\src\run_spine_periods.jl:24
[11] top-level scope
@ C:\Workspace\Spine\projects\fei_invest\spine_periods_opt.jl:8
[12] include(fname::String)
@ Base.MainInclude .\client.jl:478
[13] top-level scope
@ none:1
in expression starting at C:\Workspace\Spine\projects\fei_invest\spine_periods_opt.jl:8
caused by: UndefVarError: `parameter_value` not defined
Stacktrace:
[1] (::SpinePeriods.var"#3#6"{SpineInterface.Object})(u::SpineInterface.Object)
@ SpinePeriods .\none:0
[2] iterate
@ .\generator.jl:47 [inlined]
[3] grow_to!(dest::Dict{Any, Any}, itr::Base.Generator{Vector{SpineInterface.Object}, SpinePeriods.var"#3#6"{SpineInterface.Object}})
@ Base .\dict.jl:120
[4] dict_with_eltype
@ .\abstractdict.jl:590 [inlined]
[5] Dict(kv::Base.Generator{Vector{SpineInterface.Object}, SpinePeriods.var"#3#6"{SpineInterface.Object}})
@ Base .\dict.jl:109
[6] generate_resources()
@ SpinePeriods C:\Workspace\Spine\SpinePeriods.jl\src\preprocess_data_structure.jl:59
[7] preprocess_data_structure
@ C:\Workspace\Spine\SpinePeriods.jl\src\preprocess_data_structure.jl:23 [inlined]
[8] run_spine_periods_ordering(url_in::String, out_file::String; with_optimizer::MathOptInterface.OptimizerWithAttributes, alternative::String)
@ SpinePeriods C:\Workspace\Spine\SpinePeriods.jl\src\run_spine_periods_ordering.jl:18
[9] run_spine_periods_ordering
@ C:\Workspace\Spine\SpinePeriods.jl\src\run_spine_periods_ordering.jl:6 [inlined]
[10] run_spine_periods(url_in::String, out_file::String; with_optimizer::MathOptInterface.OptimizerWithAttributes, alternative::String)
@ SpinePeriods C:\Workspace\Spine\SpinePeriods.jl\src\run_spine_periods.jl:24
[11] top-level scope
@ C:\Workspace\Spine\projects\fei_invest\spine_periods_opt.jl:8
[12] include(fname::String)
@ Base.MainInclude .\client.jl:478
[13] top-level scope
@ none:1
I did something quick so you can pull and try @DillonJ - I will test it now.
Seems to work, closing.
Thanks @manuelma
Right now, running SpinePeriods gives errors about conflicts between Parameter and parameter_value in JuMP and SpineInterface in JuMP version 1.14 and higher