int hotstart_open()
{
    // --- open hot start files
    if ( !openHotstartFile1() ) return FALSE;       //input hot start file
    if ( !openHotstartFile2() ) return FALSE;       //output hot start file
    return TRUE;
}
示例#2
0
文件: hotstart.c 项目: ezhangle/swmm
int hotstart_open()
{
    // --- open hot start files
    if ( !openHotstartFile1() ) return FALSE;       //input hot start file
    if ( !openHotstartFile2() ) return FALSE;       //output hot start file

    ////  Following lines removed. ////                                            //(5.1.005)
    //if ( Fhotstart1.file )
    //{
    //    readRunoff();
    //    readRouting();
    //    fclose(Fhotstart1.file);
    //}

    return TRUE;
}
示例#3
0
文件: routing.c 项目: boinst/liquids
int routing_open(int routingModel)
//
//  Input:   routingModel = routing method code
//  Output:  returns an error code
//  Purpose: initializes the routing analyzer.
//
{
    //  --- initialize steady state indicator
    InSteadyState = FALSE;

    // --- open treatment system
    if ( !treatmnt_open() ) return ErrorCode;

    // --- topologically sort the links
    SortedLinks = NULL;
    if ( Nobjects[LINK] > 0 )
    {
        SortedLinks = (int *) calloc(Nobjects[LINK], sizeof(int));
        if ( !SortedLinks )
        {
            report_writeErrorMsg(ERR_MEMORY, "");
            return ErrorCode;
        }
        toposort_sortLinks(SortedLinks);
        if ( ErrorCode ) return ErrorCode;
    }

    // --- open any routing interface files
    iface_openRoutingFiles();
    if ( ErrorCode ) return ErrorCode;

    // --- open hot start files
    if ( !openHotstartFile1() ) return ErrorCode;
    if ( !openHotstartFile2() ) return ErrorCode;

    // --- initialize the flow routing model
    flowrout_init(routingModel);
    return ErrorCode;
}