def test_make_lindynamics( n_state: int, n_ctrl: int, horizon: int, stationary: bool, passive_eigval_range: tuple[float, float], controllable: bool, transition_bias: bool, seed: int, ): dynamics = make_lindynamics( n_state, n_ctrl, horizon, stationary=stationary, passive_eigval_range=passive_eigval_range, controllable=controllable, bias=transition_bias, rng=seed, ) check_dynamics( dynamics, n_state, n_ctrl, horizon, stationary=stationary, controllable=controllable, transition_bias=transition_bias, sample_covariance=False, )
def stationary_deterministic_dynamics(n_state: int, n_ctrl: int, horizon: int, seed: int): return make_lindynamics(n_state, n_ctrl, horizon, stationary=True, rng=seed)
def dynamics(self, n_state: int, n_ctrl: int, horizon: int, seed: int, stationary: bool) -> LinSDynamics: # pylint:disable=too-many-arguments linear = make_lindynamics(n_state, n_ctrl, horizon, stationary=stationary, rng=seed) return make_linsdynamics(linear, stationary=stationary, rng=seed)
def reset_parameters(self): """Default parameter initialization.""" linear = make_lindynamics(self.n_state, self.n_ctrl, self.horizon, stationary=self.stationary) dynamics = make_linsdynamics(linear, stationary=self.stationary) self.copy_(dynamics) self.cov_cholesky.reset_parameters()
def dynamics(n_state: int, n_ctrl: int, horizon: int, rng: RNG) -> lqr.LinSDynamics: return make_linsdynamics( make_lindynamics( n_state, n_ctrl, horizon, stationary=True, passive_eigval_range=(0.5, 1.5), rng=rng, ), stationary=True, rng=rng, )
def dynamics( self, n_state: int, n_ctrl: int, horizon: int, seed: int ) -> lqr.LinSDynamics: dyn = make_lindynamics( n_state, n_ctrl, horizon, stationary=True, passive_eigval_range=(0.5, 1.5), controllable=True, bias=False, rng=seed, ) return make_linsdynamics(dyn, stationary=True, rng=seed)
def dynamics(n_state: int, n_ctrl: int, horizon: int, seed: int) -> LinSDynamics: lin = make_lindynamics(n_state, n_ctrl, horizon, rng=seed) dyn = make_linsdynamics(lin, rng=seed) return dyn
def dynamics(n_state: int, n_ctrl: int, horizon: int) -> lqr.LinSDynamics: dynamics = make_lindynamics(n_state, n_ctrl, horizon, stationary=True) return make_linsdynamics(dynamics, stationary=True)
def lindynamics(n_state: int, n_ctrl: int, horizon: int, seed: int) -> LinDynamics: return make_lindynamics(n_state, n_ctrl, horizon, rng=seed)