Skip to content

Commit

Permalink
PcaaWeightVectorChecker: Avoid division by zero bug (#653)
Browse files Browse the repository at this point in the history
  • Loading branch information
tquatmann authored Jan 14, 2025
1 parent 5823e1a commit 4eaf6d6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ void StandardPcaaWeightVectorChecker<SparseModelType>::unboundedIndividualPhase(
deterministicBackwardTransitions, storm::storage::BitVector(deterministicMatrix.getRowCount(), true), statesWithRewards);

// Compute the estimate for this objective
if (!storm::utility::isZero(weightVector[objIndex])) {
if (!storm::utility::isZero(weightVector[objIndex]) && !storm::utility::isZero(sumOfWeightsOfUncheckedObjectives)) {
objectiveResults[objIndex] = weightedSumOfUncheckedObjectives;
ValueType scalingFactor = storm::utility::one<ValueType>() / sumOfWeightsOfUncheckedObjectives;
if (storm::solver::minimize(obj.formula->getOptimalityType())) {
Expand Down

0 comments on commit 4eaf6d6

Please sign in to comment.