Skip to content
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

swmm_setLinkParam Set Link Setting Offset Conversion #75

Open
bemcdonnell opened this issue Aug 17, 2017 · 1 comment
Open

swmm_setLinkParam Set Link Setting Offset Conversion #75

bemcdonnell opened this issue Aug 17, 2017 · 1 comment
Assignees
Labels
Milestone

Comments

@bemcdonnell
Copy link
Member

If a link’s offset is changed and Elevation Offsets are being used, then the conversion of the new offset to a an internally used depth offset gets messed up.

https://github.com/OpenWaterAnalytics/Stormwater-Management-Model/blob/develop/src/toolkitAPI.c#L452-L499

@bemcdonnell bemcdonnell added this to the v5.2.0 milestone Aug 17, 2017
@bemcdonnell bemcdonnell self-assigned this Aug 17, 2017
@bemcdonnell bemcdonnell changed the title swmm_setLinkSetting Set Link Setting Offset Conversion swmm_setLinkParam Set Link Setting Offset Conversion Aug 17, 2017
@bemcdonnell
Copy link
Member Author

    if ( LinkOffsets == ELEV_OFFSET ) link_convertOffsets(j);


...

void link_convertOffsets(int j)
//
//  Input:   j = link index
//  Output:  none
//  Purpose: converts offset elevations to offset heights for a link.
//
{
    double elev;

    elev = Node[Link[j].node1].invertElev;
    Link[j].offset1 = link_getOffsetHeight(j, Link[j].offset1, elev);
    if ( Link[j].type == CONDUIT )
    {
        elev = Node[Link[j].node2].invertElev;
        Link[j].offset2 = link_getOffsetHeight(j, Link[j].offset2, elev);
    }
    else Link[j].offset2 = Link[j].offset1;

@bemcdonnell bemcdonnell modified the milestones: v5.2.0.dev5, v5.3.0.dev0 Jul 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant