-
Notifications
You must be signed in to change notification settings - Fork 56
P dispersion #268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
P dispersion #268
Conversation
gegen07
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just have this comment and it looks nice to me. Again, you are doing an awesome job @erinrolson.
|
Oops, just saw this after fixing the plot, but your code is much cleaner.
I'll play with implementing your solution a bit later, thanks!
…On Fri, Aug 19, 2022 at 3:33 PM Germano Barcelos ***@***.***> wrote:
***@***.**** commented on this pull request.
I just have this comment and it looks nice to me. Again, you are doing an
awesome job @erinrolson <https://github.com/erinrolson>.
------------------------------
In notebooks/facloc-disperse-real-world.ipynb
<#268 (comment)>:
> + " legend_elements.append(_patch)\n",
+ "\n",
+ " if 'predefined_loc' in facility_points.columns:\n",
+ " \n",
+ " pre_fac = facility_points[facility_points.predefined_loc == 1]\n",
+ " for i in range(len(pre_fac)):\n",
+ " pre_fac.iloc[[i]].plot(ax=ax,\n",
+ " marker=\"*\",\n",
+ " markersize=200 * 3.0,\n",
+ " alpha=0.8,\n",
+ " zorder=4,\n",
+ " edgecolor=\"red\",\n",
+ " facecolor=pre_colors[i])\n",
+ "\n",
+ " other_fac = facility_points[facility_points.predefined_loc == 0]\n",
+ " for i in sited_facilities:\n",
Aha! Gotcha! This is a super tricky thing.
In this case:
fac_sites = [0, 3, 5, 6, 7, 11]
sited_facilities = [0, 1, 2, 3, 4, 5]
other_fac contains stores sites, except predefined ones and it has 16
rows (index ranging from 0 to 15), so when you index with sited_facilities
you are using the right indexes but in a dataset that doesn't correspond to
the facilities chosen. So, it will print more stores than expected 9 in
this case instead of 6.
I recommend taking a look at this gist
<https://gist.github.com/gegen07/32f961686f4b339870a72291ae32c322> I did
which makes it simpler and less repetitive. It also solves the issue of
printing more facilities than expected.
—
Reply to this email directly, view it on GitHub
<#268 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJKDQOXG32IVDTY2TENQJFLVZ7OQDANCNFSM56IWR6IA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
gegen07
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
The p-dispersion notebook is giving a validation error (non-unique cell id) when I try to build the docs. I solve this error cut all notebook cells and then pasting them.
-
Rerun all notebooks, dispersion and real world examples starting in 200th cell.
Minor comments and I think it's good to merge.
|
congrats on another successful PR @erinrolson! 🎉 |
|
Thank you!
…On Fri, Sep 9, 2022 at 4:00 PM James Gaboardi ***@***.***> wrote:
congrats on another successful PR @erinrolson
<https://github.com/erinrolson>! 🎉
—
Reply to this email directly, view it on GitHub
<#268 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJKDQOWXBVBOEPXCZGEMKDLV5OJOBANCNFSM56IWR6IA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Implement p-dispersion model for GSoC '22