Closed Engberg-Jacob closed 1 month ago
Thanks for including the example! That made it much easier to understand what's going on.
I think there has been a misunderstanding. I think the most helpful thing to do is to read the definition of the transformed problem, a column, and a row in the following documentation: https://pyscipopt.readthedocs.io/en/latest/tutorials/vartypes.html# https://pyscipopt.readthedocs.io/en/latest/tutorials/constypes.html#
What I believe the three points of confusion are:
cons[0]
has no guaranteed relationship to the ordering in the bipartite graph.After checking through your instance: edge_features[0]
is holding information about the transformed variable corresponding to y_1
(because the name of the variable is t_y_1
) and I'd probably bet it's for the row representation of the capacity_1
constraint.
Alright, perfect! I'd imagined that it was simply transformation, but I wanted to be sure that row_idx
and col_idx
matched order of columns in col_features
and rows in row_features
. Thank you!
This might not be unexpected behaviour, but I thought I'd report it nonetheless. When using the
getBipartiteGraphRepresentation
in the coming release, the order of variables incol_features
and constraints inrow_features
doesn't match thecol_idx
androw_idx
numbers inedge.
To Reproduce I've included a small working example in a zip-folder. It'll create a text folder with the first entry in
col_features
,row_features
, andedge
. Thecol_features
corresponds toy_1
androw_features
corresponds todemand_1
. However the first edge indicates that variable0
, in constraint0
, should have a coefficient of-73
. However,y_1
only has that coefficient in 2 other constraints (namelycapacity_1
andtotal_capacity
).Expected behavior That the edge indexes correspond to the order in
col_features
androw_features
.System
pyscipopt
was compiled from source, from themt/add_bipartite_graph
branch, against thelibscip_linux
from https://github.com/scipopt/scipoptsuite-deploy/releases/tag/v0.4.0This might not be unexpected behaviour, or there might be intricacies in how the rows and columns are referenced which I might not get. code-and-instance.zip