Skip to content

Commit 367f48b

Browse files
committed
revert to passing internal states to CostTerm while lifting
and add a justification for doing so.
1 parent 2ab87a2 commit 367f48b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

core/src/container.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,9 @@ void ContainerBasePrivate::liftSolution(const SolutionBasePtr& solution, const I
212212
const InterfaceState* external_to{ create_to ? new_external : internalToExternalMap().at(internal_to) };
213213

214214
// computeCost
215-
computeCost(external_from ? *external_from : InterfaceState(*internal_from),
216-
external_to ? *external_to : InterfaceState(*internal_to), *solution);
215+
// we can pass intern_{from/to} here because in this case the lifted states that might be created later
216+
// are equivalent up to the connected Solutions (which are not relevant for CostTerms)
217+
computeCost(external_from ? *external_from : *internal_from, external_to ? *external_to : *internal_to, *solution);
217218

218219
// storeSolution
219220
if (!storeSolution(solution, external_from, external_to)) {

0 commit comments

Comments
 (0)