jxx123 / simglucose

A Type-1 Diabetes simulator implemented in Python for Reinforcement Learning purpose
MIT License
232 stars 109 forks source link

Dbar Modification #51

Closed wenzhoulyu closed 2 years ago

wenzhoulyu commented 2 years ago

Hello, the BG performance after the modification is very strange. After the modification, I found that the control of glucose seems to be more easily. The influence of CHO seems to be weakened.

manueich commented 2 years ago

hi, I am the person that found the bug in the first place.

From all I know, the model is now correctly implemented as described in the literature. As I have explained before in my bug report, I validated the glucose rate of appearance against results from the literature. So at least the glucose absorption model should be correct now. I also checked the rest of the model and could not find anything wrong. However, it could not find any results in the literature to validate this.

As this was quite a severe bug, I am not surprised that the behavior of the model and therefore any controllers has now changed significantly, as you are reporting. Especially since the glucose absorption has changed, an effect on CHO intake is to be expected. This unfortunately means that any results produced with the previous version may be invalid.

However, having said that, I might be wrong here and there might be other bugs in the model, so I would welcome any other people validating the model implementation.

wenzhoulyu commented 2 years ago

嗨,我是第一个发现这个错误的人。

据我所知,该模型现在已按照文献中的描述正确实现。正如我之前在错误报告中解释的那样,我根据文献结果验证了葡萄糖的出现率。所以至少葡萄糖吸收模型现在应该是正确的。我还检查了模型的其余部分,没有发现任何问题。但是,它在文献中找不到任何结果来验证这一点。

由于这是一个非常严重的错误,我对模型的行为以及任何控制器现在都发生了重大变化并不感到惊讶,正如您所报告的那样。特别是由于葡萄糖吸收发生了变化,因此可以预期对 CHO 摄入量的影响。不幸的是,这意味着以前版本产生的任何结果都可能无效。

但是,话虽如此,我在这里可能错了,模型中可能还有其他错误,所以我欢迎任何其他人验证模型实现。

Thank you so much for your reply.

wenzhoulyu commented 2 years ago

hi, I am the person that found the bug in the first place.

From all I know, the model is now correctly implemented as described in the literature. As I have explained before in my bug report, I validated the glucose rate of appearance against results from the literature. So at least the glucose absorption model should be correct now. I also checked the rest of the model and could not find anything wrong. However, it could not find any results in the literature to validate this.

As this was quite a severe bug, I am not surprised that the behavior of the model and therefore any controllers has now changed significantly, as you are reporting. Especially since the glucose absorption has changed, an effect on CHO intake is to be expected. This unfortunately means that any results produced with the previous version may be invalid.

However, having said that, I might be wrong here and there might be other bugs in the model, so I would welcome any other people validating the model implementation.

Hi, thank you for your modification. Recently, I'm trying to build controllers in other people's papers . And my results show that the results of modification version are more similar to the results of that paper. So I think the modified model seems to be correct.