[SCIP] Use .dec file writer from code (SCIP/GCG)

Lentz, Jurgen jurgen.lentz at rwth-aachen.de
Mon Apr 29 21:34:52 CEST 2024


Dear Christopher,


Firstly, you need to call the method `setSelected(true)` on the `gcg::PARTIALDECOMP` partial decomposition you need the .dec file.

Secondly, you need to use the SCIP function `SCIPwriteOrigProblem` on your `SCIP*` pointer (see https://scipopt.org/doc/html/group__GlobalProblemMethods.php#ga2f6d67a1ccef7a6363e6d6a56523c0d0), 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".

If you have any further questions don't hesitate to contact me.


Best wishes,

Jurgen Lentz

________________________________
Von: Scip <scip-bounces at zib.de> im Auftrag von Christopher G <christopherg00 at proton.me>
Gesendet: Montag, 29. April 2024 14:05:42
An: scip at zib.de
Betreff: [SCIP] Use .dec file writer from code (SCIP/GCG)

Dear SCIP community,

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?

Best,
Christopher G

[1] https://github.com/scipopt/gcg/blob/1ed540d9158490f3109735df93718a4eaf91acc1/src/gcg/reader_dec.cpp#L1318C23-L1318C37

_______________________________________________
Scip mailing list
Scip at zib.de
https://listserv.zib.de/mailman/listinfo/scip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.zib.de/pipermail/scip/attachments/20240429/07498ad4/attachment.html>


More information about the Scip mailing list