plasmo-dev / Plasmo.jl

A Platform for Scalable Modeling and Optimization
Other
150 stars 21 forks source link

attached_link_constraint #17

Closed sshin23 closed 4 years ago

sshin23 commented 4 years ago

This should allow syntax: @linkconstraint(graph,n1[:x]==n2[:x],attach=n1)

jalving commented 4 years ago

Thanks for putting this together. I ran into a few issues running the tests with this commit. I made some minor adjustments to the @linkconstraint macro, and also set default node attachments if not specified. We should be able to merge once I verify the tests pass.

jalving commented 4 years ago

I ended up making minor additions. I added a set_attached_node function which makes sure the attached node is actually in the linkconstraint. I also updated the tests. Everything seems to pass now.