We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0acd746 commit 9e23d73Copy full SHA for 9e23d73
1 file changed
src/simulation/optimisation.rs
@@ -161,6 +161,11 @@ pub fn solve_optimal(model: highs::Model) -> Result<highs::SolvedModel> {
161
.map_err(|err| anyhow!("Incoherent model: {err:?}"))?;
162
163
let status = solved.status();
164
+ ensure!(
165
+ status != HighsModelStatus::Infeasible,
166
+ "The solver has indicated that the problem is infeasible. It may be because the assets in \
167
+ this year cannot meet the required demand."
168
+ );
169
ensure!(
170
status == HighsModelStatus::Optimal,
171
"Could not find optimal result for model: {status:?}"
0 commit comments