Example #1
0
def check_cable_route(Input_DB, Input_module, warning_list):

    ERROR_IN_MODULE = False  # default value:

    for ind_elem, row in Input_DB.iterrows():

        input_param = 'x coord [m]'
        ERROR_IN_PARAM, warning_list = check_float_positive_null(
            Input_DB, ind_elem, input_param, Input_module, warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'y coord [m]'
        ERROR_IN_PARAM, warning_list = check_float_positive_null(
            Input_DB, ind_elem, input_param, Input_module, warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'zone [-]'
        ERROR_IN_PARAM, warning_list = check_unicode(Input_DB, ind_elem,
                                                     input_param, Input_module,
                                                     warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'bathymetry [m]'
        ERROR_IN_PARAM, warning_list = check_float_positive_null(
            Input_DB, ind_elem, input_param, Input_module, warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'soil type [-]'
        ERROR_IN_PARAM, warning_list = check_unicode(Input_DB, ind_elem,
                                                     input_param, Input_module,
                                                     warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'burial depth [m]'
        ERROR_IN_PARAM, warning_list = check_float_positive_null(
            Input_DB, ind_elem, input_param, Input_module, warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'split pipe [-]'
        ERROR_IN_PARAM, warning_list = check_unicode(Input_DB, ind_elem,
                                                     input_param, Input_module,
                                                     warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

    return ERROR_IN_MODULE, warning_list
Example #2
0
def check_external_protection(Input_DB, Input_module, warning_list):

    ERROR_IN_MODULE = False  # default value:

    for ind_elem, row in Input_DB.iterrows():

        input_param = 'protection type [-]'
        PARAM = Input_DB[input_param][ind_elem]
        if not (PARAM == 'concrete matress' or PARAM == 'rock filter bag'):
            warning_list.append(
                'Input: ' + input_param + ' = ' + str(PARAM) + ' in ' +
                Input_module + '/index:' + str(ind_elem) + ' is Wrong! ' +
                'Only "concrete matress" or "rock filter bag" accepted.')
            ERROR_IN_MODULE = True

        input_param = 'x coord [m]'
        ERROR_IN_PARAM, warning_list = check_float_positive_null(
            Input_DB, ind_elem, input_param, Input_module, warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'y coord [m]'
        ERROR_IN_PARAM, warning_list = check_float_positive_null(
            Input_DB, ind_elem, input_param, Input_module, warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'zone [-]'
        ERROR_IN_PARAM, warning_list = check_unicode(Input_DB, ind_elem,
                                                     input_param, Input_module,
                                                     warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

    return ERROR_IN_MODULE, warning_list
def check_hydro(Input_DB, Input_module, warning_list):

    ERROR_IN_MODULE = False  # default value:

    for ind_elem, row in Input_DB.iterrows():
        input_param = 'x coord [m]'
        ERROR_IN_PARAM, warning_list = check_integer_long(
            Input_DB, ind_elem, input_param, Input_module, warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'y coord [m]'
        ERROR_IN_PARAM, warning_list = check_integer_long(
            Input_DB, ind_elem, input_param, Input_module, warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'zone [-]'
        ERROR_IN_PARAM, warning_list = check_unicode(Input_DB, ind_elem,
                                                     input_param, Input_module,
                                                     warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

    return ERROR_IN_MODULE, warning_list
Example #4
0
def check_layout(Input_DB, Input_module, warning_list):

    ERROR_IN_MODULE = False  # default value:

    for ind_elem, row in Input_DB.iterrows():

        input_param = 'Electrical Layout [-]'
        ERROR_IN_PARAM, warning_list = check_unicode(Input_DB, ind_elem,
                                                     input_param, Input_module,
                                                     warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

    return ERROR_IN_MODULE, warning_list
Example #5
0
def check_collect(Input_DB, Input_module, warning_list):

    ERROR_IN_MODULE = False  # default value:

    for ind_elem, row in Input_DB.iterrows():

        input_param = 'type [-]'
        PARAM = Input_DB[input_param][ind_elem]
        if not (PARAM == 'surface piercing' or PARAM == 'seabed'):
            warning_list.append(
                'Input: ' + input_param + ' = ' + str(PARAM) + ' in ' +
                Input_module + '/index:' + str(ind_elem) + ' is Wrong! ' +
                'Only "surface piercing" or "seabed" accepted.')
            ERROR_IN_MODULE = True

        input_param = 'x coord [m]'
        ERROR_IN_PARAM, warning_list = check_float_positive_null(
            Input_DB, ind_elem, input_param, Input_module, warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'y coord [m]'
        ERROR_IN_PARAM, warning_list = check_float_positive_null(
            Input_DB, ind_elem, input_param, Input_module, warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'zone [-]'
        ERROR_IN_PARAM, warning_list = check_unicode(Input_DB, ind_elem,
                                                     input_param, Input_module,
                                                     warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'length [m]'
        ERROR_IN_PARAM, warning_list = check_float_positive_null(
            Input_DB, ind_elem, input_param, Input_module, warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'width [m]'
        ERROR_IN_PARAM, warning_list = check_float_positive_null(
            Input_DB, ind_elem, input_param, Input_module, warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'height [m]'
        ERROR_IN_PARAM, warning_list = check_float_positive_null(
            Input_DB, ind_elem, input_param, Input_module, warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'dry mass [kg]'
        ERROR_IN_PARAM, warning_list = check_float_positive_null(
            Input_DB, ind_elem, input_param, Input_module, warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        # input_param = 'upstream ei type [-]'
        # ERROR_IN_PARAM, warning_list = check_unicode(Input_DB, ind_elem, input_param, Input_module, warning_list)
        # if ERROR_IN_PARAM:
        #     ERROR_IN_MODULE = True
        #
        # input_param = 'upstream ei id [-]'
        # ERROR_IN_PARAM, warning_list = check_integer_long(Input_DB, ind_elem, input_param, Input_module, warning_list)
        # if ERROR_IN_PARAM:
        #     ERROR_IN_MODULE = True
        #
        # input_param = 'downstream ei type [-]'
        # ERROR_IN_PARAM, warning_list = check_unicode(Input_DB, ind_elem, input_param, Input_module, warning_list)
        # if ERROR_IN_PARAM:
        #     ERROR_IN_MODULE = True
        #
        # input_param = 'downstream ei id [-]'
        # ERROR_IN_PARAM, warning_list = check_integer_long(Input_DB, ind_elem, input_param, Input_module, warning_list)
        # if ERROR_IN_PARAM:
        #     ERROR_IN_MODULE = True

        input_param = 'nr pigtails [-]'
        ERROR_IN_PARAM, warning_list = check_float_positive_null(
            Input_DB, ind_elem, input_param, Input_module, warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'pigtails length [m]'
        ERROR_IN_PARAM, warning_list = check_float_positive_null(
            Input_DB, ind_elem, input_param, Input_module, warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'pigtails diameter [mm]'
        ERROR_IN_PARAM, warning_list = check_float_positive_null(
            Input_DB, ind_elem, input_param, Input_module, warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'pigtails cable dry mass [kg/m]'
        ERROR_IN_PARAM, warning_list = check_float_positive_null(
            Input_DB, ind_elem, input_param, Input_module, warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'pigtails total dry mass [kg]'
        ERROR_IN_PARAM, warning_list = check_float_positive_null(
            Input_DB, ind_elem, input_param, Input_module, warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

    return ERROR_IN_MODULE, warning_list
Example #6
0
def check_found(Input_DB, Input_module, warning_list):

    ERROR_IN_MODULE = False  # default value:

    for ind_elem, row in Input_DB.iterrows():
        input_param = 'x coord [m]'
        ERROR_IN_PARAM, warning_list = check_float_positive(
            Input_DB, ind_elem, input_param, Input_module, warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'y coord [m]'
        ERROR_IN_PARAM, warning_list = check_float_positive(
            Input_DB, ind_elem, input_param, Input_module, warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'zone [-]'
        ERROR_IN_PARAM, warning_list = check_unicode(Input_DB, ind_elem,
                                                     input_param, Input_module,
                                                     warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'length [m]'
        ERROR_IN_PARAM, warning_list = check_float_positive(
            Input_DB, ind_elem, input_param, Input_module, warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'width [m]'
        ERROR_IN_PARAM, warning_list = check_float_positive(
            Input_DB, ind_elem, input_param, Input_module, warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'height [m]'
        ERROR_IN_PARAM, warning_list = check_float_positive(
            Input_DB, ind_elem, input_param, Input_module, warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'installation depth [m]'
        ERROR_IN_PARAM, warning_list = check_float_positive(
            Input_DB, ind_elem, input_param, Input_module, warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'dry mass [kg]'
        ERROR_IN_PARAM, warning_list = check_float_positive(
            Input_DB, ind_elem, input_param, Input_module, warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'grout volume [m3]'
        ERROR_IN_PARAM, warning_list = check_float_positive_null(
            Input_DB, ind_elem, input_param, Input_module, warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'type [-]'
        PARAM = Input_DB[input_param][ind_elem]
        if not (PARAM == 'pile foundation' or  PARAM == 'pile anchor' or  PARAM == 'gravity foundation' or  PARAM == 'gravity anchor' \
                        or  PARAM == 'shallow foundation' or  PARAM == 'shallow anchor' or  PARAM == 'direct-embedment anchor'\
                        or  PARAM == 'drag-embedment anchor' or PARAM == 'suction caisson anchor'):
            warning_list.append(
                'Input: ' + input_param + ' = ' + str(PARAM) + ' in ' +
                Input_module + '/index:' + str(ind_elem) + ' is Wrong! ' +
                'Only "pile foundation", "pile anchor", "gravity foundation", "gravity anchor", "shallow foundation", "shallow anchor", "direct-embedment anchor", "drag-embedment anchor" or "suction caisson anchor" accepted.'
            )
            ERROR_IN_MODULE = True

    return ERROR_IN_MODULE, warning_list
Example #7
0
def check_ports(Input_DB, Input_module, warning_list):

    ERROR_IN_MODULE = False  # default value:

    for ind_elem, row in Input_DB.iterrows():

        input_param = 'UTM x [m]'
        ERROR_IN_PARAM, warning_list = check_float_positive(
            Input_DB, ind_elem, input_param, Input_module, warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'UTM y [m]'
        ERROR_IN_PARAM, warning_list = check_float_positive(
            Input_DB, ind_elem, input_param, Input_module, warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'UTM zone [-]'
        ERROR_IN_PARAM, warning_list = check_unicode(Input_DB, ind_elem,
                                                     input_param, Input_module,
                                                     warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'Type of terminal [Quay/Dry-dock]'
        ERROR_IN_PARAM, warning_list = check_unicode(Input_DB, ind_elem,
                                                     input_param, Input_module,
                                                     warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'Entrance width [m]'
        ERROR_IN_PARAM, warning_list = check_float_positive_null(
            Input_DB, ind_elem, input_param, Input_module, warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'Terminal length [m]'
        ERROR_IN_PARAM, warning_list = check_float_positive_null(
            Input_DB, ind_elem, input_param, Input_module, warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'Terminal load bearing [t/m^2]'
        ERROR_IN_PARAM, warning_list = check_float_positive(
            Input_DB, ind_elem, input_param, Input_module, warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'Terminal draught [m]'
        ERROR_IN_PARAM, warning_list = check_float_positive(
            Input_DB, ind_elem, input_param, Input_module, warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'Terminal area [m^2]'
        ERROR_IN_PARAM, warning_list = check_float_positive_null(
            Input_DB, ind_elem, input_param, Input_module, warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'Max gantry crane lift capacity [t]'
        ERROR_IN_PARAM, warning_list = check_float_positive_null(
            Input_DB, ind_elem, input_param, Input_module, warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'Max tower crane lift capacity [t]'
        ERROR_IN_PARAM, warning_list = check_float_positive(
            Input_DB, ind_elem, input_param, Input_module, warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'Jacking capability [yes/no]'
        PARAM = Input_DB[input_param][ind_elem]
        if not (PARAM == 'Yes' or PARAM == 'No' or pd.isnull(PARAM)):
            warning_list.append('Input: ' + input_param + ' = ' + str(PARAM) +
                                ' in ' + Input_module + '/index:' +
                                str(ind_elem) + ' is Wrong!' +
                                'Only "Yes" or "No" accepted.')
            ERROR_IN_MODULE = True

    return ERROR_IN_MODULE, warning_list
def check_device(Input_DB, Input_module, warning_list):

    ERROR_IN_MODULE = False  # default value:

    for ind_elem, row in Input_DB.iterrows():

        input_param = 'type [-]'
        PARAM = Input_DB[input_param][ind_elem]
        if not (PARAM == 'fixed TEC' or PARAM == 'float TEC'
                or PARAM == 'float WEC' or PARAM == 'fixed WEC'):
            warning_list.append(
                'Input: ' + input_param + ' = ' + str(PARAM) + ' in ' +
                Input_module + '/index:' + str(ind_elem) + ' is Wrong! ' +
                'Only "fixed TEC" or "float TEC" or "float WEC" or "fixed WEC" accepted.'
            )
            ERROR_IN_MODULE = True

        input_param = 'length [m]'
        ERROR_IN_PARAM, warning_list = check_float_positive_null(
            Input_DB, ind_elem, input_param, Input_module, warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'width [m]'
        ERROR_IN_PARAM, warning_list = check_float_positive_null(
            Input_DB, ind_elem, input_param, Input_module, warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'height [m]'
        ERROR_IN_PARAM, warning_list = check_float_positive_null(
            Input_DB, ind_elem, input_param, Input_module, warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'dry mass [kg]'
        ERROR_IN_PARAM, warning_list = check_float_positive_null(
            Input_DB, ind_elem, input_param, Input_module, warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'sub system list [-]'
        ERROR_IN_PARAM, warning_list = check_unicode(Input_DB, ind_elem,
                                                     input_param, Input_module,
                                                     warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True


#        input_param = 'assembly strategy [-]'
#        PARAM = Input_DB[input_param][ind_elem]
#        # ERROR_IN_PARAM, warning_list = check_unicode(Input_DB, ind_elem, input_param, Input_module, warning_list)
#        if not (PARAM == '([A,B,C],D)' or PARAM == '([A,B,C,D])'):
#            warning_list.append( 'Input: ' + input_param + ' = ' + str(PARAM) + ' in ' + Input_module + '/index:' + str(ind_elem) + ' is Wrong! '
#                                 + 'Only "([A,B,C],D)" or "([A,B,C,D])" accepted.')
#            ERROR_IN_MODULE = True

        input_param = 'assembly duration [h]'
        ERROR_IN_PARAM, warning_list = check_float_positive_null(
            Input_DB, ind_elem, input_param, Input_module, warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'load out [-]'
        PARAM = Input_DB[input_param][ind_elem]
        if not (PARAM == 'skidded' or PARAM == 'trailer'
                or PARAM == 'float away' or PARAM == 'lift away'):
            warning_list.append(
                'Input: ' + input_param + ' = ' + str(PARAM) + ' in ' +
                Input_module + '/index:' + str(ind_elem) + ' is Wrong! ' +
                'Only "skidded" or "trailer" or "float away" or "lift away" accepted.'
            )
            ERROR_IN_MODULE = True

        input_param = 'transportation method [-]'
        PARAM = Input_DB[input_param][ind_elem]
        if not (PARAM == 'deck' or PARAM == 'tow'):
            warning_list.append('Input: ' + input_param + ' = ' + str(PARAM) +
                                ' in ' + Input_module + '/index:' +
                                str(ind_elem) + ' is Wrong! ' +
                                'Only "deck" or "tow" accepted.')
            ERROR_IN_MODULE = True

        input_param = 'bollard pull [t]'
        ERROR_IN_PARAM, warning_list = check_float_positive_null(
            Input_DB, ind_elem, input_param, Input_module, warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'connect duration [h]'
        ERROR_IN_PARAM, warning_list = check_float_positive_null(
            Input_DB, ind_elem, input_param, Input_module, warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'disconnect duration [h]'
        ERROR_IN_PARAM, warning_list = check_float_positive_null(
            Input_DB, ind_elem, input_param, Input_module, warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'max Hs [m]'
        ERROR_IN_PARAM, warning_list = check_float_positive_null(
            Input_DB, ind_elem, input_param, Input_module, warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'max Tp [s]'
        ERROR_IN_PARAM, warning_list = check_float_positive_null(
            Input_DB, ind_elem, input_param, Input_module, warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'max wind speed [m/s]'
        ERROR_IN_PARAM, warning_list = check_float_positive_null(
            Input_DB, ind_elem, input_param, Input_module, warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'max current speed [m/s]'
        ERROR_IN_PARAM, warning_list = check_float_positive_null(
            Input_DB, ind_elem, input_param, Input_module, warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

        input_param = 'Project start date [-]'
        ERROR_IN_PARAM, warning_list = check_unicode(Input_DB, ind_elem,
                                                     input_param, Input_module,
                                                     warning_list)
        if ERROR_IN_PARAM:
            ERROR_IN_MODULE = True

    return ERROR_IN_MODULE, warning_list