I am working on a problem where I have a
set of 2D vertices and a
test point. I want to chek whether the test point lies inside the polygon formed by the set of given vertices. I am trying to model this problem using discrete optimization.
Naturally, this lies under point-in-polygon problem and I tried to implement a model for the Ray casting algorithm for my discrete problem. It seems a bit difficult to model and program it as I ran into some division issues.(You can look at this post for the model and the issue). There is a big discussion about the method in this stack-post
1. Is there any other way in discrete optimization modeling to check if a test point lies inside the set of vertices?
2. Does the Ray-casting algorithm fit best when we model it in Integer programming format?
This problem is kinda of stressing me out. Can anyone suggest me some other method that we can model as a constraint model I am using a constrained programming method hence strictly integers only
Any help will be really appreciated :)