<commit_before>"""
Concurrent-learning controller derived for
Fossen's dynamic model of a boat.

See:
<paper>

"""

################################################# DEPENDENCIES

from __future__ import division
import numpy as np
import numpy.linalg as npl
from collections import deque

################################################# PRIMARY CLASS

class Controller:

	def __init__(self, dt, q0, target, path_type,
				 kp, kd, kg, ku,
				 umax, vmax, amax,
				 history_size, filter_window, adapt0):
		"""
		Set-up. Takes call-period, initial state, target pose, path type,
		feedback gains, learning gains, effort limit, speed and acceleration
		limits, history stack size, filter window time, and initial adaptation.

		"""
		self.ncontrols = len(umax)
		self.nparams = len(adapt0)
		if filter_window and np.isfinite(filter_window):<commit_msg>BOAT CONTROLLER: add paper name to documentation<commit_after>"""
Concurrent-learning controller derived for
Fossen's dynamic model of a boat.

See: http://ieeexplore.ieee.org/abstract/document/7798300/
--
<NAME>, et al.
"Adaptive control of a surface marine craft with parameter
identification using integral concurrent learning."
Decision and Control (CDC), 2016 IEEE 55th Conference on. IEEE, 2016.

"""

################################################# DEPENDENCIES

from __future__ import division
import numpy as np
import numpy.linalg as npl
from collections import deque

################################################# PRIMARY CLASS

class Controller:

	def __init__(self, dt, q0, target, path_type,
				 kp, kd, kg, ku,
				 umax, vmax, amax,
				 history_size, filter_window, adapt0):
		"""
		Set-up. Takes call-period, initial state, target pose, path type,
		feedback gains, learning gains, effort limit, speed and acceleration
		limits, history stack size, filter window time, and initial adaptation.

		"""
		self.ncontrols = len(umax)
		self.nparams = len(adapt0)
		if filter_window and np.isfinite(filter_window):
{'fraction_non_alphanumeric': 0.17673716012084592, 'fraction_numerical': 0.011581067472306143, 'mean_word_length': 4.949101796407185, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1161227', 'n_tokens_mistral': 638, 'n_tokens_neox': 557, 'n_words': 205}