肺模拟
lung的Python项目详细描述
肺
玩具^3肺
文件
入门
- 强烈推荐,但可选。使用conda
conda env create -f environment.yml
- 安装
lung
包
- 从根存储库目录启动
jupyter
jupyter notebook
如何运行代码
看看notebooks/Delay Lung model.ipynb
。在
new_controller=NewController(waveform=BreathWaveform())
如何添加控制器
- 假设我们的名字是
NewController
- 在
lung/controller/_new_controller.py
中创建文件 - 控制器存根:
fromlung.controllers.coreimportControllerclassNewController(Controller):def__init__(self,**kwargs):passdeffeed(self,err,t):pass
- 将
NewController
添加到lung/controllers/__init__.py
- 使用
from lung.controllers import NewController
导入
如何添加环境
- 和上面的想法一样。你搞定了,西里尔!(注意
self.time
……)。在
- 项目
标签: