Skip to content

Commit

Permalink
View y model
Browse files Browse the repository at this point in the history
  • Loading branch information
Juan-David-Obando-Novoa committed Nov 16, 2022
1 parent 0fe5fe6 commit 9786e7f
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
6 changes: 3 additions & 3 deletions App/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def searchPaths(analyzer, initialStation, searchMethod):
todas las otras estaciones del sistemas
"""
# TODO Lab 11, conectar con la funcion del model searchPaths
return None
return model.searchPaths(analyzer,initialStation, searchMethod)


def hasSearchPath(analyzer, destStation, searchMethod):
Expand All @@ -143,15 +143,15 @@ def hasSearchPath(analyzer, destStation, searchMethod):
el metodo de busqueda ("bfs" o "dfs")
"""
# TODO Lab 11, conectar con la funcion del model hasSearchPath
return None
return model.hasSearchPath(analyzer,destStation, searchMethod)


def searchPathTo(analyzer, destStation, searchMethod):
"""
Retorna el camino de busqueda entre initialStation y destStation
"""
# TODO Lab 11, conectar con la funcion del model searchPath
return None
return model.searchPathTo(analyzer, destStation, searchMethod )


def servedRoutes(analyzer):
Expand Down
1 change: 1 addition & 0 deletions App/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ def searchPaths(analyzer, initialStation, method):
"""
# TODO Lab 11, ejectutar DepthFirstSearch de dfs
if method == "dfs":

pass
# TODO Lab 11, ejectutar BreadhtFisrtSearch de bfs
elif method == "bfs":
Expand Down
19 changes: 17 additions & 2 deletions App/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ def optionFour(cont, initialStation):


def optionFive(cont, initialStation, searchMethod):
print("estacion base")
print("Calculando caminos de busqueda con " + searchMethod)
path= controller.searchPaths(cont,initialStation, searchMethod)
print(path)
print("Fin")
# TODO Lab 11, conectar con la funcion del controller searchPaths
pass

Expand Down Expand Up @@ -125,15 +130,17 @@ def optionEight(cont):

def optionNine(cont, destStation, searchMethod):
# TODO Lab 11, conectar con la funcion del controller hasSearchPath
haspath= controller.hasSearchPath(cont, destStation, searchMethod )
haspath = None
print(haspath)


def optionTen(cont, destStation, searchMethod):
# TODO Lab 11, conectar con la funcion del controller searchPath
path = None
path= controller.searchPaths(cont, destStation, searchMethod)
if path is not None:
pass
print(path)
else:
print('No hay camino')

Expand Down Expand Up @@ -166,7 +173,11 @@ def thread_cycle():

elif int(inputs) == 5:
# TODO Lab 11, completar inputs opt 5, searchMethod, initialStation
pass
searchMethod= input("Seleccione dfs o bfs como algoritmo: " )
msg="Estacion Base. busStopCode-ServiceNo (Ej: 75009-10): "
initialStation= input(msg)
optionFive(cont, initialStation, searchMethod)


elif int(inputs) == 6:
destStation = input("Estación destino (Ej: 15151-10): ")
Expand All @@ -180,10 +191,14 @@ def thread_cycle():
optionEight(cont)

elif int(inputs) == 9:
destStation= input(" Estación destino (EJ: 15151-10): ")
optionNine(cont, destStation, searchMethod)
# TODO Lab 11, completar inputs opt 9, destStation
pass

elif int(inputs) == 10:
destStation= input("Estación destino(Ej:15151-10): ")
optionTen(cont,destStation, searchMethod)
# TODO Lab 11, completar inputs opt 10, destStation
pass

Expand Down

0 comments on commit 9786e7f

Please sign in to comment.