deluca.agents.LQR¶
-
class
deluca.agents.
LQR
(*args, **kwargs)[source]¶ Public Data Attributes:
Inherited from
JaxObject
name
attrs
Public Methods:
__init__
(A, B[, Q, R])Description: Initialize the infinite-time horizon LQR.
__call__
(state)Description: Return the action based on current state and internal parameters.
Inherited from
Agent
__init_subclass__
(*args, **kwargs)For avoiding a decorator for each subclass
__call__
(state)Description: Return the action based on current state and internal parameters.
reset
()feed
(reward)Inherited from
JaxObject
__new__
(cls, *args, **kwargs)For avoiding super().__init__()
__init_subclass__
(*args, **kwargs)For avoiding a decorator for each subclass
__str__
()Return str(self).
__setattr__
(key, val)Implement setattr(self, name, value).
save
(path)load
(path)throw
(err, msg)
-
__call__
(state) → jax._src.numpy.lax_numpy.ndarray[source]¶ Description: Return the action based on current state and internal parameters.
- Parameters
state (float/numpy.ndarray) – current state
- Returns
action to take
- Return type
jnp.ndarray
-
__init__
(A: jax._src.numpy.lax_numpy.ndarray, B: jax._src.numpy.lax_numpy.ndarray, Q: jax._src.numpy.lax_numpy.ndarray = None, R: jax._src.numpy.lax_numpy.ndarray = None) → None[source]¶ Description: Initialize the infinite-time horizon LQR. :param A: system dynamics :type A: jnp.ndarray :param B: system dynamics :type B: jnp.ndarray :param Q: cost matrices (i.e. cost = x^TQx + u^TRu) :type Q: jnp.ndarray :param R: cost matrices (i.e. cost = x^TQx + u^TRu) :type R: jnp.ndarray
- Returns
None
-