<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body>
<p>Hi Krishnan,<br>
<br>
On the line that you have mentioned, SCIP_DECL_READERREAD is a
macro. It is defined on line 78 in src/scip/type_reader.h, where
you can see the return type and parameters that the functions
defined with the use of this macro will have (finding this if you
do not know where to look can be made easier by using grep, an IDE
or whatever tool you prefer that can search in the whole project).
The reason this is done like this is that we want to have several
functions of a similar type. That is, SCIP has a few reader
plugins, and each provides its own version of the same methods:
for example, each reader reads a problem. SCIP can call the "read"
function in a way that is similar to all readers, which is
possible because the functions have similar return types and
arguments. By the way, this type of function is referred to as a
"callback" and they are an important part of SCIP's design.<br>
<br>
This also answers the question about the "filename" variable: if
you look at the macro, you can see it in the list of arguments.<br>
<br>
</p>
<div class="moz-cite-prefix">On 19.08.20 16:59, Krishnan Nampoothiri
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:BN8PR20MB22734EB9B2DE438A32D407A0845D0@BN8PR20MB2273.namprd20.prod.outlook.com">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;}</style>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0); text-align: left;"
dir="ltr">
<span style="font-family: Calibri, Arial, Helvetica, sans-serif;
text-align: start; background-color: rgb(255, 255, 255);
display: inline !important">Secondly, I see usage of <span
style="font-family: Calibri, Arial, Helvetica, sans-serif;
background-color: rgb(255, 255, 255); display: inline
!important">a few SCIP-implemented functions in the code.
For example, </span><span style="font-family: "Courier
New", monospace; background-color: rgb(255, 255, 255);
display: inline !important;">SCIPfgets(),
SCIPallocBufferArray(), SCIPfeof(), SCIPfreeBufferArray()
</span><span style="font-family: Calibri, Arial, Helvetica,
sans-serif; background-color: rgb(255, 255, 255); display:
inline !important">etc. How are these different from the
library standards -
</span><span style="font-family: "Courier New",
monospace; background-color: rgb(255, 255, 255); display:
inline !important;">fgets(), malloc/calloc(), feof(), free()</span><span
style="font-family: Calibri, Arial, Helvetica, sans-serif;
background-color: rgb(255, 255, 255); display: inline
!important"> ?</span></span></div>
</blockquote>
<p><br>
</p>
<p>There is an explanation of SCIP's memory functions and why it
uses its own rather than the standard ones here:
<a class="moz-txt-link-freetext" href="https://www.scipopt.org/doc/html/MEMORY.php">https://www.scipopt.org/doc/html/MEMORY.php</a>.<br>
</p>
<p><br>
</p>
<blockquote type="cite"
cite="mid:BN8PR20MB22734EB9B2DE438A32D407A0845D0@BN8PR20MB2273.namprd20.prod.outlook.com">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0); text-align: left;"
dir="ltr">
<span style="font-family: Calibri, Arial, Helvetica, sans-serif;
text-align: start; background-color: rgb(255, 255, 255);
display: inline !important"><span style="font-family: Calibri,
Arial, Helvetica, sans-serif; background-color: rgb(255,
255, 255); display: inline !important"></span></span><span
style="font-family: Calibri, Arial, Helvetica, sans-serif;
text-align: start; background-color: rgb(255, 255, 255);
display: inline !important"><span style="font-family: Calibri,
Arial, Helvetica, sans-serif; background-color: rgb(255,
255, 255); display: inline !important">Thirdly, some of the
functions seem to require a </span><span
style="font-family: "Courier New", monospace;
background-color: rgb(255, 255, 255); display: inline
!important;">SCIP*</span><span style="font-family: Calibri,
Arial, Helvetica, sans-serif; background-color: rgb(255,
255, 255); display: inline !important"> object passed in
them, despite not being directly (seemingly) connected to
the optimization model. For example,
</span><span style="font-family: "Courier New",
monospace; background-color: rgb(255, 255, 255); display:
inline !important;">SCIPwarningMessage()</span><span
style="font-family: Calibri, Arial, Helvetica, sans-serif;
background-color: rgb(255, 255, 255); display: inline
!important"> or </span><span style="font-family:
"Courier New", monospace; background-color:
rgb(255, 255, 255); display: inline !important;">SCIPallocBufferArray()
</span><span style="font-family: Calibri, Arial, Helvetica,
sans-serif; background-color: rgb(255, 255, 255); display:
inline !important">while the others like
</span><span style="font-family: "Courier New",
monospace; background-color: rgb(255, 255, 255); display:
inline !important;">SCIPfeof()</span><span
style="font-family: Calibri, Arial, Helvetica, sans-serif;
background-color: rgb(255, 255, 255); display: inline
!important"> or </span><span style="font-family:
"Courier New", monospace; background-color:
rgb(255, 255, 255); display: inline !important;">SCIPfgets()</span><span
style="font-family: Calibri, Arial, Helvetica, sans-serif;
background-color: rgb(255, 255, 255); display: inline
!important"> don't seem to require a </span><span
style="font-family: "Courier New", monospace;
background-color: rgb(255, 255, 255); display: inline
!important;">SCIP*</span><span style="font-family: Calibri,
Arial, Helvetica, sans-serif; background-color: rgb(255,
255, 255); display: inline !important"> passed to the
function. </span></span><br>
</div>
</blockquote>
<p><br>
</p>
<p>The SCIP structure has more than just the problem information.
For example, it also stores a message handler and a structure used
for managing memory, which is why the functions you mentioned need
it.<br>
<br>
Kind regards,<br>
Ksenia<br>
<br>
</p>
</body>
</html>