discontinuities.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:simupy 作者: sixpearls 项目源码 文件源码
def event_bounds_expressions(self, event_bounds_exp):
        if hasattr(self, 'output_equations'):
            assert len(event_bounds_exp)+1 == self.output_equations.shape[0]
        if hasattr(self, 'output_equations_functions'):
            assert len(event_bounds_exp)+1 == \
                self.output_equations_functions.size
        if hasattr(self, 'state_equations'):
            assert len(event_bounds_exp)+1 == self.state_equations.shape[0]
        if hasattr(self, 'state_equations_functions'):
            assert len(event_bounds_exp)+1 == \
                self.state_equations_functions.size
        self._event_bounds_expressions = event_bounds_exp
        self.event_bounds = np.array(
            [sp.N(bound, subs=self.constants_values)
             for bound in event_bounds_exp],
            dtype=np.float_
        )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号