0

I use the Scip solver from the Java api, via the Jni interface.

I want to implement an event handler (preferably in java), so that

  1. I can get some information about the progress of the solving, that I want to display

  2. Be able to interrupt the solving by calling SCIPinterruptSolve(SCIP *scip).

Event handlers are implemented in c and passed to scip via the following native method

SCIP_RETCODE SCIPincludeEventhdlrBasic  (   SCIP *  scip,
SCIP_EVENTHDLR **   eventhdlrptr,
const char *    name,
const char *    desc,
SCIP_DECL_EVENTEXEC((*eventexec))   ,
SCIP_EVENTHDLRDATA *    eventhdlrdata 
)

Can I implement an event handler in java?

How can I pass an event handler written in java to scip via the jni interface?

Note that there is no method corresponding to SCIPincludeEventhdlrBasic in the jni interface.

Michaël Azevedo
  • 3,874
  • 7
  • 31
  • 45

1 Answers1

1

Unfortunately, this is not possible with the SCIP JNI interface since it does not support callbacks.

mueldgog
  • 383
  • 1
  • 7