[SCIP] Bin packing reader

Krishnan Nampoothiri Krishnan.nampoothiri at outlook.com
Wed Aug 19 16:59:26 CEST 2020


Hi all,

I am new to using SCIP. I am trying to understand the Binpacking example.

I have a few questions as I try to understand this example.

For example, in line 108 of reader_bpa.c, I see a function definition

static SCIP_DECL_READERREAD(readerReadBpa)

Why is the datatype of readerReadBpa or the return type of the function is not defined? Also, the function uses a variable named filename, which is neither an argument passed to the function nor is a local variable defined in the function definition. Can somebody please explain how this code still compiles? The documentation seems to not indicate the details on how this works, unfortunately. Can somebody explain, please?

Secondly, I see usage of a few SCIP-implemented functions in the code. For example, SCIPfgets(), SCIPallocBufferArray(), SCIPfeof(), SCIPfreeBufferArray() etc. How are these different from the library standards - fgets(), malloc/calloc(), feof(), free() ?

Thirdly, some of the functions seem to require a SCIP* object passed in them, despite not being directly (seemingly) connected to the optimization model. For example, SCIPwarningMessage() or SCIPallocBufferArray() while the others like SCIPfeof() or SCIPfgets() don't seem to require a SCIP* passed to the function.

Can somebody kindly provide help with these questions? If not, please can somebody point me to the place where I can learn these details?

Thanks and regards
Krishnan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.zib.de/pipermail/scip/attachments/20200819/5d918767/attachment.html>


More information about the Scip mailing list