class_docstr: A linear dynamical system characterized by A, B, Q, and R.
  
  Suppose x_t is current state, u_t is current action, then:
  
  x_t+1 = A x_t + B u_t
  Reward_t = x_t' Q x_t + u_t' R u_t
code: def step(self, action):
      assert len(action) == self.action_dim
      action = np.clip(
          action, self.action_space.low, self.action_space.high
      )
      action = action.reshape((self.action_dim, 1))
      state = self.state.reshape((self.state_dim, 1))
      next_state = (self.A.dot(state) + self.B.dot(action)).squeeze()
      # add negative sign because we want to maximize the rewards,
      # while an LQR solution minimizes costs by convention
      reward = -(
          (
              state.T.dot(self.Q).dot(state)
              + action.T.dot(self.R).dot(action)
          ).squeeze()
      )
      self.step_cnt += 1
      terminal = False
      if self.step_cnt >= self.max_steps:
          terminal = True
      self.state = next_state
      return next_state, reward, terminal, None
  
file_path: ReAgent/reagent/gym/envs/dynamics/linear_dynamics.py
imports: import logging
  import numpy
  from gym import Env
  from gym.spaces import Box
label_desc: Use image node_id 4 for calling the LinDynaEnv obj's underlying member method code with example usage: obj.step(action) and returns: next_state,  reward,  terminal,  None