﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
1537	pre during initialization	Martin Sjölund	Martin Sjölund	"OMC fails to initialize the following. I guess during initilization, pre(x)=x? Or we simply need to save the pre()-values during each iteration of the initialization?
{{{
loadModel(Modelica);
simulate(Modelica.Thermal.FluidHeatFlow.Examples.OneMass);
}}}

Gives:
{{{
int initial_residual()
{
  int i = 0;
  state mem_state;
  
  mem_state = get_memory_state();
  localData->initialResiduals[i++] = ($PheatCapacitor$PT - $P$PRE$PheatCapacitor$PT);
  if (sim_verbose == LOG_RES_INIT) { printf("" Residual[%d] : heatCapacitor.T - pre(heatCapacitor.T) = %f\n"",i,localData->initialResiduals[i-1]); }
  localData->initialResiduals[i++] = ($Ppipe$PT - $P$PRE$Ppipe$PT);
  if (sim_verbose == LOG_RES_INIT) { printf("" Residual[%d] : pipe.T - pre(pipe.T) = %f\n"",i,localData->initialResiduals[i-1]); }
  restore_memory_state(mem_state);
  
  return 0;
}
}}}

And:
{{{
Error in initialization. Solver iterated 50 times without finding a solution
Error in initialization. System of initial equations are not consistent.
(Least Square function value is 184000)
residual[0] = 313.15
residual[1] = 293.15
}}}"	defect	closed	high				fixed		Martin Sjölund Jens Frenkel Willi Braun
