@@ -2889,6 +2889,35 @@ cdef class Model:
28892889 if not onlyroot:
28902890 self .setIntParam(" propagating/maxrounds" , 0 )
28912891
2892+ def displayProblem (self , ext = ' .cip' , trans = False , genericnames = False ):
2893+ """
2894+ Write current model/problem to a file.
2895+
2896+ Parameters
2897+ ----------
2898+ ext : str, optional
2899+ the extension to be used (Default value = '.cip').
2900+ Should have an extension corresponding to one of the readable file formats,
2901+ described in https://www.scipopt.org/doc/html/group__FILEREADERS.php.
2902+ trans : bool, optional
2903+ indicates whether the transformed problem is written to file (Default value = False)
2904+ genericnames : bool, optional
2905+ indicates whether the problem should be written with generic variable
2906+ and constraint names (Default value = False)
2907+ verbose : bool, optional
2908+ indicates whether a success message should be printed
2909+
2910+ """
2911+ user_locale = locale.getlocale(category = locale.LC_NUMERIC)
2912+ locale.setlocale(locale.LC_NUMERIC, " C" )
2913+
2914+ if trans:
2915+ PY_SCIP_CALL(SCIPwriteTransProblem(self ._scip, NULL , str_conversion(ext)[1 :], genericnames))
2916+ else :
2917+ PY_SCIP_CALL(SCIPwriteOrigProblem(self ._scip, NULL , str_conversion(ext)[1 :], genericnames))
2918+
2919+ locale.setlocale(locale.LC_NUMERIC,user_locale)
2920+
28922921 def writeProblem (self , filename = ' model.cip' , trans = False , genericnames = False , verbose = True ):
28932922 """
28942923 Write current model/problem to a file.
0 commit comments