title: Initialization error when compiling code with three equation containing array
body: <p>I am trying to prepare a modelica code to understand array and for loop.
  When I am compiling the code, I get following error.</p>
  
  <p>The initialization problem is inconsistent due to the following equation: 0 != 1 = 1.0 - I[0]
  Error in initialization. Storing results and exiting.<br>
  Use -lv=LOG_INIT -w for more information.
  Simulation process failed. Exited with code -1.</p>
  
  <p>I have tried to adjust array numbers to see if this solves. Could not trace the reason why the code is failing.</p>
  
  <pre><code>class flu
      parameter Real beta = 10.0/(40*8*24);
      parameter Real gamma= 3.0/(15*24);
      parameter Real dt = 0.1;
      parameter Real D  = 30;
      parameter Integer N_t = integer(D*24/dt);
      parameter Integer array = integer(N_t*dt);
      //parameter Real time[array];
      Real S[array] ;
      Real I[array] ;
      Real R[array] ;
  
  initial equation
      S[0] = 50;
      I[0] = 1;
      R[0] = 0;
  
  equation
      for n in 0:(array-1) loop
      S[n+1] = S[n] - dt*beta*S[n]*I[n];
      I[n+1] = I[n] + dt*beta*S[n]*I[n] - dt*gamma*I[n];
      R[n+1] = R[n] + dt*gamma*I[n];
      end for;
  
  annotation(
      __OpenModelica_simulationFlags(lv = "LOG_STATS", outputFormat = "mat", s = "dassl"));end flu;
  </code></pre>
  
  <p>I am expecting to get three curves as a result .</p>