Skip to content

Instantly share code, notes, and snippets.

@mariepied
mariepied / error_diffEq.jl
Last active July 10, 2018 19:57
ERROR: LoadError: Something went wrong. Integrator stepped past tstops but the algorithm was dtchangeable. Please report this error.
import DifferentialEquations
import Interpolations
import Distributions
using Plots
function module_simulation_wh(CONT,trajectory,mu_opt,wh,x_init,theta_0,heat_on)
Nb_wh,n_l,m_c,control_pos,K,maxPower,xenv,xL,densW,V,M,Cpf,U,Ai,R,qx0,L,delta_t,T,ft,n_t,y,lowComfort,highComfort,B,A0,A1,H,zeta0 = wh
x_tot = zeros(Nb_wh,n_l,n_t)
theta_tot = zeros(Nb_wh,n_t)
@mariepied
mariepied / error.jl
Created May 23, 2018 15:50
Example code for error
using DifferentialEquations
using Interpolations
srand(180394)
#Parameters #
delta_t = 0.01;
T=6.0;
ft = 0:delta_t:T;
n_t = length(ft);
Kelvin = 273.15;