-
Notifications
You must be signed in to change notification settings - Fork 0
/
global_parameters.py
50 lines (44 loc) · 1.28 KB
/
global_parameters.py
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# import tensorflow as tf
import numpy as np
### True if network structure wanted, False otherwise ###
OUTPUT_GRAPH = False
### The directory storing the log file of the network (shown in tensorboard) ###
LOG_DIR = './network_log'
### The name of the global_net ###
GLOBAL_NET_SCOPE = 'Global_Net'
### A_BOUND = [low, high] ###
A_BOUND = []
MAX_DETOUR_TIME = 25
GRID_NUMS = 265
REQUEST_NUMS = 3000
VEHICLES_NUMS = 6312 # 13,586
TOTAL_VEHICLES_NUMS = 10000
global_dict = {'SESS':None,
'OPT_A':None,
'OPT_C':None,
'GlOBAL_RUNNING_R':[],
'GLOBAL_EP':0,
'COORD':None,
'DATA':None,
'REQUESTS':None,
'VEHICLES':None,
'request_all':None,
'vehicle_serve':None,
'travel_time':None,
'fare':None,
'shortest_dis':None,
'predecessors':None,
}
def set_value(name, value):
global global_dict
if name not in global_dict.keys():
print('Set value error: undefined key')
return
global_dict[name] = value
def get_value(name, defValue=None):
try:
return global_dict[name]
except KeyError:
return defValue