Class TaskPlanner::TaskAssignmentStrategy

Nested Relationships

This class is a nested type of Class TaskPlanner.

Class Documentation

class TaskAssignmentStrategy

The TaskAssignmentStrategy class contains the various profiles and their associated weights for cost calculation.

Public Types

enum class Profile : uint32_t

Predefined profiles that initialize the strategy with pre-defined weights and options.

Values:

enumerator DefaultFastest

Standard RMF assignment strategy with fastest-first approach.

enumerator BatteryAware

Prioritize battery level, strongly penalize low SOC with a quadratic term. Still account for task efficiency (fastest-first), but ignore busyness.

enumerator Unset

To be overwritten from fleet_config.yaml.

enum class BusyMode : uint8_t

Options for computing the busyness penalty.

Values:

enumerator Binary

Mode where busyness penalty is 0 if idle, else 1.

enumerator Count

Mode where busyness penalty is based on task count.

Public Functions

TaskAssignmentStrategy()

Constructor.

TaskAssignmentStrategy &finish_time_weights(std::vector<double> values)

Set the finish-time polynomial weights.

const std::vector<double> &finish_time_weights() const

Get the finish-time polynomial weights.

TaskAssignmentStrategy &battery_penalty_weights(std::vector<double> values)

Set the battery penalty polynomial weights.

const std::vector<double> &battery_penalty_weights() const

Get the battery penalty polynomial weights.

TaskAssignmentStrategy &busy_penalty_weights(std::vector<double> values)

Set the busy penalty polynomial weights.

const std::vector<double> &busy_penalty_weights() const

Get the busy penalty polynomial weights.

TaskAssignmentStrategy &busy_mode(BusyMode mode)

Set the busyness penalty mode.

BusyMode busy_mode() const

Get the busyness penalty mode.

Public Static Functions

static TaskAssignmentStrategy make(Profile profile)

Make a strategy initialized from a predefined profile.