Merge remote-tracking branch 'origin/master'

This commit is contained in:
Marco Zeisler 2021-06-17 22:44:54 +02:00
commit f56bb7c4e7
10 changed files with 19 additions and 16 deletions

View File

@ -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:

View File

@ -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)

View File

@ -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:

View File

@ -3,4 +3,4 @@ kind: ConfigMap
metadata: metadata:
name: scaling-configmap name: scaling-configmap
data: data:
scaling: "1" DSE2021_SCALING: "2"

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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