Skip to content

Instantly share code, notes, and snippets.

💭
OpenSourcy

Pedro Camargo pedrocamargo

💭
OpenSourcy
View GitHub Profile
View Assigning from tnpm to reproduce error.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pedrocamargo
pedrocamargo / TSP with AequilibraE.ipynb
Created Mar 30, 2020
Using AequilibraE and Google OR-Tools to compute the TSP
View TSP with AequilibraE.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pedrocamargo
pedrocamargo / tnpm_parsing.py
Last active Mar 31, 2020
Parsing Networks in the TNPM format for consumption in AequilibraE
View tnpm_parsing.py
import aequilibrae
import os
import sys
import numpy as np
import pandas as pd
import openmatrix as omx
from aequilibrae.matrix import AequilibraeMatrix
data_folder = 'path/to/the/anaheim/folder'
@pedrocamargo
pedrocamargo / compassbearing.py
Created Apr 17, 2017 — forked from jeromer/compassbearing.py
compass bearing between two points in Python
View compassbearing.py
def calculate_initial_compass_bearing(pointA, pointB):
"""
Calculates the bearing between two points.
The formulae used is the following:
θ = atan2(sin(Δlong).cos(lat2),
cos(lat1).sin(lat2) − sin(lat1).cos(lat2).cos(Δlong))
:Parameters:
- `pointA: The tuple representing the latitude/longitude for the
You can’t perform that action at this time.