<div dir="ltr"><div>There is an official C++ wrapper, called objscip. It ships with SCIP. See the (brief) description at <a href="https://www.scipopt.org/doc/html/INTERFACES.php">https://www.scipopt.org/doc/html/INTERFACES.php</a> . They're all in the scip/objscip directory.</div><div><br></div><div>Some examples (TSP handler, Vehicle Routing) use objscip, but not very much, and it's mostly "C-ish" code still.</div><div><br></div><div>I'll let someone else answer about contributing :)</div><div><br></div><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">-- Alexander Meiburg<br></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 20, 2023 at 4:12 AM Ivo Hedtke <<a href="mailto:hedtke@me.com">hedtke@me.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi SCIP experts,<br>
<br>
My team at DB Schenker is testing SCIP after the license changed some months ago. Some of us are struggling with the cumbersome C interface.<br>
<br>
Is there a C++ wrapper around SCIP that simplifies things by automatic memory management etc? Which ones are available?<br>
<br>
If not, we wrote for our own use-cases a wrapper and we would also contribute that back to the open-source community. Should we do that as an independent project, or should we contribute back to SCIP? I attach an example of the usage of our wrapper.<br>
<br>
BR, Ivo<br>
<br>
BOOST_AUTO_TEST_CASE(KnapsackViaSCIP)<br>
{<br>
vector<int> w { 3, 4, 3, 3, 3, 3, 4, 2, 4, 1 };<br>
vector<int> v { 230, 134, 52, 60, 151, 95, 201, 245, 52, 55 };<br>
int c { 14 };<br>
<br>
Model model("KNAPSACK");<br>
auto x { model.addVars("x_", w.size(), v, VarType::BINARY) };<br>
LinExpr weight;<br>
for (size_t i { 0 }; i < w.size(); i++) {<br>
weight += <a href="http://w.at" rel="noreferrer" target="_blank">w.at</a>(i) * <a href="http://x.at" rel="noreferrer" target="_blank">x.at</a>(i);<br>
}<br>
model.addConstr(weight <= c, “capacity");<br>
model.setObjsense(Sense::MAXIMIZE);<br>
model.setParam(params::limits::MaxSol, 1);<br>
model.setParam(params::display::VerbLevel, 0);<br>
<br>
model.solve();<br>
BOOST_TEST(model.getPrimalbound() == 882);<br>
}<br>
<br>
<br>
_______________________________________________<br>
Scip mailing list<br>
<a href="mailto:Scip@zib.de" target="_blank">Scip@zib.de</a><br>
<a href="https://listserv.zib.de/mailman/listinfo/scip" rel="noreferrer" target="_blank">https://listserv.zib.de/mailman/listinfo/scip</a><br>
</blockquote></div>