Skip to content

Instantly share code, notes, and snippets.

@rocarvaj
Last active June 29, 2019 20:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rocarvaj/800ee0d28613a824f7a9370ec142837a to your computer and use it in GitHub Desktop.
Save rocarvaj/800ee0d28613a824f7a9370ec142837a to your computer and use it in GitHub Desktop.
[SCIP tips] A few SCIP tips that were a bit difficult to find, at least for me #scip
  1. How to turn off presolving?

    R: SCIPsetPresolving(scip, SCIP_PARAMSETTING_OFF, true), ref.

  2. How to write the problem to file?

    R: Use SCIPwriteOrigProblem() for writing the original problem and SCIPwriteTransProblem() for the transformed problem in the current node. ref.

  3. How to turn off presolving?
    R: SCIPsetPresolving(scip, SCIP_PARAMSETTING_OFF, true), ref.

  4. Warning when catching and dropping event.
    R: If no filterpos argument in SCIPdropEvent, a -1 should be used.

    SCIP_CALL( SCIPcatchEvent( scip, SCIP_EVENTTYPE_BESTSOLFOUND, eventhdlr, NULL, NULL) );
    SCIP_CALL( SCIPdropEvent( scip, SCIP_EVENTTYPE_BESTSOLFOUND, eventhdlr, NULL, -1) );
  5. SCIP only throws atomic events. The event in the SCIPcatchEvent() function can be a composite one, but when in the EVENTEXEC function, keep in mind that the output of SCIPeventGetType() is an atomic event (don't do if(SCIPeventGetType(scip) == SCIP_EVENTTYPE_NODESOLVED)).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment