How should you model points to create general functions to use in parameters?

11 views
Skip to first unread message

struijs...@gmail.com

unread,
Apr 23, 2019, 4:40:25 AM4/23/19
to AIMMS - The Modeling System
I'm trying to model a problem involving polygons on a fixed set of points. My input is basically a set of points (modeled as a set with index p,p1,p2,q1,q2), with coordinates in the plane (parameters coordinate_X(p), coordinate_Y(p) ). Most of my constraints only involve the edges between the input point, but now I would like to check whether some edges intersect a ray emanated from a midpoint of two input points. So, I created a parameter segmentCrossesRay(p1,p2,q1,q2). Of course, because the center of two input points is not an input point in general (and shouldn't become one), this does not work. I tried to make a superset of the input set (say with index a) and define my parameters over this set. However, this seems to make my display (a graph) of the solution break. Additionally, I would still have to define this midpoints somehow.

Ideally, I would like to be able to write something like segmentCrossesRay(midpoint(p1,p2),perpendicular(p1,p2),q1,q2) inside my constraints (this part does not contain any variables, it would be a constant in the final MP)
Any idea on how to approach this?
Reply all
Reply to author
Forward
0 new messages