Throw exception for infeasible models

feature/collection-disposal
Alinson S. Xavier 5 years ago
parent a8c7047e2d
commit 86cf7f5bd9

@ -38,8 +38,7 @@ function solve(
JuMP.optimize!(model)
if !has_values(model)
@warn "No solution available"
return OrderedDict()
error("No solution available")
end
if marginal_costs

@ -38,7 +38,7 @@ end
for (location_name, location_dict) in json["products"]["P1"]["initial amounts"]
location_dict["amount (tonne)"] *= 1000
end
RELOG.solve(RELOG.parse(json))
@test_throws ErrorException("No solution available") RELOG.solve(RELOG.parse(json))
end
@testset "solve (with storage)" begin

Loading…
Cancel
Save