tolerance not being inputted [closed]

asked 2025-06-25 14:52:31 -0500

updated 2025-06-26 10:53:23 -0500

I'm trying to test out cosimulation with pyfmi (one energyplus model and another openModelica). I keep getting this error:

xtol=0.000000 is too small, no further improvement in the approximate solution is possible.

I changed the tolerance to be larger via the options, but it doesn't seem to change anything. I think this is due to the fact that pyfmi calls scipy.optimize.root WITHOUT passing in a tolerance? But I feel like the default tolerance shouldn't be lower than 0.000000.

Has anyone encountered this error?

Here is my code:

model1 = load_fmu("path_to_fmu.fmu")
model2 = load_fmu("path_to_fmu.fmu")

models = [model1, model2]
connections = [ set up connections ]
master = Master(models, connections)

seconds_in_hour = 60 * 60
start_time = 0
final_time = 86400 * 7

opts = master.simulate_options()
opts["initialize"] = True
opts["local_rtol"] = 0.9
opts["rtol"] = 0.9
opts["atol"] = 0.09

// not included but step size is correctly calculated for my idf file. the OpenModelica fmu is variable stepsize
// opts["step_size"] = 60

res = master.simulate(start_time=0,
final_time=final_time,
options=opts)
edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by Aaron Boranian
close date 2025-06-26 10:52:00.551789

Comments

Duplicate of this post.

Aaron Boranian's avatar Aaron Boranian  ( 2025-06-26 10:52:04 -0500 )edit