% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tsqca_core.R
\name{collect_unique_i_sol}
\alias{collect_unique_i_sol}
\title{Collect and deduplicate the solution models attached to a QCA::minimize()
result}
\usage{
collect_unique_i_sol(sol)
}
\arguments{
\item{sol}{A solution object returned by \code{QCA::minimize()}.}
}
\value{
A list of unique solution term-vectors, or \code{NULL} if none
  were found.
}
\description{
When \code{dir.exp} is specified and the minimization produces more than
one prime implicant chart (QCA's own \code{C1}, \code{C2}, ... indexing,
visible as \code{"From C1P1, C2P1:"} in \code{print()}), \code{sol$i.sol}
contains one list entry per chart/path combination (e.g. \code{C1P1},
\code{C2P1}). Each entry's own \code{$solution} field is computed
independently by \code{QCA::minimize()} (via its internal
\code{getSolution()} call) and is NOT guaranteed to hold only that chart's
own model: depending on the data, it may already enumerate the full,
cross-chart set of tied minimal models. Concatenating every chart's
\code{$solution} list (the previous approach used here and in
\code{generate_report()}) therefore risks double- or N-fold counting the
same model, inflating the reported number of solutions.
}
\details{
This helper performs the same enumeration, then deduplicates by comparing
each model's term set (order-independent), so structurally identical
models are counted once regardless of which chart(s) produced them. This
mirrors the manual "remove duplicate Boolean expressions" step that is
standard practice when reporting multiple minimal solutions by hand.
}
\note{
When dir.exp is specified, the true Intermediate solution is stored in
  sol$i.sol, not sol$solution (which contains the Parsimonious solution).
}
\keyword{internal}
