Skip to content
Open

. #2

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions Dijkstra.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# campus 폴더의 하위 항목인 songdo.py 파일과 sinchon.py 파일을 모듈로 임포트합니다.
from src.campus.songdo import NodeSongdo as Song_
from src.campus.sinchon import NodeSinchon as Sin_

#print(Song_)
#print(Sin_)
print("사용할 위치를 고르세요.")
print("1 : 신촌캠퍼스 2 : 국제캠퍼스")
place = input("숫자를 입력하세요 : ")

load = []
t = []

#신촌캠퍼스
if place == 1:
def search(dir, stops, end, time=0):
if Sin_[stops][1] > time:
Sin_[stops][1] = time
dir.append(stops)
else:
return '취소'
if stops == end:
load.append(dir)
t.append(time)
load[t.index(min(t))]
print(f'지나온 길 : {load[t.index(min(t))]}')
print(f'걸린 시간 : {round(min(t), 1)} 분')
return '도착'

for i in Sin_[stops][2]: # Song_[stops][2] = [['nodem', 57, 0], ['noden', 56, 0], ['nodes', 19, 0]] 요느낌
if i[2] > 0: # 오르막길->시간 더 걸림. 가중치 (i[2]*1.1)로 해봄. 상대높이가 24까지 있다해서
search(list(dir), i[0], end, (i[1] * 0.015) * i[2] * 1.1 + time) # i[0]은 'nodem', i[1] = 57(거리), i[2] = 0(높이) 의미
elif i[2] < 0: # 내리막길->시간 덜 걸림. 가중치 (-i[2]*0.9)로 해봄. 상대높이가 24까지 있다해서
search(list(dir), i[0], end, (i[1] * 0.015) * (-i[2]) * 0.9 + time)
else: # 평지. 가중치 없음
search(list(dir), i[0], end, (i[1] * 0.015) + time)


# 사람 속도 = 1000m 15분 적용.-> 1m 0.015분
# 여기에 상대 고도 고려해야함.

#송도캠퍼스
else:
def search(dir, stops, end, time=0):
if Song_[stops][1] > time:
Song_[stops][1] = time
dir.append(stops)
else:
return '취소'
if stops == end:
load.append(dir)
t.append(time)
load[t.index(min(t))]
print(f'지나온 길 : {load[t.index(min(t))]}')
print(f'걸린 시간 : {round(min(t), 1)} 분')
print(t, load)
return '도착'

for i in Song_[stops][2]: # Song_[stops][2] = [['nodem', 57, 0], ['noden', 56, 0], ['nodes', 19, 0]] 요느낌
if i[2] > 0: # 오르막길->시간 더 걸림. 가중치 (i[2]*1.1)로 해봄. 상대높이가 24까지 있다해서
search(list(dir), i[0], end,
(i[1] * 0.015) * i[2] * 1.1 + time) # i[0]은 'nodem', i[1] = 57(거리), i[2] = 0(높이) 의미
elif i[2] < 0: # 내리막길->시간 덜 걸림. 가중치 (-i[2]*0.9)로 해봄. 상대높이가 24까지 있다해서
search(list(dir), i[0], end, (i[1] * 0.015) * (-i[2]) * 0.9 + time)
else: # 평지. 가중치 없음
search(list(dir), i[0], end, (i[1] * 0.015) + time)


# 사람 속도 = 1000m 15분 적용.-> 1m 0.015분
# 여기에 상대 고도 고려해야함.

search([], 'Yplaza', 'YICfield')
search([], 'Yplaza', 'gatea')
search([], 'Futsal', 'gatea')
61 changes: 61 additions & 0 deletions Helpclose.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'Helpclose.ui'
#
# Created by: PyQt5 UI code generator 5.15.6
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.


from PyQt5 import QtCore, QtGui, QtWidgets


class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(320, 240)
MainWindow.setMinimumSize(QtCore.QSize(320, 240))
MainWindow.setMaximumSize(QtCore.QSize(320, 240))
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.gridLayoutWidget = QtWidgets.QWidget(self.centralwidget)
self.gridLayoutWidget.setGeometry(QtCore.QRect(10, 10, 301, 221))
self.gridLayoutWidget.setObjectName("gridLayoutWidget")
self.gridLayout = QtWidgets.QGridLayout(self.gridLayoutWidget)
self.gridLayout.setContentsMargins(0, 0, 0, 0)
self.gridLayout.setObjectName("gridLayout")
self.lineEdit = QtWidgets.QLineEdit(self.gridLayoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.lineEdit.sizePolicy().hasHeightForWidth())
self.lineEdit.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setFamily("Pretendard SemiBold")
self.lineEdit.setFont(font)
self.lineEdit.setFrame(False)
self.lineEdit.setAlignment(QtCore.Qt.AlignCenter)
self.lineEdit.setDragEnabled(False)
self.lineEdit.setReadOnly(True)
self.lineEdit.setObjectName("lineEdit")
self.gridLayout.addWidget(self.lineEdit, 0, 0, 1, 1)
MainWindow.setCentralWidget(self.centralwidget)

self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)

def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
self.lineEdit.setText(_translate("MainWindow", "이제 도움 없이도 잘 쓸 수 있겠나요?"))


if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.argv)
MainWindow = QtWidgets.QMainWindow()
ui = Ui_MainWindow()
ui.setupUi(MainWindow)
MainWindow.show()
sys.exit(app.exec_())
61 changes: 61 additions & 0 deletions Helpclose.ui
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>320</width>
<height>240</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>320</width>
<height>240</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>320</width>
<height>240</height>
</size>
</property>
<property name="windowTitle">
<string>MainWindow</string>
</property>
<widget class="QWidget" name="centralwidget">
<widget class="QWidget" name="gridLayoutWidget">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>301</width>
<height>221</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="font">
<font>
<family>Pretendard SemiBold</family>
<pointsize>15</pointsize>
</font>
</property>
<property name="text">
<string>이제 도움 없이도 잘 쓸 수 있겠나요?</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</widget>
<resources/>
<connections/>
</ui>
61 changes: 61 additions & 0 deletions Helphelp.ui
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>320</width>
<height>240</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>320</width>
<height>240</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>320</width>
<height>240</height>
</size>
</property>
<property name="windowTitle">
<string>MainWindow</string>
</property>
<widget class="QWidget" name="centralwidget">
<widget class="QWidget" name="gridLayoutWidget">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>301</width>
<height>221</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="font">
<font>
<family>Pretendard SemiBold</family>
<pointsize>15</pointsize>
</font>
</property>
<property name="text">
<string>도대체 얼마나 더 도움이 필요한가요?</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</widget>
<resources/>
<connections/>
</ui>
61 changes: 61 additions & 0 deletions Helpignore.ui
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>320</width>
<height>240</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>320</width>
<height>240</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>320</width>
<height>240</height>
</size>
</property>
<property name="windowTitle">
<string>MainWindow</string>
</property>
<widget class="QWidget" name="centralwidget">
<widget class="QWidget" name="gridLayoutWidget">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>301</width>
<height>221</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="font">
<font>
<family>Pretendard SemiBold</family>
<pointsize>15</pointsize>
</font>
</property>
<property name="text">
<string>제 호의를 무시하다니, 정말 못됐군요.</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</widget>
<resources/>
<connections/>
</ui>
25 changes: 0 additions & 25 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -45,31 +45,6 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

===============================================================================
Bokgithub
/
APTP2022
===============================================================================
Copyright (c) 2022 {팀명}

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

===============================================================================
everyparser.py
===============================================================================
Expand Down
Loading