Class PursePlannerFormulation

Class Documentation

class mimir::algorithm::PursePlannerFormulation

Purse seine deployment planner algorithm formulation.

This class implements and holds instances of functions outlined in NLP formulation overview and described in Path planner for deployment. Please refer to these documents for mathematical details.

Public Functions

PursePlannerFormulation(const YAML::Node &config_schema)

PursePlannerFormulation constructor.

The constructor reads the configuration and the bundled schema. The config is the same as the one passed to PursePlanner. See Purse planner configuration schema.

To choose a specific discretization technique, use the following setting.

config:
  settings:
    nlp:
      discretization:
        x_1:
          technique: collocation

Parameters

config_schema[in] YAML configuration propagated from PursePlanner.

PursePlannerFormulation() = default
~PursePlannerFormulation()
PursePlannerFormulation(const PursePlannerFormulation &other) = delete
PursePlannerFormulation &operator=(const PursePlannerFormulation &other) = delete
PursePlannerFormulation(PursePlannerFormulation &&other) = default
PursePlannerFormulation &operator=(PursePlannerFormulation &&other) = default
casadi::Slice get_slice(const std::string &name, const std::vector<casadi::MX> &vars)

Returns the slice of a variable in the concatenated vector of variables.

void set_variable(const std::string &name, const casadi::DM &value)

Sets a named decision variable in a slice of the discretized NLP.

fkin::OptiStats stats()

Get statistics and status for the optimization run.

void set_abort(const std::atomic<bool> &cancel_token)

Sets the cancel token in the NlpCallback.

inline const fkin::NlpConfig &nlp_config() const

Get the NLP settings for the NLP problem.

Public Members

NlpProblemBuilder nlp_builder

The NlpProblemBuilder helps construct the DAE/ODE formulation of the OCP, see.

Problem 2 and Path planner for deployment.

casadi::NlpBuilder nlp_problem

Holds necessary data structures for the NLP problem as stated in.

Problem 7.

casadi::Function nlp_solver

NLP formulation overview.

std::map<std::string, std::map<std::string, casadi::Function>> mpc

Model predictive helper functions.

The map consists of helper functions for each sub system of the NLP formulation. The outer key is the name of the sub system, e.g. “x_2”. The inner keys refers to various helper functions as listed below. In some cases a helper function operates on only the portion of the solution vector relevant to the sub system. In that case, we first use NLP subsystem extractor ::create_system_extractor.

std::unique_ptr<NlpCallback> nlp_callback

Callback to allow cancellation of NLP algorithm solving. Inherits from casadi::Callback.

double omega_max
std::uint32_t N2

Private Members

fkin::NlpConfig m_nlp_config

Configuration settings for NLP problem.

NlpStructure m_nlp_structure

Helper variables for discretized NLP problem.