-
Notifications
You must be signed in to change notification settings - Fork 136
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setting Subcatchment Parameters for calibration purposes #246
Comments
Are you looking to change these parameters before simulation starts? |
Yes, thats correct.
…Sent from my iPhone
On 13 Jul 2020, at 11:49 pm, Jenn ***@***.***> wrote:
Are you looking to change these parameters before simulation starts?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
I don't think this feature is available in the SWMM toolkitapi, which is what pyswmm use. I would make the request here: https://github.com/OpenWaterAnalytics/Stormwater-Management-Model/issues |
Hello, I am studying pyswmm recently, and I have a question to ask you. The parameter of changing the impervious area of the subcatchment cannot be modified. Is it my code problem? ‘’‘S1.percent_impervious = 10’ |
code:print(s1.percent_impervious) |
Hi @yangdong963, can you please post a larger portion of your code? Thanks! |
from pyswmm import Simulation, Subcatchments
with Simulation('./C1C2.inp') as sim:
s1 = Subcatchments(sim)['S1']
s1.slope = 100
s1.percent_impervious = 0
s1.percent_impervious = 0.22
print(sub.percent_impervious)
…------------------ 原始邮件 ------------------
发件人: "OpenWaterAnalytics/pyswmm" <[email protected]>;
发送时间: 2020年7月22日(星期三) 晚上8:41
收件人: "OpenWaterAnalytics/pyswmm"<[email protected]>;
抄送: "杨先森"<[email protected]>;"Mention"<[email protected]>;
主题: Re: [OpenWaterAnalytics/pyswmm] setting Subcatchment Parameters for calibration purposes (#246)
Hi @yangdong963, can you please post a larger portion of your code? Thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
from pyswmm import Simulation, Subcatchments
with Simulation('./C1C2.inp') as sim:
s1 = Subcatchments(sim)['S1']
s1.slope = 100
print(s1.percent_impervious)
s1.percent_impervious = 0.22
print(s1.percent_impervious)
Hello, when I tried to modify the percent_impervious parameter in subcatchments, I found that this parameter cannot be modified, and parameters such as slope can be modified. My python environment is python 3.7. Thank you. Looking forward to your reply.
------------------ 原始邮件 ------------------
发件人: "OpenWaterAnalytics/pyswmm" <[email protected]>;
发送时间: 2020年7月22日(星期三) 晚上8:41
收件人: "OpenWaterAnalytics/pyswmm"<[email protected]>;
抄送: "杨先森"<[email protected]>;"Mention"<[email protected]>;
主题: Re: [OpenWaterAnalytics/pyswmm] setting Subcatchment Parameters for calibration purposes (#246)
Hi @yangdong963, can you please post a larger portion of your code? Thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
thanks @yangdong963. As @bemcdonnell pointed out here, this feature is not yet available. From the comments in the code, it looks like this may be a more challenging setter to implement, as it will require recalculation of other parameters after setting. I believe @jennwuu is working on some of the subcatchment parameters, but I'm not sure about this one (?) |
Thank you for answering my question. In the process of calibrating the model, the parameters in subcatchments such as N-Imperv, N-perv, Dstore-imperv and other parameters are also empirical parameters that can be adjusted. I don’t know if you will consider them in the next development process. Yet?
One last word, thank you
…------------------ 原始邮件 ------------------
发件人: "OpenWaterAnalytics/pyswmm" <[email protected]>;
发送时间: 2020年7月22日(星期三) 晚上9:05
收件人: "OpenWaterAnalytics/pyswmm"<[email protected]>;
抄送: "杨先森"<[email protected]>;"Mention"<[email protected]>;
主题: Re: [OpenWaterAnalytics/pyswmm] setting Subcatchment Parameters for calibration purposes (#246)
thanks @yangdong963. As @bemcdonnell pointed out here, this feature is not yet available. From the comments in the code, it looks like this may be a more challenging setter to implement, as it will require recalculation of other parameters after setting. I believe @jennwuu is working on some of the subcatchment parameters, but I'm not sure about this one (?)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
@yangdong963, would you be interested in contributing these features? |
Thank you, I'm just new to programming and I still don't have the ability to contribute
…------------------ 原始邮件 ------------------
发件人: "OpenWaterAnalytics/pyswmm" <[email protected]>;
发送时间: 2020年7月22日(星期三) 晚上9:18
收件人: "OpenWaterAnalytics/pyswmm"<[email protected]>;
抄送: "杨先森"<[email protected]>;"Mention"<[email protected]>;
主题: Re: [OpenWaterAnalytics/pyswmm] setting Subcatchment Parameters for calibration purposes (#246)
@yangdong963, would you be interested in contributing these features?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
@yangdong963 yes, N-Imperv, N-perv, Dstore-imperv, and Dstore-perv are parameters I am planning to expand in subcatchment getters and setters. I did not evaluate the complexity of adding impervious fraction yet. I may include this parameter as well. |
@yangdong963 Are you aware of any update on this? |
@tamaddun I am still working on this feature. It's more complex than I originally thought and that's why it is delayed. |
@jennwuu Thank you. Rooting for you! |
Hi def subcatch_set_parameter(*args, **kwargs): # real signature unknown
"""
Set a property value for specified subcatchment.
Parameters
----------
index: int
The index of a subcatchment
param: SM_SubcProperty
The property type code (See :ref: SM_SubcProperty)
value: double
The new value of the subcatchment's property
"""
pass What exactly does it do with the passed arguments to function subcatch_set_parameter from solver.py file? def subcatch_set_parameter(index: "int", param: "SM_SubcProperty", value: "double") -> "int":
r"""
Set a property value for specified subcatchment.
Parameters
----------
index: int
The index of a subcatchment
param: SM_SubcProperty
The property type code (See :ref: SM_SubcProperty)
value: double
The new value of the subcatchment's property
"""
return _solver.subcatch_set_parameter(index, param, value) I also noticed that changing the numbering in the SubcParams class as below setter works. This class in toolkitapi.py. The simulation executes correctly. Can someone direct me why there is a problem with key 2 and where can I look for a solution? class SubcParams(Enum):
width = 0 # double
area = 2 # double
fracImperv = 1 # double
slope = 3 # double
curbLength = 4 # double
# initBuildup = 5 # double |
Okay, I see what the problem is. break; //Subcatch[index].fracImperv; break;
// Cannot Open Function just yet. Need
// to adjust some internal functions to
// ensure parameters are recalculated
// = MIN(value, 100.0) / 100.0; break; |
@BuczynskiRafal, if you scroll down to the bottom of this page it will show you the links to the various repositories and how the project is architected. I’m going to convert the issue to a discussion until we find units of work to work on |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
It seems that Subcatchment parameters that can be set by user are limited to width, area, fracImperv, slope and curbLength (see class SubcParams(Enum) in toolkitapi.py).
For calibration of a SWMM model it is usually necessary to change parameters such as previous and impervious roughness, infiltration rates, depression storage, etc. Is this functionality already available?
The text was updated successfully, but these errors were encountered: