Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
f56bb7c4e7
@ -1,6 +1,7 @@
|
|||||||
import pickle
|
import pickle
|
||||||
import threading
|
import threading
|
||||||
import time
|
import time
|
||||||
|
import os
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
from circuitbreaker import circuit
|
from circuitbreaker import circuit
|
||||||
@ -13,7 +14,7 @@ from pika.exceptions import AMQPConnectionError
|
|||||||
|
|
||||||
SWITCHING_TIME = 15
|
SWITCHING_TIME = 15
|
||||||
# Scale speed of switching by factor x
|
# Scale speed of switching by factor x
|
||||||
SCALING = 6
|
SCALING = int(os.environ['DSE2021_SCALING'])
|
||||||
|
|
||||||
|
|
||||||
class TrafficLight:
|
class TrafficLight:
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import pickle
|
import pickle
|
||||||
import threading
|
import threading
|
||||||
import time
|
import time
|
||||||
|
import os
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from typing import Union
|
from typing import Union
|
||||||
|
|
||||||
@ -19,7 +20,7 @@ STARTING_POINT = geopy.Point(47.89053, 16.20703)
|
|||||||
# Driving direction in degrees: 0=N, 90=E, 180=S, 270=W
|
# Driving direction in degrees: 0=N, 90=E, 180=S, 270=W
|
||||||
BEARING = 2
|
BEARING = 2
|
||||||
# Scale speed of vehicles by factor x
|
# Scale speed of vehicles by factor x
|
||||||
SCALING = 6
|
SCALING = int(os.environ['DSE2021_SCALING'])
|
||||||
# in km/h
|
# in km/h
|
||||||
STARTING_VELOCITY = 130 * SCALING
|
STARTING_VELOCITY = 130 * SCALING
|
||||||
# Interval between status updates in seconds (is not scaled)
|
# Interval between status updates in seconds (is not scaled)
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import datetime
|
import datetime
|
||||||
import pickle
|
import pickle
|
||||||
import sys
|
import sys
|
||||||
|
import os
|
||||||
from typing import List, Dict
|
from typing import List, Dict
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
from math import floor
|
from math import floor
|
||||||
@ -22,7 +23,7 @@ sys.modules['target_velocity'] = target_velocity
|
|||||||
|
|
||||||
ENTITY_IDENT_URL = 'http://entityident:5002/api/v1/resources/'
|
ENTITY_IDENT_URL = 'http://entityident:5002/api/v1/resources/'
|
||||||
|
|
||||||
SCALING = 6
|
SCALING = int(os.environ['DSE2021_SCALING'])
|
||||||
|
|
||||||
|
|
||||||
class Orchestrator:
|
class Orchestrator:
|
||||||
|
|||||||
@ -3,4 +3,4 @@ kind: ConfigMap
|
|||||||
metadata:
|
metadata:
|
||||||
name: scaling-configmap
|
name: scaling-configmap
|
||||||
data:
|
data:
|
||||||
scaling: "1"
|
DSE2021_SCALING: "2"
|
||||||
@ -23,11 +23,11 @@ spec:
|
|||||||
- containerPort: 80
|
- containerPort: 80
|
||||||
resources: {}
|
resources: {}
|
||||||
env:
|
env:
|
||||||
- name: SCALING
|
- name: DSE2021_SCALING
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: scaling-configmap
|
name: scaling-configmap
|
||||||
key: scaling
|
key: DSE2021_SCALING
|
||||||
restartPolicy: Always
|
restartPolicy: Always
|
||||||
serviceAccountName: ""
|
serviceAccountName: ""
|
||||||
volumes: null
|
volumes: null
|
||||||
|
|||||||
@ -23,11 +23,11 @@ spec:
|
|||||||
- containerPort: 5002
|
- containerPort: 5002
|
||||||
resources: {}
|
resources: {}
|
||||||
env:
|
env:
|
||||||
- name: SCALING
|
- name: DSE2021_SCALING
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: scaling-configmap
|
name: scaling-configmap
|
||||||
key: scaling
|
key: DSE2021_SCALING
|
||||||
restartPolicy: Always
|
restartPolicy: Always
|
||||||
serviceAccountName: ""
|
serviceAccountName: ""
|
||||||
volumes: null
|
volumes: null
|
||||||
|
|||||||
@ -23,11 +23,11 @@ spec:
|
|||||||
- containerPort: 5001
|
- containerPort: 5001
|
||||||
resources: {}
|
resources: {}
|
||||||
env:
|
env:
|
||||||
- name: SCALING
|
- name: DSE2021_SCALING
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: scaling-configmap
|
name: scaling-configmap
|
||||||
key: scaling
|
key: DSE2021_SCALING
|
||||||
restartPolicy: Always
|
restartPolicy: Always
|
||||||
serviceAccountName: ""
|
serviceAccountName: ""
|
||||||
volumes: null
|
volumes: null
|
||||||
|
|||||||
@ -21,11 +21,11 @@ spec:
|
|||||||
name: ifeed
|
name: ifeed
|
||||||
resources: {}
|
resources: {}
|
||||||
env:
|
env:
|
||||||
- name: SCALING
|
- name: DSE2021_SCALING
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: scaling-configmap
|
name: scaling-configmap
|
||||||
key: scaling
|
key: DSE2021_SCALING
|
||||||
restartPolicy: Always
|
restartPolicy: Always
|
||||||
serviceAccountName: ""
|
serviceAccountName: ""
|
||||||
volumes: null
|
volumes: null
|
||||||
|
|||||||
@ -21,11 +21,11 @@ spec:
|
|||||||
name: orchestration
|
name: orchestration
|
||||||
resources: {}
|
resources: {}
|
||||||
env:
|
env:
|
||||||
- name: SCALING
|
- name: DSE2021_SCALING
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: scaling-configmap
|
name: scaling-configmap
|
||||||
key: scaling
|
key: DSE2021_SCALING
|
||||||
restartPolicy: Always
|
restartPolicy: Always
|
||||||
serviceAccountName: ""
|
serviceAccountName: ""
|
||||||
volumes: null
|
volumes: null
|
||||||
|
|||||||
@ -23,11 +23,11 @@ spec:
|
|||||||
- containerPort: 5004
|
- containerPort: 5004
|
||||||
resources: {}
|
resources: {}
|
||||||
env:
|
env:
|
||||||
- name: SCALING
|
- name: DSE2021_SCALING
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: scaling-configmap
|
name: scaling-configmap
|
||||||
key: scaling
|
key: DSE2021_SCALING
|
||||||
restartPolicy: Always
|
restartPolicy: Always
|
||||||
serviceAccountName: ""
|
serviceAccountName: ""
|
||||||
volumes: null
|
volumes: null
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user