-
Notifications
You must be signed in to change notification settings - Fork 253
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
Adds bipartite graph function #874
base: master
Are you sure you want to change the base?
Conversation
"""Returns the degree of parallelism between hyplerplanes. 1 if perfectly parallel, 0 if orthognal. | ||
101 in this case is an 'e' (euclidean) in ASCII. The other accpetable input is 100 (d for discrete).""" | ||
"""Returns the degree of parallelism between hyplerplanes. 1 if perfectly parallel, 0 if orthogonal. | ||
101 in this case is an 'e' (euclidean) in ASCII. The other acceptable input is 100 (d for discrete).""" |
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 would also add how this is calculated, degree of parallelism is too vague. The SCIP documentation has "returns the degree of parallelism between the hyperplanes defined by the two row vectors v, w: p = |vw|/(|v||w|); the hyperplanes are parallel, iff p = 1, they are orthogonal, iff p = 0"
|
||
def getBipartiteGraphRepresentation(self, prev_col_features=None, prev_edge_features=None, prev_row_features=None, | ||
static_only=False, suppress_warnings=False): | ||
"""This function generated the bipartite graph representation of an LP, which was first used in |
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.
generates instead of generated. Or if you want to say that it generated the representation first used in the paper, I think you need to say something like "... of an LP used in the following paper". Not a grammar expert though, so might be wrong.
|
||
for i in range(100): | ||
more_vars.append(scip.addVar(vtype="I", lb=-52, ub=10)) | ||
scip.addCons(quicksum(v for v in more_vars[50::2]) <= (40 - i) * quicksum(v for v in more_vars[405::2])) |
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.
Same thing with more_vars[405::2]
This branch shouldn't be merged until the strong branch one is complete. A potential user raised concerns about such functionality not being present in PySCIPOpt directly and that he had to use third party software. After thinking about it a bit, it is just a glorified feature retrieval function. So I thought I'd spin up a quick version.