def augment_state(state): #import pdb #pdb.set_trace() # TODO: Move into Definitions + Add propapagation return tf.concat( to_col([State.TFP(state), State.depr(state)] + [getattr(State, "K" + str(i))(state) for i in range(2, 7)] + [ Definitions.K_total(state, None), Definitions.r(state, None), Definitions.w(state, None), Definitions.Y(state, None) ] + [ Definitions.r(state, None) * getattr(State, "K" + str(i))(state) for i in range(2, 7) ]), axis=1)
def w(state, policy_state=None): return (1 - Parameters.alpha) * State.TFP(state) * Definitions.K_total( state, None)**Parameters.alpha
def Y(state, policy_state=None): return State.TFP(state) * Definitions.K_total( state, None)**Parameters.alpha + ( 1 - State.depr(state)) * Definitions.K_total(state, None)
def r(state, policy_state=None): return Parameters.alpha * State.TFP(state) * Definitions.K_total( state, None)**(Parameters.alpha - 1) + (1 - State.depr(state))