36 Memory(
int solverId, std::unique_ptr<solver::abstract::LeastSquareSolver> solver);
38 void reset(std::unique_ptr<solver::abstract::LeastSquareSolver> solver);
40 std::unique_ptr<solver::abstract::LeastSquareSolver> solver;
52 using isFactory = std::is_base_of<solver::abstract::LSSolverFactory, T>;
55 struct FactoryMemberIsFactory
57 static constexpr
bool value = isFactory<typename T::Factory>::value;
61 using isLSSolverFactoryOption =
62 std::conjunction<tvm::internal::has_public_member_type_Factory<T>, FactoryMemberIsFactory<T>>;
72 template<class SolverFactory, typename std::enable_if<isFactory<SolverFactory>::value,
int>::type = 0>
74 : LinearResolutionScheme<WeightedLeastSquares>(abilities_), options_(schemeOptions),
75 solverFactory_(solverFactory.clone())
85 template<class SolverOptions, typename std::enable_if<isLSSolverFactoryOption<SolverOptions>::value,
int>::type = 0>
94 typename std::enable_if<!isFactory<T>::value && !isLSSolverFactoryOption<T>::value,
int>::type = 0>
96 : LinearResolutionScheme<WeightedLeastSquares>(abilities_)
99 "First argument can only be a LSSolverFactory or a solver configuration. "
100 "A configuration needs to have a Factory member type that is itself deriving from LSSolverFactory. "
101 "See LSSOLLSSolverOptions for an example.");
#define TVM_ADD_NON_DEFAULT_OPTION(optionName, defaultValue)
Definition: Option.h:30
#define TVM_DLLAPI
Definition: api.h:35
Definition: LinearizedControlProblem.h:24
Definition: ControlProblem.h:22
Definition: VariableCountingVector.h:30
Definition: WeightedLeastSquares.h:18
Definition: WeightedLeastSquares.h:32
Memory ComputationDataType
Definition: WeightedLeastSquares.h:65
void removeTask(const LinearizedControlProblem &problem, Memory *memory, const TaskWithRequirements &task, solver::internal::SolverEvents &se) const
WeightedLeastSquares(const SolverOptions &solverOptions, WeightedLeastSquaresOptions schemeOptions={})
Definition: WeightedLeastSquares.h:86
void processProblem(const LinearizedControlProblem &problem, Memory *memory) const
WeightedLeastSquares(WeightedLeastSquares &&)=delete
WeightedLeastSquares(const SolverFactory &solverFactory, WeightedLeastSquaresOptions schemeOptions={})
Definition: WeightedLeastSquares.h:73
WeightedLeastSquares(const T &, WeightedLeastSquaresOptions={})
Definition: WeightedLeastSquares.h:95
void resetComputationData(const LinearizedControlProblem &problem, Memory *memory) const
std::unique_ptr< solver::abstract::LSSolverFactory > solverFactory_
Definition: WeightedLeastSquares.h:133
bool solve_(const LinearizedControlProblem &problem, internal::ProblemComputationData *data) const
void updateComputationData_(const LinearizedControlProblem &problem, internal::ProblemComputationData *data) const
WeightedLeastSquares & operator=(const WeightedLeastSquares &)=delete
WeightedLeastSquares & operator=(WeightedLeastSquares &&)=delete
WeightedLeastSquaresOptions options_
Definition: WeightedLeastSquares.h:131
void addTask(const LinearizedControlProblem &problem, Memory *memory, const TaskWithRequirements &task, solver::internal::SolverEvents &se) const
std::unique_ptr< Memory > createComputationData_(const LinearizedControlProblem &problem) const
WeightedLeastSquares(const WeightedLeastSquares &)=delete
Definition: ResolutionScheme.h:65
Definition: LinearizedProblemComputationData.h:20
Definition: ProblemComputationData.h:27
Definition: SchemeAbilities.h:59
Definition: SolverEvents.h:14