% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/solutionset-class.R
\name{solutionset-class}
\alias{solutionset-class}
\alias{SolutionSet}
\title{SolutionSet class}
\value{
No return value. This page documents the \code{SolutionSet} class.
}
\description{
The \code{SolutionSet} class stores the result of solving a
\code{\link{Problem}} object when multiple runs are produced.

A \code{SolutionSet} object is the multi-run counterpart of
\code{\link{solution-class}}. It contains the original problem, run-level
design and outcome tables, the list of individual \code{Solution} objects,
diagnostics summarizing the full set of runs, method metadata, and additional
metadata.

Objects of this class are typically created by \code{\link{solve}} in
workflows that generate more than one optimization run, such as weighted-sum
scans, \eqn{\epsilon}-constraint designs, or AUGMECON grids.
}
\details{
\strong{Conceptual role}

The \code{SolutionSet} class represents the result of a multi-run solving
workflow:
\preformatted{
Problem -> solve() -> SolutionSet
}

Each run corresponds to one specific optimization subproblem, parameter
setting, or trade-off configuration. The \code{SolutionSet} object keeps all
these runs together in a structured form.

Thus, a \code{SolutionSet} is not a single solution with multiple labels, but
a collection of distinct \code{Solution} objects linked to a shared problem
and a shared multi-run design.

\strong{Typical use cases}

A \code{SolutionSet} is typically returned when the chosen solution method
generates multiple runs, for example:
\itemize{
\item several weighted-sum configurations,
\item a grid of \eqn{\epsilon}-constraint runs,
\item an AUGMECON exploration of multiple
\eqn{\epsilon}-combinations,
\item or any other workflow producing more than one optimizer call.
}

\strong{Internal structure}

A \code{SolutionSet} object separates information into several layers:

\describe{
\item{\code{problem}}{The original \code{Problem} object shared by all
runs.}

\item{\code{solution}}{A named \code{list} containing the core multi-run
optimization outputs. This typically includes the run design, the run
summary table, and the list of individual \code{Solution} objects.}

\item{\code{summary}}{A named \code{list} containing user-facing summaries
aggregated across runs when such summaries are available.}

\item{\code{diagnostics}}{A named \code{list} containing diagnostics about
the solution set as a whole.}

\item{\code{method}}{A named \code{list} describing the multi-run
optimization method used.}

\item{\code{meta}}{A named \code{list} containing additional metadata.}

\item{\code{name}}{A \code{character(1)} identifier for the solution set.}
}

\strong{Run-level content}

The \code{solution} field is the main entry point for run-level information.
Typical entries include:
\describe{
\item{\code{design}}{A \code{data.frame} describing the experimental or
optimization design, for example weights or \eqn{\epsilon}-levels.}

\item{\code{runs}}{A \code{data.frame} summarizing the outcome of each run.
This typically includes run identifiers, solver status, runtime, gap, and
objective values.}

\item{\code{solutions}}{A list of individual \code{Solution} objects, one
per run.}
}

In many workflows, the \code{runs} table is the most important compact
representation of the solution set, while \code{solutions[[i]]} provides the
full detailed output for run \eqn{i}.

\strong{Objective values and run tables}

In multi-objective workflows, the run table often stores objective values in
columns named \code{value_<alias>}, where \code{<alias>} is the alias of a
registered objective. For example:
\itemize{
\item \code{value_cost},
\item \code{value_frag},
\item \code{value_benefit}.
}

This naming convention is used by downstream functions such as
\code{\link{plot_tradeoff}}.

Depending on the solving method, the run table may also contain design
columns such as:
\itemize{
\item \code{weight_<alias>} for weighted-sum runs,
\item \code{eps_<alias>} for \eqn{\epsilon}-constraint or AUGMECON runs.
}

\strong{Relationship with \code{Solution}}

A \code{SolutionSet} is conceptually a collection of \code{Solution} objects.
The individual runs are typically stored in:
\deqn{
\code{x$solution$solutions[[i]]}
}

where each element is itself a full \code{Solution} object.

Therefore:
\itemize{
\item use \code{SolutionSet} when working with the full set of runs,
\item use an individual \code{Solution} when inspecting one particular run
in detail.
}

\strong{Diagnostics}

The \code{diagnostics} field stores metadata about the multi-run solve
process. Depending on the implementation, it may summarize:
\itemize{
\item number of runs,
\item status frequencies,
\item runtime ranges,
\item gap ranges,
\item and other aggregate information about the set of runs.
}

\strong{Printing}

The \code{print()} method provides a concise summary of the full solution set.
It reports:
\itemize{
\item the optimization method name,
\item the participating objective aliases,
\item the number of design rows, runs, and stored solutions,
\item run-level status summaries,
\item runtime and gap ranges,
\item and the names of design and objective-value columns when available.
}

This printed output is intended as a quick overview. Detailed inspection
should use:
\itemize{
\item \code{x$solution$runs},
\item \code{x$solution$design},
\item \code{x$solution$solutions[[i]]},
\item or the accessor methods documented below.
}
}
\section{Fields}{

\describe{
\item{\code{problem}}{The \code{Problem} object used to generate the full
solution set.}
\item{\code{solution}}{A named \code{list} containing the core multi-run
outputs, typically including \code{design}, \code{runs}, and
\code{solutions}.}
\item{\code{summary}}{A named \code{list} containing user-facing summaries
associated with the solution set.}
\item{\code{diagnostics}}{A named \code{list} containing diagnostics about
the solution set as a whole.}
\item{\code{method}}{A named \code{list} describing the optimization method
used.}
\item{\code{meta}}{A named \code{list} of additional metadata.}
\item{\code{name}}{A \code{character(1)} name for the solution set
object.}
}
}

\section{Methods}{

\describe{
\item{\code{print()}}{Print a concise summary of the solution set,
including method name, number of runs, and run-level diagnostics.}

\item{\code{show()}}{Alias of \code{print()}.}

\item{\code{repr()}}{Return a short one-line representation of the
solution set.}

\item{\code{getMethod()}}{Return the method specification stored in
\code{self$method}.}

\item{\code{getDesign()}}{Return the design table stored in
\code{self$solution$design}.}

\item{\code{getRuns()}}{Return the run summary table stored in
\code{self$solution$runs}.}

\item{\code{getSolutions()}}{Return the list of individual
\code{Solution} objects stored in \code{self$solution$solutions}.}
}
}

\seealso{
\code{\link{solution-class}},
\code{\link{plot_tradeoff}},
\code{\link{get_pu}},
\code{\link{get_actions}},
\code{\link{get_features}},
\code{\link{get_targets}},
\code{\link{solve}}
}
