n44.py 文件源码

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

项目:Nordic44-Nordpool 作者: ALSETLab 项目源码 文件源码
def change_prod_con(self, areas, prod, con, pf, tol=4,
                        row=None, column=None):
        """Wrapper function to change load and production
        Args:
            areas: area number
            prod: production
            con: consumption
            pf: power factor
            tol: tolerance for round
            row: which row to write to
            column: which column to write to
        """
        psspy.bsys(sid=0, numarea=1, areas=[areas])
        psspy.scal_2(0, 0, 0,
                     [0, 1, 1, 1, 0],
                     [con, prod,
                      0.0, 0.0, 0.0, 0.0,
                      round(con*math.tan(math.acos(pf)), tol)])
        if self.to_excel:
            self.sheet.cell(row=row, column=column).value = prod
            self.sheet.cell(row=row, column=column+1).value = con
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号