Skip to content

Latest commit

 

History

History
25 lines (14 loc) · 1.6 KB

CONTRIBUTING.md

File metadata and controls

25 lines (14 loc) · 1.6 KB

Contributing to russcip

First off, thank you for considering contributing to russcip.

Where do I go from here?

If you've noticed a bug or have a feature request, make sure to open a GitHub issue if one does not already exist.

Porting part of the SCIP C-API to safe Rust

Steps:

  1. Add a method to the ScipPtr struct, this should in most cases return a Result<YOU_RETURN_TYPE, Retcode> from calling the scip_call! macro. Use the unsafe bindings from the ffi module to call SCIP methods.
  2. The Model struct has many states, choose the state that is safe to call your ScipPtr method in.

Wrapping a SCIP plugin

  1. SCIP plugins are essentially interfaces. So first step would be to check the plugin's (fundamental) callbacks from SCIP's documentation and write an interface that represents it. Here's the one for the constraint handler plugin for example.
  2. SCIP saves PLUGIN_DATA for each plugin type. This is what russcip uses to wrap the struct that implements the interface. You'd need to add an include_{PLUGIN_NAME} method on Model<ProblemCreated> that takes a box of this interface and defines the C callbacks. As a reference you can take a look at the pricer plugin implementation and it's include method.

Code Quality

  • Add documentation for any new methods/struct.
  • Cover any new functionality or test any issue fix.