-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding priorities to UserDemand/Time causes initialization to fail #1250
Comments
I reckon the problem is here: elseif node_id in time_node_ids
push!(demand_from_timeseries, true)
for p in priorities
push!(demand, 0.0)
if p in keys(time_priority_dict)
demand_p_itp, is_valid = get_scalar_interpolation(
config.starttime,
t_end,
time_priority_dict[p],
node_id,
:demand;
default_value = 0.0,
)
if is_valid
push!(demand_itp_node_id, demand_p_itp)
else
@error "The demand(t) relationship for UserDemand #$node_id of priority $p from the time table has repeated timestamps, this can not be interpolated."
errors = true
end
else
demand_p_itp = LinearInterpolation([0.0, 0.0], trivial_timespan)
push!(demand_itp_node_id, demand_p_itp)
end
end
push!(demand_itp, demand_itp_node_id) In my case, I have a node 118, with priority 3. We first make the time_priority_dict. In this case, priority 1 => (data for node 131, 132). I think line In general, my feeling is the entire |
Running a model with all UserDemand at 1 runs fine, but assigning (random) priorities 1 to 3 results in this error below.
I haven't changed anything else in the model, so allocation isn't used.
In that case, the whole grouping per priority should maybe not happen at all?
The text was updated successfully, but these errors were encountered: