﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
1652	Bound parameter is calculated fine but the value that ends up in the result file is the start value ...	Adrian Pop	Adrian Pop	"Hi,

Seems there is an issue with propagation of the results
calculated by bound_parameter to the result file.
See an example of the problem here:
[http://www.openmodelica.org/index.php/forum/topic?id=446]
I actually edited Test.c and added a printout at the end
of bound_parameters and the parameter mod.result1 is correct.
I also added:
{{{
 printf(""eq2 - mod.result1: %g global: %g\n"", $Pmod$Presult1, globalData->parameters[2]); fflush(NULL);
}}}
in eqFunction_2 and both global and local data parameters[2] is 1, but still, in the result file we get 0.\\
Ok, found the error, but I don't know how to resolve it.\\
We have in callSolver:
{{{
sim_result = new simulation_result_mat(result_file_cstr.c_str(), start, stop);
}}}
This will write the parameters, but bound_parameters functions is only called later in solver_main!!\\
We need to re-write parameter values after bound_parameters!\\
We have this error both in the old (maybe also in the new) simulation runtime.

Cheers,
Adrian Pop/"	defect	closed	high				fixed		Adrian Pop Jens Frenkel Martin Sjölund Willi Braun
