Skip to content

Instantly share code, notes, and snippets.

View aabbas90's full-sized avatar

Ahmed Abbas aabbas90

View GitHub Profile
import numpy as np
class ReplayBuffer:
def __init__(self, a = 1.0, b = 0.7):
self.keys = []
self.values = []
self.a = a
# b < 1.0 allows to sample near the max key more frequently.
# This allows to sample more trajectories where optimization is difficult, 1.0 will do uniform distribution.
self.b = b
# Adapted from https://github.com/cyang-kth/maximum-coverage-location
import numpy as np
from gurobipy import *
from numpy import random
from scipy.spatial import distance_matrix
import argparse
def mclp(points, sites, demands, B, radius):
print('----- Configurations -----')