rwl / PYPOWER

Port of MATPOWER to Python
http://rwl.github.io/PYPOWER/api/
Other
329 stars 110 forks source link

makePTDF ValueError: column index exceeds matrix dimensions #76

Open Hahades17 opened 1 year ago

Hahades17 commented 1 year ago

I cannot use makePTDF in pypower

Hahades17 commented 1 year ago

This problem occurred when using makePTDF. I did not modify any data and directly used the standard example. What is the matter?

from gurobipy import * import numpy as np from pypower.case6ww import case6ww from pypower.api import makePTDF from scipy import sparse

ppc = case6ww() PTDF = makePTDF(ppc["baseMVA"],ppc["bus"], ppc["branch"],0)

ValueError: column index exceeds matrix dimensions

zhenzheniscrazy commented 2 months ago

bro i make a same mistake, how you deal with the problem

Hahades17 commented 2 months ago

u can use this function (ext2int) after loading case.The mistake is lead by the index, it should start form 0. The ext2int can change the order of the index.

@.***

 

------------------ 原始邮件 ------------------ 发件人: "rwl/PYPOWER" @.>; 发送时间: 2024年7月10日(星期三) 晚上6:58 @.>; @.**@.>; 主题: Re: [rwl/PYPOWER] makePTDF ValueError: column index exceeds matrix dimensions (Issue #76)

bro i make a same mistake, how you deal with the problem

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

zhenzheniscrazy commented 2 months ago

Thank you very much

------------------ 原始邮件 ------------------ 发件人: "rwl/PYPOWER" @.>; 发送时间: 2024年7月10日(星期三) 晚上7:06 @.>; @.**@.>; 主题: Re: [rwl/PYPOWER] makePTDF ValueError: column index exceeds matrix dimensions (Issue #76)

u can use this function (ext2int) after loading case.The mistake is lead by the index, it should start form 0. The ext2int can change the order of the index.

@.***

 

------------------ 原始邮件 ------------------ 发件人: "rwl/PYPOWER" @.>; 发送时间: 2024年7月10日(星期三) 晚上6:58 @.>; @.**@.>; 主题: Re: [rwl/PYPOWER] makePTDF ValueError: column index exceeds matrix dimensions (Issue #76)

bro i make a same mistake, how you deal with the problem

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.> — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.>