... | ... | @@ -139,91 +139,90 @@ Python: |
|
|
|
|
|
```Python
|
|
|
import json
|
|
|
from pprint import pprint
|
|
|
|
|
|
with open('config.json') as f:
|
|
|
data = json.load(f)
|
|
|
|
|
|
idMatch = data["map"]["id"]
|
|
|
id_match = data["map"]["id"]
|
|
|
steps = data["map"]["steps"]
|
|
|
mapMatch = data["map"]["map"]
|
|
|
minLon = data["map"]["minLon"]
|
|
|
maxLon = data["map"]["maxLon"]
|
|
|
minLat = data["map"]["minLat"]
|
|
|
maxLat = data["map"]["maxLat"]
|
|
|
centerLat = data["map"]["centerLat"]
|
|
|
centerLon = data["map"]["centerLon"]
|
|
|
map_match = data["map"]["map"]
|
|
|
min_lon = data["map"]["minLon"]
|
|
|
max_lon = data["map"]["maxLon"]
|
|
|
min_lat = data["map"]["minLat"]
|
|
|
max_lat = data["map"]["maxLat"]
|
|
|
center_lat = data["map"]["centerLat"]
|
|
|
center_lon = data["map"]["centerLon"]
|
|
|
proximity = data["map"]["proximity"]
|
|
|
randomSeed = data["map"]["randomSeed"]
|
|
|
goToCost = data["map"]["gotoCost"]
|
|
|
rechargeRate = data["map"]["rechargeRate"]
|
|
|
|
|
|
numCar = data["agents"]["car"]
|
|
|
numDrone = data["agents"]["drone"]
|
|
|
numBoat = data["agents"]["boat"]
|
|
|
|
|
|
speedDrone = data["roles"]["drone"]["speed"]
|
|
|
capPhysicalDrone = data["roles"]["drone"]["capacity_physical"]
|
|
|
capVirtualDrone = data["roles"]["drone"]["capacity_virtual"]
|
|
|
batteryDrone = data["roles"]["drone"]["battery"]
|
|
|
photoAbDrone = data["roles"]["drone"]["abilities"][0]
|
|
|
victimAbDrone = data["roles"]["drone"]["abilities"][1]
|
|
|
waterAbDrone = data["roles"]["drone"]["abilities"][2]
|
|
|
percieveDrone = data["roles"]["drone"]["percieve"]
|
|
|
kindDrone = data["roles"]["drone"]["kind"]
|
|
|
|
|
|
|
|
|
speedCar = data["roles"]["car"]["speed"]
|
|
|
capPhysicalCar = data["roles"]["car"]["capacity_physical"]
|
|
|
capVirtualCar = data["roles"]["car"]["capacity_virtual"]
|
|
|
batteryCar = data["roles"]["car"]["battery"]
|
|
|
photoAbCar = data["roles"]["car"]["abilities"][0]
|
|
|
victimAbCar = data["roles"]["car"]["abilities"][1]
|
|
|
waterAbCar = data["roles"]["car"]["abilities"][2]
|
|
|
percieveCar = data["roles"]["car"]["percieve"]
|
|
|
kindCar = data["roles"]["car"]["kind"]
|
|
|
|
|
|
|
|
|
speedBoat = data["roles"]["boat"]["speed"]
|
|
|
capPhysicalBoat = data["roles"]["boat"]["capacity_physical"]
|
|
|
capVirtualBoat = data["roles"]["boat"]["capacity_virtual"]
|
|
|
batteryBoat = data["roles"]["boat"]["battery"]
|
|
|
photoAbBoat = data["roles"]["boat"]["abilities"][0]
|
|
|
victimAbBoat = data["roles"]["boat"]["abilities"][1]
|
|
|
waterAbBoat = data["roles"]["boat"]["abilities"][2]
|
|
|
percieveBoat = data["roles"]["boat"]["percieve"]
|
|
|
kindBoat = data["roles"]["boat"]["kind"]
|
|
|
|
|
|
|
|
|
quadSize = data["generate"]["quadSize"]
|
|
|
floodProbability = data["generate"]["floodProbability"]
|
|
|
|
|
|
floodMinPeriod = data["generate"]["flood"]["minPeriod"]
|
|
|
floodMaxPeriod = data["generate"]["flood"]["maxPeriod"]
|
|
|
|
|
|
circleMinRad = data["generate"]["flood"]["circle"]["minRadius"]
|
|
|
circleMaxRad = data["generate"]["flood"]["circle"]["maxRadius"]
|
|
|
|
|
|
rectMinHeight = data["generate"]["flood"]["rectangle"]["minHeight"]
|
|
|
rectMaxHeight = data["generate"]["flood"]["rectangle"]["minHeight"]
|
|
|
rectMinLength = data["generate"]["flood"]["rectangle"]["minLength"]
|
|
|
rectMaxLength = data["generate"]["flood"]["rectangle"]["maxLength"]
|
|
|
|
|
|
photoSize = data["generate"]["photo"]["size"]
|
|
|
photoMinAmount = data["generate"]["photo"]["minAmount"]
|
|
|
photoMaxAmount = data["generate"]["photo"]["maxAmount"]
|
|
|
photoVictimProb = data["generate"]["photo"]["victimProbability"]
|
|
|
|
|
|
victimMinSize = data["generate"]["victim"]["minSize"]
|
|
|
victimMaxSize = data["generate"]["victim"]["maxSize"]
|
|
|
victimMinAmount = data["generate"]["victim"]["minAmount"]
|
|
|
victimMaxAmount = data["generate"]["victim"]["maxAmount"]
|
|
|
victimMinLifetime = data["generate"]["victim"]["minLifetime"]
|
|
|
victimMaxLifetime = data["generate"]["victim"]["maxLifetime"]
|
|
|
|
|
|
waterSampleSize = data["generate"]["waterSample"]["size"]
|
|
|
waterSampleMin = data["generate"]["waterSample"]["minAmount"]
|
|
|
WaterSampleMax = data["generate"]["waterSample"]["maxAmount"]
|
|
|
|
|
|
print(victimMinLifetime)
|
|
|
random_seed = data["map"]["randomSeed"]
|
|
|
go_to_cost = data["map"]["gotoCost"]
|
|
|
recharge_rate = data["map"]["rechargeRate"]
|
|
|
|
|
|
num_car = data["agents"]["car"]
|
|
|
num_drone = data["agents"]["drone"]
|
|
|
num_boat = data["agents"]["boat"]
|
|
|
|
|
|
speed_drone = data["roles"]["drone"]["speed"]
|
|
|
cap_physical_drone = data["roles"]["drone"]["capacity_physical"]
|
|
|
cap_virtual_drone = data["roles"]["drone"]["capacity_virtual"]
|
|
|
battery_drone = data["roles"]["drone"]["battery"]
|
|
|
photo_ab_drone = data["roles"]["drone"]["abilities"][0]
|
|
|
victim_ab_drone = data["roles"]["drone"]["abilities"][1]
|
|
|
water_ab_drone = data["roles"]["drone"]["abilities"][2]
|
|
|
percieve_drone = data["roles"]["drone"]["percieve"]
|
|
|
kind_drone = data["roles"]["drone"]["kind"]
|
|
|
|
|
|
|
|
|
speed_car = data["roles"]["car"]["speed"]
|
|
|
cap_physical_car = data["roles"]["car"]["capacity_physical"]
|
|
|
cap_virtual_car = data["roles"]["car"]["capacity_virtual"]
|
|
|
battery_car = data["roles"]["car"]["battery"]
|
|
|
photo_ab_car = data["roles"]["car"]["abilities"][0]
|
|
|
victim_ab_car = data["roles"]["car"]["abilities"][1]
|
|
|
water_ab_car = data["roles"]["car"]["abilities"][2]
|
|
|
percieve_car = data["roles"]["car"]["percieve"]
|
|
|
kind_car = data["roles"]["car"]["kind"]
|
|
|
|
|
|
|
|
|
speed_boat = data["roles"]["boat"]["speed"]
|
|
|
cap_physical_boat = data["roles"]["boat"]["capacity_physical"]
|
|
|
cap_virtual_boat = data["roles"]["boat"]["capacity_virtual"]
|
|
|
battery_boat = data["roles"]["boat"]["battery"]
|
|
|
photo_ab_boat = data["roles"]["boat"]["abilities"][0]
|
|
|
victim_ab_boat = data["roles"]["boat"]["abilities"][1]
|
|
|
water_ab_boat = data["roles"]["boat"]["abilities"][2]
|
|
|
percieve_boat = data["roles"]["boat"]["percieve"]
|
|
|
kind_boat = data["roles"]["boat"]["kind"]
|
|
|
|
|
|
|
|
|
quad_size = data["generate"]["quadSize"]
|
|
|
flood_probability = data["generate"]["floodProbability"]
|
|
|
|
|
|
flood_min_period = data["generate"]["flood"]["minPeriod"]
|
|
|
flood_max_period = data["generate"]["flood"]["maxPeriod"]
|
|
|
|
|
|
circle_min_rad = data["generate"]["flood"]["circle"]["minRadius"]
|
|
|
circle_max_rad = data["generate"]["flood"]["circle"]["maxRadius"]
|
|
|
|
|
|
rect_min_height = data["generate"]["flood"]["rectangle"]["minHeight"]
|
|
|
rect_max_height = data["generate"]["flood"]["rectangle"]["minHeight"]
|
|
|
rect_min_length = data["generate"]["flood"]["rectangle"]["minLength"]
|
|
|
rect_max_length = data["generate"]["flood"]["rectangle"]["maxLength"]
|
|
|
|
|
|
photo_size = data["generate"]["photo"]["size"]
|
|
|
photo_min_amount = data["generate"]["photo"]["minAmount"]
|
|
|
photo_max_amount = data["generate"]["photo"]["maxAmount"]
|
|
|
photo_victim_prob = data["generate"]["photo"]["victimProbability"]
|
|
|
|
|
|
victim_min_size = data["generate"]["victim"]["minSize"]
|
|
|
victim_max_size = data["generate"]["victim"]["maxSize"]
|
|
|
victim_min_amount = data["generate"]["victim"]["minAmount"]
|
|
|
victim_max_amount = data["generate"]["victim"]["maxAmount"]
|
|
|
victim_min_lifetime = data["generate"]["victim"]["minLifetime"]
|
|
|
victim_max_lifetime = data["generate"]["victim"]["maxLifetime"]
|
|
|
|
|
|
water_sample_size = data["generate"]["waterSample"]["size"]
|
|
|
water_sample_min = data["generate"]["waterSample"]["minAmount"]
|
|
|
water_sample_max = data["generate"]["waterSample"]["maxAmount"]
|
|
|
|
|
|
#print(quad_size)
|
|
|
``` |
|
|
\ No newline at end of file |