Ejemplo n.º 1
0
                                      skipinitialspace=True,
                                      sep=';',
                                      dtype={
                                          'VERSION': int,
                                          'LINE_NR': int,
                                          'STR_LINE_VAR': int,
                                          'LINE_DIR_NR': int,
                                          'LINE_NAME': str
                                      },
                                      index_col=3)

    # dates = [(2018, 11, 5), (2018, 11, 6), (2018, 11, 7), (2018, 11, 8), (2018, 11, 9), (2018, 11, 10), (2018, 11, 11)]
    dates = [(2018, 11, 8)]
    versionidVER = 21
    versionidHST = 10
    versionVER = Version(set_version.loc[versionidVER])
    stopsVER = readallstops(versionVER, rec_stop, rec_stop_area,
                            rec_stopping_points)
    versionHST = Version(set_version.loc[versionidHST])
    stopsHST = readallstops(versionHST, rec_stop, rec_stop_area,
                            rec_stopping_points)
    restrictions = {
        versionidVER: readrestrictions(service_restriction, versionVER),
        versionidHST: readrestrictions(service_restriction, versionHST)
    }

    lines = {
        45511:
        Line(versionVER, 45511, rec_lin_ber, lid_course, lid_travel_time_type,
             stopsVER),
        50510:
Ejemplo n.º 2
0
with open("C:/Users/kibaa/dino/dino/set_version.din", 'r') as verfile:
    set_version = pandas.read_csv(verfile,
                                  skipinitialspace=True,
                                  sep=';',
                                  dtype={
                                      'VERSION': int,
                                      'VERSION_TEXT': str,
                                      'TIMETABLE_PERIOD': str,
                                      'TT_PERIOD_NAME': str,
                                      'PERIOD_DATE_FROM': str,
                                      'PERIOD_DATE_TO': str,
                                      'NET_ID': str,
                                      'PERIOD_PRIORITY': int
                                  },
                                  index_col=0)
version = Version(set_version.loc[versionid])

with open("C:/Users/kibaa/dino/dino/rec_stop_area.din", 'r') as areafile:
    rec_stop_area = pandas.read_csv(areafile,
                                    skipinitialspace=True,
                                    sep=';',
                                    dtype={
                                        'VERSION': int,
                                        'STOP_NR': int,
                                        'STOP_AREA_NR': int,
                                        'STOP_AREA_NAME': str,
                                        'IFOPT': str
                                    })

with open("C:/Users/kibaa/dino/dino/rec_stopping_points.din", 'r') as platfile:
    rec_stopping_points = pandas.read_csv(platfile,
Ejemplo n.º 3
0
                                          'VERSION': int,
                                          'LINE_NR': int,
                                          'STR_LINE_VAR': int,
                                          'LINE_DIR_NR': int,
                                          'LINE_NAME': str
                                      },
                                      index_col=3)

    # dates = [(2018, 11, 5), (2018, 11, 6), (2018, 11, 7), (2018, 11, 8), (2018, 11, 9), (2018, 11, 10), (2018, 11, 11)]
    # dates = [(2018, 11, 8)]
    dates = [  #(2019, 3, 11), (2019, 3, 12), (2019, 3, 13), (2019, 3, 14), (2019, 3, 15), (2019, 3, 16), (2019, 3, 17),
        (2019, 5, 6), (2019, 5, 7), (2019, 5, 8), (2019, 5, 9), (2019, 5, 10),
        (2019, 5, 11), (2019, 5, 12)
    ]
    versionidHST = 9
    versionHST = Version(set_version.loc[versionidHST])
    stopsHST = readallstops(versionHST, rec_stop, rec_stop_area,
                            rec_stopping_points)
    restrictions = {
        versionidHST: readrestrictions(service_restriction, versionHST)
    }

    _lineids = (50510, 50521, 50542, 50903, 50931, 50932, 50047)
    lines = {
        _lineid: Line(versionHST, _lineid, rec_lin_ber, lid_course,
                      lid_travel_time_type, stopsHST)
        for _lineid in _lineids
    }

    linedatekm = {}
    for lineid in lines: