diff --git a/README.md b/README.md index 8c131b0..0e31046 100644 --- a/README.md +++ b/README.md @@ -53,11 +53,10 @@ Optimize a 365-day schedule with at most 2 visits per day and minimum gap constr 其中 `lat0` 可取所有站点纬度均值(单位:英里)。若仅需相对距离,也可用 `|lat_i - lat_j| + |lon_i - lon_j|` 作为无量纲近似。 具体配对流程(可直接脚本化): - - **距离筛选**:对每个站点 `i`,计算与所有 `j != i` 的 `d_ij`,保留 `d_ij <= d_max` - 或取 `k` 个最近邻(如 `k=5~8`),得到近邻集合 `N(i)`。 - - **需求均衡筛选**:对候选 `(i, j)`,要求 - `mu_i / mu_j` 处于区间 `[r_min, r_max]`(如 `[0.5, 2.0]`), - 或 `|mu_i - mu_j| <= delta_mu`,避免极端失衡导致第二站缺货。 + - **距离筛选**:对每个站点 `i`,计算与所有 `j != i` 的 `d_ij`,取 `k` 个最近邻 + (默认 `k=6`),得到近邻集合 `N(i)`。 + - **运载量筛选**:对候选 `(i, j)`,要求 `mu_i + mu_j <= 250` + (将每次访问的平均客户数视为需求均值),确保双站总需求不超过单车载量。 - **波动风险筛选**:若 `sigma_i` 或 `sigma_j` 过大(如 `sigma / mu > 0.5`), 则优先作为第二站(或直接剔除)以降低不确定性风险。 - **最终候选集**:`P = {(i, j) | j in N(i) 且满足需求/波动筛选}`, @@ -97,3 +96,26 @@ Optimize a 365-day schedule with at most 2 visits per day and minimum gap constr - **动态修正**:若某站点连续出现“后站不足”,在后续排程中降低其作为第一站的概率或提高 `q_i` 分位数阈值。 该方案与当前脚本兼容:`kmin_effectiveness.py` 提供需求统计与 Monte Carlo 框架;`scheduling_optimization.py` 的 CP-SAT 可扩展为“单站/双站二选一”的排程模型。 + +### 候选配对生成脚本 + +- `python3 candidate_pairs.py --k 6 --capacity 250` +- 输出:`data/candidate_pairs_k6_cap250.csv` + +### 第一站分配量优化脚本 + +- `python3 two_stop_allocation.py --input data/candidate_pairs_k6_cap250.csv` +- 输出:`data/ordered_pairs_allocation_k6_cap250.csv` +- 说明:对每个无序候选对生成 `(i -> j)` 与 `(j -> i)` 两条有序记录,并用 Monte Carlo + 在 `q_i ∈ [0, C]` 上搜索最优第一站分配量。 + +### Task 3 频次分配(双站合并出车) + +- `python3 p3_kmin.py --input-pairs data/ordered_pairs_allocation_k6_cap250.csv` +- 输出: + - `data/p3_kmin_data.csv`:扫 `k_min` 的有效性/公平性指标 + 出车统计 + - `data/p3_kmin_sites.csv`:每站单独次数/双站次数统计 + - `data/p3_kmin_pairs.csv`:有序双站出车次数 + 第一站上限 `q_opt` + - `data/p3_kmin_effectiveness.png`:Task 3 的 `k_min` 指标曲线图 + +![p3 kmin effectiveness](data/p3_kmin_effectiveness.png) diff --git a/candidate_pairs.py b/candidate_pairs.py new file mode 100644 index 0000000..3811d07 --- /dev/null +++ b/candidate_pairs.py @@ -0,0 +1,153 @@ +""" +Generate candidate two-stop site pairs using k-nearest Manhattan distance +and a capacity filter on average demand. +""" + +from __future__ import annotations + +import argparse +import os +from typing import Dict, List, Tuple + +import numpy as np +import pandas as pd + + +DEFAULT_INPUT = "prob/MFP Regular Sites 2019.xlsx" +DEFAULT_OUTPUT = "data/candidate_pairs_k6_cap250.csv" + + +def _find_col(df: pd.DataFrame, candidates: List[str]) -> str: + for name in candidates: + if name in df.columns: + return name + lower_map = {c.lower(): c for c in df.columns} + for name in candidates: + key = name.lower() + if key in lower_map: + return lower_map[key] + raise ValueError(f"Missing required column. Tried: {candidates}") + + +def _load_sites(path: str) -> pd.DataFrame: + df = pd.read_excel(path) + + col_site = _find_col(df, ["Site Name", "site name", "site"]) + col_lat = _find_col(df, ["latitude", "lat"]) + col_lon = _find_col(df, ["longitude", "lon", "lng"]) + col_mu = _find_col(df, ["Average Demand per Visit", "average demand per visit", "avg demand"]) + col_sigma = _find_col( + df, ["StDev(Demand per Visit)", "stdev(demand per visit)", "stdev", "std"] + ) + + out = df[[col_site, col_lat, col_lon, col_mu, col_sigma]].copy() + out.columns = ["site_name", "latitude", "longitude", "mu", "sigma"] + + out["latitude"] = pd.to_numeric(out["latitude"], errors="coerce") + out["longitude"] = pd.to_numeric(out["longitude"], errors="coerce") + out["mu"] = pd.to_numeric(out["mu"], errors="coerce") + out["sigma"] = pd.to_numeric(out["sigma"], errors="coerce").fillna(0.0) + + if out[["latitude", "longitude", "mu"]].isna().any().any(): + missing = out[out[["latitude", "longitude", "mu"]].isna().any(axis=1)] + raise ValueError(f"Missing lat/lon/mu for {len(missing)} rows.") + + out = out.reset_index(drop=True) + out["site_idx"] = np.arange(1, len(out) + 1, dtype=int) + return out + + +def _manhattan_miles(lat: np.ndarray, lon: np.ndarray) -> np.ndarray: + lat0 = float(np.mean(lat)) + lat_scale = 69.0 + lon_scale = 69.0 * float(np.cos(np.deg2rad(lat0))) + + dlat = np.abs(lat[:, None] - lat[None, :]) * lat_scale + dlon = np.abs(lon[:, None] - lon[None, :]) * lon_scale + dist = dlat + dlon + np.fill_diagonal(dist, np.inf) + return dist + + +def generate_pairs( + df: pd.DataFrame, + *, + k: int, + capacity: float, +) -> pd.DataFrame: + if k <= 0: + raise ValueError("k must be > 0") + + lat = df["latitude"].to_numpy(dtype=float) + lon = df["longitude"].to_numpy(dtype=float) + mu = df["mu"].to_numpy(dtype=float) + sigma = df["sigma"].to_numpy(dtype=float) + + dist = _manhattan_miles(lat, lon) + + pair_rows: List[Dict[str, float]] = [] + seen: set[Tuple[int, int]] = set() + + for i in range(len(df)): + nn_idx = np.argsort(dist[i])[:k] + for j in nn_idx: + if mu[i] + mu[j] > capacity: + continue + a, b = (i, j) if i < j else (j, i) + if (a, b) in seen: + continue + seen.add((a, b)) + + mu_a = float(mu[a]) + mu_b = float(mu[b]) + sigma_a = float(sigma[a]) + sigma_b = float(sigma[b]) + ratio = mu_a / mu_b if mu_b > 0 else np.inf + + pair_rows.append( + { + "site_i_idx": int(df.loc[a, "site_idx"]), + "site_i_name": df.loc[a, "site_name"], + "site_j_idx": int(df.loc[b, "site_idx"]), + "site_j_name": df.loc[b, "site_name"], + "distance_miles": float(dist[a, b]), + "lat_i": float(lat[a]), + "lon_i": float(lon[a]), + "lat_j": float(lat[b]), + "lon_j": float(lon[b]), + "mu_i": mu_a, + "sigma_i": sigma_a, + "mu_j": mu_b, + "sigma_j": sigma_b, + "sum_mu": mu_a + mu_b, + "mu_ratio": ratio, + "sum_sigma": sigma_a + sigma_b, + } + ) + + out = pd.DataFrame(pair_rows) + if len(out) > 0: + out = out.sort_values(["distance_miles", "sum_mu"]).reset_index(drop=True) + return out + + +def main() -> None: + parser = argparse.ArgumentParser( + description="Generate candidate two-stop site pairs from MFP dataset." + ) + parser.add_argument("--input", default=DEFAULT_INPUT) + parser.add_argument("--k", type=int, default=6, help="k nearest neighbors per site.") + parser.add_argument("--capacity", type=float, default=250.0) + parser.add_argument("--output", default=DEFAULT_OUTPUT) + args = parser.parse_args() + + df = _load_sites(args.input) + pairs = generate_pairs(df, k=args.k, capacity=args.capacity) + + os.makedirs(os.path.dirname(args.output), exist_ok=True) + pairs.to_csv(args.output, index=False) + print(f"Saved {len(pairs)} candidate pairs to {args.output}") + + +if __name__ == "__main__": + main() diff --git a/data/candidate_pairs_k6_cap250.csv b/data/candidate_pairs_k6_cap250.csv new file mode 100644 index 0000000..99a6752 --- /dev/null +++ b/data/candidate_pairs_k6_cap250.csv @@ -0,0 +1,117 @@ +site_i_idx,site_i_name,site_j_idx,site_j_name,distance_miles,lat_i,lon_i,lat_j,lon_j,mu_i,sigma_i,mu_j,sigma_j,sum_mu,mu_ratio,sum_sigma +37,MFP Senior - Bragg,38,MFP Senior - Carpenter Apartments,0.26343727419097573,42.0896598,-76.7977954,42.0930065,-76.7984317,66.88888888888889,6.03001750504186,31.09090909090909,6.75950509215793,97.97979797979798,2.151397011046134,12.78952259719979 +19,MFP First Assembly Of God Church,52,MFP Senior - Metro Plaza Apartments,0.26603540683023114,42.1022814,-75.9129518,42.1016977,-75.9085338,146.0,21.6459108042479,56.3,19.9167712689024,202.3,2.5932504440497337,41.5626820731503 +33,MFP Saint Mary Recreation Center,52,MFP Senior - Metro Plaza Apartments,0.41906667521229546,42.0988789,-75.9041391,42.1016977,-75.9085338,148.3,59.8313370140505,56.3,19.9167712689024,204.60000000000002,2.6341030195381885,79.7481082829529 +52,MFP Senior - Metro Plaza Apartments,53,MFP Senior - North Shore Towers,0.44560068880224146,42.1016977,-75.9085338,42.0966132,-75.9103884,56.3,19.9167712689024,58.333333333333336,6.86051504383355,114.63333333333333,0.9651428571428571,26.777286312735953 +50,MFP Senior - Lincoln Court,53,MFP Senior - North Shore Towers,0.4510672532235281,42.090217,-75.910198,42.0966132,-75.9103884,26.0,4.89897948556636,58.333333333333336,6.86051504383355,84.33333333333334,0.4457142857142857,11.759494529399909 +33,MFP Saint Mary Recreation Center,53,MFP Senior - North Shore Towers,0.4756729640145355,42.0988789,-75.9041391,42.0966132,-75.9103884,148.3,59.8313370140505,58.333333333333336,6.86051504383355,206.63333333333335,2.5422857142857143,66.69185205788405 +35,MFP Schuyler Outreach,49,MFP Senior - Jefferson Village,0.4835250933346896,42.3770866,-76.8698425,42.3829923,-76.8713304,138.85714285714286,21.5362374571215,24.818181818181817,2.78633026822672,163.67532467532467,5.59497645211931,24.32256772534822 +19,MFP First Assembly Of God Church,53,MFP Senior - North Shore Towers,0.5220957180283179,42.1022814,-75.9129518,42.0966132,-75.9103884,146.0,21.6459108042479,58.333333333333336,6.86051504383355,204.33333333333334,2.5028571428571427,28.50642584808145 +50,MFP Senior - Lincoln Court,52,MFP Senior - Metro Plaza Apartments,0.8772090355783712,42.090217,-75.910198,42.1016977,-75.9085338,26.0,4.89897948556636,56.3,19.9167712689024,82.3,0.4618117229129663,24.815750754468763 +33,MFP Saint Mary Recreation Center,50,MFP Senior - Lincoln Court,0.9072813107906652,42.0988789,-75.9041391,42.090217,-75.910198,148.3,59.8313370140505,26.0,4.89897948556636,174.3,5.703846153846154,64.73031649961686 +37,MFP Senior - Bragg,47,MFP Senior - Flannery,0.9136830730627137,42.0896598,-76.7977954,42.0819957,-76.8053269,66.88888888888889,6.03001750504186,61.72727272727273,10.1103007778296,128.6161616161616,1.0836197021764031,16.140318282871462 +45,"MFP Senior - Elizabeth Square, Waverly",56,MFP Senior - Springview Apartments,0.9595184075407899,42.001546,-76.541203,42.0100399,-76.533895,29.0,9.67658842962558,27.583333333333332,9.31722094084958,56.58333333333333,1.0513595166163143,18.993809370475162 +19,MFP First Assembly Of God Church,50,MFP Senior - Lincoln Court,0.973162971251846,42.1022814,-75.9129518,42.090217,-75.910198,146.0,21.6459108042479,26.0,4.89897948556636,172.0,5.615384615384615,26.544890289814262 +20,MFP Lamphear Court,59,MFP Senior - Village Square/Manor,1.038358516439775,42.1598551,-77.0711389,42.159804,-77.09139,126.0,40.6803255750109,34.25,6.48249390842192,160.25,3.678832116788321,47.16281948343282 +26,MFP Owego VFW,51,MFP Senior - Long Meadow Senior Housing,1.084296011715769,42.1043411,-76.2615965,42.1135325,-76.2704045,176.25,34.285234033433,34.75,13.0043698949098,211.0,5.071942446043166,47.2896039283428 +38,MFP Senior - Carpenter Apartments,47,MFP Senior - Flannery,1.1120903988719573,42.0930065,-76.7984317,42.0819957,-76.8053269,31.09090909090909,6.75950509215793,61.72727272727273,10.1103007778296,92.81818181818181,0.5036818851251841,16.86980586998753 +12,MFP College Ithaca College,57,MFP Senior - Titus Towers,1.2126342142593374,42.4199351,-76.4969643,42.4317058,-76.504801,138.33333333333334,66.1418929272515,72.8,4.31534728871525,211.13333333333333,1.9001831501831503,70.45724021596675 +20,MFP Lamphear Court,42,MFP Senior - Corning Senior Center,1.2156460766066033,42.1598551,-77.0711389,42.1490255,-77.0619725,126.0,40.6803255750109,75.0,30.9636884107821,201.0,1.68,71.644013985793 +1,MFP American Legion - Binghamton,44,MFP Senior - East Hill Senior Living,1.2264929609690354,42.108036,-75.887779,42.1141777,-75.8720703,200.1818181818182,46.0669473306365,39.833333333333336,2.16724933890169,240.01515151515153,5.02548497527577,48.23419666953819 +21,MFP Lansing,61,MFP Senior - Woodsedge Apartments,1.2874023513887627,42.5183206,-76.5035538,42.535151,-76.501086,181.0,23.2937759927411,17.2,4.23739962188552,198.2,10.523255813953488,27.53117561462662 +48,MFP Senior - Harry L Apartments,60,MFP Senior - Wells Apartments,1.3192042503486914,42.1237339,-75.9567565,42.1076045,-75.9607932,32.833333333333336,6.24232862533419,23.5,4.55216676124922,56.333333333333336,1.397163120567376,10.79449538658341 +42,MFP Senior - Corning Senior Center,43,MFP Senior - Dayspring,1.3231815462029837,42.1490255,-77.0619725,42.1420715,-77.0454685,75.0,30.9636884107821,77.18181818181819,17.9489174148091,152.1818181818182,0.9717314487632508,48.9126058255912 +39,MFP Senior - Cayuga Meadows,41,MFP Senior - Conifer Village,1.366052046263474,42.464569,-76.5409393,42.4511294,-76.5323538,25.88888888888889,3.33333333333333,33.8,10.3794669098819,59.68888888888888,0.7659434582511506,13.71280024321523 +6,MFP Boys and Girls Club,50,MFP Senior - Lincoln Court,1.6176038361456346,42.1053841,-75.9213736,42.090217,-75.910198,210.8,52.3551971313896,26.0,4.89897948556636,236.8,8.107692307692307,57.25417661695596 +5,MFP Birnie Transportation Services,59,MFP Senior - Village Square/Manor,1.8200361709161552,42.172309,-77.1101217,42.159804,-77.09139,213.375,53.4039525021991,34.25,6.48249390842192,247.625,6.2299270072992705,59.88644641062102 +6,MFP Boys and Girls Club,60,MFP Senior - Wells Apartments,2.1675518976919204,42.1053841,-75.9213736,42.1076045,-75.9607932,210.8,52.3551971313896,23.5,4.55216676124922,234.3,8.970212765957447,56.90736389263882 +42,MFP Senior - Corning Senior Center,59,MFP Senior - Village Square/Manor,2.2469527930463364,42.1490255,-77.0619725,42.159804,-77.09139,75.0,30.9636884107821,34.25,6.48249390842192,109.25,2.18978102189781,37.44618231920402 +34,MFP Salvation Army Ithaca,41,MFP Senior - Conifer Village,2.3330238989813528,42.4398066,-76.5019869,42.4511294,-76.5323538,181.1818181818182,39.5848915163808,33.8,10.3794669098819,214.9818181818182,5.360408821947284,49.9643584262627 +34,MFP Salvation Army Ithaca,46,MFP Senior - Ellis Hollow,2.3921824800166336,42.4398066,-76.5019869,42.435955,-76.460374,181.1818181818182,39.5848915163808,24.727272727272727,13.8064543536051,205.9090909090909,7.327205882352942,53.3913458699859 +20,MFP Lamphear Court,43,MFP Senior - Dayspring,2.5388276228095874,42.1598551,-77.0711389,42.1420715,-77.0454685,126.0,40.6803255750109,77.18181818181819,17.9489174148091,203.1818181818182,1.6325088339222613,58.62924298982 +46,MFP Senior - Ellis Hollow,57,MFP Senior - Titus Towers,2.5634175854556234,42.435955,-76.460374,42.4317058,-76.504801,24.727272727272727,13.8064543536051,72.8,4.31534728871525,97.52727272727273,0.33966033966033965,18.12180164232035 +33,MFP Saint Mary Recreation Center,44,MFP Senior - East Hill Senior Living,2.694335107177977,42.0988789,-75.9041391,42.1141777,-75.8720703,148.3,59.8313370140505,39.833333333333336,2.16724933890169,188.13333333333335,3.723012552301255,61.99858635295219 +44,MFP Senior - East Hill Senior Living,52,MFP Senior - Metro Plaza Apartments,2.724407382390271,42.1141777,-75.8720703,42.1016977,-75.9085338,39.833333333333336,2.16724933890169,56.3,19.9167712689024,96.13333333333333,0.7075192421551214,22.084020607804092 +41,MFP Senior - Conifer Village,57,MFP Senior - Titus Towers,2.748178393541912,42.4511294,-76.5323538,42.4317058,-76.504801,33.8,10.3794669098819,72.8,4.31534728871525,106.6,0.46428571428571425,14.69481419859715 +19,MFP First Assembly Of God Church,60,MFP Senior - Wells Apartments,2.8119927625857093,42.1022814,-75.9129518,42.1076045,-75.9607932,146.0,21.6459108042479,23.5,4.55216676124922,169.5,6.212765957446808,26.198077565497123 +19,MFP First Assembly Of God Church,44,MFP Senior - East Hill Senior Living,2.909892189220507,42.1022814,-75.9129518,42.1141777,-75.8720703,146.0,21.6459108042479,39.833333333333336,2.16724933890169,185.83333333333334,3.6652719665271962,23.81316014314959 +12,MFP College Ithaca College,46,MFP Senior - Ellis Hollow,2.9751399711972084,42.4199351,-76.4969643,42.435955,-76.460374,138.33333333333334,66.1418929272515,24.727272727272727,13.8064543536051,163.06060606060606,5.5943627450980395,79.94834728085661 +6,MFP Boys and Girls Club,48,MFP Senior - Harry L Apartments,3.07420484734281,42.1053841,-75.9213736,42.1237339,-75.9567565,210.8,52.3551971313896,32.833333333333336,6.24232862533419,243.63333333333335,6.420304568527919,58.59752575672379 +52,MFP Senior - Metro Plaza Apartments,60,MFP Senior - Wells Apartments,3.07802816941594,42.1016977,-75.9085338,42.1076045,-75.9607932,56.3,19.9167712689024,23.5,4.55216676124922,79.8,2.3957446808510636,24.46893803015162 +44,MFP Senior - East Hill Senior Living,53,MFP Senior - North Shore Towers,3.1700080711925125,42.1141777,-75.8720703,42.0966132,-75.9103884,39.833333333333336,2.16724933890169,58.333333333333336,6.86051504383355,98.16666666666667,0.6828571428571428,9.027764382735239 +53,MFP Senior - North Shore Towers,60,MFP Senior - Wells Apartments,3.334088480614027,42.0966132,-75.9103884,42.1076045,-75.9607932,58.333333333333336,6.86051504383355,23.5,4.55216676124922,81.83333333333334,2.4822695035460995,11.41268180508277 +38,MFP Senior - Carpenter Apartments,58,MFP Senior - Villa Serene,3.413257608083184,42.0930065,-76.7984317,42.1295916,-76.8158267,31.09090909090909,6.75950509215793,69.72727272727273,5.0614406860282,100.81818181818183,0.4458930899608865,11.820945778186129 +47,MFP Senior - Flannery,55,MFP Senior - Park Terrace Congregate Apartments,3.525334028702802,42.0819957,-76.8053269,42.051364,-76.832954,61.72727272727273,10.1103007778296,24.363636363636363,4.41073071662117,86.0909090909091,2.533582089552239,14.52103149445077 +43,MFP Senior - Dayspring,59,MFP Senior - Village Square/Manor,3.57013433924932,42.1420715,-77.0454685,42.159804,-77.09139,77.18181818181819,17.9489174148091,34.25,6.48249390842192,111.43181818181819,2.2534837425348377,24.431411323231018 +37,MFP Senior - Bragg,58,MFP Senior - Villa Serene,3.67669488227416,42.0896598,-76.7977954,42.1295916,-76.8158267,66.88888888888889,6.03001750504186,69.72727272727273,5.0614406860282,136.6161616161616,0.9592930609879761,11.09145819107006 +34,MFP Salvation Army Ithaca,39,MFP Senior - Cayuga Meadows,3.699075945244827,42.4398066,-76.5019869,42.464569,-76.5409393,181.1818181818182,39.5848915163808,25.88888888888889,3.33333333333333,207.07070707070707,6.998439328911432,42.91822484971413 +19,MFP First Assembly Of God Church,48,MFP Senior - Harry L Apartments,3.7186457122365986,42.1022814,-75.9129518,42.1237339,-75.9567565,146.0,21.6459108042479,32.833333333333336,6.24232862533419,178.83333333333334,4.446700507614213,27.888239429582093 +47,MFP Senior - Flannery,58,MFP Senior - Villa Serene,3.820657609211378,42.0819957,-76.8053269,42.1295916,-76.8158267,61.72727272727273,10.1103007778296,69.72727272727273,5.0614406860282,131.45454545454547,0.8852672750977835,15.1717414638578 +12,MFP College Ithaca College,41,MFP Senior - Conifer Village,3.960812607801249,42.4199351,-76.4969643,42.4511294,-76.5323538,138.33333333333334,66.1418929272515,33.8,10.3794669098819,172.13333333333333,4.092702169625247,76.5213598371334 +14,MFP Conklin- Maines Community Center,44,MFP Senior - East Hill Senior Living,3.9695434147851723,42.0870901,-75.8309647,42.1141777,-75.8720703,153.16666666666666,20.1125620325993,39.833333333333336,2.16724933890169,193.0,3.845188284518828,22.27981137150099 +48,MFP Senior - Harry L Apartments,52,MFP Senior - Metro Plaza Apartments,3.98468111906683,42.1237339,-75.9567565,42.1016977,-75.9085338,32.833333333333336,6.24232862533419,56.3,19.9167712689024,89.13333333333333,0.5831853167554767,26.15909989423659 +39,MFP Senior - Cayuga Meadows,57,MFP Senior - Titus Towers,4.114230439805386,42.464569,-76.5409393,42.4317058,-76.504801,25.88888888888889,3.33333333333333,72.8,4.31534728871525,98.68888888888888,0.35561660561660563,7.64868062204858 +14,MFP Conklin- Maines Community Center,50,MFP Senior - Lincoln Court,4.264583232754312,42.0870901,-75.8309647,42.090217,-75.910198,153.16666666666666,20.1125620325993,26.0,4.89897948556636,179.16666666666666,5.8910256410256405,25.01154151816566 +24,MFP Montour Falls-Schuyler County Human Services Complex,49,MFP Senior - Jefferson Village,4.433762697674371,42.3409968,-76.8412703,42.3829923,-76.8713304,149.36363636363637,60.0387753493902,24.818181818181817,2.78633026822672,174.1818181818182,6.018315018315019,62.82510561761692 +37,MFP Senior - Bragg,55,MFP Senior - Park Terrace Congregate Apartments,4.439017101765515,42.0896598,-76.7977954,42.051364,-76.832954,66.88888888888889,6.03001750504186,24.363636363636363,4.41073071662117,91.25252525252525,2.745439469320066,10.440748221663029 +38,MFP Senior - Carpenter Apartments,55,MFP Senior - Park Terrace Congregate Apartments,4.637424427574759,42.0930065,-76.7984317,42.051364,-76.832954,31.09090909090909,6.75950509215793,24.363636363636363,4.41073071662117,55.45454545454545,1.2761194029850746,11.1702358087791 +14,MFP Conklin- Maines Community Center,53,MFP Senior - North Shore Towers,4.71565048597784,42.0870901,-75.8309647,42.0966132,-75.9103884,153.16666666666666,20.1125620325993,58.333333333333336,6.86051504383355,211.5,2.6257142857142854,26.97307707643285 +41,MFP Senior - Conifer Village,46,MFP Senior - Ellis Hollow,4.725206378997987,42.4511294,-76.5323538,42.435955,-76.460374,33.8,10.3794669098819,24.727272727272727,13.8064543536051,58.527272727272724,1.3669117647058824,24.185921263487 +14,MFP Conklin- Maines Community Center,52,MFP Senior - Metro Plaza Apartments,4.971710797175927,42.0870901,-75.8309647,42.1016977,-75.9085338,153.16666666666666,20.1125620325993,56.3,19.9167712689024,209.46666666666664,2.7205447010065127,40.0293333015017 +36,MFP Senior - Addison Place Apartments,64,MFP Tuscarora,5.172850536384525,42.1001876,-77.2371924,42.0522655,-77.2737134,30.09090909090909,5.02900676982135,192.63636363636363,29.8639338576576,222.72727272727272,0.1562057574327513,34.89294062747895 +12,MFP College Ithaca College,39,MFP Senior - Cayuga Meadows,5.326864654064723,42.4199351,-76.4969643,42.464569,-76.5409393,138.33333333333334,66.1418929272515,25.88888888888889,3.33333333333333,164.22222222222223,5.343347639484979,69.47522626058483 +21,MFP Lansing,39,MFP Senior - Cayuga Meadows,5.619262046423938,42.5183206,-76.5035538,42.464569,-76.5409393,181.0,23.2937759927411,25.88888888888889,3.33333333333333,206.88888888888889,6.991416309012876,26.62710932607443 +39,MFP Senior - Cayuga Meadows,46,MFP Senior - Ellis Hollow,6.0912584252614606,42.464569,-76.5409393,42.435955,-76.460374,25.88888888888889,3.33333333333333,24.727272727272727,13.8064543536051,50.61616161616162,1.0469771241830066,17.13978768693843 +21,MFP Lansing,41,MFP Senior - Conifer Village,6.107874800160203,42.5183206,-76.5035538,42.4511294,-76.5323538,181.0,23.2937759927411,33.8,10.3794669098819,214.8,5.355029585798817,33.673242902623 +55,MFP Senior - Park Terrace Congregate Apartments,58,MFP Senior - Villa Serene,6.272910619491075,42.051364,-76.832954,42.1295916,-76.8158267,24.363636363636363,4.41073071662117,69.72727272727273,5.0614406860282,94.0909090909091,0.3494132985658409,9.47217140264937 +34,MFP Salvation Army Ithaca,61,MFP Senior - Woodsedge Apartments,6.624799652567899,42.4398066,-76.5019869,42.535151,-76.501086,181.1818181818182,39.5848915163808,17.2,4.23739962188552,198.38181818181818,10.533826638477802,43.82229113826632 +15,MFP Danby,57,MFP Senior - Titus Towers,6.74907391207574,42.3522565,-76.4800051,42.4317058,-76.504801,160.22222222222223,34.5788149658782,72.8,4.31534728871525,233.02222222222224,2.200854700854701,38.894162254593454 +15,MFP Danby,46,MFP Senior - Ellis Hollow,6.778347073379921,42.3522565,-76.4800051,42.435955,-76.460374,160.22222222222223,34.5788149658782,24.727272727272727,13.8064543536051,184.94949494949495,6.479575163398693,48.3852693194833 +39,MFP Senior - Cayuga Meadows,61,MFP Senior - Woodsedge Apartments,6.9066643978127,42.464569,-76.5409393,42.535151,-76.501086,25.88888888888889,3.33333333333333,17.2,4.23739962188552,43.08888888888889,1.505167958656331,7.570732955218849 +57,MFP Senior - Titus Towers,61,MFP Senior - Woodsedge Apartments,7.327555558006515,42.4317058,-76.504801,42.535151,-76.501086,72.8,4.31534728871525,17.2,4.23739962188552,90.0,4.232558139534884,8.55274691060077 +41,MFP Senior - Conifer Village,61,MFP Senior - Woodsedge Apartments,7.3952771515489655,42.4511294,-76.5323538,42.535151,-76.501086,33.8,10.3794669098819,17.2,4.23739962188552,51.0,1.9651162790697674,14.616866531767421 +12,MFP College Ithaca College,61,MFP Senior - Woodsedge Apartments,8.160516256252258,42.4199351,-76.4969643,42.535151,-76.501086,138.33333333333334,66.1418929272515,17.2,4.23739962188552,155.53333333333333,8.04263565891473,70.37929254913702 +25,MFP Nichols-The Creamery,56,MFP Senior - Springview Apartments,9.179050357986887,42.02302,-76.371793,42.0100399,-76.533895,122.4,26.4253666010521,27.583333333333332,9.31722094084958,149.98333333333335,4.437462235649547,35.742587541901685 +15,MFP Danby,41,MFP Senior - Conifer Village,9.497252305617653,42.3522565,-76.4800051,42.4511294,-76.5323538,160.22222222222223,34.5788149658782,33.8,10.3794669098819,194.02222222222224,4.740302432610125,44.9582818757601 +18,MFP Erin,58,MFP Senior - Villa Serene,9.716358981660893,42.1788978,-76.6922607,42.1295916,-76.8158267,173.9090909090909,27.3219858189501,69.72727272727273,5.0614406860282,243.63636363636363,2.494132985658409,32.3834265049783 +23,MFP Millport,49,MFP Senior - Jefferson Village,9.727694899522636,42.267172,-76.837356,42.3829923,-76.8713304,166.0,36.4996194805127,24.818181818181817,2.78633026822672,190.8181818181818,6.688644688644689,39.28594974873942 +29,MFP Reach for Christ Church Freeville,46,MFP Senior - Ellis Hollow,9.796449039452579,42.4919905,-76.3443272,42.435955,-76.460374,220.0,22.6175939382498,24.727272727272727,13.8064543536051,244.72727272727272,8.897058823529411,36.4240482918549 +25,MFP Nichols-The Creamery,45,"MFP Senior - Elizabeth Square, Waverly",10.138568765527676,42.02302,-76.371793,42.001546,-76.541203,122.4,26.4253666010521,29.0,9.67658842962558,151.4,4.220689655172414,36.10195503067768 +8,MFP Campbell,59,MFP Senior - Village Square/Manor,10.226626433666802,42.2314129,-77.1948265,42.159804,-77.09139,168.5,40.968946111104,34.25,6.48249390842192,202.75,4.91970802919708,47.451440019525926 +36,MFP Senior - Addison Place Apartments,70,MFP Woodhull,10.292202989934541,42.1001876,-77.2371924,42.0798397,-77.4111295,30.09090909090909,5.02900676982135,176.0,63.5438288256081,206.0909090909091,0.1709710743801653,68.57283559542945 +23,MFP Millport,58,MFP Senior - Villa Serene,10.593196325210428,42.267172,-76.837356,42.1295916,-76.8158267,166.0,36.4996194805127,69.72727272727273,5.0614406860282,235.72727272727275,2.380704041720991,41.5610601665409 +15,MFP Danby,39,MFP Senior - Cayuga Meadows,10.863304351881126,42.3522565,-76.4800051,42.464569,-76.5409393,160.22222222222223,34.5788149658782,25.88888888888889,3.33333333333333,186.11111111111111,6.1888412017167385,37.91214829921153 +29,MFP Reach for Christ Church Freeville,61,MFP Senior - Woodsedge Apartments,10.988460066901554,42.4919905,-76.3443272,42.535151,-76.501086,220.0,22.6175939382498,17.2,4.23739962188552,237.2,12.790697674418606,26.85499356013532 +8,MFP Campbell,36,MFP Senior - Addison Place Apartments,11.219446132312399,42.2314129,-77.1948265,42.1001876,-77.2371924,168.5,40.968946111104,30.09090909090909,5.02900676982135,198.5909090909091,5.599697885196375,45.997952880925354 +18,MFP Erin,38,MFP Senior - Carpenter Apartments,11.351845173577209,42.1788978,-76.6922607,42.0930065,-76.7984317,173.9090909090909,27.3219858189501,31.09090909090909,6.75950509215793,205.0,5.593567251461988,34.081490911108034 +25,MFP Nichols-The Creamery,51,MFP Senior - Long Meadow Senior Housing,11.42632189143268,42.02302,-76.371793,42.1135325,-76.2704045,122.4,26.4253666010521,34.75,13.0043698949098,157.15,3.5223021582733813,39.429736495961905 +18,MFP Erin,37,MFP Senior - Bragg,11.550252499386453,42.1788978,-76.6922607,42.0896598,-76.7977954,173.9090909090909,27.3219858189501,66.88888888888889,6.03001750504186,240.7979797979798,2.599969797644216,33.35200332399196 +7,MFP Bradford,40,MFP Senior - CFS Lakeview,11.76921918626308,42.3691309,-77.1081064,42.3488781,-77.3110763,122.27272727272727,29.7425315300864,112.0,15.563490039905,234.27272727272725,1.0917207792207793,45.3060215699914 +29,MFP Reach for Christ Church Freeville,39,MFP Senior - Cayuga Meadows,11.938975464714387,42.4919905,-76.3443272,42.464569,-76.5409393,220.0,22.6175939382498,25.88888888888889,3.33333333333333,245.88888888888889,8.49785407725322,25.95092727158313 +18,MFP Erin,47,MFP Senior - Flannery,12.463935572449167,42.1788978,-76.6922607,42.0819957,-76.8053269,173.9090909090909,27.3219858189501,61.72727272727273,10.1103007778296,235.63636363636363,2.817378497790869,37.432286596779704 +8,MFP Campbell,42,MFP Senior - Corning Senior Center,12.473579226713138,42.2314129,-77.1948265,42.1490255,-77.0619725,168.5,40.968946111104,75.0,30.9636884107821,243.5,2.2466666666666666,71.9326345218861 +4,MFP Beaver Dams,43,MFP Senior - Dayspring,12.753912404588453,42.2606415,-76.9559856,42.1420715,-77.0454685,170.7,28.7906234736241,77.18181818181819,17.9489174148091,247.88181818181818,2.2116607773851586,46.7395408884332 +4,MFP Beaver Dams,49,MFP Senior - Jefferson Village,12.768091799305061,42.2606415,-76.9559856,42.3829923,-76.8713304,170.7,28.7906234736241,24.818181818181817,2.78633026822672,195.5181818181818,6.8780219780219785,31.57695374185082 +7,MFP Bradford,49,MFP Senior - Jefferson Village,13.055706644096546,42.3691309,-77.1081064,42.3829923,-76.8713304,122.27272727272727,29.7425315300864,24.818181818181817,2.78633026822672,147.0909090909091,4.926739926739927,32.528861798313116 +44,MFP Senior - East Hill Senior Living,69,MFP Windsor,14.215724264291934,42.1141777,-75.8720703,42.0779615,-75.6427789,39.833333333333336,2.16724933890169,200.9090909090909,34.8954281975578,240.74242424242425,0.19826546003016593,37.06267753645949 +50,MFP Senior - Lincoln Court,69,MFP Windsor,14.510764082261073,42.090217,-75.910198,42.0779615,-75.6427789,26.0,4.89897948556636,200.9090909090909,34.8954281975578,226.9090909090909,0.12941176470588237,39.794407683124156 +48,MFP Senior - Harry L Apartments,54,"MFP Senior - Northern Broome Senior Center, Whitney Point",14.58591429542938,42.1237339,-75.9567565,42.3269618,-75.9677778,32.833333333333336,6.24232862533419,50.90909090909091,21.9565687002981,83.74242424242425,0.6449404761904762,28.198897325632288 +23,MFP Millport,55,MFP Senior - Park Terrace Congregate Apartments,15.115694505719103,42.267172,-76.837356,42.051364,-76.832954,166.0,36.4996194805127,24.363636363636363,4.41073071662117,190.36363636363637,6.813432835820896,40.910350197133866 +54,"MFP Senior - Northern Broome Senior Center, Whitney Point",60,MFP Senior - Wells Apartments,15.492567245080268,42.3269618,-75.9677778,42.1076045,-75.9607932,50.90909090909091,21.9565687002981,23.5,4.55216676124922,74.4090909090909,2.1663442940038684,26.508735461547317 +26,MFP Owego VFW,60,MFP Senior - Wells Apartments,15.596244120794326,42.1043411,-76.2615965,42.1076045,-75.9607932,176.25,34.285234033433,23.5,4.55216676124922,199.75,7.5,38.83740079468222 +48,MFP Senior - Harry L Apartments,68,MFP Whitney Point,15.96939470304803,42.1237339,-75.9567565,42.3405329,-75.9765268,32.833333333333336,6.24232862533419,202.54545454545453,30.4478690103713,235.37878787878788,0.16210353081986836,36.69019763570549 +56,MFP Senior - Springview Apartments,65,MFP Van Etten,15.987684260739819,42.0100399,-76.533895,42.2080409,-76.579406,27.583333333333332,9.31722094084958,213.7,19.9613515463145,241.28333333333333,0.12907502729683357,29.27857248716408 +45,"MFP Senior - Elizabeth Square, Waverly",65,MFP Van Etten,16.200324053199697,42.001546,-76.541203,42.2080409,-76.579406,29.0,9.67658842962558,213.7,19.9613515463145,242.7,0.1357042583060365,29.63793997594008 +51,MFP Senior - Long Meadow Senior Housing,60,MFP Senior - Wells Apartments,16.230190932509878,42.1135325,-76.2704045,42.1076045,-75.9607932,34.75,13.0043698949098,23.5,4.55216676124922,58.25,1.4787234042553192,17.556536656159018 +48,MFP Senior - Harry L Apartments,51,MFP Senior - Long Meadow Senior Housing,16.731331182858945,42.1237339,-75.9567565,42.1135325,-76.2704045,32.833333333333336,6.24232862533419,34.75,13.0043698949098,67.58333333333334,0.9448441247002399,19.24669852024399 +60,MFP Senior - Wells Apartments,68,MFP Whitney Point,16.87604765269892,42.1076045,-75.9607932,42.3405329,-75.9765268,23.5,4.55216676124922,202.54545454545453,30.4478690103713,226.04545454545453,0.1160233393177738,35.00003577162052 +26,MFP Owego VFW,48,MFP Senior - Harry L Apartments,16.915448371143015,42.1043411,-76.2615965,42.1237339,-75.9567565,176.25,34.285234033433,32.833333333333336,6.24232862533419,209.08333333333334,5.368020304568527,40.52756265876719 +10,MFP Colesville,44,MFP Senior - East Hill Senior Living,17.05151590904141,42.1841905,-75.6329193,42.1141777,-75.8720703,197.33333333333334,66.2589044902074,39.833333333333336,2.16724933890169,237.16666666666669,4.953974895397489,68.42615382910908 +55,MFP Senior - Park Terrace Congregate Apartments,56,MFP Senior - Springview Apartments,18.133298569652425,42.051364,-76.832954,42.0100399,-76.533895,24.363636363636363,4.41073071662117,27.583333333333332,9.31722094084958,51.946969696969695,0.8832738258720132,13.72795165747075 +45,"MFP Senior - Elizabeth Square, Waverly",55,MFP Senior - Park Terrace Congregate Apartments,18.3459383621123,42.001546,-76.541203,42.051364,-76.832954,29.0,9.67658842962558,24.363636363636363,4.41073071662117,53.36363636363636,1.1902985074626866,14.087319146246749 +6,MFP Boys and Girls Club,51,MFP Senior - Long Meadow Senior Housing,18.397742830201796,42.1053841,-75.9213736,42.1135325,-76.2704045,210.8,52.3551971313896,34.75,13.0043698949098,245.55,6.066187050359712,65.3595670262994 +47,MFP Senior - Flannery,56,MFP Senior - Springview Apartments,18.83513914094972,42.0819957,-76.8053269,42.0100399,-76.533895,61.72727272727273,10.1103007778296,27.583333333333332,9.31722094084958,89.31060606060606,2.2378467453996156,19.42752171867918 +45,"MFP Senior - Elizabeth Square, Waverly",47,MFP Senior - Flannery,19.047778933409596,42.001546,-76.541203,42.0819957,-76.8053269,29.0,9.67658842962558,61.72727272727273,10.1103007778296,90.72727272727272,0.4698085419734904,19.786889207455182 +36,MFP Senior - Addison Place Apartments,63,MFP Troupsburg,19.69026681157269,42.1001876,-77.2371924,42.0432505,-77.5456383,30.09090909090909,5.02900676982135,148.71428571428572,50.2484304422015,178.80519480519482,0.20234040695135794,55.27743721202285 +16,MFP Deposit,44,MFP Senior - East Hill Senior Living,26.546392170166833,42.0625771,-75.422248,42.1141777,-75.8720703,156.58333333333334,56.545168322378,39.833333333333336,2.16724933890169,196.41666666666669,3.930962343096234,58.71241766127969 +16,MFP Deposit,50,MFP Senior - Lincoln Court,26.84143198813597,42.0625771,-75.422248,42.090217,-75.910198,156.58333333333334,56.545168322378,26.0,4.89897948556636,182.58333333333334,6.022435897435898,61.444147807944354 diff --git a/data/ordered_pairs_allocation_k6_cap250.csv b/data/ordered_pairs_allocation_k6_cap250.csv new file mode 100644 index 0000000..001ac90 --- /dev/null +++ b/data/ordered_pairs_allocation_k6_cap250.csv @@ -0,0 +1,233 @@ +site_i_idx,site_i_name,site_j_idx,site_j_name,distance_miles,mu_i,sigma_i,mu_j,sigma_j,q_opt,score_mean,served_i_mean,served_j_mean,served_total_mean,unmet_mean,waste_mean,ratio_i_mean,ratio_j_mean,fairness_mean +1,MFP American Legion - Binghamton,44,MFP Senior - East Hill Senior Living,1.2264929609690354,200.1818181818182,46.0669473306365,39.833333333333336,2.16724933890169,218.0,0.9076916879119182,189.64189395688896,36.834715559218765,226.47660951610771,0.045930999813104945,0.09409356193556909,0.9590566364451305,0.9270570130555649,0.04125701131999791 +4,MFP Beaver Dams,43,MFP Senior - Dayspring,12.753912404588451,170.7,28.7906234736241,77.18181818181819,17.9489174148091,222.0,0.9213082404806847,169.38076586924691,65.82608186501915,235.2068477342661,0.04178577356670505,0.05917260906293571,0.9981329689452986,0.8664082391636959,0.13176073559218776 +4,MFP Beaver Dams,49,MFP Senior - Jefferson Village,12.76809179930506,170.7,28.7906234736241,24.818181818181817,2.78633026822672,232.0,0.954000502934162,170.00948955299742,24.62246455435106,194.63195410734852,0.0010656627198230492,0.22147218357060602,0.9994281099354286,0.9943761803588563,0.005102235172355691 +5,MFP Birnie Transportation Services,59,MFP Senior - Village Square/Manor,1.8200361709161552,213.375,53.4039525021991,34.25,6.48249390842192,241.0,0.8795125938031572,203.4360404959719,24.589854880699217,228.02589537667112,0.06431757656136228,0.08789641849331556,0.9649204062391686,0.7189184293067638,0.24607542516028993 +6,MFP Boys and Girls Club,48,MFP Senior - Harry L Apartments,3.07420484734281,210.8,52.3551971313896,32.833333333333336,6.24232862533419,239.0,0.892399246103388,200.7949830864558,24.66787394962242,225.46285703607822,0.05498189970342165,0.09814857185568707,0.968756220309243,0.7651150831551522,0.2037863766810612 +6,MFP Boys and Girls Club,50,MFP Senior - Lincoln Court,1.6176038361456346,210.8,52.3551971313896,26.0,4.89897948556636,240.0,0.8993626808196025,201.55059591156535,20.396398629186457,221.9469945407518,0.048871821758124344,0.11221202183699282,0.9680641564849471,0.7914870869562642,0.17681128414003552 +6,MFP Boys and Girls Club,51,MFP Senior - Long Meadow Senior Housing,18.397742830201796,210.8,52.3551971313896,34.75,13.0043698949098,249.0,0.8782157521635565,204.81916101475764,22.09955847145334,226.91871948621096,0.06457451464088262,0.09232512205515608,0.9750334679024825,0.6514970276905242,0.3235364402119582 +6,MFP Boys and Girls Club,60,MFP Senior - Wells Apartments,2.1675518976919204,210.8,52.3551971313896,23.5,4.55216676124922,240.0,0.9028500509733773,200.62355997338392,19.00243932780315,219.62599930118708,0.04553171779223268,0.12149600279525166,0.9679003089658942,0.8136093923385961,0.15433506805843383 +7,MFP Bradford,40,MFP Senior - CFS Lakeview,11.76921918626308,122.27272727272728,29.7425315300864,112.0,15.563490039905,184.0,0.9428869758435677,122.25498527814786,105.3741322184006,227.62911749654845,0.024510198846044388,0.08948353001380621,0.9990972042500004,0.9441164351469573,0.05505858603761611 +7,MFP Bradford,49,MFP Senior - Jefferson Village,13.055706644096546,122.27272727272728,29.7425315300864,24.818181818181817,2.78633026822672,228.0,0.9185946110575463,123.5551082242641,24.746410687248552,148.30151891151266,2.9127544789943305e-05,0.4067939243539494,0.9999876348450154,0.9998238227962103,0.0001638120488050504 +8,MFP Campbell,36,MFP Senior - Addison Place Apartments,11.2194461323124,168.5,40.968946111104,30.09090909090909,5.02900676982135,232.0,0.9448016628001836,167.7230928097312,28.88657125821306,196.6096640679442,0.007803792783857342,0.21356134372822305,0.9956735992305155,0.9660083686158929,0.029741383980146068 +8,MFP Campbell,42,MFP Senior - Corning Senior Center,12.473579226713138,168.5,40.968946111104,75.0,30.9636884107821,248.0,0.8940926170580517,166.40521210206353,59.56367058819695,225.96888269026047,0.054176555683848,0.096124469238958,0.9984274250036133,0.817411946946492,0.18101547805712126 +8,MFP Campbell,59,MFP Senior - Village Square/Manor,10.226626433666802,168.5,40.968946111104,34.25,6.48249390842192,232.0,0.9451685542727916,168.0863770865769,32.742213591302,200.82859067787888,0.009683948918444773,0.19668563728848448,0.9957414761049685,0.956172515189619,0.03966354245159542 +10,MFP Colesville,44,MFP Senior - East Hill Senior Living,17.05151590904141,197.33333333333337,66.2589044902074,39.833333333333336,2.16724933890169,216.0,0.8699716425215174,177.68690495085536,37.535447713128946,215.22235266398434,0.0638788997560438,0.1391105893440627,0.9346237514656086,0.9420964858492877,0.04081793509513079 +12,MFP College Ithaca College,39,MFP Senior - Cayuga Meadows,5.326864654064723,138.33333333333334,66.1418929272515,25.88888888888889,3.33333333333333,234.0,0.9127523640151164,137.354497543239,24.97134605274027,162.32584359597928,0.010692694288541848,0.3506966256160829,0.9745005805995437,0.9664647912786183,0.04300122422697849 +12,MFP College Ithaca College,41,MFP Senior - Conifer Village,3.960812607801249,138.33333333333334,66.1418929272515,33.8,10.3794669098819,241.0,0.9104847698649855,137.5150720773743,31.086322329429404,168.6013944068037,0.015247716037785913,0.32559442237278524,0.9710814627858873,0.926440821155676,0.08924470739974813 +12,MFP College Ithaca College,46,MFP Senior - Ellis Hollow,2.9751399711972084,138.33333333333334,66.1418929272515,24.727272727272727,13.8064543536051,250.0,0.9107393637474336,138.43325840643172,22.943951870677104,161.37721027710882,0.010851502796408383,0.35449115889156474,0.9754624239688535,0.8898112094367245,0.12380161411369103 +12,MFP College Ithaca College,57,MFP Senior - Titus Towers,1.2126342142593374,138.33333333333334,66.1418929272515,72.8,4.31534728871525,190.0,0.904261273027411,129.00922137833865,69.92074038505893,198.9299617633976,0.03430168523956696,0.20428015294640964,0.954272473919421,0.9597518986042567,0.03974427387921178 +12,MFP College Ithaca College,61,MFP Senior - Woodsedge Apartments,8.160516256252258,138.33333333333334,66.1418929272515,17.2,4.23739962188552,246.0,0.9095963628247209,136.65591657003773,16.425970287542782,153.0818868575805,0.008043216663339717,0.3876724525696779,0.9733445037688507,0.9520598859871465,0.06399335904140643 +14,MFP Conklin- Maines Community Center,44,MFP Senior - East Hill Senior Living,3.969543414785172,153.16666666666666,20.1125620325993,39.833333333333336,2.16724933890169,213.0,0.9546072453572061,153.50497076800713,39.834476580702976,193.33944734871008,4.019532610125289e-05,0.22664221060515954,0.9999681480420629,0.999914835110471,6.756933735085025e-05 +14,MFP Conklin- Maines Community Center,50,MFP Senior - Lincoln Court,4.264583232754312,153.16666666666666,20.1125620325993,26.0,4.89897948556636,222.0,0.9432913604350304,153.16580340095715,25.948397142830764,179.11420054378792,0.0,0.2835431978248483,1.0,1.0,0.0 +14,MFP Conklin- Maines Community Center,52,MFP Senior - Metro Plaza Apartments,4.971710797175927,153.16666666666666,20.1125620325993,56.3,19.9167712689024,212.0,0.9606771014925984,153.85284691640337,54.89896052039646,208.75180743679982,0.003952715285525919,0.1649927702528007,0.9999552075987247,0.9853587902354928,0.014596417363232007 +14,MFP Conklin- Maines Community Center,53,MFP Senior - North Shore Towers,4.71565048597784,153.16666666666666,20.1125620325993,58.333333333333336,6.86051504383355,202.0,0.9673232176127321,153.16748725169143,58.222339029392096,211.38982628108351,0.0011179021325842078,0.15444069487566592,0.9997651519565478,0.9962419469840803,0.003572490917959506 +15,MFP Danby,39,MFP Senior - Cayuga Meadows,10.863304351881126,160.22222222222223,34.5788149658782,25.88888888888889,3.33333333333333,235.0,0.9455831007192662,160.19857945995946,25.4939307222559,185.6925101822154,0.0018568171415662498,0.25722995927113845,0.9991634385332259,0.9889676315483619,0.010195806984864164 +15,MFP Danby,41,MFP Senior - Conifer Village,9.497252305617652,160.22222222222223,34.5788149658782,33.8,10.3794669098819,241.0,0.9488742384334137,159.29126012554119,32.57749862536899,191.86875875091016,0.0028879803545715475,0.23252496499635938,0.9996272801254767,0.9815013277372591,0.0181259523882177 +15,MFP Danby,46,MFP Senior - Ellis Hollow,6.778347073379921,160.22222222222223,34.5788149658782,24.727272727272727,13.8064543536051,250.0,0.9427180325465487,159.43297699024188,24.372066743724478,183.80504373396636,0.0027037515253902334,0.26477982506413467,0.9997180241844811,0.9370499350781432,0.0626680891063382 +15,MFP Danby,57,MFP Senior - Titus Towers,6.74907391207574,160.22222222222223,34.5788149658782,72.8,4.31534728871525,190.0,0.9386917705052576,156.90304496212124,69.19779172023146,226.10083668235268,0.026368061775390392,0.09559665327058929,0.9819261875976929,0.9524403721601727,0.03238289475592244 +16,MFP Deposit,44,MFP Senior - East Hill Senior Living,26.546392170166833,156.58333333333334,56.545168322378,39.833333333333336,2.16724933890169,217.0,0.9257452096889515,152.13952261283453,38.71173378387466,190.85125639670918,0.01683487214275996,0.23659497441316327,0.9838678840459515,0.9721218178032724,0.018560181072153605 +16,MFP Deposit,50,MFP Senior - Lincoln Court,26.84143198813597,156.58333333333334,56.545168322378,26.0,4.89897948556636,236.0,0.9255364577642545,153.76072391158505,24.855213722996407,178.61593763458146,0.010847682714631603,0.28553624946167416,0.9877537841154094,0.9566258601047426,0.041203313768873075 +18,MFP Erin,37,MFP Senior - Bragg,11.550252499386453,173.9090909090909,27.3219858189501,66.88888888888889,6.03001750504186,201.0,0.9457820858175549,171.4753383144834,61.88515598728526,233.36049430176865,0.025566443514912576,0.06655802279292537,0.9897139944969792,0.9297695333623885,0.060330348957278956 +18,MFP Erin,38,MFP Senior - Carpenter Apartments,11.351845173577209,173.9090909090909,27.3219858189501,31.09090909090909,6.75950509215793,232.0,0.9596543054737808,174.75971286597905,30.63486464514537,205.39457751112442,0.0029133478344492507,0.1784216899555023,0.9991448032866024,0.9833982853535616,0.015787688992074545 +18,MFP Erin,47,MFP Senior - Flannery,12.463935572449168,173.9090909090909,27.3219858189501,61.72727272727273,10.1103007778296,215.0,0.9518261130996397,173.78074383378473,56.36340452390987,230.14414835769463,0.02018075349157241,0.07942340656922162,0.9967743078990587,0.9264515396633294,0.07048091349358046 +18,MFP Erin,58,MFP Senior - Villa Serene,9.716358981660893,173.9090909090909,27.3219858189501,69.72727272727273,5.0614406860282,195.0,0.9419878158051813,169.7459073027099,65.17965222179345,234.92555952450334,0.028720394884013414,0.06029776190198663,0.9839530957513088,0.9363048103373215,0.048721757375764126 +19,MFP First Assembly Of God Church,44,MFP Senior - East Hill Senior Living,2.909892189220507,146.0,21.6459108042479,39.833333333333336,2.16724933890169,213.0,0.9487649930999985,146.1592916414775,39.86564413193418,186.0249357734117,3.434719920681324e-05,0.2559002569063532,0.999979440137201,0.9998999328210343,8.305258300460189e-05 +19,MFP First Assembly Of God Church,48,MFP Senior - Harry L Apartments,3.7186457122365986,146.0,21.6459108042479,32.833333333333336,6.24232862533419,215.0,0.9435176376476938,146.4583427189074,32.954298458705615,179.412641177613,7.797058997799003e-06,0.2823494352895481,1.0,0.9999492272311782,5.0772768821853384e-05 +19,MFP First Assembly Of God Church,50,MFP Senior - Lincoln Court,0.973162971251846,146.0,21.6459108042479,26.0,4.89897948556636,221.0,0.9373611114847463,145.70562225838734,26.068123489083487,171.77374574747083,3.617819576893856e-05,0.3129050170101167,0.999980914815686,0.9998576351489288,0.00012327966675712375 +19,MFP First Assembly Of God Church,52,MFP Senior - Metro Plaza Apartments,0.2660354068302311,146.0,21.6459108042479,56.3,19.9167712689024,208.0,0.9564994656923202,146.01424475032007,54.985832752129774,201.00007750244987,0.0026878726935247385,0.1959996899902005,0.9999815970962013,0.9896153638072829,0.010366233288918395 +19,MFP First Assembly Of God Church,53,MFP Senior - North Shore Towers,0.5220957180283179,146.0,21.6459108042479,58.333333333333336,6.86051504383355,201.0,0.9625420516175291,146.3596023863901,58.03038823760345,204.38999062399355,0.0006062130510410495,0.1824400375040258,0.9998809734713545,0.9979092489869449,0.0019717244844096446 +19,MFP First Assembly Of God Church,60,MFP Senior - Wells Apartments,2.8119927625857093,146.0,21.6459108042479,23.5,4.55216676124922,217.0,0.9355427430443758,145.95658251458482,23.471846290884898,169.42842880546976,0.0,0.322286284778121,1.0,1.0,0.0 +20,MFP Lamphear Court,42,MFP Senior - Corning Senior Center,1.2156460766066033,126.0,40.6803255750109,75.0,30.9636884107821,227.0,0.9302798578553,127.56628346264213,70.70067791416179,198.2669613768039,0.01770856952883946,0.20693215449278438,0.9986662140788031,0.9409016797571023,0.059335580738799264 +20,MFP Lamphear Court,43,MFP Senior - Dayspring,2.5388276228095874,126.0,40.6803255750109,77.18181818181819,17.9489174148091,209.0,0.9417319305889975,125.2536380858632,73.67629766238196,198.92993574824516,0.010882511255999077,0.20428025700701932,0.9975753346750716,0.96892092605832,0.03070464765920665 +20,MFP Lamphear Court,59,MFP Senior - Village Square/Manor,1.038358516439775,126.0,40.6803255750109,34.25,6.48249390842192,226.0,0.9262649314751051,125.30130338357917,34.13069177831543,159.4319951618946,0.0008004154090065908,0.3622720193524216,0.9991587995687785,0.9964998339794799,0.0036782738491397196 +21,MFP Lansing,39,MFP Senior - Cayuga Meadows,5.619262046423938,181.0,23.2937759927411,25.88888888888889,3.33333333333333,234.0,0.9632424199444167,180.910898646557,25.636436636448472,206.54733528300548,0.0012471551762423107,0.17381065886797809,0.9996879283011278,0.9908340036885477,0.008853924612580352 +21,MFP Lansing,41,MFP Senior - Conifer Village,6.107874800160203,181.0,23.2937759927411,33.8,10.3794669098819,233.0,0.9651881002957399,180.59999851592787,32.66221052848747,213.26220904441536,0.0033885418373702696,0.14695116382233858,0.9997629580990872,0.9799437603770594,0.01984599710430551 +21,MFP Lansing,61,MFP Senior - Woodsedge Apartments,1.2874023513887627,181.0,23.2937759927411,17.2,4.23739962188552,241.0,0.9571903573940116,180.72498188368826,17.029663088655152,197.7546449723434,0.0006333491149144955,0.20898142011062634,0.9998384832563243,0.9939716887236656,0.005886885720801468 +23,MFP Millport,49,MFP Senior - Jefferson Village,9.727694899522636,166.0,36.4996194805127,24.818181818181817,2.78633026822672,234.0,0.9467621807094303,164.4728897388206,24.388425907596737,188.86131564641732,0.0027042948798147465,0.24455473741433065,0.998490475790719,0.9861840517553558,0.012431371010983383 +23,MFP Millport,55,MFP Senior - Park Terrace Congregate Apartments,15.115694505719103,166.0,36.4996194805127,24.363636363636363,4.41073071662117,239.0,0.948162717900407,166.58653630344105,23.67680631426951,190.26334261771052,0.002529972621100995,0.23894662952915785,0.9990836602507631,0.9816929211140459,0.01740390501958927 +23,MFP Millport,58,MFP Senior - Villa Serene,10.593196325210428,166.0,36.4996194805127,69.72727272727273,5.0614406860282,194.0,0.9318355370091744,161.15633915642178,65.88224559828005,227.03858475470182,0.031122081746616844,0.09184566098119266,0.978166674045486,0.9438233455558811,0.038469353908204953 +24,MFP Montour Falls-Schuyler County Human Services Complex,49,MFP Senior - Jefferson Village,4.433762697674371,149.36363636363637,60.0387753493902,24.818181818181817,2.78633026822672,233.0,0.9212077480397017,146.56024257251153,24.090118470265082,170.65036104277658,0.009570337996574665,0.31739855582889365,0.984696018809527,0.9733723206167312,0.026660044152371797 +25,MFP Nichols-The Creamery,45,"MFP Senior - Elizabeth Square, Waverly",10.138568765527676,122.4,26.4253666010521,29.0,9.67658842962558,212.0,0.9201070311479234,121.3478181779974,28.785970756906966,150.13378893490432,0.0,0.39946484426038265,1.0,0.9998187224090636,0.0001812775909364812 +25,MFP Nichols-The Creamery,51,MFP Senior - Long Meadow Senior Housing,11.42632189143268,122.4,26.4253666010521,34.75,13.0043698949098,212.0,0.9254843313990551,122.19023199722395,34.665182251594885,156.85541424881885,0.0,0.3725783430047246,1.0,0.9955340910266149,0.0044659089733850195 +25,MFP Nichols-The Creamery,56,MFP Senior - Springview Apartments,9.179050357986888,122.4,26.4253666010521,27.583333333333332,9.31722094084958,210.0,0.9203302610166295,122.68620735540006,27.73520068723258,150.4214080426326,4.290885922909427e-06,0.3983143678294695,1.0,0.9988614177517227,0.0011385822482773227 +26,MFP Owego VFW,48,MFP Senior - Harry L Apartments,16.915448371143015,176.25,34.285234033433,32.833333333333336,6.24232862533419,235.0,0.9529469686331824,175.65757309293303,31.374335477855293,207.03190857078835,0.00792409888965515,0.17187236571684666,0.9975157699526355,0.9556718035748117,0.041964176047360524 +26,MFP Owego VFW,51,MFP Senior - Long Meadow Senior Housing,1.084296011715769,176.25,34.285234033433,34.75,13.0043698949098,249.0,0.9519174094223091,175.972203613584,32.84657982249788,208.8187834360819,0.009461010829097777,0.1647248662556724,0.9994002830847503,0.9355871593829644,0.06381312370178585 +26,MFP Owego VFW,60,MFP Senior - Wells Apartments,15.596244120794326,176.25,34.285234033433,23.5,4.55216676124922,240.0,0.9525062560423728,176.69706922841073,22.588277358631302,199.28534658704203,0.00432626326703802,0.2028586136518319,0.9983454443205477,0.9698207762618037,0.028594076720749043 +29,MFP Reach for Christ Church Freeville,39,MFP Senior - Cayuga Meadows,11.938975464714389,220.0,22.6175939382498,25.88888888888889,3.33333333333333,234.0,0.950629534948421,215.98171993749114,22.55338998480063,238.53510992229178,0.025124095618382723,0.045859560310832874,0.9862967996227717,0.8730592198050864,0.11324237292643542 +29,MFP Reach for Christ Church Freeville,46,MFP Senior - Ellis Hollow,9.79644903945258,220.0,22.6175939382498,24.727272727272727,13.8064543536051,250.0,0.9416923070748863,218.8112985874378,17.551837783297625,236.36313637073542,0.02962387626356382,0.05454745451705833,0.996163081824017,0.7280385539525601,0.26812452787145685 +29,MFP Reach for Christ Church Freeville,61,MFP Senior - Woodsedge Apartments,10.988460066901554,220.0,22.6175939382498,17.2,4.23739962188552,244.0,0.962586600279761,217.59971016858316,14.787948793888864,232.387658962472,0.014577204306385358,0.07044936415011206,0.993904404447825,0.871430362462156,0.12247404198566907 +33,MFP Saint Mary Recreation Center,44,MFP Senior - East Hill Senior Living,2.694335107177977,148.3,59.8313370140505,39.833333333333336,2.16724933890169,217.0,0.922133392609499,144.86563256162114,38.86020309000904,183.72583565163018,0.015529547444878293,0.2650966573934793,0.9780047323529,0.9775754867413929,0.020947057643149095 +33,MFP Saint Mary Recreation Center,50,MFP Senior - Lincoln Court,0.9072813107906652,148.3,59.8313370140505,26.0,4.89897948556636,241.0,0.9231397477959274,149.9028230081814,24.52933457378506,174.43215758196644,0.010253736418528548,0.3022713696721342,0.9867884007435708,0.9458782413593531,0.05623630614132844 +33,MFP Saint Mary Recreation Center,52,MFP Senior - Metro Plaza Apartments,0.4190666752122954,148.3,59.8313370140505,56.3,19.9167712689024,237.0,0.9116875193410305,146.2421133902556,49.495426638401845,195.73754002865743,0.02806407042618469,0.21704983988537022,0.9875266587936937,0.8883332607256507,0.11129274540385768 +33,MFP Saint Mary Recreation Center,53,MFP Senior - North Shore Towers,0.4756729640145355,148.3,59.8313370140505,58.333333333333336,6.86051504383355,214.0,0.9145855822251376,146.08422904878773,54.03511800898833,200.11934705777603,0.028443684638176998,0.19952261176889585,0.9779965227377279,0.9263681201962933,0.06395028437223008 +34,MFP Salvation Army Ithaca,39,MFP Senior - Cayuga Meadows,3.699075945244827,181.1818181818182,39.5848915163808,25.88888888888889,3.33333333333333,234.0,0.9479516411026961,179.95065740375,24.656047475818017,204.606704879568,0.009833576750598942,0.18157318048172796,0.9937723230721938,0.957473502083155,0.036298820989038784 +34,MFP Salvation Army Ithaca,41,MFP Senior - Conifer Village,2.3330238989813528,181.1818181818182,39.5848915163808,33.8,10.3794669098819,246.0,0.944630200576508,177.78244868593995,30.347353483272904,208.12980216921284,0.01367102572428895,0.16748079132314858,0.9970633784926484,0.912531992995514,0.08461953003341238 +34,MFP Salvation Army Ithaca,46,MFP Senior - Ellis Hollow,2.3921824800166336,181.1818181818182,39.5848915163808,24.727272727272727,13.8064543536051,250.0,0.9441317028639936,180.2991516513942,22.85470107457625,203.15385272597044,0.01149461207298922,0.1873845890961182,0.9973876213388251,0.8734128603537162,0.12397476098510882 +34,MFP Salvation Army Ithaca,61,MFP Senior - Woodsedge Apartments,6.624799652567899,181.1818181818182,39.5848915163808,17.2,4.23739962188552,243.0,0.9473543057176131,181.3950946552491,16.308727818057243,197.70382247330636,0.006755470163144965,0.2091847101067746,0.9962679371286173,0.9527701687865492,0.0434977683420681 +35,MFP Schuyler Outreach,49,MFP Senior - Jefferson Village,0.4835250933346896,138.85714285714286,21.5362374571215,24.818181818181817,2.78633026822672,216.0,0.9314144403389621,139.39897597687565,24.86907444682688,164.26805042370248,0.0,0.34292779830519005,1.0,1.0,0.0 +36,MFP Senior - Addison Place Apartments,8,MFP Campbell,11.2194461323124,30.09090909090909,5.02900676982135,168.5,40.968946111104,46.0,0.9457593251395936,30.076547619694416,165.64544849160856,195.72199611130293,0.006761419843405591,0.21711201555478818,1.0,0.992412030360839,0.0075879696391610305 +36,MFP Senior - Addison Place Apartments,63,MFP Troupsburg,19.69026681157269,30.09090909090909,5.02900676982135,148.71428571428572,50.2484304422015,48.0,0.9288906695926177,30.044651619144787,144.33916083694405,174.38381245608883,0.006635237732658418,0.3024647501756446,1.0,0.9895452292966367,0.01045477070336343 +36,MFP Senior - Addison Place Apartments,64,MFP Tuscarora,5.172850536384525,30.09090909090909,5.02900676982135,192.63636363636363,29.8639338576576,48.0,0.9570370972522737,29.987718310219154,189.2485413607691,219.23625967098826,0.011469944052823085,0.12305496131604696,1.0,0.9870996558688718,0.012900344131128146 +36,MFP Senior - Addison Place Apartments,70,MFP Woodhull,10.29220298993454,30.09090909090909,5.02900676982135,176.0,63.5438288256081,51.0,0.9104648633418764,30.131997468927636,166.6128504889785,196.7448479579061,0.029331884390280324,0.21302060816837554,1.0,0.9648402631449817,0.03515973685501833 +37,MFP Senior - Bragg,18,MFP Erin,11.550252499386453,66.88888888888889,6.03001750504186,173.9090909090909,27.3219858189501,86.0,0.9453496899428082,66.79883368460483,166.76752104774818,233.56635473235306,0.02593962115192134,0.06573458107058781,0.9999827909639569,0.9655694687690591,0.03441332219489794 +37,MFP Senior - Bragg,38,MFP Senior - Carpenter Apartments,0.2634372741909757,66.88888888888889,6.03001750504186,31.09090909090909,6.75950509215793,87.0,0.8783147196438295,66.78324885772722,31.11015069705952,97.89339955478674,0.0,0.6084264017808529,1.0,1.0,0.0 +37,MFP Senior - Bragg,47,MFP Senior - Flannery,0.9136830730627136,66.88888888888889,6.03001750504186,61.72727272727273,10.1103007778296,89.0,0.902795735769781,66.94370184478032,61.55096786744603,128.49466971222637,0.0,0.48602132115109453,1.0,1.0,0.0 +37,MFP Senior - Bragg,55,MFP Senior - Park Terrace Congregate Apartments,4.439017101765515,66.88888888888889,6.03001750504186,24.363636363636363,4.41073071662117,90.0,0.8730351137671815,66.9790941115903,24.314798097386596,91.29389220897687,0.0,0.6348244311640924,1.0,1.0,0.0 +37,MFP Senior - Bragg,58,MFP Senior - Villa Serene,3.67669488227416,66.88888888888889,6.03001750504186,69.72727272727273,5.0614406860282,88.0,0.9092182257392413,66.7780126148811,69.7447695591704,136.5227821740515,0.0,0.453908871303794,1.0,1.0,0.0 +38,MFP Senior - Carpenter Apartments,18,MFP Erin,11.351845173577209,31.09090909090909,6.75950509215793,173.9090909090909,27.3219858189501,55.0,0.9595602108419315,30.816569725812275,173.22014854740362,204.0367182732159,0.0022932273604007237,0.18385312690713643,1.0,0.9973685240246086,0.00263147597539131 +38,MFP Senior - Carpenter Apartments,37,MFP Senior - Bragg,0.2634372741909757,31.09090909090909,6.75950509215793,66.88888888888889,6.03001750504186,53.0,0.8781735296393239,30.966406156656863,66.75050589249815,97.71691204915503,0.0,0.60913235180338,1.0,1.0,0.0 +38,MFP Senior - Carpenter Apartments,47,MFP Senior - Flannery,1.1120903988719573,31.09090909090909,6.75950509215793,61.72727272727273,10.1103007778296,57.0,0.8742593054192478,31.022405494299715,61.80172627976006,92.8241317740598,0.0,0.6287034729037608,1.0,1.0,0.0 +38,MFP Senior - Carpenter Apartments,55,MFP Senior - Park Terrace Congregate Apartments,4.637424427574759,31.09090909090909,6.75950509215793,24.363636363636363,4.41073071662117,56.0,0.8438751745268569,30.788173544679438,24.055794613891738,54.84396815857118,0.0,0.7806241273657153,1.0,1.0,0.0 +38,MFP Senior - Carpenter Apartments,58,MFP Senior - Villa Serene,3.413257608083184,31.09090909090909,6.75950509215793,69.72727272727273,5.0614406860282,52.0,0.8806873095107269,31.08110189593318,69.77803499247548,100.85913688840866,0.0,0.5965634524463653,1.0,1.0,0.0 +39,MFP Senior - Cayuga Meadows,12,MFP College Ithaca College,5.326864654064723,25.88888888888889,3.33333333333333,138.33333333333334,66.1418929272515,36.0,0.9122231553548927,25.75217694492372,136.5004945476971,162.25267149262078,0.010986863649502493,0.3509893140295169,1.0,0.9659931907695977,0.03400680923040233 +39,MFP Senior - Cayuga Meadows,15,MFP Danby,10.863304351881126,25.88888888888889,3.33333333333333,160.22222222222223,34.5788149658782,37.0,0.9461558562506889,25.910570236421204,159.67422087684744,185.58479111326866,0.0014449853999537962,0.2576608355469253,1.0,0.9983937142673733,0.0016062857326266501 +39,MFP Senior - Cayuga Meadows,21,MFP Lansing,5.619262046423938,25.88888888888889,3.33333333333333,181.0,23.2937759927411,38.0,0.9635822985614684,25.940284344595877,180.6618705898014,206.60215493439725,0.001062140866280889,0.17359138026241097,1.0,0.9988153083219709,0.001184691678029074 +39,MFP Senior - Cayuga Meadows,29,MFP Reach for Christ Church Freeville,11.938975464714389,25.88888888888889,3.33333333333333,220.0,22.6175939382498,38.0,0.9495769147007114,25.96079855409688,212.62689737658502,238.5876959306819,0.025808276277396295,0.04564921627727236,0.9999935766572019,0.971398118952175,0.028595457705026812 +39,MFP Senior - Cayuga Meadows,34,MFP Salvation Army Ithaca,3.699075945244827,25.88888888888889,3.33333333333333,181.1818181818182,39.5848915163808,37.0,0.9467121319511724,26.008790217443465,178.44702737582287,204.45581759326632,0.01053282632715042,0.18217672962693468,1.0,0.9883601048497603,0.011639895150239792 +39,MFP Senior - Cayuga Meadows,41,MFP Senior - Conifer Village,1.366052046263474,25.88888888888889,3.33333333333333,33.8,10.3794669098819,37.0,0.8481508614633982,25.970785282386345,34.21779154686141,60.18857682924775,0.0,0.7592456926830091,1.0,1.0,0.0 +39,MFP Senior - Cayuga Meadows,46,MFP Senior - Ellis Hollow,6.0912584252614606,25.88888888888889,3.33333333333333,24.727272727272727,13.8064543536051,38.0,0.8400389709009328,25.86018450217753,24.188529123988477,50.048713626166005,0.0,0.799805145495336,1.0,0.9615071687136776,0.03849283128632236 +39,MFP Senior - Cayuga Meadows,57,MFP Senior - Titus Towers,4.114230439805386,25.88888888888889,3.33333333333333,72.8,4.31534728871525,39.0,0.8789661290465096,25.917500164280167,72.79016114385698,98.70766130813715,0.0,0.6051693547674515,1.0,1.0,0.0 +39,MFP Senior - Cayuga Meadows,61,MFP Senior - Woodsedge Apartments,6.9066643978127,25.88888888888889,3.33333333333333,17.2,4.23739962188552,38.0,0.834333144767865,25.849764890750944,17.066666069080355,42.916430959831295,0.0,0.8283342761606748,1.0,1.0,0.0 +40,MFP Senior - CFS Lakeview,7,MFP Bradford,11.76921918626308,112.0,15.563490039905,122.27272727272728,29.7425315300864,159.0,0.9427058289387816,111.6332015799329,115.65641089389015,227.28961247382304,0.024453663150172996,0.09084155010470782,1.0,0.9565100710332918,0.04348992896670824 +41,MFP Senior - Conifer Village,12,MFP College Ithaca College,3.960812607801249,33.8,10.3794669098819,138.33333333333334,66.1418929272515,66.0,0.9116797876291791,33.68367535895418,135.5957301912743,169.2794055502285,0.014839835506877294,0.322882377799086,1.0,0.9583290288652075,0.04167097113479249 +41,MFP Senior - Conifer Village,15,MFP Danby,9.497252305617652,33.8,10.3794669098819,160.22222222222223,34.5788149658782,64.0,0.9491271177257241,33.792778654513775,159.28818408051524,193.08096273502903,0.0033360327889369085,0.22767614905988387,0.9995,0.996096908326348,0.004403091673651985 +41,MFP Senior - Conifer Village,21,MFP Lansing,6.107874800160203,33.8,10.3794669098819,181.0,23.2937759927411,67.0,0.964910960142488,34.00979160088637,179.24792880291136,213.25772040379772,0.0035595101128439418,0.14696911838480906,0.9995,0.995741979756016,0.004758020243984025 +41,MFP Senior - Conifer Village,34,MFP Salvation Army Ithaca,2.3330238989813528,33.8,10.3794669098819,181.1818181818182,39.5848915163808,69.0,0.94301809320968,33.18527145619351,176.87835335331235,210.06362480950588,0.015645504148702926,0.15974550076197647,0.998697794300437,0.9820041523664355,0.019257867764276484 +41,MFP Senior - Conifer Village,39,MFP Senior - Cayuga Meadows,1.366052046263474,33.8,10.3794669098819,25.88888888888889,3.33333333333333,76.0,0.8477946312662283,33.940416404348476,25.80287267843698,59.74328908278546,0.0,0.7610268436688582,0.9995,1.0,0.0005 +41,MFP Senior - Conifer Village,46,MFP Senior - Ellis Hollow,4.725206378997987,33.8,10.3794669098819,24.727272727272727,13.8064543536051,73.0,0.8467738468173023,34.231188288068275,24.2361202335595,58.467308521627785,0.0,0.7661307659134888,0.998987087200854,0.9592696720306687,0.041743240768477255 +41,MFP Senior - Conifer Village,57,MFP Senior - Titus Towers,2.748178393541912,33.8,10.3794669098819,72.8,4.31534728871525,73.0,0.8851335805200321,33.711529062775575,72.70544658726445,106.41697565004002,0.0,0.5743320973998399,0.999,1.0,0.001 +41,MFP Senior - Conifer Village,61,MFP Senior - Woodsedge Apartments,7.395277151548965,33.8,10.3794669098819,17.2,4.23739962188552,69.0,0.8411846071243511,34.13894237662277,17.341816528816175,51.48075890543895,0.0,0.7940769643782443,0.9985043327979458,1.0,0.0014956672020541894 +42,MFP Senior - Corning Senior Center,8,MFP Campbell,12.473579226713138,75.0,30.9636884107821,168.5,40.968946111104,172.0,0.8894519492506825,74.11010533413926,152.015046799968,226.12515213410725,0.057155107785377066,0.09549939146357105,0.9910360402421368,0.915747482246796,0.09307112706566609 +42,MFP Senior - Corning Senior Center,20,MFP Lamphear Court,1.2156460766066033,75.0,30.9636884107821,126.0,40.6803255750109,170.0,0.9294506975178515,74.78499738900017,120.71895778605914,195.50395517505933,0.016845291638872453,0.21798417929976277,0.993,0.9717192118386294,0.03528078816137045 +42,MFP Senior - Corning Senior Center,43,MFP Senior - Dayspring,1.3231815462029837,75.0,30.9636884107821,77.18181818181819,17.9489174148091,161.0,0.9216718450305098,75.10698421261439,77.32048727665344,152.42747148926784,0.00016883260056531918,0.39029011404292874,0.994955017430137,0.9996821589553199,0.00527285847481704 +42,MFP Senior - Corning Senior Center,59,MFP Senior - Village Square/Manor,2.2469527930463364,75.0,30.9636884107821,34.25,6.48249390842192,168.0,0.8877931849966899,75.60263269439167,34.13884855147076,109.74148124586243,0.0,0.5610340750165502,0.9954890125268903,1.0,0.004510987473109786 +43,MFP Senior - Dayspring,4,MFP Beaver Dams,12.753912404588451,77.18181818181819,17.9489174148091,170.7,28.7906234736241,123.0,0.9226034498778233,76.61920553210992,158.44470418778906,235.06390971989904,0.04090479868630993,0.05974436112040394,0.9998529835184264,0.9405751892183717,0.05927779430005481 +43,MFP Senior - Dayspring,20,MFP Lamphear Court,2.5388276228095874,77.18181818181819,17.9489174148091,126.0,40.6803255750109,141.0,0.9408573767962026,76.38487029412194,122.92108379132692,199.30595408544886,0.011617116545097766,0.2027761836582046,1.0,0.980805999834957,0.019194000165043097 +43,MFP Senior - Dayspring,42,MFP Senior - Corning Senior Center,1.3231815462029837,77.18181818181819,17.9489174148091,75.0,30.9636884107821,137.0,0.9204454349197772,77.23851016521442,73.48458464176609,150.72309480698053,8.315057862953249e-05,0.3971076207720779,1.0,0.9900183660449204,0.009981633955079621 +43,MFP Senior - Dayspring,59,MFP Senior - Village Square/Manor,3.57013433924932,77.18181818181819,17.9489174148091,34.25,6.48249390842192,150.0,0.8889839709239535,77.01257171222328,34.21739194271862,111.22996365494188,0.0,0.5550801453802323,1.0,1.0,0.0 +44,MFP Senior - East Hill Senior Living,1,MFP American Legion - Binghamton,1.2264929609690354,39.833333333333336,2.16724933890169,200.1818181818182,46.0669473306365,47.0,0.9086065032578287,39.80241660156709,185.8621152312336,225.6645318328007,0.04495320138025745,0.09734187266879733,1.0,0.9481118503611236,0.051888149638876425 +44,MFP Senior - East Hill Senior Living,10,MFP Colesville,17.05151590904141,39.833333333333336,2.16724933890169,197.33333333333337,66.2589044902074,48.0,0.8775160584238801,39.7663246091889,176.16375353730155,215.93007814649047,0.05951750255832012,0.13627968741403806,1.0,0.9308550877625597,0.06914491223744033 +44,MFP Senior - East Hill Senior Living,14,MFP Conklin- Maines Community Center,3.969543414785172,39.833333333333336,2.16724933890169,153.16666666666666,20.1125620325993,47.0,0.9535846908565183,39.7662914512261,152.38045205923203,192.1467435104581,8.293996990504902e-05,0.23141302595816754,1.0,0.9999019115199594,9.808848004053483e-05 +44,MFP Senior - East Hill Senior Living,16,MFP Deposit,26.546392170166833,39.833333333333336,2.16724933890169,156.58333333333334,56.545168322378,47.0,0.9237216415783767,39.82356374381338,152.44273254235844,192.26629628617184,0.018807122156600464,0.23093481485531267,1.0,0.9772428522398265,0.02275714776017348 +44,MFP Senior - East Hill Senior Living,19,MFP First Assembly Of God Church,2.909892189220507,39.833333333333336,2.16724933890169,146.0,21.6459108042479,48.0,0.948494279319603,39.83978225770908,145.7917098832599,185.631492140969,6.821495732633938e-06,0.2574740314361241,1.0,0.9999919067732405,8.093226759586569e-06 +44,MFP Senior - East Hill Senior Living,33,MFP Saint Mary Recreation Center,2.694335107177977,39.833333333333336,2.16724933890169,148.3,59.8313370140505,46.0,0.9232495753078674,39.82497915151681,144.12822406705158,183.95320321856838,0.014945617041867124,0.2641871871257265,0.9999933196501914,0.9787315303406399,0.021261789309551554 +44,MFP Senior - East Hill Senior Living,52,MFP Senior - Metro Plaza Apartments,2.724407382390271,39.833333333333336,2.16724933890169,56.3,19.9167712689024,48.0,0.8770023478575545,39.862689106833926,56.390245715109295,96.25293482194323,0.0,0.6149882607122272,1.0,0.9985,0.0015 +44,MFP Senior - East Hill Senior Living,53,MFP Senior - North Shore Towers,3.1700080711925125,39.833333333333336,2.16724933890169,58.333333333333336,6.86051504383355,48.0,0.8787102113759582,39.811326814564104,58.57643740538357,98.38776421994768,0.0,0.6064489431202092,1.0,1.0,0.0 +44,MFP Senior - East Hill Senior Living,69,MFP Windsor,14.215724264291934,39.833333333333336,2.16724933890169,200.9090909090909,34.8954281975578,47.0,0.9315803699121217,39.742044726677655,190.9112885611214,230.65333328779903,0.033088935448823464,0.07738666684880374,0.9999970343865616,0.9615588164562936,0.03843821793026807 +45,"MFP Senior - Elizabeth Square, Waverly",25,MFP Nichols-The Creamery,10.138568765527676,29.0,9.67658842962558,122.4,26.4253666010521,59.0,0.9206789658119094,28.937176942341488,121.91153032254542,150.84870726488688,0.0,0.39660517094045245,0.997,1.0,0.003 +45,"MFP Senior - Elizabeth Square, Waverly",47,MFP Senior - Flannery,19.047778933409596,29.0,9.67658842962558,61.72727272727273,10.1103007778296,62.0,0.8726691193035772,29.201822235322958,61.63457689414858,90.83639912947154,0.0,0.6366544034821138,0.9995,1.0,0.0005 +45,"MFP Senior - Elizabeth Square, Waverly",55,MFP Senior - Park Terrace Congregate Apartments,18.3459383621123,29.0,9.67658842962558,24.363636363636363,4.41073071662117,63.0,0.8426787693325484,28.889006941715955,24.4594547239697,53.348461665685655,0.0,0.7866061533372574,0.9985,1.0,0.0015 +45,"MFP Senior - Elizabeth Square, Waverly",56,MFP Senior - Springview Apartments,0.95951840754079,29.0,9.67658842962558,27.583333333333332,9.31722094084958,66.0,0.8451098800297587,28.754347032706495,27.63300300449193,56.38735003719842,0.0,0.7744505998512063,0.998360256274488,0.9986065161361063,0.003033227589405838 +45,"MFP Senior - Elizabeth Square, Waverly",65,MFP Van Etten,16.200324053199697,29.0,9.67658842962558,213.7,19.9613515463145,57.0,0.9575306805051936,28.932857648259986,207.86708464280986,236.79994229106984,0.01994329582978879,0.05280023083572064,0.9994172881088079,0.9771252086948627,0.023368568690720765 +46,MFP Senior - Ellis Hollow,12,MFP College Ithaca College,2.9751399711972084,24.727272727272727,13.8064543536051,138.33333333333334,66.1418929272515,77.0,0.9104732948648702,25.04432473516569,135.81834120038482,160.86266593555052,0.010448023677231437,0.3565493362577979,0.956998086287528,0.9734325786440103,0.06601498656039914 +46,MFP Senior - Ellis Hollow,15,MFP Danby,6.778347073379921,24.727272727272727,13.8064543536051,160.22222222222223,34.5788149658782,75.0,0.9431661955372309,24.7761240604192,158.55592102470547,183.33204508512466,0.002187150331792987,0.26667181965950126,0.9588213517811425,0.9974466469414204,0.043732001277437246 +46,MFP Senior - Ellis Hollow,29,MFP Reach for Christ Church Freeville,9.79644903945258,24.727272727272727,13.8064543536051,220.0,22.6175939382498,63.0,0.942242321593566,25.592672772448196,211.71282199278033,237.30549476522853,0.02975129638663549,0.05077802093908578,0.9623558337721096,0.9660398190022788,0.07120969742513787 +46,MFP Senior - Ellis Hollow,34,MFP Salvation Army Ithaca,2.3921824800166336,24.727272727272727,13.8064543536051,181.1818181818182,39.5848915163808,69.0,0.9461425904751966,24.60395402465814,177.22230271238274,201.82625673704086,0.009574009321522631,0.19269497305183653,0.9559781794865209,0.9891674250122044,0.05475372836443934 +46,MFP Senior - Ellis Hollow,39,MFP Senior - Cayuga Meadows,6.0912584252614606,24.727272727272727,13.8064543536051,25.88888888888889,3.33333333333333,67.0,0.840776681364033,25.146171951310578,25.824679753730663,50.97085170504125,0.0,0.7961165931798351,0.958153250270563,1.0,0.04184674972943706 +46,MFP Senior - Ellis Hollow,41,MFP Senior - Conifer Village,4.725206378997987,24.727272727272727,13.8064543536051,33.8,10.3794669098819,70.0,0.8468802315872725,24.677185776729427,33.92310370736128,58.60028948409071,0.0,0.7655988420636373,0.9665326280261993,0.999,0.03446737197380071 +46,MFP Senior - Ellis Hollow,57,MFP Senior - Titus Towers,2.5634175854556234,24.727272727272727,13.8064543536051,72.8,4.31534728871525,69.0,0.87795963191651,24.75316132664113,72.6963785689964,97.44953989563753,0.0,0.6102018404174498,0.9560298168360287,1.0,0.04397018316397123 +47,MFP Senior - Flannery,18,MFP Erin,12.463935572449168,61.72727272727273,10.1103007778296,173.9090909090909,27.3219858189501,99.0,0.9510402492977993,61.86877068428495,168.18276140374064,230.0515320880256,0.02062561023288823,0.07979387164789764,1.0,0.9727388464667481,0.02726115353325178 +47,MFP Senior - Flannery,37,MFP Senior - Bragg,0.9136830730627136,61.72727272727273,10.1103007778296,66.88888888888889,6.03001750504186,99.0,0.9028897915279447,61.641667869309266,66.97057154062155,128.6122394099308,0.0,0.48555104236027674,1.0,1.0,0.0 +47,MFP Senior - Flannery,38,MFP Senior - Carpenter Apartments,1.1120903988719573,61.72727272727273,10.1103007778296,31.09090909090909,6.75950509215793,96.0,0.8744558000139027,61.84133600340808,31.228414013970237,93.06975001737833,0.0,0.6277209999304867,1.0,1.0,0.0 +47,MFP Senior - Flannery,45,"MFP Senior - Elizabeth Square, Waverly",19.047778933409596,61.72727272727273,10.1103007778296,29.0,9.67658842962558,90.0,0.8730186859576109,61.909873789514066,29.363483657499536,91.27335744701361,0.0,0.6349065702119455,1.0,0.997502277347739,0.0024977226522610715 +47,MFP Senior - Flannery,55,MFP Senior - Park Terrace Congregate Apartments,3.525334028702802,61.72727272727273,10.1103007778296,24.363636363636363,4.41073071662117,100.0,0.8689525136265764,61.652767751830645,24.537874281389975,86.19064203322061,0.0,0.6552374318671175,1.0,1.0,0.0 +47,MFP Senior - Flannery,56,MFP Senior - Springview Apartments,18.83513914094972,61.72727272727273,10.1103007778296,27.583333333333332,9.31722094084958,99.0,0.8713227233857037,61.712825370188,27.440578861941713,89.15340423212973,0.0,0.6433863830714811,1.0,0.998,0.002 +47,MFP Senior - Flannery,58,MFP Senior - Villa Serene,3.820657609211378,61.72727272727273,10.1103007778296,69.72727272727273,5.0614406860282,96.0,0.9049874266452896,61.40411251829729,69.83017078831463,131.23428330661193,0.0,0.4750628667735523,1.0,1.0,0.0 +48,MFP Senior - Harry L Apartments,6,MFP Boys and Girls Club,3.07420484734281,32.833333333333336,6.24232862533419,210.8,52.3551971313896,54.0,0.8857852257896607,32.76068443921264,192.43878966867732,225.19947410788993,0.05898397093540708,0.09920210356844025,0.9999804223148453,0.9337126337050967,0.06626778860974863 +48,MFP Senior - Harry L Apartments,19,MFP First Assembly Of God Church,3.7186457122365986,32.833333333333336,6.24232862533419,146.0,21.6459108042479,58.0,0.9434285145183958,32.94471860952175,146.38082571482158,179.32554432434333,1.9950588174235913e-05,0.2826978227026268,1.0,0.999977018125536,2.2981874463996466e-05 +48,MFP Senior - Harry L Apartments,26,MFP Owego VFW,16.915448371143015,32.833333333333336,6.24232862533419,176.25,34.285234033433,51.0,0.9557506491221163,32.967065793811216,175.59195315480338,208.5590189486146,0.006935353772984646,0.1657639242055417,1.0,0.9920687776161624,0.007931222383837632 +48,MFP Senior - Harry L Apartments,51,MFP Senior - Long Meadow Senior Housing,16.731331182858945,32.833333333333336,6.24232862533419,34.75,13.0043698949098,53.0,0.8539102175715496,32.616098535167026,34.77167342926997,67.38777196443701,0.0,0.730448912142252,1.0,0.9968924962036553,0.003107503796344723 +48,MFP Senior - Harry L Apartments,52,MFP Senior - Metro Plaza Apartments,3.98468111906683,32.833333333333336,6.24232862533419,56.3,19.9167712689024,55.0,0.8715895596201708,32.83427560374961,56.65267392146398,89.48694952521359,0.0,0.6420522018991457,1.0,0.9985,0.0015 +48,MFP Senior - Harry L Apartments,54,"MFP Senior - Northern Broome Senior Center, Whitney Point",14.58591429542938,32.833333333333336,6.24232862533419,50.90909090909091,21.9565687002981,53.0,0.866840414809825,32.907008633981135,50.64350987830012,83.55051851228127,0.0,0.665797925950875,1.0,0.9893339210665472,0.010666078933452823 +48,MFP Senior - Harry L Apartments,60,MFP Senior - Wells Apartments,1.3192042503486914,32.833333333333336,6.24232862533419,23.5,4.55216676124922,55.0,0.8450039510836872,32.66692178116868,23.588017073440326,56.254938854609016,0.0,0.774980244581564,1.0,1.0,0.0 +48,MFP Senior - Harry L Apartments,68,MFP Whitney Point,15.96939470304803,32.833333333333336,6.24232862533419,202.54545454545453,30.4478690103713,54.0,0.9435898653470001,32.71641733144388,195.7820904536888,228.4985077851327,0.024505588050691297,0.08600596885946933,0.9999865548198668,0.9720825975426278,0.027903957277239027 +49,MFP Senior - Jefferson Village,4,MFP Beaver Dams,12.76809179930506,24.818181818181817,2.78633026822672,170.7,28.7906234736241,35.0,0.9541130470769167,24.876624785335387,170.89326699128202,195.76989177661744,0.0015642914652357499,0.2169204328935303,1.0,0.9982673733666095,0.001732626633390555 +49,MFP Senior - Jefferson Village,7,MFP Bradford,13.055706644096546,24.818181818181817,2.78633026822672,122.27272727272728,29.7425315300864,35.0,0.9183170068980401,24.800831624850275,123.0954269976999,147.89625862255016,0.0,0.4084149655097992,1.0,1.0,0.0 +49,MFP Senior - Jefferson Village,23,MFP Millport,9.727694899522636,24.818181818181817,2.78633026822672,166.0,36.4996194805127,35.0,0.9483307431611822,24.922133210940554,165.30998600247702,190.23211921341758,0.0024093451309700063,0.23907152314632965,1.0,0.9973434595267302,0.0026565404732699274 +49,MFP Senior - Jefferson Village,24,MFP Montour Falls-Schuyler County Human Services Complex,4.433762697674371,24.818181818181817,2.78633026822672,149.36363636363637,60.0387753493902,33.0,0.9187656382832033,24.83145441098687,143.1627141272326,167.9941685382194,0.009768560342107671,0.3280233258471223,0.9999925946089513,0.9828245050597423,0.017168089549209134 +49,MFP Senior - Jefferson Village,35,MFP Schuyler Outreach,0.4835250933346896,24.818181818181817,2.78633026822672,138.85714285714286,21.5362374571215,36.0,0.9308359878396211,24.907676377065364,138.637308422461,163.54498479952636,0.0,0.34582006080189454,1.0,1.0,0.0 +50,MFP Senior - Lincoln Court,6,MFP Boys and Girls Club,1.6176038361456346,26.0,4.89897948556636,210.8,52.3551971313896,43.0,0.8964940398967124,25.95351428515129,196.35179713810712,222.3053114232584,0.05084388077618397,0.11077875430696635,1.0,0.9442859569072346,0.05571404309276544 +50,MFP Senior - Lincoln Court,14,MFP Conklin- Maines Community Center,4.264583232754312,26.0,4.89897948556636,153.16666666666666,20.1125620325993,42.0,0.943682628410739,25.97720589365366,153.66209977292792,179.63930566658155,1.801007657891957e-05,0.2814427773336738,1.0,0.9999798050940635,2.019490593651363e-05 +50,MFP Senior - Lincoln Court,16,MFP Deposit,26.84143198813597,26.0,4.89897948556636,156.58333333333334,56.545168322378,42.0,0.9249915747940385,26.121729584670216,152.98407516330678,179.10580474797698,0.011433168127714461,0.283576781008092,1.0,0.9859289924814113,0.01407100751858862 +50,MFP Senior - Lincoln Court,19,MFP First Assembly Of God Church,0.973162971251846,26.0,4.89897948556636,146.0,21.6459108042479,44.0,0.9372186960759207,26.160911414485724,145.36245868041505,171.52337009490077,0.0,0.3139065196203969,1.0,1.0,0.0 +50,MFP Senior - Lincoln Court,33,MFP Saint Mary Recreation Center,0.9072813107906652,26.0,4.89897948556636,148.3,59.8313370140505,42.0,0.922358574805745,26.000919755057506,145.2702338133836,171.2711535684411,0.009161467530629939,0.3149153857262355,1.0,0.9819117449433578,0.01808825505664219 +50,MFP Senior - Lincoln Court,52,MFP Senior - Metro Plaza Apartments,0.8772090355783712,26.0,4.89897948556636,56.3,19.9167712689024,43.0,0.8661038143148505,26.114122856844293,56.515645036718794,82.62976789356308,0.0,0.6694809284257476,1.0,0.995112728618511,0.004887271381489109 +50,MFP Senior - Lincoln Court,53,MFP Senior - North Shore Towers,0.4510672532235281,26.0,4.89897948556636,58.333333333333336,6.86051504383355,43.0,0.8674236042176697,26.113826185326747,58.165679086760456,84.2795052720872,0.0,0.6628819789116512,1.0,1.0,0.0 +50,MFP Senior - Lincoln Court,69,MFP Windsor,14.510764082261073,26.0,4.89897948556636,200.9090909090909,34.8954281975578,42.0,0.9456726291804917,26.030319995749654,195.5577931920765,221.5881131878261,0.019748663356105776,0.11364754724869545,0.9999941260131213,0.9781816212596834,0.021812504753437947 +51,MFP Senior - Long Meadow Senior Housing,6,MFP Boys and Girls Club,18.397742830201796,34.75,13.0043698949098,210.8,52.3551971313896,71.0,0.8715704617386206,34.8794294573394,192.9712779883952,227.8507074457346,0.06919381513622934,0.08859717021706164,0.9959173727296845,0.9210717125787228,0.08294376476001716 +51,MFP Senior - Long Meadow Senior Housing,25,MFP Nichols-The Creamery,11.42632189143268,34.75,13.0043698949098,122.4,26.4253666010521,75.0,0.925878192363591,34.83617913975692,122.59048797156883,157.4266671113257,3.946332841848229e-05,0.370293331554697,0.9968339263903601,0.9999487591251854,0.003217314484454472 +51,MFP Senior - Long Meadow Senior Housing,26,MFP Owego VFW,1.084296011715769,34.75,13.0043698949098,176.25,34.285234033433,75.0,0.9519792196656197,34.48286887986591,172.9413445528889,207.4242134327548,0.008725094425365107,0.1703031462689808,0.9963411468595392,0.9895484339730172,0.014110419167443539 +51,MFP Senior - Long Meadow Senior Housing,48,MFP Senior - Harry L Apartments,16.731331182858945,34.75,13.0043698949098,32.833333333333336,6.24232862533419,79.0,0.8542054473628178,35.04287488605271,32.71393431746958,67.75680920352228,0.0,0.728972763185911,0.9973082360537114,1.0,0.002691763946288526 +51,MFP Senior - Long Meadow Senior Housing,60,MFP Senior - Wells Apartments,16.230190932509878,34.75,13.0043698949098,23.5,4.55216676124922,87.0,0.8467391742723328,34.80240488503061,23.621562955385254,58.42396784041587,0.0,0.7663041286383365,0.99649426915564,1.0,0.003505730844359984 +52,MFP Senior - Metro Plaza Apartments,14,MFP Conklin- Maines Community Center,4.971710797175927,56.3,19.9167712689024,153.16666666666666,20.1125620325993,114.0,0.9614448925652858,56.134920404051805,151.73568494851176,207.8706053525636,0.0030322448229782714,0.16851757858974564,0.9953519426123021,0.9955147715494261,0.009093366275166808 +52,MFP Senior - Metro Plaza Apartments,19,MFP First Assembly Of God Church,0.2660354068302311,56.3,19.9167712689024,146.0,21.6459108042479,126.0,0.9568398060344661,56.831339522837204,145.21866545851418,202.0500049813514,0.0030001237191344065,0.19179998007459437,0.997,0.9955327157006175,0.007467284299382516 +52,MFP Senior - Metro Plaza Apartments,33,MFP Saint Mary Recreation Center,0.4190666752122954,56.3,19.9167712689024,148.3,59.8313370140505,125.0,0.9102046826005051,57.12793558442053,137.78816333423936,194.91609891865988,0.028580122834014187,0.22033560432536042,0.9978438244202061,0.9569614734521639,0.04519470212762995 +52,MFP Senior - Metro Plaza Apartments,44,MFP Senior - East Hill Senior Living,2.724407382390271,56.3,19.9167712689024,39.833333333333336,2.16724933890169,121.0,0.8769771693333425,56.37981219495795,39.84164947172013,96.2214616666781,0.0,0.6151141533332878,0.9977565920142397,1.0,0.002243407985760301 +52,MFP Senior - Metro Plaza Apartments,48,MFP Senior - Harry L Apartments,3.98468111906683,56.3,19.9167712689024,32.833333333333336,6.24232862533419,115.0,0.8715883241984678,56.60691581657072,32.878489431514026,89.48540524808473,0.0,0.6420583790076609,0.9965,1.0,0.0035 +52,MFP Senior - Metro Plaza Apartments,50,MFP Senior - Lincoln Court,0.8772090355783712,56.3,19.9167712689024,26.0,4.89897948556636,120.0,0.8656901519584083,56.27203623075791,25.840653717252497,82.11268994801041,0.0,0.6715492402079583,0.998,1.0,0.002 +52,MFP Senior - Metro Plaza Apartments,53,MFP Senior - North Shore Towers,0.4456006888022414,56.3,19.9167712689024,58.333333333333336,6.86051504383355,125.0,0.8914394153039292,56.0102761133084,58.28899301660314,114.29926912991154,0.0,0.5428029234803537,0.9965529433627016,1.0,0.003447056637298348 +52,MFP Senior - Metro Plaza Apartments,60,MFP Senior - Wells Apartments,3.07802816941594,56.3,19.9167712689024,23.5,4.55216676124922,129.0,0.8638478044035528,56.26110129743483,23.548654207006233,79.80975550444106,0.0,0.6807609779822358,0.9989046171309841,1.0,0.0010953828690159165 +53,MFP Senior - North Shore Towers,14,MFP Conklin- Maines Community Center,4.71565048597784,58.333333333333336,6.86051504383355,153.16666666666666,20.1125620325993,81.0,0.9671612707121308,58.15717523677041,153.09272564808333,211.24990088485373,0.0011491562473450788,0.15500039646058503,1.0,0.9984825541992525,0.0015174458007475174 +53,MFP Senior - North Shore Towers,19,MFP First Assembly Of God Church,0.5220957180283179,58.333333333333336,6.86051504383355,146.0,21.6459108042479,90.0,0.962485707875553,58.599940211582584,145.78765599991183,204.38759621149444,0.0006402306835266476,0.18244961515402222,1.0,0.9991609164791477,0.0008390835208521582 +53,MFP Senior - North Shore Towers,33,MFP Saint Mary Recreation Center,0.4756729640145355,58.333333333333336,6.86051504383355,148.3,59.8313370140505,79.0,0.9152867778904358,58.3483288475185,141.7335980392195,200.081926886738,0.027986727261846627,0.19967229245304807,1.0,0.9592008578801036,0.04079914211989653 +53,MFP Senior - North Shore Towers,44,MFP Senior - East Hill Senior Living,3.1700080711925125,58.333333333333336,6.86051504383355,39.833333333333336,2.16724933890169,82.0,0.878456740931582,58.197420637357794,39.87350552711964,98.07092616447743,0.0,0.6077162953420903,1.0,1.0,0.0 +53,MFP Senior - North Shore Towers,50,MFP Senior - Lincoln Court,0.4510672532235281,58.333333333333336,6.86051504383355,26.0,4.89897948556636,81.0,0.8676239029320432,58.55798807006764,25.971890594986245,84.52987866505387,0.0,0.6618804853397845,1.0,1.0,0.0 +53,MFP Senior - North Shore Towers,52,MFP Senior - Metro Plaza Apartments,0.4456006888022414,58.333333333333336,6.86051504383355,56.3,19.9167712689024,81.0,0.8915450572576351,58.16626996861192,56.26505160343195,114.43132157204387,0.0,0.5422747137118245,1.0,0.9965,0.0035 +53,MFP Senior - North Shore Towers,60,MFP Senior - Wells Apartments,3.334088480614027,58.333333333333336,6.86051504383355,23.5,4.55216676124922,85.0,0.865261521081359,58.21543954469859,23.361461807000214,81.57690135169881,0.0,0.6736923945932048,1.0,1.0,0.0 +54,"MFP Senior - Northern Broome Senior Center, Whitney Point",48,MFP Senior - Harry L Apartments,14.58591429542938,50.90909090909091,21.9565687002981,32.833333333333336,6.24232862533419,131.0,0.8676801995905857,51.86009459742323,32.74015489080899,84.60024948823222,0.0,0.661599002047071,0.9881712076937169,1.0,0.01182879230628308 +54,"MFP Senior - Northern Broome Senior Center, Whitney Point",60,MFP Senior - Wells Apartments,15.492567245080268,50.90909090909091,21.9565687002981,23.5,4.55216676124922,125.0,0.8595280752273122,51.09808046942431,23.312013564716064,74.41009403414037,0.0,0.7023596238634385,0.9898633124891646,1.0,0.010136687510835431 +55,MFP Senior - Park Terrace Congregate Apartments,23,MFP Millport,15.115694505719103,24.363636363636363,4.41073071662117,166.0,36.4996194805127,39.0,0.9469858109726231,24.352236831357025,165.5048835788935,189.85712041025053,0.0030624283472357895,0.24057151835899787,1.0,0.9966287273769971,0.003371272623002902 +55,MFP Senior - Park Terrace Congregate Apartments,37,MFP Senior - Bragg,4.439017101765515,24.363636363636363,4.41073071662117,66.88888888888889,6.03001750504186,38.0,0.8728140319832637,24.258717849490306,66.75882212958928,91.01753997907959,0.0,0.6359298400836817,1.0,1.0,0.0 +55,MFP Senior - Park Terrace Congregate Apartments,38,MFP Senior - Carpenter Apartments,4.637424427574759,24.363636363636363,4.41073071662117,31.09090909090909,6.75950509215793,41.0,0.844512689192702,24.575447640276963,31.065413850600546,55.64086149087751,0.0,0.7774365540364899,1.0,1.0,0.0 +55,MFP Senior - Park Terrace Congregate Apartments,45,"MFP Senior - Elizabeth Square, Waverly",18.3459383621123,24.363636363636363,4.41073071662117,29.0,9.67658842962558,40.0,0.8424799816882705,24.40213151251581,28.697845597822443,53.09997711033825,0.0,0.787600091558647,1.0,0.999370959320926,0.0006290406790739741 +55,MFP Senior - Park Terrace Congregate Apartments,47,MFP Senior - Flannery,3.525334028702802,24.363636363636363,4.41073071662117,61.72727272727273,10.1103007778296,42.0,0.8684223787828409,24.166729310261452,61.36124416828981,85.52797347855126,0.0,0.6578881060857951,1.0,1.0,0.0 +55,MFP Senior - Park Terrace Congregate Apartments,56,MFP Senior - Springview Apartments,18.133298569652425,24.363636363636363,4.41073071662117,27.583333333333332,9.31722094084958,38.0,0.8416585833783983,24.363022797976143,27.71020642502173,52.07322922299787,0.0,0.7917070831080085,1.0,0.9990789391085075,0.00092106089149251 +55,MFP Senior - Park Terrace Congregate Apartments,58,MFP Senior - Villa Serene,6.272910619491075,24.363636363636363,4.41073071662117,69.72727272727273,5.0614406860282,39.0,0.8751622883924661,24.391343221929624,69.56151726865313,93.95286049058275,0.0,0.624188558037669,1.0,1.0,0.0 +56,MFP Senior - Springview Apartments,25,MFP Nichols-The Creamery,9.179050357986888,27.583333333333332,9.31722094084958,122.4,26.4253666010521,56.0,0.9199155157574925,27.482898887975033,122.41149580889073,149.89439469686576,0.0,0.40042242121253696,0.9987899658745628,1.0,0.001210034125437247 +56,MFP Senior - Springview Apartments,45,"MFP Senior - Elizabeth Square, Waverly",0.95951840754079,27.583333333333332,9.31722094084958,29.0,9.67658842962558,57.0,0.8451901882218795,27.448669591731203,29.03906568561827,56.48773527734947,0.0,0.7740490588906022,0.9974162554122631,0.999,0.0035837445877369015 +56,MFP Senior - Springview Apartments,47,MFP Senior - Flannery,18.83513914094972,27.583333333333332,9.31722094084958,61.72727272727273,10.1103007778296,63.0,0.8719746119220965,28.110808124851612,61.85745677776894,89.96826490262055,0.0,0.6401269403895178,0.9989518777138876,1.0,0.001048122286112433 +56,MFP Senior - Springview Apartments,55,MFP Senior - Park Terrace Congregate Apartments,18.133298569652425,27.583333333333332,9.31722094084958,24.363636363636363,4.41073071662117,56.0,0.8417255616400382,27.903896438107783,24.253055611939942,52.15695205004772,0.0,0.7913721917998091,0.9985441898101756,1.0,0.0014558101898244523 +56,MFP Senior - Springview Apartments,65,MFP Van Etten,15.98768426073982,27.583333333333332,9.31722094084958,213.7,19.9613515463145,60.0,0.9599482535843799,27.729904255502117,208.38933412497505,236.11923838047716,0.01809196070000119,0.05552304647809137,0.9970284582045988,0.9793270372969494,0.023644504498451773 +57,MFP Senior - Titus Towers,12,MFP College Ithaca College,1.2126342142593374,72.8,4.31534728871525,138.33333333333334,66.1418929272515,88.0,0.9008230566304617,72.73455890158925,125.6592746911061,198.39383359269533,0.03618250640230918,0.20642466562921863,0.9999936859004108,0.9286795617092478,0.07131412419116308 +57,MFP Senior - Titus Towers,15,MFP Danby,6.74907391207574,72.8,4.31534728871525,160.22222222222223,34.5788149658782,87.0,0.9383601913390792,72.84793518758134,152.7522149197674,225.60015010734875,0.026324955466749927,0.09759939957060501,0.9999937110976516,0.9644240910123928,0.0355696200852588 +57,MFP Senior - Titus Towers,39,MFP Senior - Cayuga Meadows,4.114230439805386,72.8,4.31534728871525,25.88888888888889,3.33333333333333,89.0,0.8790001750299977,72.97345268135278,25.776766106144503,98.75021878749729,0.0,0.6049991248500107,1.0,1.0,0.0 +57,MFP Senior - Titus Towers,41,MFP Senior - Conifer Village,2.748178393541912,72.8,4.31534728871525,33.8,10.3794669098819,92.0,0.8852106929697038,72.75702829972273,33.756337912406984,106.51336621212971,0.0,0.5739465351514812,1.0,0.9995,0.0005 +57,MFP Senior - Titus Towers,46,MFP Senior - Ellis Hollow,2.5634175854556234,72.8,4.31534728871525,24.727272727272727,13.8064543536051,87.0,0.8779659815240826,72.78292203210017,24.674554873002982,97.45747690510316,0.0,0.6101700923795872,1.0,0.9654036783921354,0.034596321607864744 +57,MFP Senior - Titus Towers,61,MFP Senior - Woodsedge Apartments,7.327555558006515,72.8,4.31534728871525,17.2,4.23739962188552,91.0,0.8720803643235101,72.75371431691624,17.34674108747144,90.1004554043877,0.0,0.6395981783824493,1.0,1.0,0.0 +58,MFP Senior - Villa Serene,18,MFP Erin,9.716358981660893,69.72727272727273,5.0614406860282,173.9090909090909,27.3219858189501,85.0,0.9404152952522107,69.72033414624839,165.59723827593297,235.31757242218134,0.029899226678459023,0.058729710311274635,0.9999952909959839,0.9599551803734838,0.04004011062250012 +58,MFP Senior - Villa Serene,23,MFP Millport,10.593196325210428,69.72727272727273,5.0614406860282,166.0,36.4996194805127,84.0,0.9338181981409592,69.66185187329195,158.19618676472925,227.8580386380212,0.030292645480911092,0.08856784544791524,0.999954529189803,0.9597122187620403,0.04024231042776258 +58,MFP Senior - Villa Serene,37,MFP Senior - Bragg,3.67669488227416,69.72727272727273,5.0614406860282,66.88888888888889,6.03001750504186,86.0,0.909275467058799,69.68713469939236,66.90719912410641,136.59433382349877,0.0,0.45362266470600493,1.0,1.0,0.0 +58,MFP Senior - Villa Serene,38,MFP Senior - Carpenter Apartments,3.413257608083184,69.72727272727273,5.0614406860282,31.09090909090909,6.75950509215793,86.0,0.8805242377162789,69.60495593203053,31.05034121331813,100.65529714534865,0.0,0.5973788114186053,1.0,1.0,0.0 +58,MFP Senior - Villa Serene,47,MFP Senior - Flannery,3.820657609211378,69.72727272727273,5.0614406860282,61.72727272727273,10.1103007778296,85.0,0.9046912798600322,69.74769037549608,61.116409449544165,130.86409982504023,0.0,0.476543600699839,1.0,1.0,0.0 +58,MFP Senior - Villa Serene,55,MFP Senior - Park Terrace Congregate Apartments,6.272910619491075,69.72727272727273,5.0614406860282,24.363636363636363,4.41073071662117,89.0,0.8752966157117071,69.84872221985832,24.272047419775603,94.12076963963392,0.0,0.6235169214414643,1.0,1.0,0.0 +59,MFP Senior - Village Square/Manor,5,MFP Birnie Transportation Services,1.8200361709161552,34.25,6.48249390842192,213.375,53.4039525021991,56.0,0.8732745135144439,34.219704243325815,193.77307097510976,227.99277521843555,0.06819981666269036,0.08802889912625775,0.9999909181921229,0.9230337576540534,0.07695716053806956 +59,MFP Senior - Village Square/Manor,8,MFP Campbell,10.226626433666802,34.25,6.48249390842192,168.5,40.968946111104,57.0,0.945434723392738,34.31957766684849,166.005020895597,200.3245985624455,0.009265597160761386,0.1987016057502181,1.0,0.98938499203219,0.010615007967810043 +59,MFP Senior - Village Square/Manor,20,MFP Lamphear Court,1.038358516439775,34.25,6.48249390842192,126.0,40.6803255750109,60.0,0.9274887641165321,34.307964265329794,126.39403994374261,160.70200420907238,0.0006705245317035836,0.3571919831637104,1.0,0.9982188177480523,0.0017811822519477512 +59,MFP Senior - Village Square/Manor,42,MFP Senior - Corning Senior Center,2.2469527930463364,34.25,6.48249390842192,75.0,30.9636884107821,56.0,0.8879986709221097,34.17134039314509,75.82699825949202,109.9983386526371,0.0,0.5600066453894516,1.0,0.9928114484431176,0.007188551556882286 +59,MFP Senior - Village Square/Manor,43,MFP Senior - Dayspring,3.57013433924932,34.25,6.48249390842192,77.18181818181819,17.9489174148091,54.0,0.8895937792380911,34.28922843434001,77.70299561327384,111.99222404761386,0.0,0.5520311038095447,1.0,1.0,0.0 +60,MFP Senior - Wells Apartments,6,MFP Boys and Girls Club,2.1675518976919204,23.5,4.55216676124922,210.8,52.3551971313896,37.0,0.9042215025639603,23.609377538051618,196.61213160500387,220.22150914305547,0.044972315469052566,0.11911396342777804,0.9999547675794881,0.9510661992388971,0.048888568340591 +60,MFP Senior - Wells Apartments,19,MFP First Assembly Of God Church,2.8119927625857093,23.5,4.55216676124922,146.0,21.6459108042479,39.0,0.9349581636029229,23.562485070588714,145.13639163414052,168.69887670472923,5.861005377902381e-07,0.3252044931810831,1.0,0.9999993522362653,6.477637345948528e-07 +60,MFP Senior - Wells Apartments,26,MFP Owego VFW,15.596244120794326,23.5,4.55216676124922,176.25,34.285234033433,40.0,0.9518625360672258,23.40625651110142,173.8050327357391,197.21128924684052,0.003691559581404151,0.21115484301263787,1.0,0.9959487614961372,0.004051238503862869 +60,MFP Senior - Wells Apartments,48,MFP Senior - Harry L Apartments,1.3192042503486914,23.5,4.55216676124922,32.833333333333336,6.24232862533419,38.0,0.844803637931177,23.411883680228684,32.59266373374254,56.00454741397122,0.0,0.7759818103441151,1.0,1.0,0.0 +60,MFP Senior - Wells Apartments,51,MFP Senior - Long Meadow Senior Housing,16.230190932509878,23.5,4.55216676124922,34.75,13.0043698949098,40.0,0.8469453421700119,23.570829914680044,35.11084779783486,58.681677712514904,0.0,0.7652732891499404,1.0,0.9935,0.0065 +60,MFP Senior - Wells Apartments,52,MFP Senior - Metro Plaza Apartments,3.07802816941594,23.5,4.55216676124922,56.3,19.9167712689024,42.0,0.8638678575824226,23.26673215138383,56.56808982664431,79.83482197802813,0.0,0.6806607120878874,1.0,0.998,0.002 +60,MFP Senior - Wells Apartments,53,MFP Senior - North Shore Towers,3.334088480614027,23.5,4.55216676124922,58.333333333333336,6.86051504383355,38.0,0.8651509912955719,23.401564246051027,58.03717487341376,81.4387391194648,0.0,0.6742450435221408,1.0,1.0,0.0 +60,MFP Senior - Wells Apartments,54,"MFP Senior - Northern Broome Senior Center, Whitney Point",15.492567245080268,23.5,4.55216676124922,50.90909090909091,21.9565687002981,41.0,0.8594771964524667,23.476017544068643,50.87047802151482,74.34649556558347,0.0,0.7026140177376662,1.0,0.9927983738829036,0.0072016261170964845 +60,MFP Senior - Wells Apartments,68,MFP Whitney Point,16.87604765269892,23.5,4.55216676124922,202.54545454545453,30.4478690103713,38.0,0.9560834562544471,23.41129022986761,198.46644039988945,221.87773062975708,0.013386705155849053,0.11248907748097173,0.9999987155600728,0.9853066981188102,0.01469201744126261 +61,MFP Senior - Woodsedge Apartments,12,MFP College Ithaca College,8.160516256252258,17.2,4.23739962188552,138.33333333333334,66.1418929272515,32.0,0.9096069577370417,17.351507881669903,134.66267402373987,152.01418190540977,0.0075027423670538124,0.39194327237836096,1.0,0.9720116355726981,0.027988364427301928 +61,MFP Senior - Woodsedge Apartments,21,MFP Lansing,1.2874023513887627,17.2,4.23739962188552,181.0,23.2937759927411,36.0,0.9585834942698038,17.266528001822255,181.64201297579268,198.90854097761493,0.00033958657018011407,0.20436583608954023,1.0,0.9996316958971263,0.00036830410287369124 +61,MFP Senior - Woodsedge Apartments,29,MFP Reach for Christ Church Freeville,10.988460066901554,17.2,4.23739962188552,220.0,22.6175939382498,30.0,0.9618826602498192,17.26547018760898,215.6962065041302,232.96167669173917,0.0153041756897326,0.06815329323304331,1.0,0.9835630775076599,0.01643692249234009 +61,MFP Senior - Woodsedge Apartments,34,MFP Salvation Army Ithaca,6.624799652567899,17.2,4.23739962188552,181.1818181818182,39.5848915163808,32.0,0.9464822322600581,17.255930046754205,178.59627136313696,195.85220140989117,0.006374705542409233,0.2165911943604354,1.0,0.993190921718,0.006809078282000051 +61,MFP Senior - Woodsedge Apartments,39,MFP Senior - Cayuga Meadows,6.9066643978127,17.2,4.23739962188552,25.88888888888889,3.33333333333333,33.0,0.8345697902621839,17.298712769062817,25.913525058667098,43.212237827729915,0.0,0.8271510486890803,1.0,1.0,0.0 +61,MFP Senior - Woodsedge Apartments,41,MFP Senior - Conifer Village,7.395277151548965,17.2,4.23739962188552,33.8,10.3794669098819,31.0,0.8406191934831686,17.319804352735122,33.45418750122565,50.773991853960766,0.0,0.796904032584157,1.0,0.9995956269956981,0.0004043730043018437 +61,MFP Senior - Woodsedge Apartments,57,MFP Senior - Titus Towers,7.327555558006515,17.2,4.23739962188552,72.8,4.31534728871525,33.0,0.8720960060867253,17.28426479233024,72.8357428160764,90.12000760840665,0.0,0.6395199695663735,1.0,1.0,0.0 +63,MFP Troupsburg,36,MFP Senior - Addison Place Apartments,19.69026681157269,148.71428571428572,50.2484304422015,30.09090909090909,5.02900676982135,234.0,0.9309722887130849,147.51828350289423,29.335270421308937,176.85355392420314,0.0065690965164235445,0.2925857843031873,0.994543343042548,0.9732034972812899,0.024519686214199674 +64,MFP Tuscarora,36,MFP Senior - Addison Place Apartments,5.172850536384525,192.63636363636363,29.8639338576576,30.09090909090909,5.02900676982135,233.0,0.9571630445210271,192.53996336018574,28.1110239281017,220.65098728828744,0.01209859081850181,0.11739605084685031,0.9945384553527563,0.9379297361035529,0.05660871924920332 +65,MFP Van Etten,45,"MFP Senior - Elizabeth Square, Waverly",16.200324053199697,213.7,19.9613515463145,29.0,9.67658842962558,243.0,0.9553637296875132,213.77304492189603,24.04242426660649,237.81546918850253,0.021805403539555623,0.04873812324598987,0.9974915615658203,0.8423502360032453,0.1551413255625752 +65,MFP Van Etten,56,MFP Senior - Springview Apartments,15.98768426073982,213.7,19.9613515463145,27.583333333333332,9.31722094084958,247.0,0.9581645171559209,212.95299781895358,22.623845200296387,235.57684301924996,0.018935598287174425,0.057692627923000166,0.9986222978697614,0.8463159292093841,0.15230636866037725 +68,MFP Whitney Point,48,MFP Senior - Harry L Apartments,15.96939470304803,202.54545454545453,30.4478690103713,32.833333333333336,6.24232862533419,234.0,0.9450987467980008,200.7959988535992,28.63058462086558,229.42658347446476,0.024026574988481878,0.08229366610214091,0.9905398626351604,0.8772059865507436,0.1135088641807078 +68,MFP Whitney Point,60,MFP Senior - Wells Apartments,16.87604765269892,202.54545454545453,30.4478690103713,23.5,4.55216676124922,238.0,0.9571221984285616,200.05055395051318,21.74456459228217,221.7951185427954,0.012696185253546667,0.11281952582881852,0.9934789092932628,0.9275456911378226,0.06593321815544015 +69,MFP Windsor,44,MFP Senior - East Hill Senior Living,14.215724264291934,200.9090909090909,34.8954281975578,39.833333333333336,2.16724933890169,219.0,0.9297187954680582,193.7656511167687,36.72787763560192,230.49352875237062,0.03417251720864884,0.07802588499051753,0.9733930209424343,0.9231313390179732,0.051422858892545546 +69,MFP Windsor,50,MFP Senior - Lincoln Court,14.510764082261073,200.9090909090909,34.8954281975578,26.0,4.89897948556636,237.0,0.9464011221716473,197.9911686202582,23.27842987046033,221.26959849071855,0.019134097888079713,0.11492160603712574,0.9895414756554091,0.9030310460987526,0.08657066430333085 +70,MFP Woodhull,36,MFP Senior - Addison Place Apartments,10.29220298993454,176.0,63.5438288256081,30.09090909090909,5.02900676982135,234.0,0.9100952066649615,169.5550680322242,27.037657163839626,196.5927251960638,0.02948685843243099,0.21362909921574477,0.9769248549678711,0.9072260834148612,0.07300481595935156 diff --git a/data/p3_kmin_data.csv b/data/p3_kmin_data.csv new file mode 100644 index 0000000..db60790 --- /dev/null +++ b/data/p3_kmin_data.csv @@ -0,0 +1,92 @@ +k_min,effectiveness,min_eff,bottom10_eff,gini_eff,std_eff,unmet,waste,total_served,total_demand,serve_ratio,total_visits_allocated,pair_trips,total_trips,n_total_guess +1.0,0.6740723786885516,0.0,0.0,0.3217202192552402,0.43656031934945183,6020.289385111637,36176.24303967647,147723.2768683165,102473.0,1.4415824350640314,838,108,730,838 +1.1,0.6722177485654618,0.0,0.0,0.3237898270037862,0.4381964050059289,6134.933288588227,36010.11976628754,147945.03797284796,102473.0,1.4437465280888426,836,106,730,836 +1.2000000000000002,0.6704958056643757,0.0,0.0,0.3252720980781685,0.43767064228245295,6134.628433322902,35851.698318827875,148087.79720977912,102473.0,1.445139668105541,836,106,730,836 +1.3000000000000003,0.6695095925793307,0.0,0.0,0.3265198171690131,0.4390762580089967,6194.792025406361,35791.54530474273,148141.2688314323,102473.0,1.4456614799160004,835,105,730,835 +1.4000000000000004,0.6694339654873941,0.0,0.0,0.3265802483202278,0.43905148544927036,6228.20708270612,36000.81452945016,147931.99960672486,102473.0,1.4436192910007988,834,104,730,834 +1.5000000000000004,0.6636484657996786,0.0,0.0,0.3326203421528935,0.4436320259876694,6356.091273608803,36333.108762277174,147589.4830348685,102473.0,1.440276785444639,832,102,730,832 +1.6000000000000005,0.6674208779059524,0.0,0.0,0.3293309386901855,0.4449673364402397,6234.590067200417,36320.201836248496,147631.90110044152,102473.0,1.4406907292695785,833,103,730,833 +1.7000000000000006,0.677206085721042,0.0,0.0,0.3193836926435514,0.43808481522067905,5912.781858506872,36354.762090768185,147728.00500309057,102473.0,1.4416285753621985,838,108,730,838 +1.8000000000000007,0.6853909571528494,0.0,0.0,0.31023826446319225,0.4308742949819052,5630.1359189478335,36483.523227618854,147537.6525628842,102473.0,1.4397709890691617,842,112,730,842 +1.9000000000000008,0.6890401314655326,0.0,0.0,0.3062024543978086,0.427646944020185,5393.962361226006,36534.7334051381,147536.0728234961,102473.0,1.4397555729167302,848,118,730,848 +2.000000000000001,0.6916342987650869,0.0,0.0,0.30285566345045,0.4237753393873303,5226.963307492039,36417.396480255346,147694.8974979497,102473.0,1.4413054902066857,855,125,730,855 +2.100000000000001,0.6916342987650869,0.0,0.0,0.30285566345045,0.4237753393873303,5226.963307492039,36243.39825347202,147868.89572473304,102473.0,1.443003481158286,855,125,730,855 +2.200000000000001,0.6916342987650869,0.0,0.0,0.30285566345045,0.4237753393873303,5241.751256285928,36282.267759646194,147821.23826976496,102473.0,1.4425384078709997,854,124,730,854 +2.300000000000001,0.689742345332021,0.0,0.0,0.3052835506806135,0.42655395722447487,5274.6871545285085,36319.739718309014,147783.79747865337,102473.0,1.442173035615756,853,123,730,853 +2.4000000000000012,0.688248360925854,0.0,0.0,0.30553469184828663,0.4221237318113932,5366.086641321199,36189.79208030942,147634.20280955738,102473.0,1.440713190884988,853,124,729,854 +2.5000000000000013,0.6848290989216977,0.0,0.0,0.3093208490891366,0.42515345580679914,5472.22950054102,36281.72441598971,147799.44228348258,102473.0,1.442325708074152,854,124,730,854 +2.6000000000000014,0.6896535071313614,0.0,0.0,0.305304325597086,0.4270116708887982,5352.72050226549,36516.254106924214,147594.42373209246,102473.0,1.440325000069213,855,125,730,855 +2.7000000000000015,0.6985110166730488,0.0,0.0,0.29670683697586453,0.4221335041512494,5025.3870274202345,36686.51116283028,147477.51989743143,102473.0,1.4391841743428164,858,128,730,858 +2.8000000000000016,0.7100761581874693,0.0,0.0,0.2831113409660537,0.40856678154890197,4742.678752758735,36978.4427807813,147188.4850911636,102473.0,1.4363635795884144,862,132,730,862 +2.9000000000000017,0.7198705386798687,0.0,0.0,0.271575294485249,0.39776035729469933,4506.474027485676,36974.56304216336,147242.02643546386,102473.0,1.4368860717990481,868,138,730,868 +3.0000000000000018,0.7314298778470564,0.0,0.033766076722152795,0.25638144882241276,0.3805459043648514,4339.474973751709,36857.22611728063,147400.8511099175,102473.0,1.438435989089004,875,145,730,875 +3.100000000000002,0.7252752990058506,0.0,0.017169732492595333,0.26395202440891885,0.388378191123884,4464.487061818893,36567.79239401148,147629.21302946407,102473.0,1.4406644972769809,871,141,730,871 +3.200000000000002,0.7204285472205735,0.0,0.017169732492595333,0.2689724725768716,0.3922194812375008,4497.631473754569,36589.067808291344,147607.9376151842,102473.0,1.4404568775695472,870,140,730,870 +3.300000000000002,0.7242550778657342,0.0,0.017169732492595333,0.2646652350651417,0.3877456740629719,4449.8452916156375,36632.053513103245,147573.77102671744,102473.0,1.4401234571713275,872,142,730,872 +3.400000000000002,0.7177542121976923,0.0,0.017169732492595333,0.27143994765260526,0.3938203358062794,4631.229278882666,36563.57373724476,147632.99067575324,102473.0,1.440701362073456,871,141,730,871 +3.500000000000002,0.7177542121976923,0.0,0.017169732492595333,0.27143994765260526,0.3938203358062794,4631.229278882666,36720.63542345697,147475.92898954102,102473.0,1.4391686492006774,871,141,730,871 +3.6000000000000023,0.7187617714834224,0.0,0.007007234874695632,0.2719009177667593,0.3979241974558004,4602.763774059581,37000.92013243452,147216.36747131392,102473.0,1.4366356744831703,870,140,730,870 +3.7000000000000024,0.7273028122198695,0.0,0.0,0.26475321252765904,0.3954021490716001,4295.125219300304,37256.261168024226,147100.47854168684,102473.0,1.4355047528781908,873,143,730,873 +3.8000000000000025,0.7390472617564016,0.0,0.017169732492595333,0.25118008620036325,0.38163389437899137,4027.204893432692,37595.756262237905,146755.09231036244,102473.0,1.4321342432676163,876,146,730,876 +3.9000000000000026,0.7540293018072356,0.0,0.04731511280749442,0.23409057177925274,0.36509407900062024,3791.000168159633,37683.34018197474,146983.84876694123,102473.0,1.4343666016115584,883,152,731,882 +4.000000000000003,0.7685014722164484,0.0,0.09773300593223486,0.21604381186712707,0.3437213966754365,3623.9575213643493,37558.28893264284,147150.38776584403,102473.0,1.4359918004337147,890,159,731,889 +4.100000000000003,0.7693787970682873,0.08580453583003264,0.11027751619063263,0.214422421135964,0.34125675879485917,3620.3065798964253,37060.58980645669,147416.73783349807,102473.0,1.4385910223522105,890,160,730,890 +4.200000000000003,0.7583063449505908,0.0,0.09773300593223486,0.22450364811434498,0.3480286798472576,3870.914606123618,37191.316644841485,147274.42086249572,102473.0,1.4372021982619394,886,156,730,886 +4.3000000000000025,0.7613841665242425,0.08580453583003264,0.10685164245791927,0.2218590487710259,0.3462916785749853,3846.39442834506,36960.97265607414,147466.7024217918,102473.0,1.4390786101879693,887,157,730,887 +4.400000000000003,0.7613269409178632,0.08580453583003264,0.10685164245791927,0.22191116016014,0.34633610179754637,3851.3981612466637,36939.98098086362,147487.69409700233,102473.0,1.4392834609799883,888,158,730,888 +4.5000000000000036,0.7592468472390332,0.08580453583003264,0.10214873974979818,0.22457416019921816,0.34976586136098775,3875.118560622251,37178.74741098417,147236.25086056747,102473.0,1.436829709880334,887,157,730,887 +4.600000000000003,0.7589806105177003,0.0,0.0847137765296161,0.22636463945492125,0.3542417265451027,3822.32682950495,37399.49386433039,147045.01554676561,102473.0,1.4349635079168719,887,157,730,887 +4.700000000000003,0.7617608488270767,0.0,0.06572328094203966,0.22635980549379564,0.35942010924932244,3567.6249940327316,37761.768346579614,146804.61727289128,102473.0,1.4326175409414312,887,157,730,887 +4.800000000000003,0.7781921610034352,0.0,0.07007397305625625,0.20947583678434456,0.3426573389160954,3251.9496535774197,37932.03874846048,146887.24368269357,102473.0,1.4334238646540414,893,162,731,892 +4.900000000000004,0.7905533262386106,0.0,0.1140453817749449,0.19482523529477258,0.3232459377222856,3072.945088414577,37802.57166889043,147114.05094684858,102473.0,1.4356372014759848,900,169,731,899 +5.0000000000000036,0.8063524174616191,0.0878115718087844,0.19629873813053836,0.17656566834083787,0.2996060193495954,2906.7048363821605,37677.52041955852,147280.5899457514,102473.0,1.437262400298141,907,176,731,906 +5.100000000000003,0.8083175933810728,0.13969065669623595,0.21595049732507504,0.17379113571015115,0.29530682472249453,2891.916887588272,37471.22489073447,147282.245371764,102473.0,1.4372785550512233,907,177,730,907 +5.200000000000004,0.8067111746070708,0.13969065669623595,0.21595049732507504,0.17496077561101275,0.29581010319036494,2954.4561779246887,37577.63413353803,147133.29683862402,102473.0,1.4358250157468213,906,176,730,906 +5.300000000000004,0.8048048676551554,0.13969065669623595,0.21595049732507504,0.17687897256580087,0.29840831627421716,2994.321822056623,37459.88846701144,147211.604912624,102473.0,1.4365891982534327,905,175,730,905 +5.400000000000004,0.8001843293019237,0.13969065669623595,0.21595049732507504,0.1806239013248363,0.30141068072479216,3131.74958339343,37340.8478087531,147320.30322509888,102473.0,1.4376499490119239,904,174,730,904 +5.5000000000000036,0.8001843293019237,0.13969065669623595,0.21595049732507504,0.1806239013248363,0.30141068072479216,3131.74958339343,37565.616225893405,146845.53480795858,102473.0,1.433016841587136,903,174,729,904 +5.600000000000004,0.8006660544756361,0.13969065669623595,0.21595049732507504,0.18024152397150406,0.3011104384379928,3115.608843165862,37802.80782982654,145887.8543435698,102473.0,1.4236711557539041,900,174,726,904 +5.700000000000005,0.8085043708763061,0.0878115718087844,0.19629873813053836,0.17566182129872776,0.3021532217248958,2813.0271898563856,37992.70712775607,146819.83125401512,102473.0,1.4327660091342609,908,178,730,908 +5.800000000000004,0.8233002201989894,0.13969065669623595,0.22186454748544399,0.160882611226824,0.28422107953713327,2509.6240719584775,38063.97438959663,146701.4958484458,102473.0,1.4316112131824559,913,183,730,913 +5.900000000000004,0.8356354619761441,0.13969065669623595,0.2677345280655274,0.14782744454080232,0.2648939166362586,2330.7019037034606,37932.98223127127,146929.79702380486,102473.0,1.4338391285880656,920,190,730,920 +6.000000000000004,0.8493853546559438,0.2844197980177543,0.35432079558183843,0.1322419622096782,0.2400711810795258,2196.644632937205,37807.93098193936,147096.33602270763,102473.0,1.4354643274102215,927,197,730,927 +6.100000000000005,0.8493853546559438,0.2844197980177543,0.35432079558183843,0.1322419622096782,0.2400711810795258,2196.644632937205,37750.491952534365,147150.97286828895,102473.0,1.4359975102543008,926,196,730,926 +6.200000000000005,0.8452475636118361,0.22537388617054127,0.3346690363873018,0.13613605006405027,0.24457978884807166,2280.630373451326,37683.99513966863,147199.48394064052,102473.0,1.4364709137103484,924,194,730,924 +6.300000000000004,0.8452475636118361,0.22537388617054127,0.3346690363873018,0.13613605006405027,0.24457978884807166,2280.630373451326,37729.24732693835,147117.65980497614,102473.0,1.435672419124805,924,194,730,924 +6.400000000000005,0.8394059021948915,0.22537388617054127,0.3202455310980886,0.14171278586749914,0.2519176464415909,2333.5934857336033,38063.08344497489,146832.80085900193,102473.0,1.4328925752051949,921,191,730,921 +6.500000000000005,0.8313909490784981,0.22537388617054127,0.2842756263641339,0.1500663274324241,0.2637651054213871,2482.39997848706,38321.968817794914,146497.5647498637,102473.0,1.4296211172685849,917,187,730,917 +6.600000000000005,0.8384742278728325,0.22537388617054127,0.3100824304823972,0.14253873319452137,0.25239561361599877,2400.2996923537567,38379.09227011349,146489.9754315522,102473.0,1.429547055629797,921,191,730,921 +6.700000000000005,0.8464288776153129,0.22537388617054127,0.3100824304823972,0.1375251693120152,0.2531838008876674,2128.655344278889,38151.12439147372,146789.8857307061,102473.0,1.4324737807101002,926,196,730,926 +6.800000000000005,0.8572396492452687,0.2307258469995803,0.33531378930542327,0.127465676345206,0.24027825495576688,1966.0829456649788,38308.49979583387,146373.86701966915,102473.0,1.4284139921703196,929,199,730,929 +6.900000000000006,0.8694766253125472,0.2844197980177543,0.38906166074655557,0.11492378882473853,0.21926084592904796,1787.1564581158805,38142.244695321184,146607.24500555737,102473.0,1.4306914504850778,936,206,730,936 +7.000000000000005,0.8823020879874417,0.364767680258805,0.46751062730617027,0.1014886955901122,0.19563957609799948,1652.7458770897342,38013.53338217175,146777.4440682777,102473.0,1.4323523666553892,943,213,730,943 +7.100000000000005,0.8802654930016758,0.364767680258805,0.46751062730617027,0.10316666884165282,0.19840502200845703,1684.280913220463,37596.922522595334,146996.26699034407,102473.0,1.4344877869325976,941,211,730,941 +7.2000000000000055,0.8781414862386119,0.364767680258805,0.448560352831529,0.10557600414027557,0.20277359612941548,1717.301403641385,37390.95470114173,147192.01247276829,102473.0,1.436398002134887,939,209,730,939 +7.300000000000006,0.8781667280009705,0.364767680258805,0.4483517369146842,0.10557109995590874,0.2028222208179023,1702.1396147154946,37664.600666481776,146780.99064745405,102473.0,1.4323869765445927,938,208,730,938 +7.400000000000006,0.8744009599469025,0.364767680258805,0.4483517369146842,0.10780768806855878,0.20254949938231437,1798.2968915278636,37904.73585573689,146890.32671691084,102473.0,1.4334539509618225,939,209,730,939 +7.500000000000005,0.8724059917322737,0.36293620053229814,0.4286999777201475,0.1101117507764644,0.20678066404172663,1812.4137040290675,38027.73491387723,146758.53970997658,102473.0,1.4321678852963862,938,208,730,938 +7.600000000000006,0.8742437763973652,0.364767680258805,0.448560352831529,0.10788263860748004,0.20248333708526917,1801.6505368351038,38164.14610000826,146853.53838077962,102473.0,1.4330949457982065,940,210,730,940 +7.700000000000006,0.8831754808484038,0.364767680258805,0.448560352831529,0.10239976996100886,0.2028232306361744,1514.671081666199,38012.89928803379,146648.32976003454,102473.0,1.4310923829695095,943,213,730,943 +7.800000000000006,0.8951090775668794,0.364767680258805,0.45522357907817856,0.09287036908073443,0.19124978727774095,1292.9680492915168,38139.15303686369,146317.7153291883,102473.0,1.4278660264575869,946,216,730,946 +7.900000000000006,0.9069990898180242,0.4291489393392728,0.5125267743885675,0.0811089486239982,0.16859253018922998,1118.1205559269174,37959.84437211777,146550.0661784029,102473.0,1.4301334612864158,953,223,730,953 +8.000000000000007,0.9190762963107236,0.49799810876464895,0.5864881092912383,0.06951534424276873,0.14641352252882384,987.0112644017943,38083.49686054857,146467.90143954303,102473.0,1.4293316428673215,959,229,730,959 +8.100000000000007,0.9190762963107236,0.49799810876464895,0.5864881092912383,0.06951534424276873,0.14641352252882384,987.0112644017943,37729.65365211102,146321.74464798055,102473.0,1.4279053472424985,957,229,728,959 +8.200000000000006,0.9169170517572199,0.49799810876464895,0.5668363500967015,0.0717322084637051,0.1510420655989019,1005.1861075554783,37815.870993188066,146726.73935810965,102473.0,1.431857556215878,958,228,730,958 +8.300000000000006,0.9165292275999608,0.49836778301281837,0.5863337994744384,0.0711345380812054,0.14711522481193245,1063.0270429524007,37734.738634345194,146831.52675038922,102473.0,1.4328801416020729,958,228,730,958 +8.400000000000006,0.9121447362660413,0.49836778301281837,0.5479008362442345,0.07550358327540274,0.15568570853899102,1145.0561367703046,37990.07750571951,146928.29458521598,102473.0,1.4338244667884805,958,228,730,958 +8.500000000000007,0.9123225999808005,0.48565026807438816,0.5486543907389779,0.07539595914881692,0.15570007374268066,1160.3982478225657,37937.74247261302,146766.7956589762,102473.0,1.4322484523628292,957,227,730,957 +8.600000000000007,0.9121690660740657,0.48565026807438816,0.5486015801320966,0.07549409899666193,0.15571945197450124,1164.7720203883007,38291.842274589835,146659.82481271515,102473.0,1.4312045593738365,959,229,730,959 +8.700000000000006,0.9153834239714527,0.48565026807438816,0.5289498209375599,0.07428739840823728,0.15996185164021415,1037.1901800554754,38230.6662221282,146384.1050621949,102473.0,1.4285139018297004,960,230,730,960 +8.800000000000008,0.926567275724005,0.49799810876464895,0.5864881092912383,0.06443472728477384,0.1433075882204532,858.078237769703,38634.264436292986,145981.92633840605,102473.0,1.424589173132494,964,234,730,964 +8.900000000000007,0.9380464987394858,0.5738780806607914,0.6318959098267288,0.05401584720209618,0.12254122329078738,683.2687389515884,38653.607527383,146005.61233552406,102473.0,1.424820316917862,970,240,730,970 +9.000000000000007,0.947530186726669,0.6208373869044782,0.6651578258489953,0.0458964124705743,0.10818973566911046,579.827945053232,38766.05325597971,145925.8664077044,102473.0,1.4240421028729948,975,245,730,975 +9.100000000000007,0.9473183925162697,0.6208373869044782,0.6651578258489953,0.046050398729643005,0.10837968512832687,579.74234019446,38590.59258551186,146101.3270781722,102473.0,1.425754365327181,974,244,730,974 +9.200000000000006,0.9469914974140063,0.6208373869044782,0.6651578258489953,0.046222315813837955,0.10802088638301069,580.3705946643179,38421.242518954496,146270.67714472956,102473.0,1.4274069964256884,974,244,730,974 +9.300000000000008,0.9450484275084066,0.6179377009729412,0.6611825372870416,0.047855433199638364,0.11067147449405357,620.9471786101155,38693.752143827856,145970.79482814873,102473.0,1.4244805444180295,970,240,730,970 +9.400000000000007,0.9452856824232523,0.6179377009729412,0.6612416404096987,0.047687152984716485,0.1104864004637672,626.1874474090306,38693.58420043615,146481.08637094568,102473.0,1.4294603102372887,974,242,732,972 +9.500000000000007,0.9477566261585413,0.6208373869044782,0.6789226882897211,0.04546550639241187,0.10576972009654512,610.6758470808943,38510.110583921174,146168.604451017,102473.0,1.4264109028819005,975,245,730,975 +9.600000000000009,0.9442748717498353,0.6193875439387098,0.6614021495228591,0.048275760829639136,0.11017815617813613,635.6388295179536,38644.65524949006,146304.52236946733,102473.0,1.4277372807419255,975,244,731,974 +9.700000000000008,0.9437662966588594,0.5004985148940551,0.6417503903283225,0.049524815495458174,0.1168002856957197,617.2476123646618,39066.366294806234,145633.2211670775,102473.0,1.4211862750878526,974,244,730,974 +9.800000000000008,0.9466719562454651,0.5004985148940551,0.665316256538013,0.04690996405545245,0.11159293668906929,553.4964046993778,39541.132641578566,145121.05027116384,102473.0,1.416188169285215,975,245,730,975 +9.900000000000007,0.9589678423879959,0.5004985148940551,0.7178027992406258,0.036413858658215004,0.09365152180828752,382.69953266702566,39448.39835467144,145026.06438831924,102473.0,1.4152612335768373,981,252,729,982 +10.000000000000007,0.9686787026271481,0.638060829255812,0.77246983431715,0.027849769046894846,0.07373783517888713,284.44793034421787,39587.12965084927,145168.54241184186,102473.0,1.4166516293252063,987,257,730,987 diff --git a/data/p3_kmin_effectiveness.png b/data/p3_kmin_effectiveness.png new file mode 100644 index 0000000..d1e397e Binary files /dev/null and b/data/p3_kmin_effectiveness.png differ diff --git a/data/p3_kmin_pairs.csv b/data/p3_kmin_pairs.csv new file mode 100644 index 0000000..0b45184 --- /dev/null +++ b/data/p3_kmin_pairs.csv @@ -0,0 +1,27 @@ +site_i_idx,site_i_name,site_j_idx,site_j_name,distance_miles,mu_i,sigma_i,mu_j,sigma_j,q_opt,score_mean,served_i_mean,served_j_mean,served_total_mean,unmet_mean,waste_mean,ratio_i_mean,ratio_j_mean,fairness_mean,pair_count +7,MFP Bradford,40,MFP Senior - CFS Lakeview,11.76921918626308,122.27272727272728,29.7425315300864,112.0,15.563490039905,184.0,0.9428869758435676,122.25498527814786,105.3741322184006,227.62911749654845,0.0245101988460443,0.0894835300138062,0.9990972042500004,0.9441164351469572,0.0550585860376161,11 +20,MFP Lamphear Court,43,MFP Senior - Dayspring,2.5388276228095874,126.0,40.6803255750109,77.18181818181819,17.9489174148091,209.0,0.9417319305889976,125.2536380858632,73.67629766238196,198.92993574824516,0.010882511255999,0.2042802570070193,0.9975753346750716,0.96892092605832,0.0307046476592066,10 +15,MFP Danby,57,MFP Senior - Titus Towers,6.74907391207574,160.22222222222223,34.5788149658782,72.8,4.31534728871525,190.0,0.9386917705052576,156.90304496212124,69.19779172023146,226.10083668235268,0.0263680617753903,0.0955966532705892,0.9819261875976928,0.9524403721601729,0.0323828947559224,9 +58,MFP Senior - Villa Serene,23,MFP Millport,10.593196325210428,69.72727272727273,5.0614406860282,166.0,36.4996194805127,84.0,0.9338181981409592,69.66185187329195,158.19618676472925,227.8580386380212,0.030292645480911,0.0885678454479152,0.999954529189803,0.9597122187620404,0.0402423104277625,9 +52,MFP Senior - Metro Plaza Apartments,14,MFP Conklin- Maines Community Center,4.971710797175927,56.3,19.9167712689024,153.16666666666666,20.1125620325993,114.0,0.9614448925652858,56.134920404051805,151.73568494851176,207.8706053525636,0.0030322448229782,0.1685175785897456,0.995351942612302,0.995514771549426,0.0090933662751668,8 +18,MFP Erin,47,MFP Senior - Flannery,12.463935572449168,173.9090909090909,27.3219858189501,61.72727272727273,10.1103007778296,215.0,0.9518261130996396,173.78074383378473,56.36340452390987,230.14414835769463,0.0201807534915724,0.0794234065692216,0.9967743078990589,0.9264515396633294,0.0704809134935804,8 +19,MFP First Assembly Of God Church,44,MFP Senior - East Hill Senior Living,2.909892189220507,146.0,21.6459108042479,39.833333333333336,2.16724933890169,213.0,0.9487649930999984,146.1592916414775,39.86564413193418,186.0249357734117,3.434719920681324e-05,0.2559002569063532,0.999979440137201,0.9998999328210344,8.305258300460189e-05,8 +14,MFP Conklin- Maines Community Center,53,MFP Senior - North Shore Towers,4.71565048597784,153.16666666666666,20.1125620325993,58.333333333333336,6.86051504383355,202.0,0.967323217612732,153.16748725169143,58.222339029392096,211.38982628108351,0.0011179021325842,0.1544406948756659,0.9997651519565478,0.9962419469840804,0.0035724909179595,7 +21,MFP Lansing,41,MFP Senior - Conifer Village,6.107874800160203,181.0,23.2937759927411,33.8,10.3794669098819,233.0,0.96518810029574,180.5999985159279,32.66221052848747,213.26220904441536,0.0033885418373702,0.1469511638223385,0.9997629580990872,0.9799437603770594,0.0198459971043055,7 +56,MFP Senior - Springview Apartments,65,MFP Van Etten,15.98768426073982,27.583333333333332,9.31722094084958,213.7,19.9613515463145,60.0,0.95994825358438,27.729904255502117,208.38933412497505,236.11923838047716,0.0180919607000011,0.0555230464780913,0.9970284582045988,0.9793270372969494,0.0236445044984517,7 +18,MFP Erin,38,MFP Senior - Carpenter Apartments,11.351845173577209,173.9090909090909,27.3219858189501,31.09090909090909,6.75950509215793,232.0,0.9596543054737808,174.75971286597905,30.63486464514537,205.3945775111244,0.0029133478344492,0.1784216899555023,0.9991448032866024,0.9833982853535616,0.0157876889920745,7 +45,"MFP Senior - Elizabeth Square, Waverly",65,MFP Van Etten,16.200324053199697,29.0,9.67658842962558,213.7,19.9613515463145,57.0,0.9575306805051936,28.932857648259983,207.86708464280983,236.79994229106984,0.0199432958297887,0.0528002308357206,0.999417288108808,0.9771252086948627,0.0233685686907207,7 +64,MFP Tuscarora,36,MFP Senior - Addison Place Apartments,5.172850536384525,192.63636363636363,29.8639338576576,30.09090909090909,5.02900676982135,233.0,0.9571630445210272,192.53996336018577,28.1110239281017,220.65098728828744,0.0120985908185018,0.1173960508468503,0.9945384553527564,0.9379297361035528,0.0566087192492033,7 +51,MFP Senior - Long Meadow Senior Housing,26,MFP Owego VFW,1.084296011715769,34.75,13.0043698949098,176.25,34.285234033433,75.0,0.9519792196656196,34.48286887986591,172.9413445528889,207.4242134327548,0.0087250944253651,0.1703031462689808,0.9963411468595392,0.9895484339730172,0.0141104191674435,7 +59,MFP Senior - Village Square/Manor,8,MFP Campbell,10.226626433666802,34.25,6.48249390842192,168.5,40.968946111104,57.0,0.945434723392738,34.31957766684849,166.005020895597,200.3245985624455,0.0092655971607613,0.1987016057502181,1.0,0.98938499203219,0.01061500796781,7 +8,MFP Campbell,42,MFP Senior - Corning Senior Center,12.473579226713138,168.5,40.968946111104,75.0,30.9636884107821,248.0,0.8940926170580517,166.40521210206353,59.56367058819695,225.96888269026047,0.054176555683848,0.096124469238958,0.9984274250036131,0.817411946946492,0.1810154780571212,7 +49,MFP Senior - Jefferson Village,4,MFP Beaver Dams,12.76809179930506,24.818181818181817,2.78633026822672,170.7,28.7906234736241,35.0,0.9541130470769168,24.876624785335387,170.89326699128202,195.76989177661744,0.0015642914652357,0.2169204328935303,1.0,0.9982673733666096,0.0017326266333905,6 +39,MFP Senior - Cayuga Meadows,21,MFP Lansing,5.619262046423938,25.88888888888889,3.33333333333333,181.0,23.2937759927411,38.0,0.9635822985614684,25.940284344595877,180.6618705898014,206.60215493439725,0.0010621408662808,0.1735913802624109,1.0,0.9988153083219709,0.001184691678029,5 +68,MFP Whitney Point,60,MFP Senior - Wells Apartments,16.87604765269892,202.54545454545453,30.4478690103713,23.5,4.55216676124922,238.0,0.9571221984285616,200.0505539505132,21.74456459228217,221.7951185427954,0.0126961852535466,0.1128195258288185,0.9934789092932628,0.9275456911378226,0.0659332181554401,5 +48,MFP Senior - Harry L Apartments,26,MFP Owego VFW,16.915448371143015,32.833333333333336,6.24232862533419,176.25,34.285234033433,51.0,0.9557506491221164,32.967065793811216,175.59195315480338,208.5590189486146,0.0069353537729846,0.1657639242055417,1.0,0.9920687776161624,0.0079312223838376,5 +23,MFP Millport,55,MFP Senior - Park Terrace Congregate Apartments,15.115694505719103,166.0,36.4996194805127,24.363636363636363,4.41073071662117,239.0,0.948162717900407,166.58653630344105,23.67680631426951,190.26334261771052,0.0025299726211009,0.2389466295291578,0.9990836602507632,0.981692921114046,0.0174039050195892,5 +69,MFP Windsor,50,MFP Senior - Lincoln Court,14.510764082261073,200.9090909090909,34.8954281975578,26.0,4.89897948556636,237.0,0.9464011221716472,197.9911686202582,23.27842987046033,221.26959849071855,0.0191340978880797,0.1149216060371257,0.9895414756554092,0.9030310460987526,0.0865706643033308,5 +46,MFP Senior - Ellis Hollow,34,MFP Salvation Army Ithaca,2.3921824800166336,24.727272727272727,13.8064543536051,181.1818181818182,39.5848915163808,69.0,0.9461425904751966,24.60395402465814,177.22230271238274,201.8262567370409,0.0095740093215226,0.1926949730518365,0.9559781794865208,0.9891674250122044,0.0547537283644393,5 +29,MFP Reach for Christ Church Freeville,61,MFP Senior - Woodsedge Apartments,10.988460066901554,220.0,22.6175939382498,17.2,4.23739962188552,244.0,0.962586600279761,217.59971016858316,14.787948793888864,232.387658962472,0.0145772043063853,0.070449364150112,0.993904404447825,0.871430362462156,0.122474041985669,4 +20,MFP Lamphear Court,42,MFP Senior - Corning Senior Center,1.2156460766066033,126.0,40.6803255750109,75.0,30.9636884107821,227.0,0.9302798578553,127.56628346264212,70.70067791416179,198.2669613768039,0.0177085695288394,0.2069321544927843,0.9986662140788032,0.9409016797571024,0.0593355807387992,2 +47,MFP Senior - Flannery,37,MFP Senior - Bragg,0.9136830730627136,61.72727272727273,10.1103007778296,66.88888888888889,6.03001750504186,99.0,0.9028897915279448,61.641667869309266,66.97057154062155,128.6122394099308,0.0,0.4855510423602767,1.0,1.0,0.0,1 diff --git a/data/p3_kmin_sites.csv b/data/p3_kmin_sites.csv new file mode 100644 index 0000000..fe6826d --- /dev/null +++ b/data/p3_kmin_sites.csv @@ -0,0 +1,71 @@ +site_idx,site_name,total_visits_allocated,single_visits,paired_first,paired_second,paired_total +1,MFP American Legion - Binghamton,17,17,0,0,0 +2,MFP Avoca,26,26,0,0,0 +3,MFP Bath,22,22,0,0,0 +4,MFP Beaver Dams,14,8,0,6,6 +5,MFP Birnie Transportation Services,14,14,0,0,0 +6,MFP Boys and Girls Club,16,16,0,0,0 +7,MFP Bradford,12,1,11,0,11 +8,MFP Campbell,16,2,7,7,14 +9,MFP Canisteo,15,15,0,0,0 +10,MFP Colesville,18,18,0,0,0 +11,MFP College Corning Community College,13,13,0,0,0 +12,MFP College Ithaca College,12,12,0,0,0 +13,MFP College TC3 -College,14,14,0,0,0 +14,MFP Conklin- Maines Community Center,15,0,7,8,15 +15,MFP Danby,13,4,9,0,9 +16,MFP Deposit,15,15,0,0,0 +17,MFP Endwell United Methodist Church,24,24,0,0,0 +18,MFP Erin,15,0,15,0,15 +19,MFP First Assembly Of God Church,15,7,8,0,8 +20,MFP Lamphear Court,12,0,12,0,12 +21,MFP Lansing,16,4,7,5,12 +22,MFP Lindley,18,18,0,0,0 +23,MFP Millport,14,0,5,9,14 +24,MFP Montour Falls-Schuyler County Human Services Complex,14,14,0,0,0 +25,MFP Nichols-The Creamery,8,8,0,0,0 +26,MFP Owego VFW,16,4,0,12,12 +27,MFP Prattsburgh,14,14,0,0,0 +28,MFP Rathbone,21,21,0,0,0 +29,MFP Reach for Christ Church Freeville,17,13,4,0,4 +30,MFP Redeemer Lutheran Church,18,18,0,0,0 +31,MFP Rehoboth Deliverance Ministry,18,18,0,0,0 +32,MFP Richford,21,21,0,0,0 +33,MFP Saint Mary Recreation Center,13,13,0,0,0 +34,MFP Salvation Army Ithaca,16,11,0,5,5 +35,MFP Schuyler Outreach,10,10,0,0,0 +36,MFP Senior - Addison Place Apartments,7,0,0,7,7 +37,MFP Senior - Bragg,8,7,0,1,1 +38,MFP Senior - Carpenter Apartments,7,0,0,7,7 +39,MFP Senior - Cayuga Meadows,5,0,5,0,5 +40,MFP Senior - CFS Lakeview,11,0,0,11,11 +41,MFP Senior - Conifer Village,7,0,0,7,7 +42,MFP Senior - Corning Senior Center,9,0,0,9,9 +43,MFP Senior - Dayspring,10,0,0,10,10 +44,MFP Senior - East Hill Senior Living,8,0,0,8,8 +45,"MFP Senior - Elizabeth Square, Waverly",7,0,7,0,7 +46,MFP Senior - Ellis Hollow,5,0,5,0,5 +47,MFP Senior - Flannery,9,0,1,8,9 +48,MFP Senior - Harry L Apartments,5,0,5,0,5 +49,MFP Senior - Jefferson Village,6,0,6,0,6 +50,MFP Senior - Lincoln Court,5,0,0,5,5 +51,MFP Senior - Long Meadow Senior Housing,7,0,7,0,7 +52,MFP Senior - Metro Plaza Apartments,8,0,8,0,8 +53,MFP Senior - North Shore Towers,7,0,0,7,7 +54,"MFP Senior - Northern Broome Senior Center, Whitney Point",8,8,0,0,0 +55,MFP Senior - Park Terrace Congregate Apartments,5,0,0,5,5 +56,MFP Senior - Springview Apartments,7,0,7,0,7 +57,MFP Senior - Titus Towers,9,0,0,9,9 +58,MFP Senior - Villa Serene,9,0,9,0,9 +59,MFP Senior - Village Square/Manor,7,0,7,0,7 +60,MFP Senior - Wells Apartments,5,0,0,5,5 +61,MFP Senior - Woodsedge Apartments,4,0,0,4,4 +62,MFP The Love Church,22,22,0,0,0 +63,MFP Troupsburg,11,11,0,0,0 +64,MFP Tuscarora,17,10,7,0,7 +65,MFP Van Etten,17,3,0,14,14 +66,MFP Waverly,29,29,0,0,0 +67,MFP Wayland,17,17,0,0,0 +68,MFP Whitney Point,17,12,5,0,5 +69,MFP Windsor,17,12,5,0,5 +70,MFP Woodhull,16,16,0,0,0 diff --git a/p3_kmin.py b/p3_kmin.py new file mode 100644 index 0000000..c3d0dc0 --- /dev/null +++ b/p3_kmin.py @@ -0,0 +1,528 @@ +""" +Task 3: k-min allocation with ordered two-stop pairing. + +- Uses 2019 data to allocate visit frequencies. +- Pairs are drawn from ordered_pairs_allocation_k6_cap250.csv (ordered i->j). +- Total annual trips (paired + single) are fixed to N_TARGET via fixed-point adjustment. +""" + +from __future__ import annotations + +import argparse +import os +import math +from typing import Dict, List, Tuple + +import numpy as np +import pandas as pd + +try: + import matplotlib + + matplotlib.use("Agg") + import matplotlib.pyplot as plt + + _HAS_MPL = True +except ModuleNotFoundError: + plt = None + _HAS_MPL = False + + +INPUT_XLSX = "prob/MFP Regular Sites 2019.xlsx" +INPUT_PAIRS = "data/ordered_pairs_allocation_k6_cap250.csv" +OUTPUT_DIR = "data" + +C_OPT = 250 +N_TARGET = 730 +ALPHA = 0.6 +BETA = 0.2 +N_SIMS = 2000 +RANDOM_SEED = 606 + + +def gini_coefficient(values: np.ndarray) -> float: + x = np.asarray(values, dtype=float) + x = x[np.isfinite(x)] + if x.size == 0: + return 0.0 + x = np.clip(x, 0, None) + total = x.sum() + if total <= 0: + return 0.0 + + x_sorted = np.sort(x) + n = x_sorted.size + idx = np.arange(1, n + 1, dtype=float) + return float((2.0 * (idx * x_sorted).sum()) / (n * total) - (n + 1.0) / n) + + +def _norm_pdf(z): + return np.exp(-0.5 * z * z) / np.sqrt(2.0 * np.pi) + + +def _norm_cdf(z): + z = np.asarray(z, dtype=float) + erf_vec = np.vectorize(math.erf, otypes=[float]) + return 0.5 * (1.0 + erf_vec(z / np.sqrt(2.0))) + + +def expected_clipped_normal(mu, sigma, lower=0.0, upper=1.0): + mu = np.asarray(mu, dtype=float) + sigma = np.asarray(sigma, dtype=float) + lower = float(lower) + upper = float(upper) + + if lower > upper: + raise ValueError("lower must be <= upper") + + out = np.empty_like(mu, dtype=float) + mask = sigma > 0 + out[~mask] = np.clip(mu[~mask], lower, upper) + + if np.any(mask): + m = mu[mask] + s = sigma[mask] + + z_u = (upper - m) / s + z_l = (lower - m) / s + + Phi_u = _norm_cdf(z_u) + Phi_l = _norm_cdf(z_l) + phi_u = _norm_pdf(z_u) + phi_l = _norm_pdf(z_l) + + ex_le_u = m * Phi_u - s * phi_u + ex_le_l = m * Phi_l - s * phi_l + + p_le_l = Phi_l + p_gt_u = 1.0 - Phi_u + + out[mask] = lower * p_le_l + (ex_le_u - ex_le_l) + upper * p_gt_u + + return out + + +def _find_col(df: pd.DataFrame, candidates: List[str]) -> str: + for name in candidates: + if name in df.columns: + return name + lower_map = {c.lower(): c for c in df.columns} + for name in candidates: + key = name.lower() + if key in lower_map: + return lower_map[key] + raise ValueError(f"Missing required column. Tried: {candidates}") + + +def load_sites(path: str) -> pd.DataFrame: + df = pd.read_excel(path) + + col_site = _find_col(df, ["Site Name", "site name", "site"]) + col_mu = _find_col(df, ["Average Demand per Visit", "average demand per visit", "avg demand"]) + col_sigma = _find_col(df, ["StDev(Demand per Visit)", "stdev(demand per visit)", "stdev", "std"]) + col_visits = _find_col(df, ["Number of Visits in 2019", "number of visits in 2019", "visits"]) + + out = df[[col_site, col_mu, col_sigma, col_visits]].copy() + out.columns = ["site_name", "mu", "sigma", "visits_2019"] + out["mu"] = pd.to_numeric(out["mu"], errors="coerce") + out["sigma"] = pd.to_numeric(out["sigma"], errors="coerce").fillna(0.0) + out["visits_2019"] = pd.to_numeric(out["visits_2019"], errors="coerce") + if out[["mu", "visits_2019"]].isna().any().any(): + missing = out[out[["mu", "visits_2019"]].isna().any(axis=1)] + raise ValueError(f"Missing mu/visits_2019 for {len(missing)} rows.") + + out = out.reset_index(drop=True) + out["site_idx"] = np.arange(1, len(out) + 1, dtype=int) + out["TotalDemand"] = out["mu"] * out["visits_2019"] + return out + + +def allocate_visits(df: pd.DataFrame, k_min_real: float, n_total: int) -> np.ndarray: + df_sorted = df.sort_values("TotalDemand").reset_index(drop=False) + n = len(df_sorted) + + k_floor = int(np.floor(k_min_real)) + k_ceil = int(np.ceil(k_min_real)) + frac = k_min_real - k_floor + + n_ceil = int(round(n * frac)) + n_floor = n - n_ceil + + k_base = np.array([k_floor] * n_floor + [k_ceil] * n_ceil, dtype=int) + + n_reserved = int(k_base.sum()) + n_free = int(n_total - n_reserved) + if n_free < 0: + return None + + weights = df_sorted["TotalDemand"] / df_sorted["TotalDemand"].sum() + allocated = (k_base + n_free * weights.values).round().astype(int) + allocated = np.maximum(allocated, k_base) + + diff = int(n_total - allocated.sum()) + if diff != 0: + sorted_idx = weights.sort_values(ascending=(diff < 0)).index.tolist() + for idx in sorted_idx[:abs(diff)]: + allocated[idx] += int(np.sign(diff)) + + alloc_sorted = df_sorted[["site_idx"]].copy() + alloc_sorted["AllocatedVisits"] = allocated + alloc = alloc_sorted.sort_values("site_idx")["AllocatedVisits"].to_numpy(dtype=int) + return alloc + + +def assign_pairs(pairs_df: pd.DataFrame, visits: np.ndarray) -> Tuple[pd.DataFrame, np.ndarray]: + remaining = visits.astype(int).copy() + pair_counts = np.zeros(len(pairs_df), dtype=int) + + for idx, row in pairs_df.iterrows(): + i = int(row["site_i_idx"]) - 1 + j = int(row["site_j_idx"]) - 1 + if remaining[i] <= 0 or remaining[j] <= 0: + continue + t = int(min(remaining[i], remaining[j])) + if t <= 0: + continue + pair_counts[idx] = t + remaining[i] -= t + remaining[j] -= t + + out = pairs_df.copy() + out["pair_count"] = pair_counts + return out, remaining + + +def _compute_metrics( + sites: pd.DataFrame, + visits: np.ndarray, + pairs_with_counts: pd.DataFrame, + singles: np.ndarray, + *, + alpha: float, + beta: float, + capacity: float, +) -> Dict[str, float]: + n = len(sites) + mu = sites["mu"].to_numpy(dtype=float) + sigma = sites["sigma"].to_numpy(dtype=float) + demand = sites["TotalDemand"].to_numpy(dtype=float) + + eff_single = expected_clipped_normal(mu, sigma, lower=0.0, upper=capacity) + served_single = singles * eff_single + cap_single = singles * capacity + + pair_first = np.zeros(n, dtype=float) + pair_second = np.zeros(n, dtype=float) + served_first = np.zeros(n, dtype=float) + served_second = np.zeros(n, dtype=float) + cap_first = np.zeros(n, dtype=float) + cap_second = np.zeros(n, dtype=float) + + for _, row in pairs_with_counts.iterrows(): + count = int(row["pair_count"]) + if count <= 0: + continue + i = int(row["site_i_idx"]) - 1 + j = int(row["site_j_idx"]) - 1 + q_opt = float(row["q_opt"]) + served_i = float(row["served_i_mean"]) + served_j = float(row["served_j_mean"]) + + pair_first[i] += count + pair_second[j] += count + served_first[i] += count * served_i + served_second[j] += count * served_j + cap_first[i] += count * q_opt + cap_second[j] += count * (capacity - q_opt) + + annual_eff = served_single + served_first + served_second + cap_total = cap_single + cap_first + cap_second + + with np.errstate(divide="ignore", invalid="ignore"): + base = np.where(demand > 0, annual_eff / demand, 0.0) + unmet = np.where(demand > 0, np.maximum(0.0, demand - annual_eff) / demand, 0.0) + waste = np.where(cap_total > 0, np.maximum(0.0, cap_total - annual_eff) / cap_total, 0.0) + + score = np.clip(base - alpha * unmet - beta * waste, 0.0, 1.0) + bottom_n = max(1, int(np.ceil(n * 0.10))) + + total_served = float(annual_eff.sum()) + total_demand = float(demand.sum()) + total_unmet = float(np.maximum(0.0, demand - annual_eff).sum()) + total_waste = float(np.maximum(0.0, cap_total - annual_eff).sum()) + + return { + "effectiveness": float(score.mean()), + "min_eff": float(score.min()), + "bottom10_eff": float(np.sort(score)[:bottom_n].mean()), + "gini_eff": float(gini_coefficient(score)), + "std_eff": float(score.std()), + "total_unmet": total_unmet, + "total_waste": total_waste, + "total_served": total_served, + "total_demand": total_demand, + "serve_ratio": float(total_served / total_demand) if total_demand > 0 else 0.0, + "score_per_site": score, + "annual_eff": annual_eff, + "pair_first": pair_first, + "pair_second": pair_second, + } + + +def allocate_with_pairs( + sites: pd.DataFrame, + pairs_df: pd.DataFrame, + k_min: float, + *, + n_target: int, + capacity: float, + max_iter: int = 30, +) -> Tuple[np.ndarray, np.ndarray, pd.DataFrame, int]: + n_total_guess = int(n_target) + + for _ in range(max_iter): + visits = allocate_visits(sites, k_min, n_total_guess) + if visits is None: + return None, None, None, None + + pairs_with_counts, singles = assign_pairs(pairs_df, visits) + pair_total = int(pairs_with_counts["pair_count"].sum()) + new_guess = int(n_target + pair_total) + if new_guess == n_total_guess: + return visits, singles, pairs_with_counts, n_total_guess + n_total_guess = new_guess + + return visits, singles, pairs_with_counts, n_total_guess + + +def select_kmin(results: pd.DataFrame) -> float: + gini_candidates = results.loc[results["gini_eff"] < 0.2, "k_min"] + if len(gini_candidates) > 0: + return float(gini_candidates.iloc[0]) + idx = results["effectiveness"].idxmax() + return float(results.loc[idx, "k_min"]) + + +def plot_results(results: pd.DataFrame, output_dir: str) -> float: + if not _HAS_MPL: + raise RuntimeError("缺少依赖: matplotlib(无法绘图)。请先安装 matplotlib 再运行绘图部分。") + + fig, axes = plt.subplots(4, 2, figsize=(12, 13)) + + selected_k = select_kmin(results) + selected_idx = (results["k_min"] - selected_k).abs().idxmin() + selected_eff = float(results.loc[selected_idx, "effectiveness"]) + selected_label = f"Selected k_min={selected_k:.1f}" + + ax = axes[0, 0] + ax.plot(results["k_min"], results["effectiveness"], "b-", lw=2) + ax.axvline(selected_k, color="r", ls="--", label=selected_label) + ax.scatter([selected_k], [selected_eff], c="r", s=100, zorder=5) + ax.set_xlabel("k_min") + ax.set_ylabel("Mean Effectiveness") + ax.set_title("Mean Effectiveness vs k_min") + ax.legend() + ax.grid(True, alpha=0.3) + + ax = axes[0, 1] + ax.plot(results["k_min"], results["bottom10_eff"], "m-", lw=2) + ax.axvline(selected_k, color="r", ls="--") + ax.set_xlabel("k_min") + ax.set_ylabel("Bottom 10% Mean Effectiveness") + ax.set_title("Bottom 10% Mean Effectiveness vs k_min") + ax.grid(True, alpha=0.3) + + ax = axes[1, 0] + ax.plot(results["k_min"], results["total_served"] / 1000, "c-", lw=2) + ax.axhline(results["total_demand"].iloc[0] / 1000, color="gray", ls=":", label="Total Demand") + ax.axvline(selected_k, color="r", ls="--") + ax.set_xlabel("k_min") + ax.set_ylabel("Served Families (×1000)") + ax.set_title("Total Served vs k_min") + ax.legend() + ax.grid(True, alpha=0.3) + + ax = axes[1, 1] + ax.plot(results["k_min"], results["min_eff"], "g-", lw=2) + ax.axvline(selected_k, color="r", ls="--") + ax.set_xlabel("k_min") + ax.set_ylabel("Min Effectiveness") + ax.set_title("Worst Site Effectiveness vs k_min") + ax.grid(True, alpha=0.3) + + ax = axes[2, 0] + ax.plot(results["k_min"], results["unmet"] / 1000, "r-", lw=2, label="Unmet") + ax.plot(results["k_min"], results["waste"] / 1000, "b-", lw=2, label="Waste") + ax.axvline(selected_k, color="gray", ls="--") + ax.set_xlabel("k_min") + ax.set_ylabel("Families (×1000)") + ax.set_title("Unmet Demand vs Wasted Capacity") + ax.legend() + ax.grid(True, alpha=0.3) + + ax = axes[2, 1] + ax.plot(results["k_min"], results["std_eff"], color="tab:orange", lw=2) + ax.axvline(selected_k, color="gray", ls="--") + ax.set_xlabel("k_min") + ax.set_ylabel("Std Effectiveness") + ax.set_title("Effectiveness Std vs k_min") + ax.grid(True, alpha=0.3) + + ax = axes[3, 0] + ax.plot(results["k_min"], results["gini_eff"], color="tab:purple", lw=2) + ax.axhline(0.2, color="gray", ls=":", lw=1) + ax.axvline(selected_k, color="r", ls="--") + ax.set_xlabel("k_min") + ax.set_ylabel("Gini Coefficient") + ax.set_title("Gini (Effectiveness) vs k_min") + ax.grid(True, alpha=0.3) + + axes[3, 1].axis("off") + + plt.tight_layout() + os.makedirs(output_dir, exist_ok=True) + plt.savefig(os.path.join(output_dir, "p3_kmin_effectiveness.png"), dpi=150) + plt.close(fig) + + return selected_k + + +def main() -> None: + parser = argparse.ArgumentParser(description="Task 3 k-min allocation with two-stop pairing.") + parser.add_argument("--input-xlsx", default=INPUT_XLSX) + parser.add_argument("--input-pairs", default=INPUT_PAIRS) + parser.add_argument("--output-dir", default=OUTPUT_DIR) + parser.add_argument("--kmin-start", type=float, default=1.0) + parser.add_argument("--kmin-end", type=float, default=10.0) + parser.add_argument("--kmin-step", type=float, default=0.1) + parser.add_argument("--capacity", type=float, default=C_OPT) + parser.add_argument("--n-target", type=int, default=N_TARGET) + parser.add_argument("--alpha", type=float, default=ALPHA) + parser.add_argument("--beta", type=float, default=BETA) + args = parser.parse_args() + + sites = load_sites(args.input_xlsx) + pairs = pd.read_csv(args.input_pairs) + required_cols = { + "site_i_idx", + "site_j_idx", + "score_mean", + "q_opt", + "served_i_mean", + "served_j_mean", + "distance_miles", + } + missing = required_cols.difference(pairs.columns) + if missing: + raise ValueError(f"Missing columns in pairs CSV: {sorted(missing)}") + + pairs = pairs.sort_values( + ["score_mean", "distance_miles"], ascending=[False, True] + ).reset_index(drop=True) + + k_range = np.arange(args.kmin_start, args.kmin_end + 1e-9, args.kmin_step) + results = [] + + for k_min in k_range: + visits, singles, pairs_with_counts, n_total_guess = allocate_with_pairs( + sites, + pairs, + float(k_min), + n_target=args.n_target, + capacity=args.capacity, + ) + if visits is None: + continue + + metrics = _compute_metrics( + sites, + visits, + pairs_with_counts, + singles, + alpha=args.alpha, + beta=args.beta, + capacity=args.capacity, + ) + + pair_total = int(pairs_with_counts["pair_count"].sum()) + total_trips = int(visits.sum() - pair_total) + row = { + "k_min": float(k_min), + "effectiveness": metrics["effectiveness"], + "min_eff": metrics["min_eff"], + "bottom10_eff": metrics["bottom10_eff"], + "gini_eff": metrics["gini_eff"], + "std_eff": metrics["std_eff"], + "unmet": metrics["total_unmet"], + "waste": metrics["total_waste"], + "total_served": metrics["total_served"], + "total_demand": metrics["total_demand"], + "serve_ratio": metrics["serve_ratio"], + "total_visits_allocated": int(visits.sum()), + "pair_trips": pair_total, + "total_trips": total_trips, + "n_total_guess": int(n_total_guess), + } + results.append(row) + + results_df = pd.DataFrame(results) + if len(results_df) == 0: + raise RuntimeError("No feasible k_min values found.") + + best_k = select_kmin(results_df) + best_idx = (results_df["k_min"] - best_k).abs().idxmin() + + visits, singles, pairs_with_counts, n_total_guess = allocate_with_pairs( + sites, + pairs, + float(best_k), + n_target=args.n_target, + capacity=args.capacity, + ) + metrics = _compute_metrics( + sites, + visits, + pairs_with_counts, + singles, + alpha=args.alpha, + beta=args.beta, + capacity=args.capacity, + ) + + pair_total = int(pairs_with_counts["pair_count"].sum()) + total_trips = int(visits.sum() - pair_total) + + site_rows = pd.DataFrame( + { + "site_idx": sites["site_idx"], + "site_name": sites["site_name"], + "total_visits_allocated": visits, + "single_visits": singles, + "paired_first": metrics["pair_first"].astype(int), + "paired_second": metrics["pair_second"].astype(int), + "paired_total": (metrics["pair_first"] + metrics["pair_second"]).astype(int), + } + ) + + pairs_out = pairs_with_counts.loc[pairs_with_counts["pair_count"] > 0].copy() + pairs_out = pairs_out.sort_values(["pair_count", "score_mean"], ascending=[False, False]) + + os.makedirs(args.output_dir, exist_ok=True) + results_df.to_csv(os.path.join(args.output_dir, "p3_kmin_data.csv"), index=False) + site_rows.to_csv(os.path.join(args.output_dir, "p3_kmin_sites.csv"), index=False) + pairs_out.to_csv(os.path.join(args.output_dir, "p3_kmin_pairs.csv"), index=False) + + if _HAS_MPL: + plot_results(results_df, args.output_dir) + else: + print("未检测到 matplotlib,跳过绘图(仍会保存CSV结果)。") + + print(f"Best k_min={best_k:.1f} (total_trips={total_trips}, pair_trips={pair_total})") + print( + "Saved: data/p3_kmin_data.csv, data/p3_kmin_sites.csv, " + "data/p3_kmin_pairs.csv, data/p3_kmin_effectiveness.png" + ) + + +if __name__ == "__main__": + main() diff --git a/two_stop_allocation.py b/two_stop_allocation.py new file mode 100644 index 0000000..cfc0859 --- /dev/null +++ b/two_stop_allocation.py @@ -0,0 +1,185 @@ +""" +Optimize first-stop allocation for ordered two-stop pairs using Monte Carlo. +""" + +from __future__ import annotations + +import argparse +import os +from typing import Dict, Tuple + +import numpy as np +import pandas as pd + + +DEFAULT_INPUT = "data/candidate_pairs_k6_cap250.csv" +DEFAULT_OUTPUT = "data/ordered_pairs_allocation_k6_cap250.csv" + +ALPHA = 0.6 +BETA = 0.2 +GAMMA = 0.0 +N_SIMS = 2000 +RANDOM_SEED = 606 + + +def _simulate_pair( + mu_i: float, + sigma_i: float, + mu_j: float, + sigma_j: float, + *, + capacity: float, + alpha: float, + beta: float, + gamma: float, + step: int, + n_sims: int, + seed: int, +) -> Dict[str, float]: + rng = np.random.default_rng(seed) + d_i = rng.normal(mu_i, sigma_i, size=n_sims) + d_j = rng.normal(mu_j, sigma_j, size=n_sims) + d_i = np.clip(d_i, 0, None) + d_j = np.clip(d_j, 0, None) + + total_d = d_i + d_j + total_d_safe = np.maximum(total_d, 1.0) + d_i_safe = np.maximum(d_i, 1.0) + d_j_safe = np.maximum(d_j, 1.0) + + best_q = 0 + best_score = -1e9 + best_metrics: Tuple[float, ...] = () + + for q in range(0, int(capacity) + 1, step): + s_i = np.minimum(d_i, float(q)) + remaining = capacity - s_i + s_j = np.minimum(d_j, remaining) + served = s_i + s_j + + base = served / total_d_safe + unmet = np.maximum(0.0, total_d - served) / total_d_safe + waste = (capacity - served) / capacity + + ratio_i = s_i / d_i_safe + ratio_j = s_j / d_j_safe + fairness = np.abs(ratio_i - ratio_j) + + score = base - alpha * unmet - beta * waste - gamma * fairness + score_mean = float(np.mean(score)) + + if score_mean > best_score: + best_score = score_mean + best_q = q + best_metrics = ( + float(np.mean(s_i)), + float(np.mean(s_j)), + float(np.mean(served)), + float(np.mean(unmet)), + float(np.mean(waste)), + float(np.mean(ratio_i)), + float(np.mean(ratio_j)), + float(np.mean(fairness)), + ) + + return { + "q_opt": float(best_q), + "score_mean": float(best_score), + "served_i_mean": best_metrics[0], + "served_j_mean": best_metrics[1], + "served_total_mean": best_metrics[2], + "unmet_mean": best_metrics[3], + "waste_mean": best_metrics[4], + "ratio_i_mean": best_metrics[5], + "ratio_j_mean": best_metrics[6], + "fairness_mean": best_metrics[7], + } + + +def _directional_row(row: pd.Series, forward: bool) -> Dict[str, float]: + if forward: + return { + "site_i_idx": int(row["site_i_idx"]), + "site_i_name": row["site_i_name"], + "site_j_idx": int(row["site_j_idx"]), + "site_j_name": row["site_j_name"], + "distance_miles": float(row["distance_miles"]), + "mu_i": float(row["mu_i"]), + "sigma_i": float(row["sigma_i"]), + "mu_j": float(row["mu_j"]), + "sigma_j": float(row["sigma_j"]), + } + return { + "site_i_idx": int(row["site_j_idx"]), + "site_i_name": row["site_j_name"], + "site_j_idx": int(row["site_i_idx"]), + "site_j_name": row["site_i_name"], + "distance_miles": float(row["distance_miles"]), + "mu_i": float(row["mu_j"]), + "sigma_i": float(row["sigma_j"]), + "mu_j": float(row["mu_i"]), + "sigma_j": float(row["sigma_i"]), + } + + +def main() -> None: + parser = argparse.ArgumentParser( + description="Optimize first-stop allocation for ordered two-stop pairs." + ) + parser.add_argument("--input", default=DEFAULT_INPUT) + parser.add_argument("--output", default=DEFAULT_OUTPUT) + parser.add_argument("--capacity", type=float, default=250.0) + parser.add_argument("--alpha", type=float, default=ALPHA) + parser.add_argument("--beta", type=float, default=BETA) + parser.add_argument("--gamma", type=float, default=GAMMA) + parser.add_argument("--step", type=int, default=1, help="Grid step for q in [0, C].") + parser.add_argument("--n-sims", type=int, default=N_SIMS) + parser.add_argument("--seed", type=int, default=RANDOM_SEED) + args = parser.parse_args() + + df = pd.read_csv(args.input) + required = { + "site_i_idx", + "site_i_name", + "site_j_idx", + "site_j_name", + "distance_miles", + "mu_i", + "sigma_i", + "mu_j", + "sigma_j", + } + missing = required.difference(df.columns) + if missing: + raise ValueError(f"Missing columns in input: {sorted(missing)}") + + rows = [] + for idx, row in df.iterrows(): + for forward in (True, False): + base = _directional_row(row, forward) + seed = int(args.seed) + int(idx) * 2 + (0 if forward else 1) + metrics = _simulate_pair( + base["mu_i"], + base["sigma_i"], + base["mu_j"], + base["sigma_j"], + capacity=args.capacity, + alpha=args.alpha, + beta=args.beta, + gamma=args.gamma, + step=args.step, + n_sims=args.n_sims, + seed=seed, + ) + rows.append({**base, **metrics}) + + out = pd.DataFrame(rows) + out = out.sort_values(["site_i_idx", "site_j_idx"]).reset_index(drop=True) + + os.makedirs(os.path.dirname(args.output), exist_ok=True) + out.to_csv(args.output, index=False) + print(f"Saved {len(out)} ordered pairs to {args.output}") + + +if __name__ == "__main__": + main()