<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta content="text/html; charset=UTF-8">
<style type="text/css" style="">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p>Dear Christopher,</p>
<p><br>
</p>
<p>Firstly, you need to call the method <span>`setSelected(</span>true)` on the `gcg::PARTIALDECOMP` partial decomposition you need the .dec file.</p>
<p>Secondly, you need to use the SCIP function `SCIPwriteOrigProblem` on your `SCIP*` pointer (see
<a href="https://scipopt.org/doc/html/group__GlobalProblemMethods.php#ga2f6d67a1ccef7a6363e6d6a56523c0d0" class="x_OWAAutoLink">
https://scipopt.org/doc/html/group__GlobalProblemMethods.php#ga2f6d67a1ccef7a6363e6d6a56523c0d0</a>), e.g., call `SCIPwriteOrigProblem(scip, "test.dec", NULL, FALSE)` if you have named your `SCIP*` pointer `scip` and you want to create the dec file in the current
 path with the filename "test.dec".</p>
<p><br>
If you have any further questions don't hesitate to contact me.</p>
<p><br>
</p>
<p>Best wishes,</p>
<p>Jurgen Lentz<br>
</p>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Von:</b> Scip <scip-bounces@zib.de> im Auftrag von Christopher G <christopherg00@proton.me><br>
<b>Gesendet:</b> Montag, 29. April 2024 14:05:42<br>
<b>An:</b> scip@zib.de<br>
<b>Betreff:</b> [SCIP] Use .dec file writer from code (SCIP/GCG)</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Dear SCIP community,<br>
<br>
I'd like to use the .dec writer from GCG as defined here [1] in my C++ code to write a `gcg::PARTIALDECOMP` to a .dec file -- either the decomposition that is currently applied to a given `SCIP*` or a given `gcg::PARTIALDECOMP`. How would I achieve that? How
 do I write to files with methods defined with `SCIP_DECL_READERWRITE(...)` from my code?
<br>
<br>
Best,<br>
Christopher G<br>
<br>
[1] <a href="https://github.com/scipopt/gcg/blob/1ed540d9158490f3109735df93718a4eaf91acc1/src/gcg/reader_dec.cpp#L1318C23-L1318C37">
https://github.com/scipopt/gcg/blob/1ed540d9158490f3109735df93718a4eaf91acc1/src/gcg/reader_dec.cpp#L1318C23-L1318C37</a><br>
<br>
_______________________________________________<br>
Scip mailing list<br>
Scip@zib.de<br>
<a href="https://listserv.zib.de/mailman/listinfo/scip">https://listserv.zib.de/mailman/listinfo/scip</a><br>
</div>
</span></font>
</body>
</html>