Skip to content

WeightVectorChecker: Fix solver bounds for negative weights#936

Open
tquatmann wants to merge 4 commits into
stormchecker:masterfrom
tquatmann:fix/multiobj-prec
Open

WeightVectorChecker: Fix solver bounds for negative weights#936
tquatmann wants to merge 4 commits into
stormchecker:masterfrom
tquatmann:fix/multiobj-prec

Conversation

@tquatmann
Copy link
Copy Markdown
Contributor

Fixes an issue when using the WeightVectorChecker with negative weights and sound computations enabled.

Also adds some tests for the WeightVectorChecker.

continue; // this objective is not relevant for the weighted sum, so we can skip it
} else {
// Choose the requested, relevant bound (lower or upper). Invert the choice for negative weights.
boost::optional<ValueType> const& objBound = (lower == (weight > storm::utility::zero<ValueType>())) ? this->objectives[objIndex].lowerResultBound
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

std::optional? :-)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bound is already stored as a boost::optional in the Objective class, so we're not introducing a new boost::optional here.
Happy to change all occurrences of boost::optional in a separate PR.

@sjunges
Copy link
Copy Markdown
Contributor

sjunges commented May 29, 2026

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants