diff --git a/core/src/create.jl b/core/src/create.jl index a76d7259f..b9ab781c8 100644 --- a/core/src/create.jl +++ b/core/src/create.jl @@ -704,13 +704,21 @@ function User(db::DB, config::Config)::User first_row = time[first_row_idx] is_active = true else - @error "User node #$node_id data not in any table." + @error "User node $node_id data not in any table." errors = true end - if !all(all.(>(0), eachcol(interpolations))) - error("Demand should be a non-negative number") + for (col, id) in zip(interpolations, node_ids) + for (demand_p_itp, p_itp) in zip(col, priorities) + if any(demand_p_itp.u .< 0.0) + @error "Demand of user node $id with priority #$p_itp should be non-negative" + errors = true + end + end end + #if !all(all.(>=(0.0), eachcol(interpolations))) + # error("Demand should be a non-negative number") + #end if !isnothing(first_row) min_level_ = coalesce(first_row.min_level, 0.0)