Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/pyscipopt/reader.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ cdef class Reader:
'''calls read method of reader'''
return {}

def readerwrite(self, file, name, transformed, objsense, objscale, objoffset, binvars, intvars,
def readerwrite(self, file, name, transformed, objsense, objoffset, objscale, binvars, intvars,
implvars, contvars, fixedvars, startnvars, conss, maxnconss, startnconss, genericnames):
'''calls write method of reader'''
return {}
Expand Down Expand Up @@ -40,8 +40,8 @@ cdef SCIP_RETCODE PyReaderRead (SCIP* scip, SCIP_READER* reader, const char* fil

cdef SCIP_RETCODE PyReaderWrite (SCIP* scip, SCIP_READER* reader, FILE* file,
const char* name, SCIP_PROBDATA* probdata, SCIP_Bool transformed,
SCIP_OBJSENSE objsense, SCIP_Real objscale, SCIP_Real objoffset,
SCIP_RATIONAL* objoffsetexact, SCIP_RATIONAL* objscaleexact,
SCIP_OBJSENSE objsense, SCIP_Real objoffset, SCIP_Real objscale,
SCIP_RATIONAL* objoffsetexact, SCIP_RATIONAL* objscaleexact,
SCIP_VAR** vars, int nvars, int nbinvars, int nintvars, int nimplvars,
int ncontvars, SCIP_VAR** fixedvars, int nfixedvars, int startnvars,
SCIP_CONS** conss, int nconss, int maxnconss, int startnconss,
Expand All @@ -59,7 +59,8 @@ cdef SCIP_RETCODE PyReaderWrite (SCIP* scip, SCIP_READER* reader, FILE* file,
PyFixedVars = [Variable.create(fixedvars[i]) for i in range(nfixedvars)]
PyConss = [Constraint.create(conss[i]) for i in range(nconss)]
PyReader = <Reader>readerdata
result_dict = PyReader.readerwrite(PyFile, PyName, transformed, objsense, objscale, objoffset,
#TODO: provide rational objoffsetexact and objscaleexact
result_dict = PyReader.readerwrite(PyFile, PyName, transformed, objsense, objoffset, objscale,
PyBinVars, PyIntVars, PyImplVars, PyContVars, PyFixedVars, startnvars,
PyConss, maxnconss, startnconss, genericnames)
result[0] = result_dict.get("result", <SCIP_RESULT>result[0])
Expand Down
4 changes: 2 additions & 2 deletions src/pyscipopt/scip.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -994,8 +994,8 @@ cdef extern from "scip/scip.h":
SCIP_RETCODE (*readerread) (SCIP* scip, SCIP_READER* reader, const char* filename, SCIP_RESULT* result),
SCIP_RETCODE (*readerwrite) (SCIP* scip, SCIP_READER* reader, FILE* file,
const char* name, SCIP_PROBDATA* probdata, SCIP_Bool transformed,
SCIP_OBJSENSE objsense, SCIP_Real objscale, SCIP_Real objoffset,
SCIP_RATIONAL* objoffsetexact, SCIP_RATIONAL* objscaleexact,
SCIP_OBJSENSE objsense, SCIP_Real objoffset, SCIP_Real objscale,
SCIP_RATIONAL* objoffsetexact, SCIP_RATIONAL* objscaleexact,
SCIP_VAR** vars, int nvars, int nbinvars, int nintvars, int nimplvars,
int ncontvars, SCIP_VAR** fixedvars, int nfixedvars, int startnvars,
SCIP_CONS** conss, int nconss, int maxnconss, int startnconss,
Expand Down
Loading