Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error “The linesearch algorithm failed with too small a step.” in sensitivitiy analysis. #4677

Closed
Azure-Dreamer opened this issue Dec 15, 2024 · 1 comment

Comments

@Azure-Dreamer
Copy link

Azure-Dreamer commented Dec 15, 2024

Thank you pybamm team for your great work, and I would be grateful if you can provide some help with the following problem.

I tried to calculate the sensitivity applying the "explicit sensitivity calculation" function.

I created a new parameter class and put both negative and positive particle diffusivities into it, then processed it into InputParameter class during discretization. Everything is fine until solving. The solver usually raised error “The linesearch algorithm failed with too small a step.” when I chose "fast", "fast with events" and "safe" as the casadisolve "mode" argument. I tried

  1. calculating the sensitiviy of only one parameter instead of both, for example by set calculate_sensitivities=['Negative particle diffusivity [m2.s-1]',],
  2. different simulation time.

At present the only situation that solver didn't raise the error "The linesearch ..." is only sensitivity of Negative particle diffusivity is calculated and the simulation time is set as 0.1s. However, another error raised which seems not by solver:

[ERROR] solution.check_ys_are_not_too_large(397): Solution for '3.5986316539448007 + y[882:902]' exceeds the maximum allowed value of `100000.0. This could be due to incorrect scaling, model formulation, or parameter values. The maximum allowed value is set by 'pybammm.settings.max_y_value'._

I will post the error in the last of this issue, and thank you team for your work. If possible, please help me with it. I will also post it in PyBaMM Discourse.

The linesearch algorithm failed with too small a step.
2024-12-16 00:41:14.184 - [ERROR] callbacks.on_experiment_error(233): Simulation error: Error in Function::call for 'F' [IdasInterface] at .../casadi/core/function.cpp:1432:
Error in Function::call for 'F' [IdasInterface] at .../casadi/core/function.cpp:361:
.../casadi/interfaces/sundials/idas_interface.cpp:596: IDACalcIC returned "IDA_LINESEARCH_FAIL". Consult IDAS documentation.
Traceback (most recent call last):
  File "F:\PyBaMM\pybamm\solvers\casadi_solver.py", line 685, in _run_integrator
    casadi_sol = integrator(x0=y0_diff, z0=y0_alg, p=inputs_with_tmin, **self.extra_options_call)  # self.extra_options_call: {}
  File "F:\Anaconda\envs\PyBaMM_env\lib\site-packages\casadi\casadi.py", line 23531, in __call__
    return self.call(kwargs)
  File "F:\Anaconda\envs\PyBaMM_env\lib\site-packages\casadi\casadi.py", line 20180, in call
    return _casadi.Function_call(self, *args)
RuntimeError: Error in Function::call for 'F' [IdasInterface] at .../casadi/core/function.cpp:1432:
Error in Function::call for 'F' [IdasInterface] at .../casadi/core/function.cpp:361:
.../casadi/interfaces/sundials/idas_interface.cpp:596: IDACalcIC returned "IDA_LINESEARCH_FAIL". Consult IDAS documentation.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "F:\PyBaMM\experiment.py", line 40, in <module>
    solution = sim.solve(inputs=inputs)
  File "F:\PyBaMM\pybamm\simulation.py", line 778, in solve
    raise error
  File "F:\PyBaMM\pybamm\simulation.py", line 754, in solve
    step_solution = solver.step(
  File "F:\PyBaMM\pybamm\solvers\base_solver.py", line 1374, in step
    solution = self._integrate(model, t_eval, model_inputs, t_interp)
  File "F:\PyBaMM\pybamm\solvers\casadi_solver.py", line 169, in _integrate
    solution = self._run_integrator(model, model.y0, inputs_dict, inputs, t_eval)
  File "F:\PyBaMM\pybamm\solvers\casadi_solver.py", line 692, in _run_integrator
    raise pybamm.SolverError(error.args[0]) from error
pybamm.expression_tree.exceptions.SolverError: Error in Function::call for 'F' [IdasInterface] at .../casadi/core/function.cpp:1432:
Error in Function::call for 'F' [IdasInterface] at .../casadi/core/function.cpp:361:
.../casadi/interfaces/sundials/idas_interface.cpp:596: IDACalcIC returned "IDA_LINESEARCH_FAIL". Consult IDAS documentation.

Process finished with exit code 1
@Azure-Dreamer
Copy link
Author

Azure-Dreamer commented Dec 15, 2024

Oh forget to say, I also tried the .factory function of casadi to calculate the sensitivity, similar to casadi/casadi#2517.

Briefly

integrator_fwd_p = integrator.factory("F_fwd", ['x0', 'z0', 'p', 'fwd:p'], ['fwd:xf'])
casadi_sol_fwd_p = integrator_fwd_p(x0=y0_diff, z0=y0_alg, p=inputs_with_tmin, fwd_p=[1, 0, 0])

Similar error "The linesearch algorithm failed with too small a step." and another "Newton/Linesearch algorithm failed to converge." raised for "safe" and "fast" mode.

F:\Anaconda\envs\PyBaMM_env\python.exe F:\PyBaMM\experiment.py 
Newton/Linesearch algorithm failed to converge.
Function fsens1_F (0x20926946a60)
Input 0 (x0): 
[[0, 0], 
 [0, 0], 
 [0.81, 0], 
 ...,
 [0.426, 0], 
 [0.426, 0], 
 [0.426, 0]]
Input 1 (z0): 
[[-9.86656e-08, 0], 
 [-2.86168e-07, 0], 
 [-4.6384e-07, 0], 
 [-6.31682e-07, 0], 
 [-7.89691e-07, 0], 
 [-9.37865e-07, 0], 
 [-1.0762e-06, 0], 
 [-1.2047e-06, 0], 
 [-1.32335e-06, 0], 
 [-1.43215e-06, 0], 
 [-1.5311e-06, 0], 
 [-1.62019e-06, 0], 
 [-1.69941e-06, 0], 
 [-1.76876e-06, 0], 
 [-1.82823e-06, 0], 
 [-1.87781e-06, 0], 
 [-1.91749e-06, 0], 
 [-1.94727e-06, 0], 
 [-1.96713e-06, 0], 
 [-1.97707e-06, 0], 
 [-0.08144, 0], 
 [-0.0814562, 0], 
 [-0.0814883, 0], 
 [-0.0815361, 0], 
 [-0.0815997, 0], 
 [-0.0816789, 0], 
 [-0.0817738, 0], 
 [-0.0818844, 0], 
 [-0.0820108, 0], 
 [-0.0821533, 0], 
 [-0.082312, 0], 
 [-0.0824873, 0], 
 [-0.0826795, 0], 
 [-0.082889, 0], 
 [-0.0831164, 0], 
 [-0.083362, 0], 
 [-0.0836266, 0], 
 [-0.0839108, 0], 
 [-0.0842154, 0], 
 [-0.0845411, 0], 
 [-0.0744532, 0], 
 [-0.0744559, 0], 
 [-0.0744612, 0], 
 [-0.0744691, 0], 
 [-0.0744796, 0], 
 [-0.0744928, 0], 
 [-0.0745087, 0], 
 [-0.0745271, 0], 
 [-0.0745483, 0], 
 [-0.074572, 0], 
 [-0.0745984, 0], 
 [-0.0746275, 0], 
 [-0.0746592, 0], 
 [-0.0746935, 0], 
 [-0.0747306, 0], 
 [-0.0747702, 0], 
 [-0.0748125, 0], 
 [-0.0748575, 0], 
 [-0.0749052, 0], 
 [-0.0749555, 0], 
 [-0.0749938, 0], 
 [-0.0750217, 0], 
 [-0.0750495, 0], 
 [-0.0750774, 0], 
 [-0.0751053, 0], 
 [-0.0751331, 0], 
 [-0.075161, 0], 
 [-0.0751889, 0], 
 [-0.0752168, 0], 
 [-0.0752446, 0], 
 [-0.0752725, 0], 
 [-0.0753004, 0], 
 [-0.0753282, 0], 
 [-0.0753561, 0], 
 [-0.075384, 0], 
 [-0.0754118, 0], 
 [-0.0754397, 0], 
 [-0.0754676, 0], 
 [-0.0754955, 0], 
 [-0.0755233, 0], 
 [-0.0755843, 0], 
 [-0.0756766, 0], 
 [-0.0757645, 0], 
 [-0.075848, 0], 
 [-0.0759271, 0], 
 [-0.0760019, 0], 
 [-0.0760723, 0], 
 [-0.0761383, 0], 
 [-0.0761999, 0], 
 [-0.0762571, 0], 
 [-0.0763097, 0], 
 [-0.0763578, 0], 
 [-0.0764011, 0], 
 [-0.0764396, 0], 
 [-0.0764731, 0], 
 [-0.0765015, 0], 
 [-0.0765247, 0], 
 [-0.0765424, 0], 
 [-0.0765544, 0], 
 [-0.0765606, 0]]
Input 2 (p): 
[[3e-15, 1], 
 [5.9e-13, 0], 
 [0, 0]]
Input 3 (u): 0x2
Input 4 (adj_xf): 0x0
Input 5 (adj_zf): 0x0
Input 6 (adj_qf): 0x0
Function fwd1_F (0x20926a68db0)
Input 0 (x0): [0, 0, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.81, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.0038, 0.36, 0.36, 0.36, 0.36, 0.36, 0.36, 0.36, 0.36, 0.36, 0.36, 0.36, 0.36, 0.36, 0.36, 0.36, 0.36, 0.36, 0.36, 0.36, 0.36, 0.45, 0.45, 0.45, 0.45, 0.45, 0.45, 0.45, 0.45, 0.45, 0.45, 0.45, 0.45, 0.45, 0.45, 0.45, 0.45, 0.45, 0.45, 0.45, 0.45, 0.426, 0.426, 0.426, 0.426, 0.426, 0.426, 0.426, 0.426, 0.426, 0.426, 0.426, 0.426, 0.426, 0.426, 0.426, 0.426, 0.426, 0.426, 0.426, 0.426]
Input 1 (z0): [-9.86656e-08, -2.86168e-07, -4.6384e-07, -6.31682e-07, -7.89691e-07, -9.37865e-07, -1.0762e-06, -1.2047e-06, -1.32335e-06, -1.43215e-06, -1.5311e-06, -1.62019e-06, -1.69941e-06, -1.76876e-06, -1.82823e-06, -1.87781e-06, -1.91749e-06, -1.94727e-06, -1.96713e-06, -1.97707e-06, -0.08144, -0.0814562, -0.0814883, -0.0815361, -0.0815997, -0.0816789, -0.0817738, -0.0818844, -0.0820108, -0.0821533, -0.082312, -0.0824873, -0.0826795, -0.082889, -0.0831164, -0.083362, -0.0836266, -0.0839108, -0.0842154, -0.0845411, -0.0744532, -0.0744559, -0.0744612, -0.0744691, -0.0744796, -0.0744928, -0.0745087, -0.0745271, -0.0745483, -0.074572, -0.0745984, -0.0746275, -0.0746592, -0.0746935, -0.0747306, -0.0747702, -0.0748125, -0.0748575, -0.0749052, -0.0749555, -0.0749938, -0.0750217, -0.0750495, -0.0750774, -0.0751053, -0.0751331, -0.075161, -0.0751889, -0.0752168, -0.0752446, -0.0752725, -0.0753004, -0.0753282, -0.0753561, -0.075384, -0.0754118, -0.0754397, -0.0754676, -0.0754955, -0.0755233, -0.0755843, -0.0756766, -0.0757645, -0.075848, -0.0759271, -0.0760019, -0.0760723, -0.0761383, -0.0761999, -0.0762571, -0.0763097, -0.0763578, -0.0764011, -0.0764396, -0.0764731, -0.0765015, -0.0765247, -0.0765424, -0.0765544, -0.0765606]
Input 2 (p): [3e-15, 5.9e-13, 0]
Input 3 (u): 0x1
Input 4 (adj_xf): 0x0
Input 5 (adj_zf): 0x0
Input 6 (adj_qf): 0x0
Input 7 (out_xf): [00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00]
Input 8 (out_zf): [00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00,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0]
Input 17 (fwd_u): 0x1
Input 18 (fwd_adj_xf): 0x0
Input 19 (fwd_adj_zf): 0x0
Input 20 (fwd_adj_qf): 0x0
2024-12-16 00:56:46.732 - [ERROR] callbacks.on_experiment_error(233): Simulation error: Error in Function::call for 'F_fwd' [MXFunction] at .../casadi/core/function.cpp:1432:
Error in Function::call for 'F_fwd' [MXFunction] at .../casadi/core/function.cpp:361:
Error in Function::operator() for 'fwd1_F' [MXFunction] at .../casadi/core/function.cpp:1513:
Error in Function::operator() for 'fsens1_F' [IdasInterface] at .../casadi/core/function.cpp:1513:
.../casadi/interfaces/sundials/idas_interface.cpp:596: IDACalcIC returned "IDA_CONV_FAIL". Consult IDAS documentation.
Traceback (most recent call last):
  File "F:\PyBaMM\pybamm\solvers\casadi_solver.py", line 686, in _run_integrator
    casadi_sol_fwd_p = integrator_fwd_p(x0=y0_diff, z0=y0_alg, p=inputs_with_tmin, fwd_p=[1, 0, 0])
  File "F:\Anaconda\envs\PyBaMM_env\lib\site-packages\casadi\casadi.py", line 23531, in __call__
    return self.call(kwargs)
  File "F:\Anaconda\envs\PyBaMM_env\lib\site-packages\casadi\casadi.py", line 20180, in call
    return _casadi.Function_call(self, *args)
RuntimeError: Error in Function::call for 'F_fwd' [MXFunction] at .../casadi/core/function.cpp:1432:
Error in Function::call for 'F_fwd' [MXFunction] at .../casadi/core/function.cpp:361:
Error in Function::operator() for 'fwd1_F' [MXFunction] at .../casadi/core/function.cpp:1513:
Error in Function::operator() for 'fsens1_F' [IdasInterface] at .../casadi/core/function.cpp:1513:
.../casadi/interfaces/sundials/idas_interface.cpp:596: IDACalcIC returned "IDA_CONV_FAIL". Consult IDAS documentation.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "F:\PyBaMM\experiment.py", line 40, in <module>
    solution = sim.solve(inputs=inputs)
  File "F:\PyBaMM\pybamm\simulation.py", line 778, in solve
    raise error
  File "F:\PyBaMM\pybamm\simulation.py", line 754, in solve
    step_solution = solver.step(
  File "F:\PyBaMM\pybamm\solvers\base_solver.py", line 1374, in step
    solution = self._integrate(model, t_eval, model_inputs, t_interp)
  File "F:\PyBaMM\pybamm\solvers\casadi_solver.py", line 169, in _integrate
    solution = self._run_integrator(model, model.y0, inputs_dict, inputs, t_eval)
  File "F:\PyBaMM\pybamm\solvers\casadi_solver.py", line 692, in _run_integrator
    raise pybamm.SolverError(error.args[0]) from error
pybamm.expression_tree.exceptions.SolverError: Error in Function::call for 'F_fwd' [MXFunction] at .../casadi/core/function.cpp:1432:
Error in Function::call for 'F_fwd' [MXFunction] at .../casadi/core/function.cpp:361:
Error in Function::operator() for 'fwd1_F' [MXFunction] at .../casadi/core/function.cpp:1513:
Error in Function::operator() for 'fsens1_F' [IdasInterface] at .../casadi/core/function.cpp:1513:
.../casadi/interfaces/sundials/idas_interface.cpp:596: IDACalcIC returned "IDA_CONV_FAIL". Consult IDAS documentation.

Process finished with exit code 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant