Hi,
I encountered an issue when using the CasADi solver. While running the following code, I found that the random numbers were not being generated properly. I discovered that if the CasADi solver is used, the function _set_random_seed
takes effect, causing the random numbers in my program to fail to generate correctly. How can I resolve this?
action_norm = agent.select_action(state_norm)
action_noise = (action_norm + np.random.normal(0, 1*expl_noise, size=1)).clip(-1, 1) # noise level 0.2
action_applied = denormalize_input(action_noise, env.action_space.low[0], env.action_space.high[0])
next_state, reward, is_done, b = env.step(action_applied)
in the “env.step”
self.simulation = pybamm.Simulation(
self.model,
parameter_values=self.param,
experiment=experiment,
solver=self.solver
)
the solver is casadi