forked from kytai/hackmit2k18
-
Notifications
You must be signed in to change notification settings - Fork 0
/
user.js
45 lines (23 loc) · 831 Bytes
/
user.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import time
import math
//some comment2
var resource = userinput('What resource do you need?');
var location = userinput(address)
// for Google Maps API
function avg_transaction_rate(store, resource) {
rate = (resource[t] - resource[t-15])/(15)
console.log(rate)
}
function inventory_ct (resource, store) {
console.log(number from some database with key-pair [resource, store])
}
function inven_ct_at_arrival (inventory_ct, avg_transaction_rate) {
var arrival = inventory_ct - avg_transaction_rate*travel_times
}
var travel times = []
var localgs = []
localgs.append.googlemaps.find(local groceries stores within 25 mi)
for i in localgs[0] < i <= localgs[n] {
travel times.append.googlemaps.find(travel time)
} //paired with local grocery store
arrival => Decision Optimization API => displayed to user