Scippy

SCIP

Solving Constraint Integer Programs

dialog_default.c
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2 /* */
3 /* This file is part of the program and library */
4 /* SCIP --- Solving Constraint Integer Programs */
5 /* */
6 /* Copyright (C) 2002-2016 Konrad-Zuse-Zentrum */
7 /* fuer Informationstechnik Berlin */
8 /* */
9 /* SCIP is distributed under the terms of the ZIB Academic License. */
10 /* */
11 /* You should have received a copy of the ZIB Academic License */
12 /* along with SCIP; see the file COPYING. If not email to scip@zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file dialog_default.c
17  * @brief default user interface dialog
18  * @author Tobias Achterberg
19  * @author Timo Berthold
20  * @author Gerald Gamrath
21  */
22 
23 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
24 
25 #include <assert.h>
26 #include <string.h>
27 
28 #include "scip/dialog_default.h"
29 #include "nlpi/nlpi.h"
30 
31 
32 
33 /** executes a menu dialog */
34 static
36  SCIP* scip, /**< SCIP data structure */
37  SCIP_DIALOG* dialog, /**< dialog menu */
38  SCIP_DIALOGHDLR* dialoghdlr, /**< dialog handler */
39  SCIP_DIALOG** nextdialog /**< pointer to store next dialog to execute */
40  )
41 {
42  char* command;
43  SCIP_Bool again;
44  SCIP_Bool endoffile;
45  int nfound;
46 
47  do
48  {
49  again = FALSE;
50 
51  /* get the next word of the command string */
52  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, NULL, &command, &endoffile) );
53  if( endoffile )
54  {
55  *nextdialog = NULL;
56  return SCIP_OKAY;
57  }
58 
59  /* exit to the root dialog, if command is empty */
60  if( command[0] == '\0' )
61  {
62  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
63  return SCIP_OKAY;
64  }
65  else if( strcmp(command, "..") == 0 )
66  {
67  *nextdialog = SCIPdialogGetParent(dialog);
68  if( *nextdialog == NULL )
69  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
70  return SCIP_OKAY;
71  }
72 
73  /* find command in dialog */
74  nfound = SCIPdialogFindEntry(dialog, command, nextdialog);
75 
76  /* check result */
77  if( nfound == 0 )
78  {
79  SCIPdialogMessage(scip, NULL, "command <%s> not available\n", command);
80  SCIPdialoghdlrClearBuffer(dialoghdlr);
81  *nextdialog = dialog;
82  }
83  else if( nfound >= 2 )
84  {
85  SCIPdialogMessage(scip, NULL, "\npossible completions:\n");
86  SCIP_CALL( SCIPdialogDisplayCompletions(dialog, scip, command) );
87  SCIPdialogMessage(scip, NULL, "\n");
88  SCIPdialoghdlrClearBuffer(dialoghdlr);
89  again = TRUE;
90  }
91  }
92  while( again );
93 
94  return SCIP_OKAY;
95 }
96 
97 
98 /* parse the given string to detect a Boolean value and returns it */
99 static
101  SCIP* scip, /**< SCIP data structure */
102  const char* valuestr, /**< string to parse */
103  SCIP_Bool* error /**< pointer to store the error result */
104  )
105 {
106  assert( scip != NULL );
107  assert( valuestr != NULL );
108  assert( error != NULL );
109 
110  *error = FALSE;
111 
112  switch( valuestr[0] )
113  {
114  case 'f':
115  case 'F':
116  case '0':
117  case 'n':
118  case 'N':
119  return FALSE;
120  case 't':
121  case 'T':
122  case '1':
123  case 'y':
124  case 'Y':
125  return TRUE;
126  default:
127  SCIPdialogMessage(scip, NULL, "\ninvalid parameter value <%s>\n\n", valuestr);
128  *error = TRUE;
129  break;
130  }
131 
132  return FALSE;
133 }
134 
135 
136 /* display the reader information */
137 static
139  SCIP* scip, /**< SCIP data structure */
140  SCIP_Bool reader, /**< display reader which can read */
141  SCIP_Bool writer /**< display reader which can write */
142  )
143 {
144  SCIP_READER** readers;
145  int nreaders;
146  int r;
147 
148  assert( scip != NULL );
149 
150  readers = SCIPgetReaders(scip);
151  nreaders = SCIPgetNReaders(scip);
152 
153  /* display list of readers */
154  SCIPdialogMessage(scip, NULL, "\n");
155  SCIPdialogMessage(scip, NULL, " file reader extension description\n");
156  SCIPdialogMessage(scip, NULL, " ----------- --------- -----------\n");
157  for( r = 0; r < nreaders; ++r )
158  {
159  if( (reader && SCIPreaderCanRead(readers[r])) || (writer && SCIPreaderCanWrite(readers[r])) )
160  {
161  SCIPdialogMessage(scip, NULL, " %-20s ", SCIPreaderGetName(readers[r]));
162  if( strlen(SCIPreaderGetName(readers[r])) > 20 )
163  SCIPdialogMessage(scip, NULL, "\n %20s ", "-->");
164  SCIPdialogMessage(scip, NULL, "%9s ", SCIPreaderGetExtension(readers[r]));
165  SCIPdialogMessage(scip, NULL, "%s", SCIPreaderGetDesc(readers[r]));
166  SCIPdialogMessage(scip, NULL, "\n");
167  }
168  }
169  SCIPdialogMessage(scip, NULL, "\n");
170 }
171 
172 
173 /* writes problem to file */
174 static
176  SCIP* scip, /**< SCIP data structure */
177  SCIP_DIALOG* dialog, /**< dialog menu */
178  SCIP_DIALOGHDLR* dialoghdlr, /**< dialog handler */
179  SCIP_DIALOG** nextdialog, /**< pointer to store next dialog to execute */
180  SCIP_Bool transformed, /**< output the transformed problem? */
181  SCIP_Bool genericnames /**< using generic variable and constraint names? */
182  )
183 {
184  char* filename;
185  SCIP_Bool endoffile;
186  SCIP_RETCODE retcode;
187 
188  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "enter filename: ", &filename, &endoffile) );
189  if( endoffile )
190  {
191  *nextdialog = NULL;
192  return SCIP_OKAY;
193  }
194 
195  if( filename[0] != '\0' )
196  {
197  char* tmpfilename;
198  char* extension;
199 
200  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, filename, TRUE) );
201 
202  /* copy filename */
203  SCIP_CALL( SCIPduplicateBufferArray(scip, &tmpfilename, filename, (int)strlen(filename)+1) );
204  extension = NULL;
205 
206  do
207  {
208  if( transformed )
209  retcode = SCIPwriteTransProblem(scip, tmpfilename, extension, genericnames);
210  else
211  retcode = SCIPwriteOrigProblem(scip, tmpfilename, extension, genericnames);
212 
213  if( retcode == SCIP_FILECREATEERROR )
214  {
215  SCIPdialogMessage(scip, NULL, "error creating the file <%s>\n", filename);
216  SCIPdialoghdlrClearBuffer(dialoghdlr);
217  break;
218  }
219  else if(retcode == SCIP_WRITEERROR )
220  {
221  SCIPdialogMessage(scip, NULL, "error writing file <%s>\n", filename);
222  SCIPdialoghdlrClearBuffer(dialoghdlr);
223  break;
224  }
225  else if( retcode == SCIP_PLUGINNOTFOUND )
226  {
227  /* ask user once for a suitable reader */
228  if( extension == NULL )
229  {
230  SCIPdialogMessage(scip, NULL, "no reader for requested output format\n");
231 
232  SCIPdialogMessage(scip, NULL, "following readers are avaliable for writing:\n");
233  displayReaders(scip, FALSE, TRUE);
234 
235  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog,
236  "select a suitable reader by extension (or return): ", &extension, &endoffile) );
237 
238  if( extension[0] == '\0' )
239  break;
240  }
241  else
242  {
243  SCIPdialogMessage(scip, NULL, "no reader for output in <%s> format\n", extension);
244  extension = NULL;
245  }
246  }
247  else
248  {
249  /* check for unexpected errors */
250  SCIP_CALL( retcode );
251 
252  /* print result message if writing was successful */
253  if( transformed )
254  SCIPdialogMessage(scip, NULL, "written transformed problem to file <%s>\n", tmpfilename);
255  else
256  SCIPdialogMessage(scip, NULL, "written original problem to file <%s>\n", tmpfilename);
257  break;
258  }
259  }
260  while( extension != NULL );
261 
262  SCIPfreeBufferArray(scip, &tmpfilename);
263  }
264 
265  return SCIP_OKAY;
266 }
267 
268 /** copy method for dialog plugins (called when SCIP copies plugins) */
269 static
270 SCIP_DECL_DIALOGCOPY(dialogCopyDefault)
271 { /*lint --e{715}*/
272  assert(scip != NULL);
273  assert(dialog != NULL);
274 
275  /* call inclusion method of dialog */
277 
278  return SCIP_OKAY;
279 }
280 
281 /** standard menu dialog execution method, that displays it's help screen if the remaining command line is empty */
282 SCIP_DECL_DIALOGEXEC(SCIPdialogExecMenu)
283 { /*lint --e{715}*/
284  /* if remaining command string is empty, display menu of available options */
285  if( SCIPdialoghdlrIsBufferEmpty(dialoghdlr) )
286  {
287  SCIPdialogMessage(scip, NULL, "\n");
289  SCIPdialogMessage(scip, NULL, "\n");
290  }
291 
292  SCIP_CALL( dialogExecMenu(scip, dialog, dialoghdlr, nextdialog) );
293 
294  return SCIP_OKAY;
295 }
296 
297 /** standard menu dialog execution method, that doesn't display it's help screen */
298 SCIP_DECL_DIALOGEXEC(SCIPdialogExecMenuLazy)
299 { /*lint --e{715}*/
300  SCIP_CALL( dialogExecMenu(scip, dialog, dialoghdlr, nextdialog) );
301 
302  return SCIP_OKAY;
303 }
304 
305 /** dialog execution method for the change add constraint */
306 SCIP_DECL_DIALOGEXEC(SCIPdialogExecChangeAddCons)
307 { /*lint --e{715}*/
308 
310  SCIPdialogMessage(scip, NULL, "cannot call method after problem was transformed\n");
311  else if( SCIPgetStage(scip) < SCIP_STAGE_PROBLEM )
312  SCIPdialogMessage(scip, NULL, "cannot call method before problem was created\n");
313  else
314  {
315  SCIP_CONS* cons;
316  SCIP_Bool endoffile;
317  char* str;
318 
319  cons = NULL;
320 
321  SCIP_CALL( SCIPdialoghdlrGetLine(dialoghdlr, dialog, "write constraint in <cip> format\n", &str, &endoffile) );
322 
323  if( str[0] != '\0' )
324  {
325  SCIP_Bool success;
326 
327  printf("<%s>\n", str);
328 
329  SCIP_CALL( SCIPparseCons(scip, &cons, str, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, &success) );
330 
331  if( success )
332  {
333  char consstr[SCIP_MAXSTRLEN];
334 
335  /* add and release constraint */
336  SCIP_CALL( SCIPaddCons(scip, cons) );
337  SCIP_CALL( SCIPreleaseCons(scip, &cons) );
338 
339  SCIPdialogMessage(scip, NULL, "successfully added constraint\n");
340  SCIPescapeString(consstr, SCIP_MAXSTRLEN, str);
341 
342  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, consstr, FALSE) );
343  }
344  else
345  {
346  SCIPdialogMessage(scip, NULL, "constraint was not recognizable\n");
347  }
348  }
349  }
350 
351  /* set root dialog as next dialog */
352  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
353 
354  return SCIP_OKAY;
355 }
356 
357 /** dialog execution method for the change bounds command */
358 SCIP_DECL_DIALOGEXEC(SCIPdialogExecChangeBounds)
359 { /*lint --e{715}*/
360 
362  SCIPdialogMessage(scip, NULL, "cannot call method after problem was transformed\n");
363  else if( SCIPgetStage(scip) < SCIP_STAGE_PROBLEM )
364  SCIPdialogMessage(scip, NULL, "cannot call method before problem was created\n");
365  else
366  {
367  SCIP_VAR* var;
368  SCIP_Bool endoffile;
369  char* varname;
370 
371  var = NULL;
372 
373  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
374 
375  do
376  {
377  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "enter variable name: ", &varname, &endoffile) );
378 
379  /* if we get a return or we reached the end of the file, then we stop */
380  if( varname[0] == '\0' || endoffile )
381  break;
382 
383  var = SCIPfindVar(scip, varname);
384 
385  if( var == NULL )
386  SCIPdialogMessage(scip, NULL, "variable <%s> does not exist\n", varname);
387  }
388  while( var == NULL );
389 
390  if( var != NULL )
391  {
392  do
393  {
394  char* boundstr;
395  char message[SCIP_MAXSTRLEN];
396  SCIP_Real bound;
397 
398  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, varname, FALSE) );
399 
400  (void)SCIPsnprintf(message, SCIP_MAXSTRLEN, "current lower bound <%.15g> (Return to skip): ", SCIPvarGetLbGlobal(var));
401  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, message, &boundstr, &endoffile) );
402 
403  /* if we reached the end of the file, then we stop */
404  if( endoffile )
405  break;
406 
407  if( boundstr[0] != '\0' )
408  {
409  char* endptr;
410 
411  bound = strtod(boundstr, &endptr);
412  if( endptr == boundstr || *endptr != '\0' )
413  {
414  printf("<%s> <%s>\n", endptr, boundstr);
415  SCIPdialogMessage(scip, NULL, "ignore none value string\n");
416  }
417  else if( SCIPisGT(scip, bound, SCIPvarGetUbGlobal(var)) )
418  {
419  SCIPdialogMessage(scip, NULL, "ignore lower bound <%.15g> since it is larger than the current upper bound <%.15g>\n",
420  bound, SCIPvarGetUbGlobal(var));
421  }
422  else
423  {
424  SCIP_CALL( SCIPchgVarLbGlobal(scip, var, bound) );
425  }
426  }
427 
428  (void)SCIPsnprintf(message, SCIP_MAXSTRLEN, "current upper bound <%.15g> (Return to skip): ", SCIPvarGetUbGlobal(var));
429  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, message, &boundstr, &endoffile) );
430 
431  /* if we reached the end of the file, then we stop */
432  if( endoffile )
433  break;
434 
435  if( boundstr[0] != '\0' )
436  {
437  char* endptr;
438 
439  bound = strtod(boundstr, &endptr);
440  if( endptr == boundstr || *endptr != '\0' )
441  {
442  SCIPdialogMessage(scip, NULL, "ignore none value string\n");
443  }
444  else if( SCIPisLT(scip, bound, SCIPvarGetLbGlobal(var)) )
445  {
446  SCIPdialogMessage(scip, NULL, "ignore new upper bound <%.15g> since it is smaller than the current lower bound <%.15g>\n",
447  bound, SCIPvarGetLbGlobal(var));
448  }
449  else
450  {
451  SCIP_CALL( SCIPchgVarUbGlobal(scip, var, bound) );
452  }
453  }
454  }
455  while( FALSE);
456 
457  SCIPdialogMessage(scip, NULL, "variable <%s> global bounds [%.15g,%.15g]\n", SCIPvarGetName(var), SCIPvarGetLbGlobal(var), SCIPvarGetUbGlobal(var));
458  }
459  }
460 
461  /* set root dialog as next dialog */
462  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
463 
464  return SCIP_OKAY;
465 }
466 
467 /** dialog execution method for the freetransproblem command */
468 SCIP_DECL_DIALOGEXEC(SCIPdialogExecChangeFreetransproblem)
469 { /*lint --e{715}*/
470  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
471 
472  /* free transformed problem */
474 
475  /* set root dialog as next dialog */
476  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
477 
478  return SCIP_OKAY;
479 }
480 
481 /** dialog execution method for the changing the objective sense */
482 SCIP_DECL_DIALOGEXEC(SCIPdialogExecChangeObjSense)
483 { /*lint --e{715}*/
484  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
485 
487  SCIPdialogMessage(scip, NULL, "cannot call method after problem was transformed\n");
488  else if( SCIPgetStage(scip) < SCIP_STAGE_PROBLEM )
489  SCIPdialogMessage(scip, NULL, "cannot call method before problem was created\n");
490  else
491  {
492  SCIP_Bool endoffile;
493  char* objsense;
494 
495  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "new objective sense {min,max}: ", &objsense, &endoffile) );
496 
497  /* if we get a return or we reached the end of the file, then we stop */
498  if( objsense[0] != '\0' && !endoffile )
499  {
500  if( strncmp(objsense, "max", 3) == 0 )
501  {
503  }
504  else if( strncmp(objsense , "min", 3) == 0 )
505  {
507  }
508  else
509  {
510  SCIPdialogMessage(scip, NULL, "invalid argument <%s>\n", objsense);
511  }
512  }
513  }
514 
515  /* set root dialog as next dialog */
516  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
517 
518  return SCIP_OKAY;
519 }
520 
521 /** dialog execution method for the checksol command */
522 SCIP_DECL_DIALOGEXEC(SCIPdialogExecChecksol)
523 { /*lint --e{715}*/
524  SCIP_SOL* sol;
525  SCIP_Bool feasible;
526 
527  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
528 
529  SCIPdialogMessage(scip, NULL, "\n");
531  sol = SCIPgetBestSol(scip);
532  else
533  sol = NULL;
534 
535  if( sol == NULL )
536  SCIPdialogMessage(scip, NULL, "no feasible solution available\n");
537  else
538  {
539  SCIP_Real oldfeastol;
540  SCIP_Real checkfeastolfac;
541  SCIP_Bool dispallviols;
542 
543  oldfeastol = SCIPfeastol(scip);
544  SCIP_CALL( SCIPgetRealParam(scip, "numerics/checkfeastolfac", &checkfeastolfac) );
545  SCIP_CALL( SCIPgetBoolParam(scip, "display/allviols", &dispallviols) );
546 
547  /* scale feasibility tolerance by set->num_checkfeastolfac */
548  if( !SCIPisEQ(scip, checkfeastolfac, 1.0) )
549  {
550  SCIP_CALL( SCIPchgFeastol(scip, oldfeastol * checkfeastolfac) );
551  }
552 
553  SCIPinfoMessage(scip, NULL, "check best solution\n");
554  SCIP_CALL( SCIPcheckSolOrig(scip, sol, &feasible, TRUE, dispallviols) );
555 
556  /* restore old feasibilty tolerance */
557  if( !SCIPisEQ(scip, checkfeastolfac, 1.0) )
558  {
559  SCIP_CALL( SCIPchgFeastol(scip, oldfeastol) );
560  }
561 
562  if( feasible )
563  SCIPdialogMessage(scip, NULL, "solution is feasible in original problem\n");
564  }
565  SCIPdialogMessage(scip, NULL, "\n");
566 
567  *nextdialog = SCIPdialogGetParent(dialog);
568 
569  return SCIP_OKAY;
570 }
571 
572 /** dialog execution method for the cliquegraph command */
573 SCIP_DECL_DIALOGEXEC(SCIPdialogExecCliquegraph)
574 { /*lint --e{715}*/
575  SCIP_RETCODE retcode;
576  SCIP_Bool endoffile;
577  char* filename;
578 
579  assert(nextdialog != NULL);
580 
581  *nextdialog = NULL;
582 
583  if( !SCIPisTransformed(scip) )
584  {
585  SCIPdialogMessage(scip, NULL, "cannot call method before problem was transformed\n");
586  SCIPdialoghdlrClearBuffer(dialoghdlr);
587  }
588  else
589  {
590  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "enter filename: ", &filename, &endoffile) );
591  if( endoffile )
592  {
593  *nextdialog = NULL;
594  return SCIP_OKAY;
595  }
596 
597  if( filename[0] != '\0' )
598  {
599  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, filename, TRUE) );
600 
601  retcode = SCIPwriteCliqueGraph(scip, filename, FALSE);
602  if( retcode == SCIP_FILECREATEERROR )
603  SCIPdialogMessage(scip, NULL, "error creating file <%s>\n", filename);
604  else
605  {
606  SCIP_CALL( retcode );
607  }
608  }
609  }
610 
611  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
612 
613  return SCIP_OKAY;
614 }
615 
616 /** dialog execution method for the display branching command */
617 SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayBranching)
618 { /*lint --e{715}*/
619  SCIP_BRANCHRULE** branchrules;
620  SCIP_BRANCHRULE** sorted;
621  int nbranchrules;
622  int i;
623 
624  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
625 
626  branchrules = SCIPgetBranchrules(scip);
627  nbranchrules = SCIPgetNBranchrules(scip);
628 
629  /* copy branchrules array into temporary memory for sorting */
630  SCIP_CALL( SCIPduplicateBufferArray(scip, &sorted, branchrules, nbranchrules) );
631 
632  /* sort the branching rules */
633  SCIPsortPtr((void**)sorted, SCIPbranchruleComp, nbranchrules);
634 
635  /* display sorted list of branching rules */
636  SCIPdialogMessage(scip, NULL, "\n");
637  SCIPdialogMessage(scip, NULL, " branching rule priority maxdepth maxbddist description\n");
638  SCIPdialogMessage(scip, NULL, " -------------- -------- -------- --------- -----------\n");
639  for( i = 0; i < nbranchrules; ++i )
640  {
641  SCIPdialogMessage(scip, NULL, " %-20s ", SCIPbranchruleGetName(sorted[i]));
642  if( strlen(SCIPbranchruleGetName(sorted[i])) > 20 )
643  SCIPdialogMessage(scip, NULL, "\n %20s ", "-->");
644  SCIPdialogMessage(scip, NULL, "%8d %8d %8.1f%% ", SCIPbranchruleGetPriority(sorted[i]),
645  SCIPbranchruleGetMaxdepth(sorted[i]), 100.0 * SCIPbranchruleGetMaxbounddist(sorted[i]));
646  SCIPdialogMessage(scip, NULL, "%s", SCIPbranchruleGetDesc(sorted[i]));
647  SCIPdialogMessage(scip, NULL, "\n");
648  }
649  SCIPdialogMessage(scip, NULL, "\n");
650 
651  /* free temporary memory */
652  SCIPfreeBufferArray(scip, &sorted);
653 
654  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
655 
656  return SCIP_OKAY;
657 }
658 
659 /** dialog execution method for the display relaxators command */
660 SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayRelaxators)
661 { /*lint --e{715}*/
662  SCIP_RELAX** relaxs;
663  SCIP_RELAX** sorted;
664  int nrelaxs;
665  int i;
666 
667  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
668 
669  relaxs = SCIPgetRelaxs(scip);
670  nrelaxs = SCIPgetNRelaxs(scip);
671 
672  /* copy relaxs array into temporary memory for sorting */
673  if( nrelaxs != 0 )
674  {
675  SCIP_CALL( SCIPduplicateBufferArray(scip, &sorted, relaxs, nrelaxs) );
676  }
677  else
678  sorted = NULL;
679 
680  /* sort the relaxators */
681  SCIPsortPtr((void**)sorted, SCIPrelaxComp, nrelaxs);
682 
683  /* display sorted list of relaxators */
684  SCIPdialogMessage(scip, NULL, "\n");
685  SCIPdialogMessage(scip, NULL, " relaxator priority freq description\n");
686  SCIPdialogMessage(scip, NULL, " -------------- -------- ---- -----------\n");
687  for( i = 0; i < nrelaxs; ++i )
688  {
689  assert(sorted != NULL); /* for flexelint */
690  SCIPdialogMessage(scip, NULL, " %-20s ", SCIPrelaxGetName(sorted[i]));
691  if( strlen(SCIPrelaxGetName(sorted[i])) > 20 )
692  SCIPdialogMessage(scip, NULL, "\n %20s ", "-->");
693  SCIPdialogMessage(scip, NULL, "%8d %4d ", SCIPrelaxGetPriority(sorted[i]),
694  SCIPrelaxGetFreq(sorted[i]));
695  SCIPdialogMessage(scip, NULL, "%s", SCIPrelaxGetDesc(sorted[i]));
696  SCIPdialogMessage(scip, NULL, "\n");
697  }
698  SCIPdialogMessage(scip, NULL, "\n");
699 
700  /* free temporary memory */
701  SCIPfreeBufferArrayNull(scip, &sorted);
702 
703  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
704 
705  return SCIP_OKAY;
706 }
707 
708 /** dialog execution method for the display conflict command */
709 SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayConflict)
710 { /*lint --e{715}*/
711  SCIP_CONFLICTHDLR** conflicthdlrs;
712  SCIP_CONFLICTHDLR** sorted;
713  int nconflicthdlrs;
714  int i;
715 
716  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
717 
718  conflicthdlrs = SCIPgetConflicthdlrs(scip);
719  nconflicthdlrs = SCIPgetNConflicthdlrs(scip);
720 
721  /* copy conflicthdlrs array into temporary memory for sorting */
722  SCIP_CALL( SCIPduplicateBufferArray(scip, &sorted, conflicthdlrs, nconflicthdlrs) );
723 
724  /* sort the conflict handlers */
725  SCIPsortPtr((void**)sorted, SCIPconflicthdlrComp, nconflicthdlrs);
726 
727  /* display sorted list of conflict handlers */
728  SCIPdialogMessage(scip, NULL, "\n");
729  SCIPdialogMessage(scip, NULL, " conflict handler priority description\n");
730  SCIPdialogMessage(scip, NULL, " ---------------- -------- -----------\n");
731  for( i = 0; i < nconflicthdlrs; ++i )
732  {
733  SCIPdialogMessage(scip, NULL, " %-20s ", SCIPconflicthdlrGetName(sorted[i]));
734  if( strlen(SCIPconflicthdlrGetName(sorted[i])) > 20 )
735  SCIPdialogMessage(scip, NULL, "\n %20s ", "-->");
738  SCIPdialogMessage(scip, NULL, "\n");
739  }
740  SCIPdialogMessage(scip, NULL, "\n");
741 
742  /* free temporary memory */
743  SCIPfreeBufferArray(scip, &sorted);
744 
745  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
746 
747  return SCIP_OKAY;
748 }
749 
750 /** dialog execution method for the display conshdlrs command */
751 SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayConshdlrs)
752 { /*lint --e{715}*/
753  SCIP_CONSHDLR** conshdlrs;
754  int nconshdlrs;
755  int i;
756 
757  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
758 
759  conshdlrs = SCIPgetConshdlrs(scip);
760  nconshdlrs = SCIPgetNConshdlrs(scip);
761 
762  /* display list of constraint handlers */
763  SCIPdialogMessage(scip, NULL, "\n");
764  SCIPdialogMessage(scip, NULL, " Legend:\n");
765  SCIPdialogMessage(scip, NULL, " prestim (presolve timing): 'f'ast, 'm'edium, 'e'xhaustive\n\n");
766  SCIPdialogMessage(scip, NULL, " constraint handler chckprio enfoprio sepaprio sepaf propf eager prestim description\n");
767  SCIPdialogMessage(scip, NULL, " ------------------ -------- -------- -------- ----- ----- ----- ------- -----------\n");
768  for( i = 0; i < nconshdlrs; ++i )
769  {
770  SCIPdialogMessage(scip, NULL, " %-20s ", SCIPconshdlrGetName(conshdlrs[i]));
771  if( strlen(SCIPconshdlrGetName(conshdlrs[i])) > 20 )
772  SCIPdialogMessage(scip, NULL, "\n %20s ", "-->");
773  SCIPdialogMessage(scip, NULL, "%8d %8d %8d %5d %5d %5d ",
774  SCIPconshdlrGetCheckPriority(conshdlrs[i]),
775  SCIPconshdlrGetEnfoPriority(conshdlrs[i]),
776  SCIPconshdlrGetSepaPriority(conshdlrs[i]),
777  SCIPconshdlrGetSepaFreq(conshdlrs[i]),
778  SCIPconshdlrGetPropFreq(conshdlrs[i]),
779  SCIPconshdlrGetEagerFreq(conshdlrs[i]));
780  SCIPdialogMessage(scip, NULL, " %c", SCIPconshdlrGetPresolTiming(conshdlrs[i]) & SCIP_PRESOLTIMING_FAST ? 'f' : ' ');
783  SCIPdialogMessage(scip, NULL, "%s", SCIPconshdlrGetDesc(conshdlrs[i]));
784  SCIPdialogMessage(scip, NULL, "\n");
785  }
786  SCIPdialogMessage(scip, NULL, "\n");
787 
788  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
789 
790  return SCIP_OKAY;
791 }
792 
793 /** dialog execution method for the display displaycols command */
794 SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayDisplaycols)
795 { /*lint --e{715}*/
796  SCIP_DISP** disps;
797  int ndisps;
798  int i;
799 
800  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
801 
802  disps = SCIPgetDisps(scip);
803  ndisps = SCIPgetNDisps(scip);
804 
805  /* display list of display columns */
806  SCIPdialogMessage(scip, NULL, "\n");
807  SCIPdialogMessage(scip, NULL, " display column header position width priority status description\n");
808  SCIPdialogMessage(scip, NULL, " -------------- ------ -------- ----- -------- ------ -----------\n");
809  for( i = 0; i < ndisps; ++i )
810  {
811  SCIPdialogMessage(scip, NULL, " %-20s ", SCIPdispGetName(disps[i]));
812  if( strlen(SCIPdispGetName(disps[i])) > 20 )
813  SCIPdialogMessage(scip, NULL, "\n %20s ", "-->");
814  SCIPdialogMessage(scip, NULL, "%-16s ", SCIPdispGetHeader(disps[i]));
815  if( strlen(SCIPdispGetHeader(disps[i])) > 16 )
816  SCIPdialogMessage(scip, NULL, "\n %20s %16s ", "", "-->");
817  SCIPdialogMessage(scip, NULL, "%8d ", SCIPdispGetPosition(disps[i]));
818  SCIPdialogMessage(scip, NULL, "%5d ", SCIPdispGetWidth(disps[i]));
819  SCIPdialogMessage(scip, NULL, "%8d ", SCIPdispGetPriority(disps[i]));
820  switch( SCIPdispGetStatus(disps[i]) )
821  {
822  case SCIP_DISPSTATUS_OFF:
823  SCIPdialogMessage(scip, NULL, "%6s ", "off");
824  break;
826  SCIPdialogMessage(scip, NULL, "%6s ", "auto");
827  break;
828  case SCIP_DISPSTATUS_ON:
829  SCIPdialogMessage(scip, NULL, "%6s ", "on");
830  break;
831  default:
832  SCIPdialogMessage(scip, NULL, "%6s ", "?");
833  break;
834  }
835  SCIPdialogMessage(scip, NULL, "%s", SCIPdispGetDesc(disps[i]));
836  SCIPdialogMessage(scip, NULL, "\n");
837  }
838  SCIPdialogMessage(scip, NULL, "\n");
839 
840  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
841 
842  return SCIP_OKAY;
843 }
844 
845 /** dialog execution method for the display heuristics command */
846 SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayHeuristics)
847 { /*lint --e{715}*/
848  SCIP_HEUR** heurs;
849  int nheurs;
850  int i;
851 
852  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
853 
854  heurs = SCIPgetHeurs(scip);
855  nheurs = SCIPgetNHeurs(scip);
856 
857  /* display list of primal heuristics */
858  SCIPdialogMessage(scip, NULL, "\n");
859  SCIPdialogMessage(scip, NULL, " primal heuristic c priority freq ofs description\n");
860  SCIPdialogMessage(scip, NULL, " ---------------- - -------- ---- --- -----------\n");
861  for( i = 0; i < nheurs; ++i )
862  {
863  SCIPdialogMessage(scip, NULL, " %-20s ", SCIPheurGetName(heurs[i]));
864  if( strlen(SCIPheurGetName(heurs[i])) > 20 )
865  SCIPdialogMessage(scip, NULL, "\n %20s ", "-->");
866  SCIPdialogMessage(scip, NULL, "%c ", SCIPheurGetDispchar(heurs[i]));
867  SCIPdialogMessage(scip, NULL, "%8d ", SCIPheurGetPriority(heurs[i]));
868  SCIPdialogMessage(scip, NULL, "%4d ", SCIPheurGetFreq(heurs[i]));
869  SCIPdialogMessage(scip, NULL, "%3d ", SCIPheurGetFreqofs(heurs[i]));
870  SCIPdialogMessage(scip, NULL, "%s", SCIPheurGetDesc(heurs[i]));
871  SCIPdialogMessage(scip, NULL, "\n");
872  }
873  SCIPdialogMessage(scip, NULL, "\n");
874 
875  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
876 
877  return SCIP_OKAY;
878 }
879 
880 /** dialog execution method for the display memory command */
881 SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayMemory)
882 { /*lint --e{715}*/
883  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
884 
885  SCIPdialogMessage(scip, NULL, "\n");
887  SCIPdialogMessage(scip, NULL, "\n");
888 
889  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
890 
891  return SCIP_OKAY;
892 }
893 
894 /** dialog execution method for the display nlpi command */
895 SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayNlpi)
896 { /*lint --e{715}*/
897  SCIP_NLPI** nlpis;
898  SCIP_NLPI** sorted;
899  int nnlpis;
900  int i;
901 
902  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
903 
904  nlpis = SCIPgetNlpis(scip);
905  nnlpis = SCIPgetNNlpis(scip);
906 
907  /* copy nlpis array into temporary memory for sorting */
908  if( nnlpis != 0 )
909  {
910  SCIP_CALL( SCIPduplicateBufferArray(scip, &sorted, nlpis, nnlpis) );
911  }
912  else
913  sorted = NULL;
914 
915  /* sort the branching rules */
916  SCIPsortPtr((void**)sorted, SCIPnlpiComp, nnlpis);
917 
918  /* display sorted list of branching rules */
919  SCIPdialogMessage(scip, NULL, "\n");
920  SCIPdialogMessage(scip, NULL, " NLP interface priority description\n");
921  SCIPdialogMessage(scip, NULL, " ------------- -------- -----------\n");
922  for( i = 0; i < nnlpis; ++i )
923  {
924  assert(sorted != NULL);
925  SCIPdialogMessage(scip, NULL, " %-20s ", SCIPnlpiGetName(sorted[i]));
926  if( strlen(SCIPnlpiGetName(sorted[i])) > 20 )
927  SCIPdialogMessage(scip, NULL, "\n %20s ", "-->");
928  SCIPdialogMessage(scip, NULL, "%8d ", SCIPnlpiGetPriority(sorted[i]));
929  SCIPdialogMessage(scip, NULL, "%s", SCIPnlpiGetDesc(sorted[i]));
930  SCIPdialogMessage(scip, NULL, "\n");
931  }
932  SCIPdialogMessage(scip, NULL, "\n");
933 
934  /* free temporary memory */
935  if( nnlpis != 0 )
936  {
937  SCIPfreeBufferArray(scip, &sorted);
938  }
939 
940  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
941 
942  return SCIP_OKAY;
943 }
944 
945 /** dialog execution method for the display nodeselectors command */
946 SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayNodeselectors)
947 { /*lint --e{715}*/
948  SCIP_NODESEL** nodesels;
949  int nnodesels;
950  int i;
951 
952  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
953 
954  nodesels = SCIPgetNodesels(scip);
955  nnodesels = SCIPgetNNodesels(scip);
956 
957  /* display list of node selectors */
958  SCIPdialogMessage(scip, NULL, "\n");
959  SCIPdialogMessage(scip, NULL, " node selector std priority memsave prio description\n");
960  SCIPdialogMessage(scip, NULL, " ------------- ------------ ------------ -----------\n");
961  for( i = 0; i < nnodesels; ++i )
962  {
963  SCIPdialogMessage(scip, NULL, " %-20s ", SCIPnodeselGetName(nodesels[i]));
964  if( strlen(SCIPnodeselGetName(nodesels[i])) > 20 )
965  SCIPdialogMessage(scip, NULL, "\n %20s ", "-->");
966  SCIPdialogMessage(scip, NULL, "%12d ", SCIPnodeselGetStdPriority(nodesels[i]));
967  SCIPdialogMessage(scip, NULL, "%12d ", SCIPnodeselGetMemsavePriority(nodesels[i]));
968  SCIPdialogMessage(scip, NULL, "%s", SCIPnodeselGetDesc(nodesels[i]));
969  SCIPdialogMessage(scip, NULL, "\n");
970  }
971  SCIPdialogMessage(scip, NULL, "\n");
972 
973  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
974 
975  return SCIP_OKAY;
976 }
977 
978 /** dialog execution method for the display parameters command */
979 SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayParameters)
980 { /*lint --e{715}*/
981  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
982 
983  SCIPdialogMessage(scip, NULL, "\n");
984  SCIPdialogMessage(scip, NULL, "number of parameters = %d\n", SCIPgetNParams(scip));
985  SCIPdialogMessage(scip, NULL, "non-default parameter settings:\n");
987  SCIPdialogMessage(scip, NULL, "\n");
988 
989  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
990 
991  return SCIP_OKAY;
992 }
993 
994 /** dialog execution method for the display presolvers command */
995 SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayPresolvers)
996 { /*lint --e{715}*/
997  SCIP_PRESOL** presols;
998  int npresols;
999  int i;
1000 
1001  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
1002 
1003  presols = SCIPgetPresols(scip);
1004  npresols = SCIPgetNPresols(scip);
1005 
1006  /* display list of presolvers */
1007  SCIPdialogMessage(scip, NULL, "\n");
1008  SCIPdialogMessage(scip, NULL, " Legend:\n");
1009  SCIPdialogMessage(scip, NULL, " priority: presolver called before constraint handlers iff priority > 0\n");
1010  SCIPdialogMessage(scip, NULL, " timing: 'f'ast, 'm'edium, 'e'xhaustive\n\n");
1011  SCIPdialogMessage(scip, NULL, " maxrounds: -1: no limit, 0: off, >0: limited number of rounds\n\n");
1012  SCIPdialogMessage(scip, NULL, " presolver priority timing maxrounds description\n");
1013  SCIPdialogMessage(scip, NULL, " --------- -------- ------ --------- -----------\n");
1014  for( i = 0; i < npresols; ++i )
1015  {
1016  SCIPdialogMessage(scip, NULL, " %-20s ", SCIPpresolGetName(presols[i]));
1017  if( strlen(SCIPpresolGetName(presols[i])) > 20 )
1018  SCIPdialogMessage(scip, NULL, "\n %20s ", "-->");
1019  SCIPdialogMessage(scip, NULL, "%8d ", SCIPpresolGetPriority(presols[i]));
1020  SCIPdialogMessage(scip, NULL, " %c", SCIPpresolGetTiming(presols[i]) & SCIP_PRESOLTIMING_FAST ? 'f' : ' ');
1021  SCIPdialogMessage(scip, NULL, "%c", SCIPpresolGetTiming(presols[i]) & SCIP_PRESOLTIMING_MEDIUM ? 'm' : ' ');
1022  SCIPdialogMessage(scip, NULL, "%c ", SCIPpresolGetTiming(presols[i]) & SCIP_PRESOLTIMING_EXHAUSTIVE ? 'e' : ' ');
1023  SCIPdialogMessage(scip, NULL, "%9d ", SCIPpresolGetMaxrounds(presols[i]));
1024  SCIPdialogMessage(scip, NULL, "%s", SCIPpresolGetDesc(presols[i]));
1025  SCIPdialogMessage(scip, NULL, "\n");
1026  }
1027  SCIPdialogMessage(scip, NULL, "\n");
1028 
1029  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1030 
1031  return SCIP_OKAY;
1032 }
1033 
1034 /** dialog execution method for the display pricer command */
1035 SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayPricers)
1036 { /*lint --e{715}*/
1037  SCIP_PRICER** pricers;
1038  int npricers;
1039  int i;
1040 
1041  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
1042 
1043  pricers = SCIPgetPricers(scip);
1044  npricers = SCIPgetNPricers(scip);
1045 
1046  /* display list of pricers */
1047  SCIPdialogMessage(scip, NULL, "\n");
1048  SCIPdialogMessage(scip, NULL, " pricer priority description\n");
1049  SCIPdialogMessage(scip, NULL, " ---------- -------- -----------\n");
1050  for( i = 0; i < npricers; ++i )
1051  {
1052  SCIPdialogMessage(scip, NULL, " %-20s ", SCIPpricerGetName(pricers[i]));
1053  if( strlen(SCIPpricerGetName(pricers[i])) > 20 )
1054  SCIPdialogMessage(scip, NULL, "\n %20s ", "-->");
1055  SCIPdialogMessage(scip, NULL, "%8d%c ", SCIPpricerGetPriority(pricers[i]), SCIPpricerIsDelayed(pricers[i]) ? 'd' : ' ');
1056  SCIPdialogMessage(scip, NULL, "%s", SCIPpricerGetDesc(pricers[i]));
1057  SCIPdialogMessage(scip, NULL, "\n");
1058  }
1059  SCIPdialogMessage(scip, NULL, "\n");
1060 
1061  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1062 
1063  return SCIP_OKAY;
1064 }
1065 
1066 /** dialog execution method for the display problem command */
1067 SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayProblem)
1068 { /*lint --e{715}*/
1069  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
1070 
1071  SCIPdialogMessage(scip, NULL, "\n");
1072 
1074  {
1076  }
1077  else
1078  SCIPdialogMessage(scip, NULL, "no problem available\n");
1079 
1080  SCIPdialogMessage(scip, NULL, "\n");
1081 
1082  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1083 
1084  return SCIP_OKAY;
1085 }
1086 
1087 /** dialog execution method for the display propagators command */
1088 SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayPropagators)
1089 { /*lint --e{715}*/
1090  SCIP_PROP** props;
1091  int nprops;
1092  int i;
1093 
1094  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
1095 
1096  props = SCIPgetProps(scip);
1097  nprops = SCIPgetNProps(scip);
1098 
1099  /* display list of propagators */
1100  SCIPdialogMessage(scip, NULL, "\n");
1101  SCIPdialogMessage(scip, NULL, " Legend:\n");
1102  SCIPdialogMessage(scip, NULL, " presprio: propagator presolving called before constraint handlers iff presprio > 0\n");
1103  SCIPdialogMessage(scip, NULL, " prestim (presolve timing): 'f'ast, 'm'edium, 'e'xhaustive\n\n");
1104 
1105  SCIPdialogMessage(scip, NULL, " propagator propprio freq presprio prestim description\n");
1106  SCIPdialogMessage(scip, NULL, " ---------- -------- ---- -------- ------- -----------\n");
1107  for( i = 0; i < nprops; ++i )
1108  {
1109  SCIPdialogMessage(scip, NULL, " %-20s ", SCIPpropGetName(props[i]));
1110  if( strlen(SCIPpropGetName(props[i])) > 20 )
1111  SCIPdialogMessage(scip, NULL, "\n %20s ", "-->");
1112  SCIPdialogMessage(scip, NULL, "%8d%c ", SCIPpropGetPriority(props[i]), SCIPpropIsDelayed(props[i]) ? 'd' : ' ');
1113  SCIPdialogMessage(scip, NULL, "%4d ", SCIPpropGetFreq(props[i]));
1115  SCIPdialogMessage(scip, NULL, " %c", SCIPpropGetPresolTiming(props[i]) & SCIP_PRESOLTIMING_FAST ? 'f' : ' ');
1118  SCIPdialogMessage(scip, NULL, "%s", SCIPpropGetDesc(props[i]));
1119  SCIPdialogMessage(scip, NULL, "\n");
1120  }
1121  SCIPdialogMessage(scip, NULL, "\n");
1122 
1123  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1124 
1125  return SCIP_OKAY;
1126 }
1127 
1128 /** dialog execution method for the display readers command */
1129 SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayReaders)
1130 { /*lint --e{715}*/
1131  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
1132 
1133  /* print reader information */
1135 
1136  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1137 
1138  return SCIP_OKAY;
1139 }
1140 
1141 /** dialog execution method for the display separators command */
1142 SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplaySeparators)
1143 { /*lint --e{715}*/
1144  SCIP_SEPA** sepas;
1145  int nsepas;
1146  int i;
1147 
1148  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
1149 
1150  sepas = SCIPgetSepas(scip);
1151  nsepas = SCIPgetNSepas(scip);
1152 
1153  /* display list of separators */
1154  SCIPdialogMessage(scip, NULL, "\n");
1155  SCIPdialogMessage(scip, NULL, " separator priority freq bddist description\n");
1156  SCIPdialogMessage(scip, NULL, " --------- -------- ---- ------ -----------\n");
1157  for( i = 0; i < nsepas; ++i )
1158  {
1159  SCIPdialogMessage(scip, NULL, " %-20s ", SCIPsepaGetName(sepas[i]));
1160  if( strlen(SCIPsepaGetName(sepas[i])) > 20 )
1161  SCIPdialogMessage(scip, NULL, "\n %20s ", "-->");
1162  SCIPdialogMessage(scip, NULL, "%8d%c ", SCIPsepaGetPriority(sepas[i]), SCIPsepaIsDelayed(sepas[i]) ? 'd' : ' ');
1163  SCIPdialogMessage(scip, NULL, "%4d ", SCIPsepaGetFreq(sepas[i]));
1164  SCIPdialogMessage(scip, NULL, "%6.2f ", SCIPsepaGetMaxbounddist(sepas[i]));
1165  SCIPdialogMessage(scip, NULL, "%s", SCIPsepaGetDesc(sepas[i]));
1166  SCIPdialogMessage(scip, NULL, "\n");
1167  }
1168  SCIPdialogMessage(scip, NULL, "\n");
1169 
1170  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1171 
1172  return SCIP_OKAY;
1173 }
1174 
1175 /** dialog execution method for the display solution command */
1176 SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplaySolution)
1177 { /*lint --e{715}*/
1178  SCIP_VAR** fixedvars;
1179  SCIP_VAR* var;
1180  int nfixedvars;
1181  int v;
1182 
1183  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
1184 
1185  SCIPdialogMessage(scip, NULL, "\n");
1187  SCIPdialogMessage(scip, NULL, "\n");
1188 
1189  /* check if there are infinite fixings and print a reference to 'display finitesolution', if needed */
1190  fixedvars = SCIPgetFixedVars(scip);
1191  nfixedvars = SCIPgetNFixedVars(scip);
1192  assert(fixedvars != NULL || nfixedvars == 0);
1193 
1194  /* check whether there are variables fixed to an infinite value */
1195  for( v = 0; v < nfixedvars; ++v )
1196  {
1197  var = fixedvars[v]; /*lint !e613*/
1198 
1199  /* skip (multi-)aggregated variables */
1201  continue;
1202 
1204  {
1205  SCIPdialogMessage(scip, NULL, "The primal solution contains variables fixed to infinite values.\n\
1206 If you want SCIP to display an optimal solution without infinite values, use 'display finitesolution'.\n");
1207  SCIPdialogMessage(scip, NULL, "\n");
1208  break;
1209  }
1210  }
1211 
1212  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1213 
1214  return SCIP_OKAY;
1215 }
1216 
1217 /** dialog execution method for the display finitesolution command */
1218 SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayFiniteSolution)
1219 { /*lint --e{715}*/
1220  SCIP_SOL* bestsol = SCIPgetBestSol(scip);
1221 
1222  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
1223 
1224  SCIPdialogMessage(scip, NULL, "\n");
1225  if( bestsol != NULL )
1226  {
1227  SCIP_SOL* sol;
1228  SCIP_Bool success;
1229  SCIP_RETCODE retcode;
1230 
1231  /* create copy of solution with finite values */
1232  retcode = SCIPcreateFiniteSolCopy(scip, &sol, bestsol, &success);
1233 
1234  if( retcode == SCIP_OKAY && success )
1235  {
1236  retcode = SCIPprintSol(scip, sol, NULL, FALSE);
1237  SCIPdialogMessage(scip, NULL, "\n");
1238  }
1239  else
1240  {
1241  SCIPdialogMessage(scip, NULL, "error while creating finite solution\n");
1242  }
1243 
1244  /* free solution copy */
1245  if( retcode == SCIP_OKAY )
1246  {
1247  SCIP_CALL( SCIPfreeSol(scip, &sol) );
1248  }
1249  }
1250  else
1251  {
1253  SCIPdialogMessage(scip, NULL, "\n");
1254  }
1255 
1256  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1257 
1258  return SCIP_OKAY;
1259 }
1260 
1261 /** dialog execution method for the display dual solution command */
1262 SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayDualSolution)
1263 { /*lint --e{715}*/
1264  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
1265 
1266  SCIPdialogMessage(scip, NULL, "\n");
1268  SCIPdialogMessage(scip, NULL, "\n");
1269 
1270  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1271 
1272  return SCIP_OKAY;
1273 }
1274 
1275 
1276 /** dialog execution method for the display of solutions in the pool command */
1277 SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplaySolutionPool)
1278 { /*lint --e{715}*/
1279  char prompt[SCIP_MAXSTRLEN];
1280  SCIP_Bool endoffile;
1281  SCIP_SOL** sols;
1282  char* idxstr;
1283  char* endstr;
1284  int nsols;
1285  int idx;
1286 
1287  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
1288  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1289  SCIPdialogMessage(scip, NULL, "\n");
1290 
1292  {
1293  SCIPdialogMessage(scip, NULL, "No solution available.\n\n");
1294  return SCIP_OKAY;
1295  }
1296 
1297  nsols = SCIPgetNSols(scip);
1298  if ( nsols == 0 )
1299  {
1300  SCIPdialogMessage(scip, NULL, "No solution available.\n\n");
1301  return SCIP_OKAY;
1302  }
1303 
1304  /* parse solution number */
1305  (void) SCIPsnprintf(prompt, SCIP_MAXSTRLEN-1, "index of solution [0-%d]: ", nsols-1);
1306 
1307  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, prompt, &idxstr, &endoffile) );
1308 
1309  if( endoffile )
1310  {
1311  *nextdialog = NULL;
1312  return SCIP_OKAY;
1313  }
1314 
1315  if ( SCIPstrToIntValue(idxstr, &idx, &endstr) )
1316  {
1317  if ( idx < 0 || idx >= nsols )
1318  {
1319  SCIPdialogMessage(scip, NULL, "Solution index out of bounds [0-%d].\n", nsols-1);
1320  return SCIP_OKAY;
1321  }
1322 
1323  sols = SCIPgetSols(scip);
1324  assert( sols[idx] != NULL );
1325  SCIP_CALL( SCIPprintSol(scip, sols[idx], NULL, FALSE) );
1326  }
1327  SCIPdialogMessage(scip, NULL, "\n");
1328 
1329  return SCIP_OKAY;
1330 }
1331 
1332 /** dialog execution method for the display statistics command */
1333 SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayStatistics)
1334 { /*lint --e{715}*/
1335  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
1336 
1337  SCIPdialogMessage(scip, NULL, "\n");
1339  SCIPdialogMessage(scip, NULL, "\n");
1340 
1341  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1342 
1343  return SCIP_OKAY;
1344 }
1345 
1346 /** dialog execution method for the display reoptstatistics command */
1347 SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayReoptStatistics)
1348 { /*lint --e{715}*/
1349  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
1350 
1351  SCIPdialogMessage(scip, NULL, "\n");
1353  SCIPdialogMessage(scip, NULL, "\n");
1354 
1355  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1356 
1357  return SCIP_OKAY;
1358 }
1359 
1360 /** dialog execution method for the display compression command */
1361 SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayCompression)
1362 { /*lint --e{715}*/
1363  SCIP_COMPR** comprs;
1364  SCIP_COMPR** sorted;
1365  int ncomprs;
1366  int i;
1367 
1368  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
1369 
1370  comprs = SCIPgetComprs(scip);
1371  ncomprs = SCIPgetNCompr(scip);
1372 
1373  /* copy compression array into temporary memory for sorting */
1374  SCIP_CALL( SCIPduplicateBufferArray(scip, &sorted, comprs, ncomprs) );
1375 
1376  /* sort the compression t */
1377  SCIPsortPtr((void**)sorted, SCIPcomprComp, ncomprs);
1378 
1379  /* display sorted list of branching rules */
1380  SCIPdialogMessage(scip, NULL, "\n");
1381  SCIPdialogMessage(scip, NULL, " compression method priority minnodes description\n");
1382  SCIPdialogMessage(scip, NULL, " ------------------ -------- -------- -----------\n");
1383  for( i = 0; i < ncomprs; ++i )
1384  {
1385  SCIPdialogMessage(scip, NULL, " %-24s ", SCIPcomprGetName(sorted[i]));
1386  if( strlen(SCIPcomprGetName(sorted[i])) > 24 )
1387  SCIPdialogMessage(scip, NULL, "\n %24s ", "-->");
1388  SCIPdialogMessage(scip, NULL, "%8d %8d ", SCIPcomprGetPriority(sorted[i]), SCIPcomprGetMinNodes(sorted[i]));
1389  SCIPdialogMessage(scip, NULL, "%s", SCIPcomprGetDesc(sorted[i]));
1390  SCIPdialogMessage(scip, NULL, "\n");
1391  }
1392  SCIPdialogMessage(scip, NULL, "\n");
1393 
1394  /* free temporary memory */
1395  SCIPfreeBufferArray(scip, &sorted);
1396 
1397  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1398 
1399  return SCIP_OKAY;
1400 }
1401 
1402 /** dialog execution method for the display transproblem command */
1403 SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayTransproblem)
1404 { /*lint --e{715}*/
1405  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
1406 
1407  SCIPdialogMessage(scip, NULL, "\n");
1409  {
1411  }
1412  else
1413  SCIPdialogMessage(scip, NULL, "no transformed problem available\n");
1414 
1415  SCIPdialogMessage(scip, NULL, "\n");
1416 
1417  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1418 
1419  return SCIP_OKAY;
1420 }
1421 
1422 /** dialog execution method for the display value command */
1423 SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayValue)
1424 { /*lint --e{715}*/
1425  SCIP_SOL* sol;
1426  SCIP_VAR* var;
1427  char* varname;
1428  SCIP_Real solval;
1429  SCIP_Bool endoffile;
1430 
1431  SCIPdialogMessage(scip, NULL, "\n");
1432 
1434  sol = SCIPgetBestSol(scip);
1435  else
1436  sol = NULL;
1437 
1438  if( sol == NULL )
1439  {
1440  SCIPdialogMessage(scip, NULL, "no feasible solution available\n");
1441  SCIPdialoghdlrClearBuffer(dialoghdlr);
1442  }
1443  else
1444  {
1445  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "enter variable name: ", &varname, &endoffile) );
1446  if( endoffile )
1447  {
1448  *nextdialog = NULL;
1449  return SCIP_OKAY;
1450  }
1451 
1452  if( varname[0] != '\0' )
1453  {
1454  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, varname, TRUE) );
1455 
1456  var = SCIPfindVar(scip, varname);
1457  if( var == NULL )
1458  SCIPdialogMessage(scip, NULL, "variable <%s> not found\n", varname);
1459  else
1460  {
1461  solval = SCIPgetSolVal(scip, sol, var);
1462  SCIPdialogMessage(scip, NULL, "%-32s", SCIPvarGetName(var));
1463  if( SCIPisInfinity(scip, solval) )
1464  SCIPdialogMessage(scip, NULL, " +infinity");
1465  else if( SCIPisInfinity(scip, -solval) )
1466  SCIPdialogMessage(scip, NULL, " -infinity");
1467  else
1468  SCIPdialogMessage(scip, NULL, " %20.15g", solval);
1469  SCIPdialogMessage(scip, NULL, " \t(obj:%.15g)\n", SCIPvarGetObj(var));
1470  }
1471  }
1472  }
1473  SCIPdialogMessage(scip, NULL, "\n");
1474 
1475  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1476 
1477  return SCIP_OKAY;
1478 }
1479 
1480 /** dialog execution method for the display varbranchstatistics command */
1481 SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayVarbranchstatistics)
1482 { /*lint --e{715}*/
1483  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
1484 
1485  SCIPdialogMessage(scip, NULL, "\n");
1487  SCIPdialogMessage(scip, NULL, "\n");
1488 
1489  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1490 
1491  return SCIP_OKAY;
1492 }
1493 
1494 /** dialog execution method for the display LP solution quality command */
1495 SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayLPSolutionQuality)
1496 { /*lint --e{715}*/
1497  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
1498 
1499  SCIPdialogMessage(scip, NULL, "\n");
1501  SCIPdialogMessage(scip, NULL, "\n");
1502 
1503  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1504 
1505  return SCIP_OKAY;
1506 }
1507 
1508 /** dialog execution method for the help command */
1509 SCIP_DECL_DIALOGEXEC(SCIPdialogExecHelp)
1510 { /*lint --e{715}*/
1511  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
1512 
1513  SCIPdialogMessage(scip, NULL, "\n");
1515  SCIPdialogMessage(scip, NULL, "\n");
1516 
1517  *nextdialog = SCIPdialogGetParent(dialog);
1518 
1519  return SCIP_OKAY;
1520 }
1521 
1522 /** dialog execution method for the display transsolution command */
1523 SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayTranssolution)
1524 { /*lint --e{715}*/
1525  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
1526 
1527  SCIPdialogMessage(scip, NULL, "\n");
1529  {
1531  {
1532  SCIPdialogMessage(scip, NULL, "best solution exists only in original problem space\n");
1533  }
1534  else
1535  {
1537  }
1538  }
1539  else
1540  SCIPdialogMessage(scip, NULL, "no solution available\n");
1541  SCIPdialogMessage(scip, NULL, "\n");
1542 
1543  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1544 
1545  return SCIP_OKAY;
1546 }
1547 
1548 /** dialog execution method for the free command */
1549 SCIP_DECL_DIALOGEXEC(SCIPdialogExecFree)
1550 { /*lint --e{715}*/
1551  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
1552 
1554 
1555  *nextdialog = SCIPdialogGetParent(dialog);
1556 
1557  return SCIP_OKAY;
1558 }
1559 
1560 /** dialog execution method for the newstart command */
1561 SCIP_DECL_DIALOGEXEC(SCIPdialogExecNewstart)
1562 { /*lint --e{715}*/
1563  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
1564 
1566 
1567  *nextdialog = SCIPdialogGetParent(dialog);
1568 
1569  return SCIP_OKAY;
1570 }
1571 
1572 /** dialog execution method for the transform command */
1573 SCIP_DECL_DIALOGEXEC(SCIPdialogExecTransform)
1574 { /*lint --e{715}*/
1575  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
1576 
1577  SCIPdialogMessage(scip, NULL, "\n");
1578  switch( SCIPgetStage(scip) )
1579  {
1580  case SCIP_STAGE_INIT:
1581  SCIPdialogMessage(scip, NULL, "no problem exists\n");
1582  break;
1583 
1584  case SCIP_STAGE_PROBLEM:
1586  break;
1587 
1589  SCIPdialogMessage(scip, NULL, "problem is already transformed\n");
1590  break;
1591 
1594  case SCIP_STAGE_PRESOLVING:
1595  case SCIP_STAGE_PRESOLVED:
1597  case SCIP_STAGE_INITSOLVE:
1598  case SCIP_STAGE_SOLVING:
1599  case SCIP_STAGE_SOLVED:
1600  case SCIP_STAGE_EXITSOLVE:
1601  case SCIP_STAGE_FREETRANS:
1602  case SCIP_STAGE_FREE:
1603  default:
1604  SCIPerrorMessage("invalid SCIP stage\n");
1605  return SCIP_INVALIDCALL;
1606  }
1607  SCIPdialogMessage(scip, NULL, "\n");
1608 
1609  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1610 
1611  return SCIP_OKAY;
1612 }
1613 
1614 /** dialog execution method for the optimize command */
1615 SCIP_DECL_DIALOGEXEC(SCIPdialogExecOptimize)
1616 { /*lint --e{715}*/
1617  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
1618 
1619  SCIPdialogMessage(scip, NULL, "\n");
1620  switch( SCIPgetStage(scip) )
1621  {
1622  case SCIP_STAGE_INIT:
1623  SCIPdialogMessage(scip, NULL, "no problem exists\n");
1624  break;
1625 
1626  case SCIP_STAGE_PROBLEM:
1628  case SCIP_STAGE_PRESOLVING:
1629  case SCIP_STAGE_PRESOLVED:
1630  case SCIP_STAGE_SOLVING:
1631  SCIP_CALL( SCIPsolve(scip) );
1632  break;
1633 
1634  case SCIP_STAGE_SOLVED:
1635  SCIPdialogMessage(scip, NULL, "problem is already solved\n");
1636  break;
1637 
1641  case SCIP_STAGE_INITSOLVE:
1642  case SCIP_STAGE_EXITSOLVE:
1643  case SCIP_STAGE_FREETRANS:
1644  case SCIP_STAGE_FREE:
1645  default:
1646  SCIPerrorMessage("invalid SCIP stage\n");
1647  return SCIP_INVALIDCALL;
1648  }
1649  SCIPdialogMessage(scip, NULL, "\n");
1650 
1651  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1652 
1653  return SCIP_OKAY;
1654 }
1655 
1656 /** dialog execution method for the presolve command */
1657 SCIP_DECL_DIALOGEXEC(SCIPdialogExecPresolve)
1658 { /*lint --e{715}*/
1659  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
1660 
1661  SCIPdialogMessage(scip, NULL, "\n");
1662  switch( SCIPgetStage(scip) )
1663  {
1664  case SCIP_STAGE_INIT:
1665  SCIPdialogMessage(scip, NULL, "no problem exists\n");
1666  break;
1667 
1668  case SCIP_STAGE_PROBLEM:
1670  case SCIP_STAGE_PRESOLVING:
1672  break;
1673 
1674  case SCIP_STAGE_PRESOLVED:
1675  case SCIP_STAGE_SOLVING:
1676  SCIPdialogMessage(scip, NULL, "problem is already presolved\n");
1677  break;
1678 
1679  case SCIP_STAGE_SOLVED:
1680  SCIPdialogMessage(scip, NULL, "problem is already solved\n");
1681  break;
1682 
1686  case SCIP_STAGE_INITSOLVE:
1687  case SCIP_STAGE_EXITSOLVE:
1688  case SCIP_STAGE_FREETRANS:
1689  case SCIP_STAGE_FREE:
1690  default:
1691  SCIPerrorMessage("invalid SCIP stage\n");
1692  return SCIP_INVALIDCALL;
1693  }
1694  SCIPdialogMessage(scip, NULL, "\n");
1695 
1696  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1697 
1698  return SCIP_OKAY;
1699 }
1700 
1701 /** dialog execution method for the quit command */
1702 SCIP_DECL_DIALOGEXEC(SCIPdialogExecQuit)
1703 { /*lint --e{715}*/
1704  SCIPdialogMessage(scip, NULL, "\n");
1705 
1706  *nextdialog = NULL;
1707 
1708  return SCIP_OKAY;
1709 }
1710 
1711 /** dialog execution method for the read command */
1712 SCIP_DECL_DIALOGEXEC(SCIPdialogExecRead)
1713 { /*lint --e{715}*/
1714  SCIP_RETCODE retcode;
1715  char* filename;
1716  SCIP_Bool endoffile;
1717 
1718  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "enter filename: ", &filename, &endoffile) );
1719  if( endoffile )
1720  {
1721  *nextdialog = NULL;
1722  return SCIP_OKAY;
1723  }
1724 
1725  if( filename[0] != '\0' )
1726  {
1727  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, filename, TRUE) );
1728 
1729  if( SCIPfileExists(filename) )
1730  {
1731  char* tmpfilename;
1732  char* extension;
1733 
1734  /* copy filename */
1735  SCIP_CALL( SCIPduplicateBufferArray(scip, &tmpfilename, filename, (int)strlen(filename)+1) );
1736  extension = NULL;
1737 
1738  SCIPinfoMessage(scip, NULL, "\n");
1739  SCIPinfoMessage(scip, NULL, "read problem <%s>\n", filename);
1740  SCIPinfoMessage(scip, NULL, "============\n");
1741  SCIPinfoMessage(scip, NULL, "\n");
1742 
1743  do
1744  {
1745  retcode = SCIPreadProb(scip, tmpfilename, extension);
1746  if( retcode == SCIP_READERROR || retcode == SCIP_NOFILE )
1747  {
1748  if( extension == NULL )
1749  SCIPdialogMessage(scip, NULL, "error reading file <%s>\n", tmpfilename);
1750  else
1751  SCIPdialogMessage(scip, NULL, "error reading file <%s> using <%s> file format\n",
1752  tmpfilename, extension);
1753 
1755  break;
1756  }
1757  else if( retcode == SCIP_PLUGINNOTFOUND )
1758  {
1759  /* ask user once for a suitable reader */
1760  if( extension == NULL )
1761  {
1762  SCIPdialogMessage(scip, NULL, "no reader for input file <%s> available\n", tmpfilename);
1763 
1764  SCIPdialogMessage(scip, NULL, "following readers are avaliable for reading:\n");
1766 
1767  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog,
1768  "select a suitable reader by extension (or return): ", &extension, &endoffile) );
1769 
1770  if( extension[0] == '\0' )
1771  break;
1772  }
1773  else
1774  {
1775  SCIPdialogMessage(scip, NULL, "no reader for file extension <%s> available\n", extension);
1776  extension = NULL;
1777  }
1778  }
1779  else
1780  {
1781  /* check if an unexpected error occurred during the reading process */
1782  SCIP_CALL( retcode );
1783  break;
1784  }
1785  }
1786  while( extension != NULL );
1787 
1788  /* free buffer array */
1789  SCIPfreeBufferArray(scip, &tmpfilename);
1790  }
1791  else
1792  {
1793  SCIPdialogMessage(scip, NULL, "file <%s> not found\n", filename);
1794  SCIPdialoghdlrClearBuffer(dialoghdlr);
1795  }
1796  }
1797 
1798  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1799 
1800  return SCIP_OKAY;
1801 }
1802 
1803 /** dialog execution method for the set default command */
1804 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetDefault)
1805 { /*lint --e{715}*/
1806  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
1807 
1809  SCIPdialogMessage(scip, NULL, "reset parameters to their default values\n");
1810 
1811  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1812 
1813  return SCIP_OKAY;
1814 }
1815 
1816 /** dialog execution method for the set load command */
1817 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetLoad)
1818 { /*lint --e{715}*/
1819  char* filename;
1820  SCIP_Bool endoffile;
1821 
1822  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "enter filename: ", &filename, &endoffile) );
1823  if( endoffile )
1824  {
1825  *nextdialog = NULL;
1826  return SCIP_OKAY;
1827  }
1828 
1829  if( filename[0] != '\0' )
1830  {
1831  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, filename, TRUE) );
1832 
1833  if( SCIPfileExists(filename) )
1834  {
1835  SCIP_CALL( SCIPreadParams(scip, filename) );
1836  SCIPdialogMessage(scip, NULL, "loaded parameter file <%s>\n", filename);
1837  }
1838  else
1839  {
1840  SCIPdialogMessage(scip, NULL, "file <%s> not found\n", filename);
1841  SCIPdialoghdlrClearBuffer(dialoghdlr);
1842  }
1843  }
1844 
1845  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1846 
1847  return SCIP_OKAY;
1848 }
1849 
1850 /** dialog execution method for the set save command */
1851 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetSave)
1852 { /*lint --e{715}*/
1853  char* filename;
1854  SCIP_Bool endoffile;
1855 
1856  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "enter filename: ", &filename, &endoffile) );
1857  if( endoffile )
1858  {
1859  *nextdialog = NULL;
1860  return SCIP_OKAY;
1861  }
1862 
1863  if( filename[0] != '\0' )
1864  {
1865  SCIP_RETCODE retcode;
1866 
1867  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, filename, TRUE) );
1868 
1869  retcode = SCIPwriteParams(scip, filename, TRUE, FALSE);
1870 
1871  if( retcode == SCIP_FILECREATEERROR )
1872  {
1873  SCIPdialogMessage(scip, NULL, "error creating file <%s>\n", filename);
1874  }
1875  else
1876  {
1877  SCIP_CALL( retcode );
1878  SCIPdialogMessage(scip, NULL, "saved parameter file <%s>\n", filename);
1879  }
1880  }
1881 
1882  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1883 
1884  return SCIP_OKAY;
1885 }
1886 
1887 /** dialog execution method for the set diffsave command */
1888 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetDiffsave)
1889 { /*lint --e{715}*/
1890  char* filename;
1891  SCIP_Bool endoffile;
1892 
1893  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "enter filename: ", &filename, &endoffile) );
1894  if( endoffile )
1895  {
1896  *nextdialog = NULL;
1897  return SCIP_OKAY;
1898  }
1899 
1900  if( filename[0] != '\0' )
1901  {
1902  SCIP_RETCODE retcode;
1903 
1904  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, filename, TRUE) );
1905 
1906  retcode = SCIPwriteParams(scip, filename, TRUE, TRUE);
1907 
1908  if( retcode == SCIP_FILECREATEERROR )
1909  {
1910  SCIPdialogMessage(scip, NULL, "error creating file <%s>\n", filename);
1911  }
1912  else
1913  {
1914  SCIP_CALL( retcode );
1915  SCIPdialogMessage(scip, NULL, "saved non-default parameter settings to file <%s>\n", filename);
1916  }
1917  }
1918 
1919  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1920 
1921  return SCIP_OKAY;
1922 }
1923 
1924 /** dialog execution method for the set parameter command */
1925 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetParam)
1926 { /*lint --e{715}*/
1927  SCIP_RETCODE retcode;
1928  SCIP_PARAM* param;
1929  char prompt[SCIP_MAXSTRLEN];
1930  char* valuestr;
1931  SCIP_Bool boolval;
1932  int intval;
1933  SCIP_Longint longintval;
1934  SCIP_Real realval;
1935  char charval;
1936  SCIP_Bool endoffile;
1937  SCIP_Bool error;
1938 
1939  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1940 
1941  /* get the parameter to set */
1942  param = (SCIP_PARAM*)SCIPdialogGetData(dialog);
1943 
1944  /* depending on the parameter type, request a user input */
1945  switch( SCIPparamGetType(param) )
1946  {
1947  case SCIP_PARAMTYPE_BOOL:
1948  (void) SCIPsnprintf(prompt, SCIP_MAXSTRLEN, "current value: %s, new value (TRUE/FALSE): ",
1949  SCIPparamGetBool(param) ? "TRUE" : "FALSE");
1950  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, prompt, &valuestr, &endoffile) );
1951  if( endoffile )
1952  {
1953  *nextdialog = NULL;
1954  return SCIP_OKAY;
1955  }
1956  if( valuestr[0] == '\0' )
1957  return SCIP_OKAY;
1958 
1959  boolval = parseBoolValue(scip, valuestr, &error);
1960 
1961  if( !error )
1962  {
1963  retcode = SCIPchgBoolParam(scip, param, boolval);
1964  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, boolval ? "TRUE" : "FALSE", TRUE) );
1965  if( retcode != SCIP_PARAMETERWRONGVAL )
1966  {
1967  SCIPdialogMessage(scip, NULL, "%s = %s\n", SCIPparamGetName(param), boolval ? "TRUE" : "FALSE");
1968 
1969  SCIP_CALL( retcode );
1970  }
1971  }
1972 
1973  break;
1974 
1975  case SCIP_PARAMTYPE_INT:
1976  (void) SCIPsnprintf(prompt, SCIP_MAXSTRLEN, "current value: %d, new value [%d,%d]: ",
1977  SCIPparamGetInt(param), SCIPparamGetIntMin(param), SCIPparamGetIntMax(param));
1978  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, prompt, &valuestr, &endoffile) );
1979  if( endoffile )
1980  {
1981  *nextdialog = NULL;
1982  return SCIP_OKAY;
1983  }
1984  if( valuestr[0] == '\0' )
1985  return SCIP_OKAY;
1986 
1987  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, valuestr, TRUE) );
1988 
1989  if( sscanf(valuestr, "%d", &intval) != 1 )
1990  {
1991  SCIPdialogMessage(scip, NULL, "\ninvalid input <%s>\n\n", valuestr);
1992  return SCIP_OKAY;
1993  }
1994  retcode = SCIPchgIntParam(scip, param, intval);
1995  if( retcode != SCIP_PARAMETERWRONGVAL )
1996  {
1997  SCIPdialogMessage(scip, NULL, "%s = %d\n", SCIPparamGetName(param), intval);
1998 
1999  SCIP_CALL( retcode );
2000  }
2001 
2002  break;
2003 
2005  (void) SCIPsnprintf(prompt, SCIP_MAXSTRLEN, "current value: %" SCIP_LONGINT_FORMAT ", new value [%" SCIP_LONGINT_FORMAT ",%" SCIP_LONGINT_FORMAT "]: ",
2007  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, prompt, &valuestr, &endoffile) );
2008  if( endoffile )
2009  {
2010  *nextdialog = NULL;
2011  return SCIP_OKAY;
2012  }
2013  if( valuestr[0] == '\0' )
2014  return SCIP_OKAY;
2015 
2016  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, valuestr, TRUE) );
2017 
2018  if( sscanf(valuestr, "%"SCIP_LONGINT_FORMAT, &longintval) != 1 )
2019  {
2020  SCIPdialogMessage(scip, NULL, "\ninvalid input <%s>\n\n", valuestr);
2021  return SCIP_OKAY;
2022  }
2023  retcode = SCIPchgLongintParam(scip, param, longintval);
2024  if( retcode != SCIP_PARAMETERWRONGVAL )
2025  {
2026  SCIPdialogMessage(scip, NULL, "%s = %" SCIP_LONGINT_FORMAT "\n", SCIPparamGetName(param), longintval);
2027 
2028  SCIP_CALL( retcode );
2029  }
2030  break;
2031 
2032  case SCIP_PARAMTYPE_REAL:
2033  (void) SCIPsnprintf(prompt, SCIP_MAXSTRLEN, "current value: %.15g, new value [%.15g,%.15g]: ",
2035  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, prompt, &valuestr, &endoffile) );
2036  if( endoffile )
2037  {
2038  *nextdialog = NULL;
2039  return SCIP_OKAY;
2040  }
2041  if( valuestr[0] == '\0' )
2042  return SCIP_OKAY;
2043 
2044  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, valuestr, TRUE) );
2045 
2046  if( sscanf(valuestr, "%" SCIP_REAL_FORMAT, &realval) != 1 )
2047  {
2048  SCIPdialogMessage(scip, NULL, "\ninvalid input <%s>\n\n", valuestr);
2049  return SCIP_OKAY;
2050  }
2051  retcode = SCIPchgRealParam(scip, param, realval);
2052  if( retcode != SCIP_PARAMETERWRONGVAL )
2053  {
2054  SCIPdialogMessage(scip, NULL, "%s = %.15g\n", SCIPparamGetName(param), realval);
2055 
2056  SCIP_CALL( retcode );
2057  }
2058  break;
2059 
2060  case SCIP_PARAMTYPE_CHAR:
2061  (void) SCIPsnprintf(prompt, SCIP_MAXSTRLEN, "current value: <%c>, new value: ", SCIPparamGetChar(param));
2062  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, prompt, &valuestr, &endoffile) );
2063  if( endoffile )
2064  {
2065  *nextdialog = NULL;
2066  return SCIP_OKAY;
2067  }
2068  if( valuestr[0] == '\0' )
2069  return SCIP_OKAY;
2070 
2071  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, valuestr, TRUE) );
2072 
2073  if( sscanf(valuestr, "%c", &charval) != 1 )
2074  {
2075  SCIPdialogMessage(scip, NULL, "\ninvalid input <%s>\n\n", valuestr);
2076  return SCIP_OKAY;
2077  }
2078  retcode = SCIPchgCharParam(scip, param, charval);
2079  if( retcode != SCIP_PARAMETERWRONGVAL )
2080  {
2081  SCIPdialogMessage(scip, NULL, "%s = %c\n", SCIPparamGetName(param), charval);
2082 
2083  SCIP_CALL( retcode );
2084  }
2085  break;
2086 
2087  case SCIP_PARAMTYPE_STRING:
2088  (void) SCIPsnprintf(prompt, SCIP_MAXSTRLEN, "current value: <%s>, new value: ", SCIPparamGetString(param));
2089  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, prompt, &valuestr, &endoffile) );
2090  if( endoffile )
2091  {
2092  *nextdialog = NULL;
2093  return SCIP_OKAY;
2094  }
2095  if( valuestr[0] == '\0' )
2096  return SCIP_OKAY;
2097 
2098  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, valuestr, TRUE) );
2099 
2100  retcode = SCIPchgStringParam(scip, param, valuestr);
2101  if( retcode != SCIP_PARAMETERWRONGVAL )
2102  {
2103  SCIPdialogMessage(scip, NULL, "%s = %s\n", SCIPparamGetName(param), valuestr);
2104 
2105  SCIP_CALL( retcode );
2106  }
2107  break;
2108 
2109  default:
2110  SCIPerrorMessage("invalid parameter type\n");
2111  return SCIP_INVALIDDATA;
2112  }
2113 
2114  return SCIP_OKAY;
2115 }
2116 
2117 /** dialog description method for the set parameter command */
2118 SCIP_DECL_DIALOGDESC(SCIPdialogDescSetParam)
2119 { /*lint --e{715}*/
2120  SCIP_PARAM* param;
2121  char valuestr[SCIP_MAXSTRLEN];
2122 
2123  /* get the parameter to set */
2124  param = (SCIP_PARAM*)SCIPdialogGetData(dialog);
2125 
2126  /* retrieve parameter's current value */
2127  switch( SCIPparamGetType(param) )
2128  {
2129  case SCIP_PARAMTYPE_BOOL:
2130  if( SCIPparamGetBool(param) )
2131  (void) SCIPsnprintf(valuestr, SCIP_MAXSTRLEN, "TRUE");
2132  else
2133  (void) SCIPsnprintf(valuestr, SCIP_MAXSTRLEN, "FALSE");
2134  break;
2135 
2136  case SCIP_PARAMTYPE_INT:
2137  (void) SCIPsnprintf(valuestr, SCIP_MAXSTRLEN, "%d", SCIPparamGetInt(param));
2138  break;
2139 
2141  (void) SCIPsnprintf(valuestr, SCIP_MAXSTRLEN, "%"SCIP_LONGINT_FORMAT, SCIPparamGetLongint(param));
2142  break;
2143 
2144  case SCIP_PARAMTYPE_REAL:
2145  (void) SCIPsnprintf(valuestr, SCIP_MAXSTRLEN, "%.15g", SCIPparamGetReal(param));
2146  if( strchr(valuestr, '.') == NULL && strchr(valuestr, 'e') == NULL )
2147  (void) SCIPsnprintf(valuestr, SCIP_MAXSTRLEN, "%.1f", SCIPparamGetReal(param));
2148  break;
2149 
2150  case SCIP_PARAMTYPE_CHAR:
2151  (void) SCIPsnprintf(valuestr, SCIP_MAXSTRLEN, "%c", SCIPparamGetChar(param));
2152  break;
2153 
2154  case SCIP_PARAMTYPE_STRING:
2155  (void) SCIPsnprintf(valuestr, SCIP_MAXSTRLEN, "%s", SCIPparamGetString(param));
2156  break;
2157 
2158  default:
2159  SCIPerrorMessage("invalid parameter type\n");
2160  return SCIP_INVALIDDATA;
2161  }
2162  valuestr[SCIP_MAXSTRLEN-1] = '\0';
2163 
2164  /* display parameter's description */
2165  SCIPdialogMessage(scip, NULL, "%s", SCIPparamGetDesc(param));
2166 
2167  /* display parameter's current value */
2168  SCIPdialogMessage(scip, NULL, " [%s]", valuestr);
2169 
2170  return SCIP_OKAY;
2171 }
2172 
2173 /** dialog execution method for the fix parameter command */
2174 SCIP_DECL_DIALOGEXEC(SCIPdialogExecFixParam)
2175 { /*lint --e{715}*/
2176  SCIP_PARAM* param;
2177  char prompt[SCIP_MAXSTRLEN];
2178  char* valuestr;
2179  SCIP_Bool fix;
2180  SCIP_Bool endoffile;
2181  SCIP_Bool error;
2182 
2183  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2184 
2185  /* get the parameter to fix */
2186  param = (SCIP_PARAM*)SCIPdialogGetData(dialog);
2187 
2188  (void) SCIPsnprintf(prompt, SCIP_MAXSTRLEN, "current fixing status: %s, new value (TRUE/FALSE): ",
2189  SCIPparamIsFixed(param) ? "TRUE" : "FALSE");
2190  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, prompt, &valuestr, &endoffile) );
2191  if( endoffile )
2192  {
2193  *nextdialog = NULL;
2194  return SCIP_OKAY;
2195  }
2196  if( valuestr[0] == '\0' )
2197  return SCIP_OKAY;
2198 
2199  fix = parseBoolValue(scip, valuestr, &error);
2200 
2201  if( !error )
2202  {
2203  SCIPparamSetFixed(param, fix);
2204  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, (fix ? "TRUE" : "FALSE"), TRUE) );
2205  SCIPdialogMessage(scip, NULL, "<%s> %s\n", SCIPparamGetName(param), (fix ? "fixed" : "unfixed"));
2206  }
2207 
2208  return SCIP_OKAY;
2209 }
2210 
2211 /** dialog description method for the fix parameter command */
2212 SCIP_DECL_DIALOGDESC(SCIPdialogDescFixParam)
2213 { /*lint --e{715}*/
2214  SCIP_PARAM* param;
2215 
2216  /* get the parameter to set */
2217  param = (SCIP_PARAM*)SCIPdialogGetData(dialog);
2218 
2219  /* display parameter's description */
2220  SCIPdialogMessage(scip, NULL, "%s", SCIPparamGetDesc(param));
2221 
2222  /* display parameter's current fixing status */
2223  if( SCIPparamIsFixed(param) )
2224  SCIPdialogMessage(scip, NULL, " [fixed]");
2225  else
2226  SCIPdialogMessage(scip, NULL, " [not fixed]");
2227 
2228  return SCIP_OKAY;
2229 }
2230 
2231 /** dialog execution method for the set branching direction command */
2232 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetBranchingDirection)
2233 { /*lint --e{715}*/
2234  SCIP_VAR* var;
2235  char prompt[SCIP_MAXSTRLEN];
2236  char* valuestr;
2237  int direction;
2238  SCIP_Bool endoffile;
2239 
2240  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2241 
2242  /* branching priorities cannot be set, if no problem was created */
2244  {
2245  SCIPdialogMessage(scip, NULL, "cannot set branching directions before problem was created\n");
2246  return SCIP_OKAY;
2247  }
2248 
2249  /* get variable name from user */
2250  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "variable name: ", &valuestr, &endoffile) );
2251  if( endoffile )
2252  {
2253  *nextdialog = NULL;
2254  return SCIP_OKAY;
2255  }
2256  if( valuestr[0] == '\0' )
2257  return SCIP_OKAY;
2258 
2259  /* find variable */
2260  var = SCIPfindVar(scip, valuestr);
2261  if( var == NULL )
2262  {
2263  SCIPdialogMessage(scip, NULL, "variable <%s> does not exist in problem\n", valuestr);
2264  return SCIP_OKAY;
2265  }
2266 
2267  /* get new branching direction from user */
2268  switch( SCIPvarGetBranchDirection(var) )
2269  {
2271  direction = -1;
2272  break;
2273  case SCIP_BRANCHDIR_AUTO:
2274  direction = 0;
2275  break;
2277  direction = +1;
2278  break;
2279  case SCIP_BRANCHDIR_FIXED:
2280  default:
2281  SCIPerrorMessage("invalid preferred branching direction <%d> of variable <%s>\n",
2283  return SCIP_INVALIDDATA;
2284  }
2285  (void) SCIPsnprintf(prompt, SCIP_MAXSTRLEN, "current value: %d, new value: ", direction);
2286  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, prompt, &valuestr, &endoffile) );
2287  if( endoffile )
2288  {
2289  *nextdialog = NULL;
2290  return SCIP_OKAY;
2291  }
2293  (void) SCIPsnprintf(prompt, SCIP_MAXSTRLEN, "%s %s", prompt, valuestr);
2294  if( valuestr[0] == '\0' )
2295  return SCIP_OKAY;
2296 
2297  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, prompt, FALSE) );
2298 
2299  if( sscanf(valuestr, "%d", &direction) != 1 )
2300  {
2301  SCIPdialogMessage(scip, NULL, "\ninvalid input <%s>\n\n", valuestr);
2302  return SCIP_OKAY;
2303  }
2304  if( direction < -1 || direction > +1 )
2305  {
2306  SCIPdialogMessage(scip, NULL, "\ninvalid input <%d>: direction must be -1, 0, or +1\n\n", direction);
2307  return SCIP_OKAY;
2308  }
2309 
2310  /* set new branching direction */
2311  if( direction == -1 )
2313  else if( direction == 0 )
2315  else
2317 
2318  SCIPdialogMessage(scip, NULL, "branching direction of variable <%s> set to %d\n", SCIPvarGetName(var), direction);
2319 
2320  return SCIP_OKAY;
2321 }
2322 
2323 /** dialog execution method for the set branching priority command */
2324 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetBranchingPriority)
2325 { /*lint --e{715}*/
2326  SCIP_VAR* var;
2327  char prompt[SCIP_MAXSTRLEN];
2328  char* valuestr;
2329  int priority;
2330  SCIP_Bool endoffile;
2331 
2332  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2333 
2334  /* branching priorities cannot be set, if no problem was created */
2336  {
2337  SCIPdialogMessage(scip, NULL, "cannot set branching priorities before problem was created\n");
2338  return SCIP_OKAY;
2339  }
2340 
2341  /* get variable name from user */
2342  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "variable name: ", &valuestr, &endoffile) );
2343  if( endoffile )
2344  {
2345  *nextdialog = NULL;
2346  return SCIP_OKAY;
2347  }
2348  if( valuestr[0] == '\0' )
2349  return SCIP_OKAY;
2350 
2351  /* find variable */
2352  var = SCIPfindVar(scip, valuestr);
2353  if( var == NULL )
2354  {
2355  SCIPdialogMessage(scip, NULL, "variable <%s> does not exist in problem\n", valuestr);
2356  return SCIP_OKAY;
2357  }
2358 
2359  /* get new branching priority from user */
2360  (void) SCIPsnprintf(prompt, SCIP_MAXSTRLEN, "current value: %d, new value: ", SCIPvarGetBranchPriority(var));
2361  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, prompt, &valuestr, &endoffile) );
2362  if( endoffile )
2363  {
2364  *nextdialog = NULL;
2365  return SCIP_OKAY;
2366  }
2368  (void) SCIPsnprintf(prompt, SCIP_MAXSTRLEN, "%s %s", prompt, valuestr);
2369  if( valuestr[0] == '\0' )
2370  return SCIP_OKAY;
2371 
2372  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, prompt, FALSE) );
2373 
2374  if( sscanf(valuestr, "%d", &priority) != 1 )
2375  {
2376  SCIPdialogMessage(scip, NULL, "\ninvalid input <%s>\n\n", valuestr);
2377  return SCIP_OKAY;
2378  }
2379 
2380  /* set new branching priority */
2381  SCIP_CALL( SCIPchgVarBranchPriority(scip, var, priority) );
2382  SCIPdialogMessage(scip, NULL, "branching priority of variable <%s> set to %d\n", SCIPvarGetName(var), SCIPvarGetBranchPriority(var));
2383 
2384  return SCIP_OKAY;
2385 }
2386 
2387 /** dialog execution method for the set heuristics aggressive command */
2388 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetHeuristicsAggressive)
2389 { /*lint --e{715}*/
2390  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
2391 
2392  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2393 
2395 
2396  return SCIP_OKAY;
2397 }
2398 
2399 /** dialog execution method for the set heuristics default command */
2400 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetHeuristicsDefault)
2401 { /*lint --e{715}*/
2402  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
2403 
2404  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2405 
2407 
2408  return SCIP_OKAY;
2409 }
2410 
2411 /** dialog execution method for the set heuristics fast command */
2412 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetHeuristicsFast)
2413 { /*lint --e{715}*/
2414  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
2415 
2416  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2417 
2419 
2420  return SCIP_OKAY;
2421 }
2422 
2423 /** dialog execution method for the set heuristics off command */
2424 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetHeuristicsOff)
2425 { /*lint --e{715}*/
2426  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
2427 
2428  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2429 
2431 
2432  return SCIP_OKAY;
2433 }
2434 
2435 /** dialog execution method for the set presolving aggressive command */
2436 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetPresolvingAggressive)
2437 { /*lint --e{715}*/
2438  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
2439 
2440  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2441 
2443 
2444  return SCIP_OKAY;
2445 }
2446 
2447 /** dialog execution method for the set presolving default command */
2448 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetPresolvingDefault)
2449 { /*lint --e{715}*/
2450  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
2451 
2452  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2453 
2455 
2456  return SCIP_OKAY;
2457 }
2458 
2459 /** dialog execution method for the set presolving fast command */
2460 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetPresolvingFast)
2461 { /*lint --e{715}*/
2462  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
2463 
2464  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2465 
2467 
2468  return SCIP_OKAY;
2469 }
2470 
2471 /** dialog execution method for the set presolving off command */
2472 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetPresolvingOff)
2473 { /*lint --e{715}*/
2474  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
2475 
2476  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2477 
2479 
2480  return SCIP_OKAY;
2481 }
2482 
2483 /** dialog execution method for the set separating aggressive command */
2484 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetSeparatingAggressive)
2485 { /*lint --e{715}*/
2486  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
2487 
2488  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2489 
2491 
2492  return SCIP_OKAY;
2493 }
2494 
2495 /** dialog execution method for the set separating default command */
2496 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetSeparatingDefault)
2497 { /*lint --e{715}*/
2498  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
2499 
2500  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2501 
2503 
2504  return SCIP_OKAY;
2505 }
2506 
2507 /** dialog execution method for the set separating fast command */
2508 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetSeparatingFast)
2509 { /*lint --e{715}*/
2510  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
2511 
2512  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2513 
2515 
2516  return SCIP_OKAY;
2517 }
2518 
2519 /** dialog execution method for the set separating off command */
2520 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetSeparatingOff)
2521 { /*lint --e{715}*/
2522  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
2523 
2524  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2525 
2527 
2528  return SCIP_OKAY;
2529 }
2530 
2531 /** dialog execution method for the set emphasis counter command */
2532 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetEmphasisCounter)
2533 { /*lint --e{715}*/
2534  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
2535 
2536  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2537 
2538  /* reset SCIP parameters */
2540 
2541  /* set parameters for counting problems */
2543 
2544  return SCIP_OKAY;
2545 }
2546 
2547 /** dialog execution method for the set emphasis cpsolver command */
2548 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetEmphasisCpsolver)
2549 { /*lint --e{715}*/
2550  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
2551 
2552  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2553 
2554  /* reset SCIP parameters */
2556 
2557  /* set parameters for CP like search problems */
2559 
2560  return SCIP_OKAY;
2561 }
2562 
2563 /** dialog execution method for the set emphasis easy CIP command */
2564 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetEmphasisEasycip)
2565 { /*lint --e{715}*/
2566  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
2567 
2568  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2569 
2570  /* reset SCIP parameters */
2572 
2573  /* set parameters for easy CIP problems */
2575 
2576  return SCIP_OKAY;
2577 }
2578 
2579 /** dialog execution method for the set emphasis feasibility command */
2580 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetEmphasisFeasibility)
2581 { /*lint --e{715}*/
2582  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
2583 
2584  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2585 
2586  /* reset SCIP parameters */
2588 
2589  /* set parameters for feasibility problems */
2591 
2592  return SCIP_OKAY;
2593 }
2594 
2595 /** dialog execution method for the set emphasis hard LP command */
2596 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetEmphasisHardlp)
2597 { /*lint --e{715}*/
2598  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
2599 
2600  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2601 
2602  /* reset SCIP parameters */
2604 
2605  /* set parameters for problems with hard LP */
2607 
2608  return SCIP_OKAY;
2609 }
2610 
2611 /** dialog execution method for the set emphasis optimality command */
2612 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetEmphasisOptimality)
2613 { /*lint --e{715}*/
2614  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
2615 
2616  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2617 
2618  /* reset SCIP parameters */
2620 
2621  /* set parameters for problems to prove optimality fast */
2623 
2624  return SCIP_OKAY;
2625 }
2626 
2627 /** dialog execution method for the set limits objective command */
2628 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetLimitsObjective)
2629 { /*lint --e{715}*/
2630  char prompt[SCIP_MAXSTRLEN];
2631  char* valuestr;
2632  SCIP_Real objlim;
2633  SCIP_Bool endoffile;
2634 
2635  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2636 
2637  /* objective limit cannot be set, if no problem was created */
2639  {
2640  SCIPdialogMessage(scip, NULL, "cannot set objective limit before problem was created\n");
2641  return SCIP_OKAY;
2642  }
2643 
2644  /* get new objective limit from user */
2645  (void) SCIPsnprintf(prompt, SCIP_MAXSTRLEN, "current value: %.15g, new value: ", SCIPgetObjlimit(scip));
2646  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, prompt, &valuestr, &endoffile) );
2647  if( endoffile )
2648  {
2649  *nextdialog = NULL;
2650  return SCIP_OKAY;
2651  }
2652  if( valuestr[0] == '\0' )
2653  return SCIP_OKAY;
2654 
2655  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, valuestr, TRUE) );
2656 
2657  if( sscanf(valuestr, "%" SCIP_REAL_FORMAT, &objlim) != 1 )
2658  {
2659  SCIPdialogMessage(scip, NULL, "\ninvalid input <%s>\n\n", valuestr);
2660  return SCIP_OKAY;
2661  }
2662 
2663  /* check, if new objective limit is valid */
2666  {
2667  SCIPdialogMessage(scip, NULL, "\ncannot relax objective limit from %.15g to %.15g after problem was transformed\n\n",
2668  SCIPgetObjlimit(scip), objlim);
2669  return SCIP_OKAY;
2670  }
2671 
2672  /* set new objective limit */
2673  SCIP_CALL( SCIPsetObjlimit(scip, objlim) );
2674  SCIPdialogMessage(scip, NULL, "objective value limit set to %.15g\n", SCIPgetObjlimit(scip));
2675 
2676  return SCIP_OKAY;
2677 }
2678 
2679 /** dialog execution method for the write LP command */
2680 static
2681 SCIP_DECL_DIALOGEXEC(SCIPdialogExecWriteLp)
2682 { /*lint --e{715}*/
2683  char* filename;
2684  SCIP_Bool endoffile;
2685 
2686  SCIPdialogMessage(scip, NULL, "\n");
2687 
2688  /* node relaxations only exist in solving & solved stage */
2690  {
2691  SCIPdialogMessage(scip, NULL, "There is no node LP relaxation before solving starts\n");
2692  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2693  return SCIP_OKAY;
2694  }
2696  {
2697  SCIPdialogMessage(scip, NULL, "There is no node LP relaxation after problem was solved\n");
2698  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2699  return SCIP_OKAY;
2700  }
2701 
2702  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "enter filename: ", &filename, &endoffile) );
2703  if( endoffile )
2704  {
2705  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2706  return SCIP_OKAY;
2707  }
2708  if( filename[0] != '\0' )
2709  {
2710  SCIP_RETCODE retcode;
2711 
2712  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, filename, TRUE) );
2713  retcode = SCIPwriteLP(scip, filename);
2714 
2715  if( retcode == SCIP_FILECREATEERROR )
2716  {
2717  SCIPdialogMessage(scip, NULL, "error not creating file <%s>\n", filename);
2718  }
2719  else
2720  {
2721  SCIP_CALL( retcode );
2722 
2723  SCIPdialogMessage(scip, NULL, "written node LP relaxation to file <%s>\n", filename);
2724  }
2725  }
2726 
2727  SCIPdialogMessage(scip, NULL, "\n");
2728 
2729  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2730 
2731  return SCIP_OKAY;
2732 }
2733 
2734 /** dialog execution method for the write MIP command */
2735 static
2736 SCIP_DECL_DIALOGEXEC(SCIPdialogExecWriteMip)
2737 { /*lint --e{715}*/
2738  char command[SCIP_MAXSTRLEN];
2739  char filename[SCIP_MAXSTRLEN];
2740  SCIP_Bool endoffile;
2741  char* valuestr;
2742  SCIP_Bool offset;
2743  SCIP_Bool generic;
2744  SCIP_Bool lazyconss;
2745  SCIP_Bool error;
2746 
2747  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2748 
2749  /* node relaxations only exist in solving & solved stage */
2751  {
2752  SCIPdialogMessage(scip, NULL, "There is no node MIP relaxation before solving starts\n");
2753  return SCIP_OKAY;
2754  }
2756  {
2757  SCIPdialogMessage(scip, NULL, "There is no node MIP relaxation after problem was solved\n");
2758  return SCIP_OKAY;
2759  }
2760 
2761  /* first get file name */
2762  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "enter filename: ", &valuestr, &endoffile) );
2763  if( endoffile )
2764  {
2765  *nextdialog = NULL;
2766  return SCIP_OKAY;
2767  }
2768  if( valuestr[0] == '\0' )
2769  return SCIP_OKAY;
2770 
2771  (void)strncpy(filename, valuestr, SCIP_MAXSTRLEN-1);
2772 
2773  /* second ask for generic variable and row names */
2774  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog,
2775  "using generic variable and row names (TRUE/FALSE): ",
2776  &valuestr, &endoffile) );
2777 
2778  if( endoffile )
2779  {
2780  *nextdialog = NULL;
2781  return SCIP_OKAY;
2782  }
2783  if( valuestr[0] == '\0' )
2784  return SCIP_OKAY;
2785 
2786  generic = parseBoolValue(scip, valuestr, &error);
2787 
2788  if( error )
2789  return SCIP_OKAY;
2790 
2791  /* adjust command and add to the history */
2792  SCIPescapeString(command, SCIP_MAXSTRLEN, filename);
2793  (void) SCIPsnprintf(command, SCIP_MAXSTRLEN, "%s %s", command, generic ? "TRUE" : "FALSE");
2794 
2795  /* third ask if for adjusting the objective offset */
2796  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog,
2797  "using original objective function (TRUE/FALSE): ",
2798  &valuestr, &endoffile) );
2799 
2800  if( endoffile )
2801  {
2802  *nextdialog = NULL;
2803  return SCIP_OKAY;
2804  }
2805  if( valuestr[0] == '\0' )
2806  return SCIP_OKAY;
2807 
2808  offset = parseBoolValue(scip, valuestr, &error);
2809 
2810  if( error )
2811  return SCIP_OKAY;
2812 
2813  (void) SCIPsnprintf(command, SCIP_MAXSTRLEN, "%s %s", command, offset ? "TRUE" : "FALSE");
2814  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, command, FALSE) );
2815 
2816  /* fourth ask for lazy constraints */
2817  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog,
2818  "output removable rows as lazy constraints (TRUE/FALSE): ",
2819  &valuestr, &endoffile) );
2820 
2821  if( endoffile )
2822  {
2823  *nextdialog = NULL;
2824  return SCIP_OKAY;
2825  }
2826  if( valuestr[0] == '\0' )
2827  return SCIP_OKAY;
2828 
2829  lazyconss = parseBoolValue(scip, valuestr, &error);
2830 
2831  if( error )
2832  return SCIP_OKAY;
2833 
2834  /* adjust command and add to the history */
2835  SCIPescapeString(command, SCIP_MAXSTRLEN, filename);
2836  (void) SCIPsnprintf(command, SCIP_MAXSTRLEN, "%s %s", command, lazyconss ? "TRUE" : "FALSE");
2837 
2838  /* execute command */
2839  SCIP_CALL( SCIPwriteMIP(scip, filename, generic, offset, lazyconss) );
2840  SCIPdialogMessage(scip, NULL, "written node MIP relaxation to file <%s>\n", filename);
2841 
2842  SCIPdialogMessage(scip, NULL, "\n");
2843 
2844  return SCIP_OKAY;
2845 }
2846 
2847 
2848 /** dialog execution method for the write NLP command */
2849 static
2850 SCIP_DECL_DIALOGEXEC(SCIPdialogExecWriteNlp)
2851 { /*lint --e{715}*/
2852  char* filename;
2853  SCIP_Bool endoffile;
2854 
2855  SCIPdialogMessage(scip, NULL, "\n");
2856 
2857  /* node relaxations only exist in solving & solved stage */
2859  {
2860  SCIPdialogMessage(scip, NULL, "There is no node NLP relaxation before solving starts\n");
2861  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2862  return SCIP_OKAY;
2863  }
2865  {
2866  SCIPdialogMessage(scip, NULL, "There is no node NLP relaxation after problem was solved\n");
2867  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2868  return SCIP_OKAY;
2869  }
2870  if( !SCIPisNLPConstructed(scip) )
2871  {
2872  SCIPdialogMessage(scip, NULL, "There has been no node NLP relaxation constructed\n");
2873  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2874  return SCIP_OKAY;
2875  }
2876 
2877  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "enter filename: ", &filename, &endoffile) );
2878  if( endoffile )
2879  {
2880  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2881  return SCIP_OKAY;
2882  }
2883  if( filename[0] != '\0' )
2884  {
2885  SCIP_RETCODE retcode;
2886 
2887  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, filename, TRUE) );
2888  retcode = SCIPwriteNLP(scip, filename);
2889 
2890  if( retcode == SCIP_FILECREATEERROR )
2891  {
2892  SCIPdialogMessage(scip, NULL, "error not creating file <%s>\n", filename);
2893  }
2894  else
2895  {
2896  SCIP_CALL( retcode );
2897 
2898  SCIPdialogMessage(scip, NULL, "written node NLP relaxation to file <%s>\n", filename);
2899  }
2900  }
2901 
2902  SCIPdialogMessage(scip, NULL, "\n");
2903 
2904  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2905 
2906  return SCIP_OKAY;
2907 }
2908 
2909 /** dialog execution method for the write problem command */
2910 static
2911 SCIP_DECL_DIALOGEXEC(SCIPdialogExecWriteProblem)
2912 { /*lint --e{715}*/
2913  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
2914 
2916  {
2917  SCIP_CALL( writeProblem(scip, dialog, dialoghdlr, nextdialog, FALSE, FALSE) );
2918  }
2919  else
2920  SCIPdialogMessage(scip, NULL, "no problem available\n");
2921 
2922  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2923 
2924  return SCIP_OKAY;
2925 }
2926 
2927 /** dialog execution method for the write generic problem command */
2928 static
2929 SCIP_DECL_DIALOGEXEC(SCIPdialogExecWriteGenProblem)
2930 { /*lint --e{715}*/
2931  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
2932 
2934  {
2935  SCIP_CALL( writeProblem(scip, dialog, dialoghdlr, nextdialog, FALSE, TRUE) );
2936  }
2937  else
2938  SCIPdialogMessage(scip, NULL, "no problem available\n");
2939 
2940  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2941 
2942  return SCIP_OKAY;
2943 }
2944 
2945 /** dialog execution method for the write solution command */
2946 static
2947 SCIP_DECL_DIALOGEXEC(SCIPdialogExecWriteSolution)
2948 { /*lint --e{715}*/
2949  char* filename;
2950  SCIP_Bool endoffile;
2951 
2952  SCIPdialogMessage(scip, NULL, "\n");
2953 
2954  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "enter filename: ", &filename, &endoffile) );
2955  if( endoffile )
2956  {
2957  *nextdialog = NULL;
2958  return SCIP_OKAY;
2959  }
2960  if( filename[0] != '\0' )
2961  {
2962  FILE* file;
2963 
2964  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, filename, TRUE) );
2965 
2966  file = fopen(filename, "w");
2967  if( file == NULL )
2968  {
2969  SCIPdialogMessage(scip, NULL, "error creating file <%s>\n", filename);
2970  SCIPdialoghdlrClearBuffer(dialoghdlr);
2971  }
2972  else
2973  {
2974  SCIP_RETCODE retcode;
2975  SCIPinfoMessage(scip, file, "solution status: ");
2976  retcode = SCIPprintStatus(scip, file);
2977  if( retcode != SCIP_OKAY )
2978  {
2979  fclose(file);
2980  SCIP_CALL( retcode );
2981  }
2982  else
2983  {
2984  SCIPinfoMessage(scip, file, "\n");
2985  retcode = SCIPprintBestSol(scip, file, FALSE);
2986  if( retcode != SCIP_OKAY )
2987  {
2988  fclose(file);
2989  SCIP_CALL( retcode );
2990  }
2991  else
2992  {
2993  SCIPdialogMessage(scip, NULL, "written solution information to file <%s>\n", filename);
2994  fclose(file);
2995  }
2996  }
2997  }
2998  }
2999 
3000  SCIPdialogMessage(scip, NULL, "\n");
3001 
3002  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
3003 
3004  return SCIP_OKAY;
3005 }
3006 
3007 /** dialog execution method for writing command line history */
3008 static
3009 SCIP_DECL_DIALOGEXEC(SCIPdialogExecWriteCommandHistory)
3010 { /*lint --e{715}*/
3011  char* filename;
3012  SCIP_Bool endoffile;
3013 
3014  SCIPdialogMessage(scip, NULL, "\n");
3015 
3016  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "enter filename: ", &filename, &endoffile) );
3017  if( endoffile )
3018  {
3019  *nextdialog = NULL;
3020  return SCIP_OKAY;
3021  }
3022  if( filename[0] != '\0' )
3023  {
3024  SCIP_RETCODE retcode;
3025 
3026  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, filename, TRUE) );
3027 
3028  retcode = SCIPdialogWriteHistory(filename);
3029 
3030  if( retcode != SCIP_OKAY )
3031  {
3032  SCIPdialogMessage(scip, NULL, "error writing to file <%s>\n"
3033  "check that the directory exists and that you have correct permissions\n", filename);
3034  SCIPdialoghdlrClearBuffer(dialoghdlr);
3035  }
3036  else
3037  {
3038  SCIPdialogMessage(scip, NULL, "wrote available command line history to <%s>\n", filename);
3039  }
3040  }
3041 
3042  SCIPdialogMessage(scip, NULL, "\n");
3043 
3044  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
3045 
3046  return SCIP_OKAY;
3047 }
3048 
3049 /** dialog execution method for the write finitesolution command */
3050 static
3051 SCIP_DECL_DIALOGEXEC(SCIPdialogExecWriteFiniteSolution)
3052 { /*lint --e{715}*/
3053  char* filename;
3054  SCIP_Bool endoffile;
3055 
3056  SCIPdialogMessage(scip, NULL, "\n");
3057 
3058  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "enter filename: ", &filename, &endoffile) );
3059  if( endoffile )
3060  {
3061  *nextdialog = NULL;
3062  return SCIP_OKAY;
3063  }
3064  if( filename[0] != '\0' )
3065  {
3066  FILE* file;
3067 
3068  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, filename, TRUE) );
3069 
3070  file = fopen(filename, "w");
3071  if( file == NULL )
3072  {
3073  SCIPdialogMessage(scip, NULL, "error creating file <%s>\n", filename);
3074  SCIPdialoghdlrClearBuffer(dialoghdlr);
3075  }
3076  else
3077  {
3078  SCIP_RETCODE retcode;
3079  SCIPinfoMessage(scip, file, "solution status: ");
3080  retcode = SCIPprintStatus(scip, file);
3081  if( retcode != SCIP_OKAY )
3082  {
3083  fclose(file);
3084  SCIP_CALL( retcode );
3085  }
3086  else
3087  {
3088  SCIP_SOL* bestsol = SCIPgetBestSol(scip);
3089 
3090  SCIPinfoMessage(scip, file, "\n");
3091 
3092  if( bestsol != NULL )
3093  {
3094  SCIP_SOL* sol;
3095  SCIP_Bool success;
3096 
3097  retcode = SCIPcreateFiniteSolCopy(scip, &sol, bestsol, &success);
3098 
3099  if( retcode == SCIP_OKAY )
3100  {
3101  if( !success )
3102  {
3103  SCIPdialogMessage(scip, NULL, "error while creating finite solution\n");
3104  }
3105  else
3106  {
3107  retcode = SCIPprintSol(scip, sol, file, FALSE);
3108  SCIPdialogMessage(scip, NULL, "written solution information to file <%s>\n", filename);
3109  }
3110 
3111  SCIP_CALL( SCIPfreeSol(scip, &sol) );
3112  }
3113  }
3114  else
3115  {
3116  SCIPmessageFPrintInfo(SCIPgetMessagehdlr(scip), file, "no solution available\n");
3117  SCIPdialogMessage(scip, NULL, "no solution available\n", filename);
3118  }
3119 
3120  fclose(file);
3121 
3122  if( retcode != SCIP_OKAY )
3123  {
3124  SCIP_CALL( retcode );
3125  }
3126  }
3127  }
3128  }
3129 
3130  SCIPdialogMessage(scip, NULL, "\n");
3131 
3132  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
3133 
3134  return SCIP_OKAY;
3135 }
3136 
3137 /** dialog execution method for the write statistics command */
3138 static
3139 SCIP_DECL_DIALOGEXEC(SCIPdialogExecWriteStatistics)
3140 { /*lint --e{715}*/
3141  char* filename;
3142  SCIP_Bool endoffile;
3143 
3144  SCIPdialogMessage(scip, NULL, "\n");
3145 
3146  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "enter filename: ", &filename, &endoffile) );
3147  if( endoffile )
3148  {
3149  *nextdialog = NULL;
3150  return SCIP_OKAY;
3151  }
3152  if( filename[0] != '\0' )
3153  {
3154  FILE* file;
3155 
3156  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, filename, TRUE) );
3157 
3158  file = fopen(filename, "w");
3159  if( file == NULL )
3160  {
3161  SCIPdialogMessage(scip, NULL, "error creating file <%s>\n", filename);
3162  SCIPprintSysError(filename);
3163  SCIPdialoghdlrClearBuffer(dialoghdlr);
3164  }
3165  else
3166  {
3167  SCIP_RETCODE retcode;
3168  retcode = SCIPprintStatistics(scip, file);
3169  if( retcode != SCIP_OKAY )
3170  {
3171  fclose(file);
3172  SCIP_CALL( retcode );
3173  }
3174  else
3175  {
3176  SCIPdialogMessage(scip, NULL, "written statistics to file <%s>\n", filename);
3177  fclose(file);
3178  }
3179  }
3180  }
3181 
3182  SCIPdialogMessage(scip, NULL, "\n");
3183 
3184  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
3185 
3186  return SCIP_OKAY;
3187 }
3188 
3189 /** dialog execution method for the write transproblem command */
3190 static
3191 SCIP_DECL_DIALOGEXEC(SCIPdialogExecWriteTransproblem)
3192 { /*lint --e{715}*/
3193  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
3194 
3196  {
3197  SCIP_CALL( writeProblem(scip, dialog, dialoghdlr, nextdialog, TRUE, FALSE) );
3198  }
3199  else
3200  SCIPdialogMessage(scip, NULL, "no transformed problem available\n");
3201 
3202  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
3203 
3204  return SCIP_OKAY;
3205 }
3206 
3207 /** dialog execution method for the write generic transproblem command */
3208 static
3209 SCIP_DECL_DIALOGEXEC(SCIPdialogExecWriteGenTransproblem)
3210 { /*lint --e{715}*/
3211  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
3212 
3214  {
3215  SCIP_CALL( writeProblem(scip, dialog, dialoghdlr, nextdialog, TRUE, TRUE) );
3216  }
3217  else
3218  SCIPdialogMessage(scip, NULL, "no transformed problem available\n");
3219 
3220  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
3221 
3222  return SCIP_OKAY;
3223 }
3224 
3225 /** creates a root dialog */
3227  SCIP* scip, /**< SCIP data structure */
3228  SCIP_DIALOG** root /**< pointer to store the root dialog */
3229  )
3230 {
3231  SCIP_CALL( SCIPincludeDialog(scip, root,
3232  dialogCopyDefault,
3233  SCIPdialogExecMenuLazy, NULL, NULL,
3234  "SCIP", "SCIP's main menu", TRUE, NULL) );
3235 
3236  SCIP_CALL( SCIPsetRootDialog(scip, *root) );
3237  SCIP_CALL( SCIPreleaseDialog(scip, root) );
3238  *root = SCIPgetRootDialog(scip);
3239 
3240  return SCIP_OKAY;
3241 }
3242 
3243 
3244 /** includes or updates the default dialog menus in SCIP */
3246  SCIP* scip /**< SCIP data structure */
3247  )
3248 {
3249  SCIP_DIALOG* root;
3250  SCIP_DIALOG* submenu;
3251  SCIP_DIALOG* dialog;
3252 
3253  /* root menu */
3254  root = SCIPgetRootDialog(scip);
3255  if( root == NULL )
3256  {
3257  SCIP_CALL( SCIPcreateRootDialog(scip, &root) );
3258  }
3259 
3260  /* change */
3261  if( !SCIPdialogHasEntry(root, "change") )
3262  {
3263  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
3264  NULL,
3265  SCIPdialogExecMenu, NULL, NULL,
3266  "change", "change the problem", TRUE, NULL) );
3267  SCIP_CALL( SCIPaddDialogEntry(scip, root, submenu) );
3268  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
3269  }
3270  if( SCIPdialogFindEntry(root, "change", &submenu) != 1 )
3271  {
3272  SCIPerrorMessage("change sub menu not found\n");
3273  return SCIP_PLUGINNOTFOUND;
3274  }
3275 
3276  /* change add */
3277  if( !SCIPdialogHasEntry(submenu, "add") )
3278  {
3279  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3280  NULL,
3281  SCIPdialogExecChangeAddCons, NULL, NULL,
3282  "add", "add constraint", FALSE, NULL) );
3283  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3284  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3285  }
3286 
3287  /* change bounds */
3288  if( !SCIPdialogHasEntry(submenu, "bounds") )
3289  {
3290  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3291  NULL,
3292  SCIPdialogExecChangeBounds, NULL, NULL,
3293  "bounds", "change bounds of a variable", FALSE, NULL) );
3294  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3295  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3296  }
3297 
3298  /* free transformed problem */
3299  if( !SCIPdialogHasEntry(submenu, "freetransproblem") )
3300  {
3301  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3302  NULL,
3303  SCIPdialogExecChangeFreetransproblem, NULL, NULL,
3304  "freetransproblem", "free transformed problem", FALSE, NULL) );
3305  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3306  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3307  }
3308 
3309  /* change objective sense */
3310  if( !SCIPdialogHasEntry(submenu, "objsense") )
3311  {
3312  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3313  NULL,
3314  SCIPdialogExecChangeObjSense, NULL, NULL,
3315  "objsense", "change objective sense", FALSE, NULL) );
3316  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3317  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3318  }
3319 
3320  /* checksol */
3321  if( !SCIPdialogHasEntry(root, "checksol") )
3322  {
3323  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3324  NULL,
3325  SCIPdialogExecChecksol, NULL, NULL,
3326  "checksol", "double checks best solution w.r.t. original problem", FALSE, NULL) );
3327  SCIP_CALL( SCIPaddDialogEntry(scip, root, dialog) );
3328  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3329  }
3330 
3331  /* display */
3332  if( !SCIPdialogHasEntry(root, "display") )
3333  {
3334  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
3335  NULL,
3336  SCIPdialogExecMenu, NULL, NULL,
3337  "display", "display information", TRUE, NULL) );
3338  SCIP_CALL( SCIPaddDialogEntry(scip, root, submenu) );
3339  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
3340  }
3341  if( SCIPdialogFindEntry(root, "display", &submenu) != 1 )
3342  {
3343  SCIPerrorMessage("display sub menu not found\n");
3344  return SCIP_PLUGINNOTFOUND;
3345  }
3346 
3347  /* display branching */
3348  if( !SCIPdialogHasEntry(submenu, "branching") )
3349  {
3350  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3351  NULL,
3352  SCIPdialogExecDisplayBranching, NULL, NULL,
3353  "branching", "display branching rules", FALSE, NULL) );
3354  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3355  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3356  }
3357 
3358  /* display compressions */
3359  if( !SCIPdialogHasEntry(submenu, "compression") )
3360  {
3361  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3362  NULL,
3363  SCIPdialogExecDisplayCompression, NULL, NULL,
3364  "compression", "display compression techniques", FALSE, NULL) );
3365  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3366  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3367  }
3368 
3369  /* display conflict */
3370  if( !SCIPdialogHasEntry(submenu, "conflict") )
3371  {
3372  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3373  NULL,
3374  SCIPdialogExecDisplayConflict, NULL, NULL,
3375  "conflict", "display conflict handlers", FALSE, NULL) );
3376  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3377  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3378  }
3379 
3380  /* display conshdlrs */
3381  if( !SCIPdialogHasEntry(submenu, "conshdlrs") )
3382  {
3383  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3384  NULL,
3385  SCIPdialogExecDisplayConshdlrs, NULL, NULL,
3386  "conshdlrs", "display constraint handlers", FALSE, NULL) );
3387  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3388  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3389  }
3390 
3391  /* display displaycols */
3392  if( !SCIPdialogHasEntry(submenu, "displaycols") )
3393  {
3394  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3395  NULL,
3396  SCIPdialogExecDisplayDisplaycols, NULL, NULL,
3397  "displaycols", "display display columns", FALSE, NULL) );
3398  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3399  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3400  }
3401 
3402  /* display heuristics */
3403  if( !SCIPdialogHasEntry(submenu, "heuristics") )
3404  {
3405  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3406  NULL,
3407  SCIPdialogExecDisplayHeuristics, NULL, NULL,
3408  "heuristics", "display primal heuristics", FALSE, NULL) );
3409  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3410  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3411  }
3412 
3413  /* display memory */
3414  if( !SCIPdialogHasEntry(submenu, "memory") )
3415  {
3416  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3417  NULL,
3418  SCIPdialogExecDisplayMemory, NULL, NULL,
3419  "memory", "display memory diagnostics", FALSE, NULL) );
3420  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3421  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3422  }
3423 
3424  /* display nlpi */
3425  if( !SCIPdialogHasEntry(submenu, "nlpis") )
3426  {
3427  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3428  NULL,
3429  SCIPdialogExecDisplayNlpi, NULL, NULL,
3430  "nlpis", "display NLP solver interfaces", FALSE, NULL) );
3431  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3432  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3433  }
3434 
3435  /* display nodeselectors */
3436  if( !SCIPdialogHasEntry(submenu, "nodeselectors") )
3437  {
3438  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3439  NULL,
3440  SCIPdialogExecDisplayNodeselectors, NULL, NULL,
3441  "nodeselectors", "display node selectors", FALSE, NULL) );
3442  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3443  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3444  }
3445 
3446  /* display parameters */
3447  if( !SCIPdialogHasEntry(submenu, "parameters") )
3448  {
3449  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3450  NULL,
3451  SCIPdialogExecDisplayParameters, NULL, NULL,
3452  "parameters", "display non-default parameter settings", FALSE, NULL) );
3453  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3454  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3455  }
3456 
3457  /* display presolvers */
3458  if( !SCIPdialogHasEntry(submenu, "presolvers") )
3459  {
3460  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3461  NULL,
3462  SCIPdialogExecDisplayPresolvers, NULL, NULL,
3463  "presolvers", "display presolvers", FALSE, NULL) );
3464  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3465  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3466  }
3467 
3468  /* display pricers */
3469  if( !SCIPdialogHasEntry(submenu, "pricers") )
3470  {
3471  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3472  NULL,
3473  SCIPdialogExecDisplayPricers, NULL, NULL,
3474  "pricers", "display pricers", FALSE, NULL) );
3475  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3476  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3477  }
3478 
3479  /* display problem */
3480  if( !SCIPdialogHasEntry(submenu, "problem") )
3481  {
3482  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3483  NULL,
3484  SCIPdialogExecDisplayProblem, NULL, NULL,
3485  "problem", "display original problem", FALSE, NULL) );
3486  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3487  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3488  }
3489 
3490  /* display propagators */
3491  if( !SCIPdialogHasEntry(submenu, "propagators") )
3492  {
3493  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3494  NULL,
3495  SCIPdialogExecDisplayPropagators, NULL, NULL,
3496  "propagators", "display propagators", FALSE, NULL) );
3497  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3498  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3499  }
3500 
3501  /* display readers */
3502  if( !SCIPdialogHasEntry(submenu, "readers") )
3503  {
3504  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3505  NULL,
3506  SCIPdialogExecDisplayReaders, NULL, NULL,
3507  "readers", "display file readers", FALSE, NULL) );
3508  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3509  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3510  }
3511 
3512  /* display relaxing */
3513  if( !SCIPdialogHasEntry(submenu, "relaxators") )
3514  {
3515  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3516  NULL,
3517  SCIPdialogExecDisplayRelaxators, NULL, NULL,
3518  "relaxators", "display relaxators", FALSE, NULL) );
3519  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3520  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3521  }
3522 
3523  /* display separators */
3524  if( !SCIPdialogHasEntry(submenu, "separators") )
3525  {
3526  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3527  NULL,
3528  SCIPdialogExecDisplaySeparators, NULL, NULL,
3529  "separators", "display cut separators", FALSE, NULL) );
3530  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3531  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3532  }
3533 
3534  /* display solution */
3535  if( !SCIPdialogHasEntry(submenu, "solution") )
3536  {
3537  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3538  NULL,
3539  SCIPdialogExecDisplaySolution, NULL, NULL,
3540  "solution", "display best primal solution", FALSE, NULL) );
3541  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3542  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3543  }
3544 
3545  /* display finite solution */
3546  if( !SCIPdialogHasEntry(submenu, "finitesolution") )
3547  {
3548  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3549  NULL,
3550  SCIPdialogExecDisplayFiniteSolution, NULL, NULL,
3551  "finitesolution", "display best primal solution (try to make solution values finite, first)", FALSE, NULL) );
3552  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3553  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3554  }
3555 
3556  /* display solution */
3557  if( !SCIPdialogHasEntry(submenu, "dualsolution") )
3558  {
3559  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3560  NULL,
3561  SCIPdialogExecDisplayDualSolution, NULL, NULL,
3562  "dualsolution", "display dual solution vector (LP only, without presolving)", FALSE, NULL) );
3563  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3564  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3565  }
3566 
3567  /* display solution */
3568  if( !SCIPdialogHasEntry(submenu, "sols") )
3569  {
3570  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3571  NULL,
3572  SCIPdialogExecDisplaySolutionPool, NULL, NULL,
3573  "sols", "display solutions from pool", FALSE, NULL) );
3574  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3575  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3576  }
3577 
3578  /* display statistics */
3579  if( !SCIPdialogHasEntry(submenu, "statistics") )
3580  {
3581  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3582  NULL,
3583  SCIPdialogExecDisplayStatistics, NULL, NULL,
3584  "statistics", "display problem and optimization statistics", FALSE, NULL) );
3585  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3586  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3587  }
3588 
3589  /* display reoptimization statistics */
3590  if( !SCIPdialogHasEntry(submenu, "reoptstatistics") )
3591  {
3592  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3593  NULL,
3594  SCIPdialogExecDisplayReoptStatistics, NULL, NULL,
3595  "reoptstatistics", "display reoptimitazion statistics", FALSE, NULL) );
3596  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3597  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3598  }
3599 
3600  /* display transproblem */
3601  if( !SCIPdialogHasEntry(submenu, "transproblem") )
3602  {
3603  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3604  NULL,
3605  SCIPdialogExecDisplayTransproblem, NULL, NULL,
3606  "transproblem", "display current node transformed problem", FALSE, NULL) );
3607  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3608  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3609  }
3610 
3611  /* display value */
3612  if( !SCIPdialogHasEntry(submenu, "value") )
3613  {
3614  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3615  NULL,
3616  SCIPdialogExecDisplayValue, NULL, NULL,
3617  "value", "display value of single variable in best primal solution", FALSE, NULL) );
3618  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3619  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3620  }
3621 
3622  /* display varbranchstatistics */
3623  if( !SCIPdialogHasEntry(submenu, "varbranchstatistics") )
3624  {
3625  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3626  NULL,
3627  SCIPdialogExecDisplayVarbranchstatistics, NULL, NULL,
3628  "varbranchstatistics", "display statistics for branching on variables", FALSE, NULL) );
3629  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3630  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3631  }
3632 
3633  /* display varbranchstatistics */
3634  if( !SCIPdialogHasEntry(submenu, "lpsolquality") )
3635  {
3636  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3637  NULL,
3638  SCIPdialogExecDisplayLPSolutionQuality, NULL, NULL,
3639  "lpsolquality", "display quality of the current LP solution, if available", FALSE, NULL) );
3640  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3641  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3642  }
3643 
3644  /* display transsolution */
3645  if( !SCIPdialogHasEntry(submenu, "transsolution") )
3646  {
3647  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3648  NULL,
3649  SCIPdialogExecDisplayTranssolution, NULL, NULL,
3650  "transsolution", "display best primal solution in transformed variables", FALSE, NULL) );
3651  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3652  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3653  }
3654 
3655  /* free */
3656  if( !SCIPdialogHasEntry(root, "free") )
3657  {
3658  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3659  NULL,
3660  SCIPdialogExecFree, NULL, NULL,
3661  "free", "free current problem from memory", FALSE, NULL) );
3662  SCIP_CALL( SCIPaddDialogEntry(scip, root, dialog) );
3663  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3664  }
3665 
3666  /* help */
3667  if( !SCIPdialogHasEntry(root, "help") )
3668  {
3669  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3670  NULL,
3671  SCIPdialogExecHelp, NULL, NULL,
3672  "help", "display this help", FALSE, NULL) );
3673  SCIP_CALL( SCIPaddDialogEntry(scip, root, dialog) );
3674  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3675  }
3676 
3677  /* newstart */
3678  if( !SCIPdialogHasEntry(root, "newstart") )
3679  {
3680  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3681  NULL,
3682  SCIPdialogExecNewstart, NULL, NULL,
3683  "newstart", "reset branch and bound tree to start again from root", FALSE, NULL) );
3684  SCIP_CALL( SCIPaddDialogEntry(scip, root, dialog) );
3685  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3686  }
3687 
3688 #ifndef NDEBUG
3689  /* transform problem (for debugging) */
3690  if( !SCIPdialogHasEntry(root, "transform") )
3691  {
3692  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3693  NULL,
3694  SCIPdialogExecTransform, NULL, NULL,
3695  "transform", "transforms problem from original state", FALSE, NULL) );
3696  SCIP_CALL( SCIPaddDialogEntry(scip, root, dialog) );
3697  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3698  }
3699 #endif
3700 
3701  /* optimize */
3702  if( !SCIPdialogHasEntry(root, "optimize") )
3703  {
3704  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3705  NULL,
3706  SCIPdialogExecOptimize, NULL, NULL,
3707  "optimize", "solve the problem", FALSE, NULL) );
3708  SCIP_CALL( SCIPaddDialogEntry(scip, root, dialog) );
3709  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3710  }
3711 
3712  /* presolve */
3713  if( !SCIPdialogHasEntry(root, "presolve") )
3714  {
3715  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3716  NULL,
3717  SCIPdialogExecPresolve, NULL, NULL,
3718  "presolve", "solve the problem, but stop after presolving stage", FALSE, NULL) );
3719  SCIP_CALL( SCIPaddDialogEntry(scip, root, dialog) );
3720  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3721  }
3722 
3723  /* quit */
3724  if( !SCIPdialogHasEntry(root, "quit") )
3725  {
3726  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3727  NULL,
3728  SCIPdialogExecQuit, NULL, NULL,
3729  "quit", "leave SCIP", FALSE, NULL) );
3730  SCIP_CALL( SCIPaddDialogEntry(scip, root, dialog) );
3731  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3732  }
3733 
3734  /* read */
3735  if( !SCIPdialogHasEntry(root, "read") )
3736  {
3737  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3738  NULL,
3739  SCIPdialogExecRead, NULL, NULL,
3740  "read", "read a problem", FALSE, NULL) );
3741  SCIP_CALL( SCIPaddDialogEntry(scip, root, dialog) );
3742  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3743  }
3744 
3745  /* set */
3747 
3748  /* fix */
3750 
3751  /* write */
3752  if( !SCIPdialogHasEntry(root, "write") )
3753  {
3754  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
3755  NULL,
3756  SCIPdialogExecMenu, NULL, NULL,
3757  "write", "write information to file", TRUE, NULL) );
3758  SCIP_CALL( SCIPaddDialogEntry(scip, root, submenu) );
3759  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
3760  }
3761  if( SCIPdialogFindEntry(root, "write", &submenu) != 1 )
3762  {
3763  SCIPerrorMessage("write sub menu not found\n");
3764  return SCIP_PLUGINNOTFOUND;
3765  }
3766 
3767  /* write LP */
3768  if( !SCIPdialogHasEntry(submenu, "lp") )
3769  {
3770  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3771  NULL,
3772  SCIPdialogExecWriteLp, NULL, NULL,
3773  "lp", "write current node LP relaxation in LP format to file", FALSE, NULL) );
3774  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3775  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3776  }
3777 
3778  /* write MIP */
3779  if( !SCIPdialogHasEntry(submenu, "mip") )
3780  {
3781  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3782  NULL,
3783  SCIPdialogExecWriteMip, NULL, NULL,
3784  "mip", "write current node MIP relaxation in LP format to file", FALSE, NULL) );
3785  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3786  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3787  }
3788 
3789  /* write NLP */
3790  if( !SCIPdialogHasEntry(submenu, "nlp") )
3791  {
3792  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3793  NULL,
3794  SCIPdialogExecWriteNlp, NULL, NULL,
3795  "nlp", "write current node NLP relaxation to file", FALSE, NULL) );
3796  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3797  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3798  }
3799 
3800  /* write problem */
3801  if( !SCIPdialogHasEntry(submenu, "problem") )
3802  {
3803  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3804  NULL,
3805  SCIPdialogExecWriteProblem, NULL, NULL,
3806  "problem",
3807  "write original problem to file (format is given by file extension, e.g., orig.{lp,rlp,cip,mps})",
3808  FALSE, NULL) );
3809  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3810  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3811  }
3812 
3813  /* write generic problem */
3814  if( !SCIPdialogHasEntry(submenu, "genproblem") )
3815  {
3816  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3817  NULL,
3818  SCIPdialogExecWriteGenProblem, NULL, NULL,
3819  "genproblem",
3820  "write original problem with generic names to file (format is given by file extension, e.g., orig.{lp,rlp,cip,mps})",
3821  FALSE, NULL) );
3822  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3823  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3824  }
3825 
3826  /* write solution */
3827  if( !SCIPdialogHasEntry(submenu, "solution") )
3828  {
3829  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3830  NULL,
3831  SCIPdialogExecWriteSolution, NULL, NULL,
3832  "solution", "write best primal solution to file", FALSE, NULL) );
3833  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3834  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3835  }
3836 
3837  /* write solution */
3838  if( !SCIPdialogHasEntry(submenu, "finitesolution") )
3839  {
3840  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3841  NULL,
3842  SCIPdialogExecWriteFiniteSolution, NULL, NULL,
3843  "finitesolution", "write best primal solution to file (try to make solution values finite, first)", FALSE, NULL) );
3844  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3845  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3846  }
3847 
3848  /* write statistics */
3849  if( !SCIPdialogHasEntry(submenu, "statistics") )
3850  {
3851  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3852  NULL,
3853  SCIPdialogExecWriteStatistics, NULL, NULL,
3854  "statistics", "write statistics to file", FALSE, NULL) );
3855  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3856  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3857  }
3858 
3859  /* write transproblem */
3860  if( !SCIPdialogHasEntry(submenu, "transproblem") )
3861  {
3862  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3863  NULL,
3864  SCIPdialogExecWriteTransproblem, NULL, NULL,
3865  "transproblem",
3866  "write current node transformed problem to file (format is given by file extension, e.g., trans.{lp,rlp,cip,mps})",
3867  FALSE, NULL) );
3868  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3869  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3870  }
3871 
3872  /* write transproblem with generic names */
3873  if( !SCIPdialogHasEntry(submenu, "gentransproblem") )
3874  {
3875  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3876  NULL,
3877  SCIPdialogExecWriteGenTransproblem, NULL, NULL,
3878  "gentransproblem",
3879  "write current node transformed problem with generic names to file (format is given by file extension, e.g., trans.{lp,rlp,cip,mps})",
3880  FALSE, NULL) );
3881  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3882  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3883  }
3884 
3885  /* write cliquegraph */
3886  if( !SCIPdialogHasEntry(submenu, "cliquegraph") )
3887  {
3888  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3889  NULL,
3890  SCIPdialogExecCliquegraph, NULL, NULL,
3891  "cliquegraph",
3892  "write graph of cliques and implications of binary variables to GML file (better call after presolving)",
3893  FALSE, NULL) );
3894  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3895  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3896  }
3897 
3898  /* write command line history */
3899  if( !SCIPdialogHasEntry(submenu, "history") )
3900  {
3901  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3902  NULL,
3903  SCIPdialogExecWriteCommandHistory, NULL, NULL,
3904  "history",
3905  "writes command line history to a file (only works if SCIP was compiled with 'readline')",
3906  FALSE, NULL) );
3907  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3908  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3909  }
3910 
3911  return SCIP_OKAY;
3912 }
3913 
3914 /** if a '/' occurs in the parameter's name, adds a sub menu dialog to the given menu and inserts the parameter dialog
3915  * recursively in the sub menu; if no '/' occurs in the name, adds a parameter change dialog into the given dialog menu
3916  */
3917 static
3919  SCIP* scip, /**< SCIP data structure */
3920  SCIP_DIALOG* menu, /**< dialog menu to insert the parameter into */
3921  SCIP_PARAM* param, /**< parameter to add a dialog for */
3922  char* paramname /**< parameter name to parse */
3923  )
3924 {
3925  char* slash;
3926  char* dirname;
3927 
3928  assert(paramname != NULL);
3929 
3930  /* check for a '/' */
3931  slash = strchr(paramname, '/');
3932 
3933  if( slash == NULL )
3934  {
3935  /* check, if the corresponding dialog already exists */
3936  if( !SCIPdialogHasEntry(menu, paramname) )
3937  {
3938  SCIP_DIALOG* paramdialog;
3939 
3940  if( SCIPparamIsAdvanced(param) )
3941  {
3942  SCIP_DIALOG* advmenu;
3943 
3944  if( !SCIPdialogHasEntry(menu, "advanced") )
3945  {
3946  /* if not yet existing, create an advanced sub menu */
3947  char desc[SCIP_MAXSTRLEN];
3948 
3949  (void) SCIPsnprintf(desc, SCIP_MAXSTRLEN, "advanced parameters");
3950  SCIP_CALL( SCIPincludeDialog(scip, &advmenu,
3951  NULL,
3952  SCIPdialogExecMenu, NULL, NULL, "advanced", desc, TRUE, NULL) );
3953  SCIP_CALL( SCIPaddDialogEntry(scip, menu, advmenu) );
3954  SCIP_CALL( SCIPreleaseDialog(scip, &advmenu) );
3955  }
3956 
3957  /* find the corresponding sub menu */
3958  (void)SCIPdialogFindEntry(menu, "advanced", &advmenu);
3959  if( advmenu == NULL )
3960  {
3961  SCIPerrorMessage("dialog sub menu not found\n");
3962  return SCIP_PLUGINNOTFOUND;
3963  }
3964 
3965  if( !SCIPdialogHasEntry(advmenu, paramname) )
3966  {
3967  /* create a parameter change dialog */
3968  SCIP_CALL( SCIPincludeDialog(scip, &paramdialog,
3969  NULL,
3970  SCIPdialogExecSetParam, SCIPdialogDescSetParam, NULL,
3971  paramname, SCIPparamGetDesc(param), FALSE, (SCIP_DIALOGDATA*)param) );
3972  SCIP_CALL( SCIPaddDialogEntry(scip, advmenu, paramdialog) );
3973  SCIP_CALL( SCIPreleaseDialog(scip, &paramdialog) );
3974  }
3975  }
3976  else
3977  {
3978  /* create a parameter change dialog */
3979  SCIP_CALL( SCIPincludeDialog(scip, &paramdialog,
3980  NULL,
3981  SCIPdialogExecSetParam, SCIPdialogDescSetParam, NULL,
3982  paramname, SCIPparamGetDesc(param), FALSE, (SCIP_DIALOGDATA*)param) );
3983  SCIP_CALL( SCIPaddDialogEntry(scip, menu, paramdialog) );
3984  SCIP_CALL( SCIPreleaseDialog(scip, &paramdialog) );
3985  }
3986  }
3987  }
3988  else
3989  {
3990  SCIP_DIALOG* submenu;
3991 
3992  /* split the parameter name into dirname and parameter name */
3993  dirname = paramname;
3994  paramname = slash+1;
3995  *slash = '\0';
3996 
3997  /* if not yet existing, create a corresponding sub menu */
3998  if( !SCIPdialogHasEntry(menu, dirname) )
3999  {
4000  char desc[SCIP_MAXSTRLEN];
4001 
4002  (void) SCIPsnprintf(desc, SCIP_MAXSTRLEN, "parameters for <%s>", dirname);
4003  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
4004  NULL,
4005  SCIPdialogExecMenu, NULL, NULL, dirname, desc, TRUE, NULL) );
4006  SCIP_CALL( SCIPaddDialogEntry(scip, menu, submenu) );
4007  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
4008  }
4009 
4010  /* find the corresponding sub menu */
4011  (void)SCIPdialogFindEntry(menu, dirname, &submenu);
4012  if( submenu == NULL )
4013  {
4014  SCIPerrorMessage("dialog sub menu not found\n");
4015  return SCIP_PLUGINNOTFOUND;
4016  }
4017 
4018  /* recursively call add parameter method */
4019  SCIP_CALL( addSetParamDialog(scip, submenu, param, paramname) );
4020  }
4021 
4022  return SCIP_OKAY;
4023 }
4024 
4025 /** if a '/' occurs in the parameter's name, adds a sub menu dialog to the given menu and inserts the parameter dialog
4026  * recursively in the sub menu; if no '/' occurs in the name, adds a fix parameter dialog into the given dialog menu
4027  */
4028 static
4030  SCIP* scip, /**< SCIP data structure */
4031  SCIP_DIALOG* menu, /**< dialog menu to insert the parameter into */
4032  SCIP_PARAM* param, /**< parameter to add a dialog for */
4033  char* paramname /**< parameter name to parse */
4034  )
4035 {
4036  char* slash;
4037  char* dirname;
4038 
4039  assert(paramname != NULL);
4040 
4041  /* check for a '/' */
4042  slash = strchr(paramname, '/');
4043 
4044  if( slash == NULL )
4045  {
4046  /* check, if the corresponding dialog already exists */
4047  if( !SCIPdialogHasEntry(menu, paramname) )
4048  {
4049  SCIP_DIALOG* paramdialog;
4050 
4051  if( SCIPparamIsAdvanced(param) )
4052  {
4053  SCIP_DIALOG* advmenu;
4054 
4055  if( !SCIPdialogHasEntry(menu, "advanced") )
4056  {
4057  /* if not yet existing, create an advanced sub menu */
4058  char desc[SCIP_MAXSTRLEN];
4059 
4060  (void) SCIPsnprintf(desc, SCIP_MAXSTRLEN, "advanced parameters");
4061  SCIP_CALL( SCIPincludeDialog(scip, &advmenu,
4062  NULL,
4063  SCIPdialogExecMenu, NULL, NULL, "advanced", desc, TRUE, NULL) );
4064  SCIP_CALL( SCIPaddDialogEntry(scip, menu, advmenu) );
4065  SCIP_CALL( SCIPreleaseDialog(scip, &advmenu) );
4066  }
4067 
4068  /* find the corresponding sub menu */
4069  (void)SCIPdialogFindEntry(menu, "advanced", &advmenu);
4070  if( advmenu == NULL )
4071  {
4072  SCIPerrorMessage("dialog sub menu not found\n");
4073  return SCIP_PLUGINNOTFOUND;
4074  }
4075 
4076  if( !SCIPdialogHasEntry(advmenu, paramname) )
4077  {
4078  /* create a fix parameter dialog */
4079  SCIP_CALL( SCIPincludeDialog(scip, &paramdialog,
4080  NULL,
4081  SCIPdialogExecFixParam, SCIPdialogDescFixParam, NULL,
4082  paramname, SCIPparamGetDesc(param), FALSE, (SCIP_DIALOGDATA*)param) );
4083  SCIP_CALL( SCIPaddDialogEntry(scip, advmenu, paramdialog) );
4084  SCIP_CALL( SCIPreleaseDialog(scip, &paramdialog) );
4085  }
4086  }
4087  else
4088  {
4089  /* create a fix parameter dialog */
4090  SCIP_CALL( SCIPincludeDialog(scip, &paramdialog,
4091  NULL,
4092  SCIPdialogExecFixParam, SCIPdialogDescFixParam, NULL,
4093  paramname, SCIPparamGetDesc(param), FALSE, (SCIP_DIALOGDATA*)param) );
4094  SCIP_CALL( SCIPaddDialogEntry(scip, menu, paramdialog) );
4095  SCIP_CALL( SCIPreleaseDialog(scip, &paramdialog) );
4096  }
4097  }
4098  }
4099  else
4100  {
4101  SCIP_DIALOG* submenu;
4102 
4103  /* split the parameter name into dirname and parameter name */
4104  dirname = paramname;
4105  paramname = slash+1;
4106  *slash = '\0';
4107 
4108  /* if not yet existing, create a corresponding sub menu */
4109  if( !SCIPdialogHasEntry(menu, dirname) )
4110  {
4111  char desc[SCIP_MAXSTRLEN];
4112 
4113  (void) SCIPsnprintf(desc, SCIP_MAXSTRLEN, "parameters for <%s>", dirname);
4114  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
4115  NULL,
4116  SCIPdialogExecMenu, NULL, NULL, dirname, desc, TRUE, NULL) );
4117  SCIP_CALL( SCIPaddDialogEntry(scip, menu, submenu) );
4118  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
4119  }
4120 
4121  /* find the corresponding sub menu */
4122  (void)SCIPdialogFindEntry(menu, dirname, &submenu);
4123  if( submenu == NULL )
4124  {
4125  SCIPerrorMessage("dialog sub menu not found\n");
4126  return SCIP_PLUGINNOTFOUND;
4127  }
4128 
4129  /* recursively call add parameter method */
4130  SCIP_CALL( addFixParamDialog(scip, submenu, param, paramname) );
4131  }
4132 
4133  return SCIP_OKAY;
4134 }
4135 
4136 /** create a "emphasis" sub menu */
4137 static
4139  SCIP* scip, /**< SCIP data structure */
4140  SCIP_DIALOG* root, /**< the menu to add the empty sub menu */
4141  SCIP_DIALOG** submenu /**< pointer to store the created emphasis sub menu */
4142  )
4143 {
4144  if( !SCIPdialogHasEntry(root, "emphasis") )
4145  {
4146  SCIP_CALL( SCIPincludeDialog(scip, submenu,
4147  NULL, SCIPdialogExecMenu, NULL, NULL,
4148  "emphasis", "predefined parameter settings", TRUE, NULL) );
4149  SCIP_CALL( SCIPaddDialogEntry(scip, root, *submenu) );
4150  SCIP_CALL( SCIPreleaseDialog(scip, submenu) );
4151  }
4152  else if( SCIPdialogFindEntry(root, "emphasis", submenu) != 1 )
4153  {
4154  SCIPerrorMessage("emphasis sub menu not found\n");
4155  return SCIP_PLUGINNOTFOUND;
4156  }
4157 
4158  assert(*submenu != NULL);
4159 
4160  return SCIP_OKAY;
4161 }
4162 
4163 
4164 /** includes or updates the "set" menu for each available parameter setting */
4166  SCIP* scip /**< SCIP data structure */
4167  )
4168 {
4169  SCIP_DIALOG* root;
4170  SCIP_DIALOG* setmenu;
4171  SCIP_DIALOG* emphasismenu;
4172  SCIP_DIALOG* submenu;
4173  SCIP_DIALOG* dialog;
4174  SCIP_PARAM** params;
4175  char* paramname;
4176  int nparams;
4177  int i;
4178 
4179  SCIP_BRANCHRULE** branchrules;
4180  SCIP_CONFLICTHDLR** conflicthdlrs;
4181  SCIP_CONSHDLR** conshdlrs;
4182  SCIP_DISP** disps;
4183  SCIP_HEUR** heurs;
4184  SCIP_NLPI** nlpis;
4185  SCIP_NODESEL** nodesels;
4186  SCIP_PRESOL** presols;
4187  SCIP_PRICER** pricers;
4188  SCIP_READER** readers;
4189  SCIP_SEPA** sepas;
4190  int nbranchrules;
4191  int nconflicthdlrs;
4192  int nconshdlrs;
4193  int ndisps;
4194  int nheurs;
4195  int nnlpis;
4196  int nnodesels;
4197  int npresols;
4198  int npricers;
4199  int nreaders;
4200  int nsepas;
4201 
4202  /* get root dialog */
4203  root = SCIPgetRootDialog(scip);
4204  if( root == NULL )
4205  {
4206  SCIPerrorMessage("root dialog not found\n");
4207  return SCIP_PLUGINNOTFOUND;
4208  }
4209 
4210  /* find (or create) the "set" menu of the root dialog */
4211  if( !SCIPdialogHasEntry(root, "set") )
4212  {
4213  SCIP_CALL( SCIPincludeDialog(scip, &setmenu,
4214  NULL, SCIPdialogExecMenu, NULL, NULL,
4215  "set", "load/save/change parameters", TRUE, NULL) );
4216  SCIP_CALL( SCIPaddDialogEntry(scip, root, setmenu) );
4217  SCIP_CALL( SCIPreleaseDialog(scip, &setmenu) );
4218  }
4219  if( SCIPdialogFindEntry(root, "set", &setmenu) != 1 )
4220  {
4221  SCIPerrorMessage("set sub menu not found\n");
4222  return SCIP_PLUGINNOTFOUND;
4223  }
4224 
4225  /* set default */
4226  if( !SCIPdialogHasEntry(setmenu, "default") )
4227  {
4228  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4229  NULL,
4230  SCIPdialogExecSetDefault, NULL, NULL,
4231  "default", "reset parameter settings to their default values", FALSE, NULL) );
4232  SCIP_CALL( SCIPaddDialogEntry(scip, setmenu, dialog) );
4233  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4234  }
4235 
4236  /* set load */
4237  if( !SCIPdialogHasEntry(setmenu, "load") )
4238  {
4239  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4240  NULL,
4241  SCIPdialogExecSetLoad, NULL, NULL,
4242  "load", "load parameter settings from a file", FALSE, NULL) );
4243  SCIP_CALL( SCIPaddDialogEntry(scip, setmenu, dialog) );
4244  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4245  }
4246 
4247  /* set save */
4248  if( !SCIPdialogHasEntry(setmenu, "save") )
4249  {
4250  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4251  NULL,
4252  SCIPdialogExecSetSave, NULL, NULL,
4253  "save", "save parameter settings to a file", FALSE, NULL) );
4254  SCIP_CALL( SCIPaddDialogEntry(scip, setmenu, dialog) );
4255  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4256  }
4257 
4258  /* set diffsave */
4259  if( !SCIPdialogHasEntry(setmenu, "diffsave") )
4260  {
4261  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4262  NULL,
4263  SCIPdialogExecSetDiffsave, NULL, NULL,
4264  "diffsave", "save non-default parameter settings to a file", FALSE, NULL) );
4265  SCIP_CALL( SCIPaddDialogEntry(scip, setmenu, dialog) );
4266  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4267  }
4268 
4269  /* set branching */
4270  if( !SCIPdialogHasEntry(setmenu, "branching") )
4271  {
4272  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
4273  NULL,
4274  SCIPdialogExecMenu, NULL, NULL,
4275  "branching", "change parameters for branching rules", TRUE, NULL) );
4276  SCIP_CALL( SCIPaddDialogEntry(scip, setmenu, submenu) );
4277  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
4278  }
4279  if( SCIPdialogFindEntry(setmenu, "branching", &submenu) != 1 )
4280  {
4281  SCIPerrorMessage("branching sub menu not found\n");
4282  return SCIP_PLUGINNOTFOUND;
4283  }
4284 
4285  nbranchrules = SCIPgetNBranchrules(scip);
4286  branchrules = SCIPgetBranchrules(scip);
4287 
4288  for( i = 0; i < nbranchrules; ++i )
4289  {
4290  if( !SCIPdialogHasEntry(submenu, SCIPbranchruleGetName(branchrules[i])) )
4291  {
4292  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4293  NULL,
4294  SCIPdialogExecMenu, NULL, NULL,
4295  SCIPbranchruleGetName(branchrules[i]), SCIPbranchruleGetDesc(branchrules[i]), TRUE, NULL) );
4296  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
4297  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4298  }
4299  }
4300 
4301  /* set branching priority */
4302  if( !SCIPdialogHasEntry(submenu, "priority") )
4303  {
4304  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4305  NULL,
4306  SCIPdialogExecSetBranchingPriority, NULL, NULL,
4307  "priority", "change branching priority of a single variable", FALSE, NULL) );
4308  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
4309  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4310  }
4311 
4312  /* set branching direction */
4313  if( !SCIPdialogHasEntry(submenu, "direction") )
4314  {
4315  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4316  NULL,
4317  SCIPdialogExecSetBranchingDirection, NULL, NULL,
4318  "direction", "change preferred branching direction of a single variable (-1:down, 0:auto, +1:up)",
4319  FALSE, NULL) );
4320  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
4321  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4322  }
4323 
4324  /* set conflict */
4325  if( !SCIPdialogHasEntry(setmenu, "conflict") )
4326  {
4327  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
4328  NULL,
4329  SCIPdialogExecMenu, NULL, NULL,
4330  "conflict", "change parameters for conflict handlers", TRUE, NULL) );
4331  SCIP_CALL( SCIPaddDialogEntry(scip, setmenu, submenu) );
4332  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
4333  }
4334  if( SCIPdialogFindEntry(setmenu, "conflict", &submenu) != 1 )
4335  {
4336  SCIPerrorMessage("conflict sub menu not found\n");
4337  return SCIP_PLUGINNOTFOUND;
4338  }
4339 
4340  nconflicthdlrs = SCIPgetNConflicthdlrs(scip);
4341  conflicthdlrs = SCIPgetConflicthdlrs(scip);
4342 
4343  for( i = 0; i < nconflicthdlrs; ++i )
4344  {
4345  if( !SCIPdialogHasEntry(submenu, SCIPconflicthdlrGetName(conflicthdlrs[i])) )
4346  {
4347  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4348  NULL,
4349  SCIPdialogExecMenu, NULL, NULL,
4350  SCIPconflicthdlrGetName(conflicthdlrs[i]), SCIPconflicthdlrGetDesc(conflicthdlrs[i]), TRUE, NULL) );
4351  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
4352  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4353  }
4354  }
4355 
4356  /* set constraints */
4357  if( !SCIPdialogHasEntry(setmenu, "constraints") )
4358  {
4359  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
4360  NULL,
4361  SCIPdialogExecMenu, NULL, NULL,
4362  "constraints", "change parameters for constraint handlers", TRUE, NULL) );
4363  SCIP_CALL( SCIPaddDialogEntry(scip, setmenu, submenu) );
4364  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
4365  }
4366  if( SCIPdialogFindEntry(setmenu, "constraints", &submenu) != 1 )
4367  {
4368  SCIPerrorMessage("constraints sub menu not found\n");
4369  return SCIP_PLUGINNOTFOUND;
4370  }
4371 
4372  nconshdlrs = SCIPgetNConshdlrs(scip);
4373  conshdlrs = SCIPgetConshdlrs(scip);
4374 
4375  for( i = 0; i < nconshdlrs; ++i )
4376  {
4377  if( !SCIPdialogHasEntry(submenu, SCIPconshdlrGetName(conshdlrs[i])) )
4378  {
4379  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4380  NULL,
4381  SCIPdialogExecMenu, NULL, NULL,
4382  SCIPconshdlrGetName(conshdlrs[i]), SCIPconshdlrGetDesc(conshdlrs[i]), TRUE, NULL) );
4383  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
4384  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4385  }
4386  }
4387 
4388  /* set display */
4389  if( !SCIPdialogHasEntry(setmenu, "display") )
4390  {
4391  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
4392  NULL,
4393  SCIPdialogExecMenu, NULL, NULL,
4394  "display", "change parameters for display columns", TRUE, NULL) );
4395  SCIP_CALL( SCIPaddDialogEntry(scip, setmenu, submenu) );
4396  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
4397  }
4398  if( SCIPdialogFindEntry(setmenu, "display", &submenu) != 1 )
4399  {
4400  SCIPerrorMessage("display sub menu not found\n");
4401  return SCIP_PLUGINNOTFOUND;
4402  }
4403 
4404  ndisps = SCIPgetNDisps(scip);
4405  disps = SCIPgetDisps(scip);
4406 
4407  for( i = 0; i < ndisps; ++i )
4408  {
4409  if( !SCIPdialogHasEntry(submenu, SCIPdispGetName(disps[i])) )
4410  {
4411  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4412  NULL,
4413  SCIPdialogExecMenu, NULL, NULL,
4414  SCIPdispGetName(disps[i]), SCIPdispGetDesc(disps[i]), TRUE, NULL) );
4415  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
4416  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4417  }
4418  }
4419 
4420  /* set heuristics */
4421  if( !SCIPdialogHasEntry(setmenu, "heuristics") )
4422  {
4423  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
4424  NULL,
4425  SCIPdialogExecMenu, NULL, NULL,
4426  "heuristics", "change parameters for primal heuristics", TRUE, NULL) );
4427  SCIP_CALL( SCIPaddDialogEntry(scip, setmenu, submenu) );
4428  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
4429  }
4430  if( SCIPdialogFindEntry(setmenu, "heuristics", &submenu) != 1 )
4431  {
4432  SCIPerrorMessage("heuristics sub menu not found\n");
4433  return SCIP_PLUGINNOTFOUND;
4434  }
4435 
4436  nheurs = SCIPgetNHeurs(scip);
4437  heurs = SCIPgetHeurs(scip);
4438 
4439  for( i = 0; i < nheurs; ++i )
4440  {
4441  if( !SCIPdialogHasEntry(submenu, SCIPheurGetName(heurs[i])) )
4442  {
4443  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4444  NULL,
4445  SCIPdialogExecMenu, NULL, NULL,
4446  SCIPheurGetName(heurs[i]), SCIPheurGetDesc(heurs[i]), TRUE, NULL) );
4447  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
4448  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4449  }
4450  }
4451 
4452  /* create set heuristics emphasis */
4453  SCIP_CALL( createEmphasisSubmenu(scip, submenu, &emphasismenu) );
4454  assert(emphasismenu != NULL);
4455 
4456  /* set heuristics emphasis aggressive */
4457  if( !SCIPdialogHasEntry(emphasismenu, "aggressive") )
4458  {
4459  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4460  NULL, SCIPdialogExecSetHeuristicsAggressive, NULL, NULL,
4461  "aggressive", "sets heuristics <aggressive>", FALSE, NULL) );
4462  SCIP_CALL( SCIPaddDialogEntry(scip, emphasismenu, dialog) );
4463  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4464  }
4465 
4466  /* set heuristics emphasis default */
4467  if( !SCIPdialogHasEntry(emphasismenu, "default") )
4468  {
4469  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4470  NULL, SCIPdialogExecSetHeuristicsDefault, NULL, NULL,
4471  "default", "sets heuristics settings to <default> ", FALSE, NULL) );
4472  SCIP_CALL( SCIPaddDialogEntry(scip, emphasismenu, dialog) );
4473  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4474  }
4475 
4476  /* set heuristics emphasis fast */
4477  if( !SCIPdialogHasEntry(emphasismenu, "fast") )
4478  {
4479  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4480  NULL, SCIPdialogExecSetHeuristicsFast, NULL, NULL,
4481  "fast", "sets heuristics <fast>", FALSE, NULL) );
4482  SCIP_CALL( SCIPaddDialogEntry(scip, emphasismenu, dialog) );
4483  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4484  }
4485 
4486  /* set heuristics emphasis off */
4487  if( !SCIPdialogHasEntry(emphasismenu, "off") )
4488  {
4489  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4490  NULL, SCIPdialogExecSetHeuristicsOff, NULL, NULL,
4491  "off", "turns <off> all heuristics", FALSE, NULL) );
4492  SCIP_CALL( SCIPaddDialogEntry(scip, emphasismenu, dialog) );
4493  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4494  }
4495 
4496  /* set limits */
4497  if( !SCIPdialogHasEntry(setmenu, "limits") )
4498  {
4499  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
4500  NULL,
4501  SCIPdialogExecMenu, NULL, NULL,
4502  "limits", "change parameters for time, memory, objective value, and other limits", TRUE, NULL) );
4503  SCIP_CALL( SCIPaddDialogEntry(scip, setmenu, submenu) );
4504 
4505  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4506  NULL,
4507  SCIPdialogExecSetLimitsObjective, NULL, NULL,
4508  "objective", "set limit on objective function, such that only solutions better than this limit are accepted", FALSE, NULL) );
4509  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
4510  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4511 
4512  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
4513  }
4514 
4515  /* set LP */
4516  if( !SCIPdialogHasEntry(setmenu, "lp") )
4517  {
4518  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
4519  NULL,
4520  SCIPdialogExecMenu, NULL, NULL,
4521  "lp", "change parameters for linear programming relaxations", TRUE, NULL) );
4522  SCIP_CALL( SCIPaddDialogEntry(scip, setmenu, submenu) );
4523  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
4524  }
4525 
4526  /* set NLP */
4527  if( !SCIPdialogHasEntry(setmenu, "nlp") )
4528  {
4529  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
4530  NULL,
4531  SCIPdialogExecMenu, NULL, NULL,
4532  "nlp", "change parameters for nonlinear programming relaxations", TRUE, NULL) );
4533  SCIP_CALL( SCIPaddDialogEntry(scip, setmenu, submenu) );
4534  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
4535  }
4536 
4537  /* set memory */
4538  if( !SCIPdialogHasEntry(setmenu, "memory") )
4539  {
4540  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
4541  NULL,
4542  SCIPdialogExecMenu, NULL, NULL,
4543  "memory", "change parameters for memory management", TRUE, NULL) );
4544  SCIP_CALL( SCIPaddDialogEntry(scip, setmenu, submenu) );
4545  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
4546  }
4547 
4548  /* set misc */
4549  if( !SCIPdialogHasEntry(setmenu, "misc") )
4550  {
4551  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
4552  NULL,
4553  SCIPdialogExecMenu, NULL, NULL,
4554  "misc", "change parameters for miscellaneous stuff", TRUE, NULL) );
4555  SCIP_CALL( SCIPaddDialogEntry(scip, setmenu, submenu) );
4556  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
4557  }
4558 
4559  /* set nlpi */
4560  if( !SCIPdialogHasEntry(setmenu, "nlpi") )
4561  {
4562  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
4563  NULL,
4564  SCIPdialogExecMenu, NULL, NULL,
4565  "nlpi", "change parameters for NLP solver interfaces", TRUE, NULL) );
4566  SCIP_CALL( SCIPaddDialogEntry(scip, setmenu, submenu) );
4567  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
4568  }
4569  if( SCIPdialogFindEntry(setmenu, "nlpi", &submenu) != 1 )
4570  {
4571  SCIPerrorMessage("nlpi sub menu not found\n");
4572  return SCIP_PLUGINNOTFOUND;
4573  }
4574 
4575  nnlpis = SCIPgetNNlpis(scip);
4576  nlpis = SCIPgetNlpis(scip);
4577 
4578  for( i = 0; i < nnlpis; ++i )
4579  {
4580  if( !SCIPdialogHasEntry(submenu, SCIPnlpiGetName(nlpis[i])) )
4581  {
4582  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4583  NULL,
4584  SCIPdialogExecMenu, NULL, NULL,
4585  SCIPnlpiGetName(nlpis[i]), SCIPnlpiGetDesc(nlpis[i]), TRUE, NULL) );
4586  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
4587  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4588  }
4589  }
4590 
4591  /* set nodeselection */
4592  if( !SCIPdialogHasEntry(setmenu, "nodeselection") )
4593  {
4594  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
4595  NULL,
4596  SCIPdialogExecMenu, NULL, NULL,
4597  "nodeselection", "change parameters for node selectors", TRUE, NULL) );
4598  SCIP_CALL( SCIPaddDialogEntry(scip, setmenu, submenu) );
4599  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
4600  }
4601  if( SCIPdialogFindEntry(setmenu, "nodeselection", &submenu) != 1 )
4602  {
4603  SCIPerrorMessage("nodeselection sub menu not found\n");
4604  return SCIP_PLUGINNOTFOUND;
4605  }
4606 
4607  nnodesels = SCIPgetNNodesels(scip);
4608  nodesels = SCIPgetNodesels(scip);
4609 
4610  for( i = 0; i < nnodesels; ++i )
4611  {
4612  if( !SCIPdialogHasEntry(submenu, SCIPnodeselGetName(nodesels[i])) )
4613  {
4614  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4615  NULL,
4616  SCIPdialogExecMenu, NULL, NULL,
4617  SCIPnodeselGetName(nodesels[i]), SCIPnodeselGetDesc(nodesels[i]), TRUE, NULL) );
4618  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
4619  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4620  }
4621  }
4622 
4623  /* set numerics */
4624  if( !SCIPdialogHasEntry(setmenu, "numerics") )
4625  {
4626  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
4627  NULL,
4628  SCIPdialogExecMenu, NULL, NULL,
4629  "numerics", "change parameters for numerical values", TRUE, NULL) );
4630  SCIP_CALL( SCIPaddDialogEntry(scip, setmenu, submenu) );
4631  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
4632  }
4633 
4634  /* set presolving */
4635  if( !SCIPdialogHasEntry(setmenu, "presolving") )
4636  {
4637  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
4638  NULL,
4639  SCIPdialogExecMenu, NULL, NULL,
4640  "presolving", "change parameters for presolving", TRUE, NULL) );
4641  SCIP_CALL( SCIPaddDialogEntry(scip, setmenu, submenu) );
4642  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
4643  }
4644  if( SCIPdialogFindEntry(setmenu, "presolving", &submenu) != 1 )
4645  {
4646  SCIPerrorMessage("presolving sub menu not found\n");
4647  return SCIP_PLUGINNOTFOUND;
4648  }
4649 
4650  npresols = SCIPgetNPresols(scip);
4651  presols = SCIPgetPresols(scip);
4652 
4653  for( i = 0; i < npresols; ++i )
4654  {
4655  if( !SCIPdialogHasEntry(submenu, SCIPpresolGetName(presols[i])) )
4656  {
4657  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4658  NULL, SCIPdialogExecMenu, NULL, NULL,
4659  SCIPpresolGetName(presols[i]), SCIPpresolGetDesc(presols[i]), TRUE, NULL) );
4660  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
4661  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4662  }
4663  }
4664 
4665  /* create set presolving emphasis */
4666  SCIP_CALL( createEmphasisSubmenu(scip, submenu, &emphasismenu) );
4667  assert(emphasismenu != NULL);
4668 
4669  /* set presolving emphasis aggressive */
4670  if( !SCIPdialogHasEntry(emphasismenu, "aggressive") )
4671  {
4672  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4673  NULL, SCIPdialogExecSetPresolvingAggressive, NULL, NULL,
4674  "aggressive", "sets presolving <aggressive>", FALSE, NULL) );
4675  SCIP_CALL( SCIPaddDialogEntry(scip, emphasismenu, dialog) );
4676  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4677  }
4678 
4679  /* set presolving emphasis default */
4680  if( !SCIPdialogHasEntry(emphasismenu, "default") )
4681  {
4682  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4683  NULL, SCIPdialogExecSetPresolvingDefault, NULL, NULL,
4684  "default", "sets presolving settings to <default>", FALSE, NULL) );
4685  SCIP_CALL( SCIPaddDialogEntry(scip, emphasismenu, dialog) );
4686  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4687  }
4688 
4689  /* set presolving emphasis fast */
4690  if( !SCIPdialogHasEntry(emphasismenu, "fast") )
4691  {
4692  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4693  NULL, SCIPdialogExecSetPresolvingFast, NULL, NULL,
4694  "fast", "sets presolving <fast>", FALSE, NULL) );
4695  SCIP_CALL( SCIPaddDialogEntry(scip, emphasismenu, dialog) );
4696  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4697  }
4698 
4699  /* set presolving emphasis off */
4700  if( !SCIPdialogHasEntry(emphasismenu, "off") )
4701  {
4702  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4703  NULL, SCIPdialogExecSetPresolvingOff, NULL, NULL,
4704  "off", "turns <off> all presolving", FALSE, NULL) );
4705  SCIP_CALL( SCIPaddDialogEntry(scip, emphasismenu, dialog) );
4706  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4707  }
4708 
4709  /* set pricing */
4710  if( !SCIPdialogHasEntry(setmenu, "pricing") )
4711  {
4712  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
4713  NULL,
4714  SCIPdialogExecMenu, NULL, NULL,
4715  "pricing", "change parameters for pricing variables", TRUE, NULL) );
4716  SCIP_CALL( SCIPaddDialogEntry(scip, setmenu, submenu) );
4717  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
4718  }
4719  if( SCIPdialogFindEntry(setmenu, "pricing", &submenu) != 1 )
4720  {
4721  SCIPerrorMessage("pricing sub menu not found\n");
4722  return SCIP_PLUGINNOTFOUND;
4723  }
4724 
4725  npricers = SCIPgetNPricers(scip);
4726  pricers = SCIPgetPricers(scip);
4727 
4728  for( i = 0; i < npricers; ++i )
4729  {
4730  if( !SCIPdialogHasEntry(submenu, SCIPpricerGetName(pricers[i])) )
4731  {
4732  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4733  NULL,
4734  SCIPdialogExecMenu, NULL, NULL,
4735  SCIPpricerGetName(pricers[i]), SCIPpricerGetDesc(pricers[i]), TRUE, NULL) );
4736  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
4737  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4738  }
4739  }
4740 
4741  /* set propagation */
4742  if( !SCIPdialogHasEntry(setmenu, "propagating") )
4743  {
4744  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
4745  NULL,
4746  SCIPdialogExecMenu, NULL, NULL,
4747  "propagating", "change parameters for constraint propagation", TRUE, NULL) );
4748  SCIP_CALL( SCIPaddDialogEntry(scip, setmenu, submenu) );
4749  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
4750  }
4751 
4752  /* set reading */
4753  if( !SCIPdialogHasEntry(setmenu, "reading") )
4754  {
4755  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
4756  NULL,
4757  SCIPdialogExecMenu, NULL, NULL,
4758  "reading", "change parameters for problem file readers", TRUE, NULL) );
4759  SCIP_CALL( SCIPaddDialogEntry(scip, setmenu, submenu) );
4760  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
4761  }
4762  if( SCIPdialogFindEntry(setmenu, "reading", &submenu) != 1 )
4763  {
4764  SCIPerrorMessage("reading sub menu not found\n");
4765  return SCIP_PLUGINNOTFOUND;
4766  }
4767 
4768  nreaders = SCIPgetNReaders(scip);
4769  readers = SCIPgetReaders(scip);
4770 
4771  for( i = 0; i < nreaders; ++i )
4772  {
4773  if( !SCIPdialogHasEntry(submenu, SCIPreaderGetName(readers[i])) )
4774  {
4775  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4776  NULL,
4777  SCIPdialogExecMenu, NULL, NULL,
4778  SCIPreaderGetName(readers[i]), SCIPreaderGetDesc(readers[i]), TRUE, NULL) );
4779  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
4780  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4781  }
4782  }
4783 
4784  /* set separating */
4785  if( !SCIPdialogHasEntry(setmenu, "separating") )
4786  {
4787  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
4788  NULL, SCIPdialogExecMenu, NULL, NULL,
4789  "separating", "change parameters for cut separators", TRUE, NULL) );
4790  SCIP_CALL( SCIPaddDialogEntry(scip, setmenu, submenu) );
4791  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
4792  }
4793  if( SCIPdialogFindEntry(setmenu, "separating", &submenu) != 1 )
4794  {
4795  SCIPerrorMessage("separating sub menu not found\n");
4796  return SCIP_PLUGINNOTFOUND;
4797  }
4798 
4799  nsepas = SCIPgetNSepas(scip);
4800  sepas = SCIPgetSepas(scip);
4801 
4802  for( i = 0; i < nsepas; ++i )
4803  {
4804  if( !SCIPdialogHasEntry(submenu, SCIPsepaGetName(sepas[i])) )
4805  {
4806  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4807  NULL, SCIPdialogExecMenu, NULL, NULL,
4808  SCIPsepaGetName(sepas[i]), SCIPsepaGetDesc(sepas[i]), TRUE, NULL) );
4809  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
4810  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4811  }
4812  }
4813 
4814  /* create set separating emphasis */
4815  SCIP_CALL( createEmphasisSubmenu(scip, submenu, &emphasismenu) );
4816  assert(emphasismenu != NULL);
4817 
4818  /* set separating emphasis aggressive */
4819  if( !SCIPdialogHasEntry(emphasismenu, "aggressive") )
4820  {
4821  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4822  NULL, SCIPdialogExecSetSeparatingAggressive, NULL, NULL,
4823  "aggressive", "sets separating <aggressive>", FALSE, NULL) );
4824  SCIP_CALL( SCIPaddDialogEntry(scip, emphasismenu, dialog) );
4825  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4826  }
4827 
4828  /* set separating emphasis default */
4829  if( !SCIPdialogHasEntry(emphasismenu, "default") )
4830  {
4831  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4832  NULL, SCIPdialogExecSetSeparatingDefault, NULL, NULL,
4833  "default", "sets separating settings to <default>", FALSE, NULL) );
4834  SCIP_CALL( SCIPaddDialogEntry(scip, emphasismenu, dialog) );
4835  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4836  }
4837 
4838  /* set separating emphasis fast */
4839  if( !SCIPdialogHasEntry(emphasismenu, "fast") )
4840  {
4841  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4842  NULL, SCIPdialogExecSetSeparatingFast, NULL, NULL,
4843  "fast", "sets separating <fast>", FALSE, NULL) );
4844  SCIP_CALL( SCIPaddDialogEntry(scip, emphasismenu, dialog) );
4845  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4846  }
4847 
4848  /* set separating emphasis off */
4849  if( !SCIPdialogHasEntry(emphasismenu, "off") )
4850  {
4851  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4852  NULL, SCIPdialogExecSetSeparatingOff, NULL, NULL,
4853  "off", "turns <off> all separation", FALSE, NULL) );
4854  SCIP_CALL( SCIPaddDialogEntry(scip, emphasismenu, dialog) );
4855  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4856  }
4857 
4858  /* set timing */
4859  if( !SCIPdialogHasEntry(setmenu, "timing") )
4860  {
4861  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
4862  NULL, SCIPdialogExecMenu, NULL, NULL,
4863  "timing", "change parameters for timing issues", TRUE, NULL) );
4864  SCIP_CALL( SCIPaddDialogEntry(scip, setmenu, submenu) );
4865  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
4866  }
4867 
4868  /* set visualization */
4869  if( !SCIPdialogHasEntry(setmenu, "visual") )
4870  {
4871  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
4872  NULL, SCIPdialogExecMenu, NULL, NULL,
4873  "visual", "change parameters for visualization output", TRUE, NULL) );
4874  SCIP_CALL( SCIPaddDialogEntry(scip, setmenu, submenu) );
4875  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
4876  }
4877 
4878  /* set emphasis */
4879  SCIP_CALL( createEmphasisSubmenu(scip, setmenu, &submenu) );
4880 
4881  /* get SCIP's parameters */
4882  params = SCIPgetParams(scip);
4883  nparams = SCIPgetNParams(scip);
4884 
4885  /* insert each parameter into the set menu */
4886  for( i = 0; i < nparams; ++i )
4887  {
4888  const char* pname;
4889 
4890  pname = SCIPparamGetName(params[i]);
4891  SCIP_ALLOC( BMSduplicateMemoryArray(&paramname, pname, strlen(pname)+1) );
4892  SCIP_CALL( addSetParamDialog(scip, setmenu, params[i], paramname) );
4893  BMSfreeMemoryArray(&paramname);
4894  }
4895 
4896  /* set emphasis feasibility */
4897  /* add "counter" dialog to "set/emphasis" sub menu */
4898  if( !SCIPdialogHasEntry(submenu, "counter") )
4899  {
4900  SCIP_CALL( SCIPincludeDialog(scip, &dialog, NULL, SCIPdialogExecSetEmphasisCounter, NULL, NULL,
4901  "counter", "predefined parameter settings for a \"feasible\" and \"fast\" counting process", FALSE, NULL) );
4902  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
4903  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4904  }
4905 
4906  /* add "cpsolver" dialog to "set/emphasis" sub menu */
4907  if( !SCIPdialogHasEntry(submenu, "cpsolver") )
4908  {
4909  SCIP_CALL( SCIPincludeDialog(scip, &dialog, NULL, SCIPdialogExecSetEmphasisCpsolver, NULL, NULL,
4910  "cpsolver", "predefined parameter settings for CP like search", FALSE, NULL) );
4911  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
4912  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4913  }
4914 
4915  /* add "easycip" dialog to "set/emphasis" sub menu */
4916  if( !SCIPdialogHasEntry(submenu, "easycip") )
4917  {
4918  SCIP_CALL( SCIPincludeDialog(scip, &dialog, NULL, SCIPdialogExecSetEmphasisEasycip, NULL, NULL,
4919  "easycip", "predefined parameter settings for easy problems", FALSE, NULL) );
4920  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
4921  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4922  }
4923 
4924  /* add "feasibility" dialog to "set/emphasis" sub menu */
4925  if( !SCIPdialogHasEntry(submenu, "feasibility") )
4926  {
4927  SCIP_CALL( SCIPincludeDialog(scip, &dialog, NULL, SCIPdialogExecSetEmphasisFeasibility, NULL, NULL,
4928  "feasibility", "predefined parameter settings for feasibility problems", FALSE, NULL) );
4929  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
4930  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4931  }
4932 
4933  /* add "hardlp" dialog to "set/emphasis" sub menu */
4934  if( !SCIPdialogHasEntry(submenu, "hardlp") )
4935  {
4936  SCIP_CALL( SCIPincludeDialog(scip, &dialog, NULL, SCIPdialogExecSetEmphasisHardlp, NULL, NULL,
4937  "hardlp", "predefined parameter settings for problems with a hard LP", FALSE, NULL) );
4938  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
4939  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4940  }
4941 
4942  /* add "optimality" dialog to "set/emphasis" sub menu */
4943  if( !SCIPdialogHasEntry(submenu, "optimality") )
4944  {
4945  SCIP_CALL( SCIPincludeDialog(scip, &dialog, NULL, SCIPdialogExecSetEmphasisOptimality, NULL, NULL,
4946  "optimality", "predefined parameter settings for proving optimality fast", FALSE, NULL) );
4947  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
4948  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4949  }
4950 
4951  return SCIP_OKAY;
4952 }
4953 
4954 /** includes or updates the "fix" menu for each available parameter setting */
4956  SCIP* scip /**< SCIP data structure */
4957  )
4958 {
4959  SCIP_DIALOG* root;
4960  SCIP_DIALOG* fixmenu;
4961  SCIP_DIALOG* submenu;
4962  SCIP_DIALOG* dialog;
4963  SCIP_PARAM** params;
4964  char* paramname;
4965  int nparams;
4966  int i;
4967 
4968  SCIP_BRANCHRULE** branchrules;
4969  SCIP_CONFLICTHDLR** conflicthdlrs;
4970  SCIP_CONSHDLR** conshdlrs;
4971  SCIP_DISP** disps;
4972  SCIP_HEUR** heurs;
4973  SCIP_NLPI** nlpis;
4974  SCIP_NODESEL** nodesels;
4975  SCIP_PRESOL** presols;
4976  SCIP_PRICER** pricers;
4977  SCIP_READER** readers;
4978  SCIP_SEPA** sepas;
4979  int nbranchrules;
4980  int nconflicthdlrs;
4981  int nconshdlrs;
4982  int ndisps;
4983  int nheurs;
4984  int nnlpis;
4985  int nnodesels;
4986  int npresols;
4987  int npricers;
4988  int nreaders;
4989  int nsepas;
4990 
4991  /* get root dialog */
4992  root = SCIPgetRootDialog(scip);
4993  if( root == NULL )
4994  {
4995  SCIPerrorMessage("root dialog not found\n");
4996  return SCIP_PLUGINNOTFOUND;
4997  }
4998 
4999  /* find (or create) the "fix" menu of the root dialog */
5000  if( !SCIPdialogHasEntry(root, "fix") )
5001  {
5002  SCIP_CALL( SCIPincludeDialog(scip, &fixmenu,
5003  NULL, SCIPdialogExecMenu, NULL, NULL,
5004  "fix", "fix/unfix parameters", TRUE, NULL) );
5005  SCIP_CALL( SCIPaddDialogEntry(scip, root, fixmenu) );
5006  SCIP_CALL( SCIPreleaseDialog(scip, &fixmenu) );
5007  }
5008  if( SCIPdialogFindEntry(root, "fix", &fixmenu) != 1 )
5009  {
5010  SCIPerrorMessage("fix sub menu not found\n");
5011  return SCIP_PLUGINNOTFOUND;
5012  }
5013 
5014  /* fix branching */
5015  if( !SCIPdialogHasEntry(fixmenu, "branching") )
5016  {
5017  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
5018  NULL,
5019  SCIPdialogExecMenu, NULL, NULL,
5020  "branching", "fix parameters for branching rules", TRUE, NULL) );
5021  SCIP_CALL( SCIPaddDialogEntry(scip, fixmenu, submenu) );
5022  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
5023  }
5024  if( SCIPdialogFindEntry(fixmenu, "branching", &submenu) != 1 )
5025  {
5026  SCIPerrorMessage("branching sub menu not found\n");
5027  return SCIP_PLUGINNOTFOUND;
5028  }
5029 
5030  nbranchrules = SCIPgetNBranchrules(scip);
5031  branchrules = SCIPgetBranchrules(scip);
5032 
5033  for( i = 0; i < nbranchrules; ++i )
5034  {
5035  if( !SCIPdialogHasEntry(submenu, SCIPbranchruleGetName(branchrules[i])) )
5036  {
5037  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
5038  NULL,
5039  SCIPdialogExecMenu, NULL, NULL,
5040  SCIPbranchruleGetName(branchrules[i]), SCIPbranchruleGetDesc(branchrules[i]), TRUE, NULL) );
5041  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
5042  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
5043  }
5044  }
5045 
5046  /* fix conflict */
5047  if( !SCIPdialogHasEntry(fixmenu, "conflict") )
5048  {
5049  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
5050  NULL,
5051  SCIPdialogExecMenu, NULL, NULL,
5052  "conflict", "fix parameters for conflict handlers", TRUE, NULL) );
5053  SCIP_CALL( SCIPaddDialogEntry(scip, fixmenu, submenu) );
5054  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
5055  }
5056  if( SCIPdialogFindEntry(fixmenu, "conflict", &submenu) != 1 )
5057  {
5058  SCIPerrorMessage("conflict sub menu not found\n");
5059  return SCIP_PLUGINNOTFOUND;
5060  }
5061 
5062  nconflicthdlrs = SCIPgetNConflicthdlrs(scip);
5063  conflicthdlrs = SCIPgetConflicthdlrs(scip);
5064 
5065  for( i = 0; i < nconflicthdlrs; ++i )
5066  {
5067  if( !SCIPdialogHasEntry(submenu, SCIPconflicthdlrGetName(conflicthdlrs[i])) )
5068  {
5069  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
5070  NULL,
5071  SCIPdialogExecMenu, NULL, NULL,
5072  SCIPconflicthdlrGetName(conflicthdlrs[i]), SCIPconflicthdlrGetDesc(conflicthdlrs[i]), TRUE, NULL) );
5073  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
5074  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
5075  }
5076  }
5077 
5078  /* fix constraints */
5079  if( !SCIPdialogHasEntry(fixmenu, "constraints") )
5080  {
5081  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
5082  NULL,
5083  SCIPdialogExecMenu, NULL, NULL,
5084  "constraints", "fix parameters for constraint handlers", TRUE, NULL) );
5085  SCIP_CALL( SCIPaddDialogEntry(scip, fixmenu, submenu) );
5086  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
5087  }
5088  if( SCIPdialogFindEntry(fixmenu, "constraints", &submenu) != 1 )
5089  {
5090  SCIPerrorMessage("constraints sub menu not found\n");
5091  return SCIP_PLUGINNOTFOUND;
5092  }
5093 
5094  nconshdlrs = SCIPgetNConshdlrs(scip);
5095  conshdlrs = SCIPgetConshdlrs(scip);
5096 
5097  for( i = 0; i < nconshdlrs; ++i )
5098  {
5099  if( !SCIPdialogHasEntry(submenu, SCIPconshdlrGetName(conshdlrs[i])) )
5100  {
5101  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
5102  NULL,
5103  SCIPdialogExecMenu, NULL, NULL,
5104  SCIPconshdlrGetName(conshdlrs[i]), SCIPconshdlrGetDesc(conshdlrs[i]), TRUE, NULL) );
5105  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
5106  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
5107  }
5108  }
5109 
5110  /* fix display */
5111  if( !SCIPdialogHasEntry(fixmenu, "display") )
5112  {
5113  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
5114  NULL,
5115  SCIPdialogExecMenu, NULL, NULL,
5116  "display", "fix parameters for display columns", TRUE, NULL) );
5117  SCIP_CALL( SCIPaddDialogEntry(scip, fixmenu, submenu) );
5118  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
5119  }
5120  if( SCIPdialogFindEntry(fixmenu, "display", &submenu) != 1 )
5121  {
5122  SCIPerrorMessage("display sub menu not found\n");
5123  return SCIP_PLUGINNOTFOUND;
5124  }
5125 
5126  ndisps = SCIPgetNDisps(scip);
5127  disps = SCIPgetDisps(scip);
5128 
5129  for( i = 0; i < ndisps; ++i )
5130  {
5131  if( !SCIPdialogHasEntry(submenu, SCIPdispGetName(disps[i])) )
5132  {
5133  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
5134  NULL,
5135  SCIPdialogExecMenu, NULL, NULL,
5136  SCIPdispGetName(disps[i]), SCIPdispGetDesc(disps[i]), TRUE, NULL) );
5137  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
5138  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
5139  }
5140  }
5141 
5142  /* fix heuristics */
5143  if( !SCIPdialogHasEntry(fixmenu, "heuristics") )
5144  {
5145  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
5146  NULL,
5147  SCIPdialogExecMenu, NULL, NULL,
5148  "heuristics", "fix parameters for primal heuristics", TRUE, NULL) );
5149  SCIP_CALL( SCIPaddDialogEntry(scip, fixmenu, submenu) );
5150  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
5151  }
5152  if( SCIPdialogFindEntry(fixmenu, "heuristics", &submenu) != 1 )
5153  {
5154  SCIPerrorMessage("heuristics sub menu not found\n");
5155  return SCIP_PLUGINNOTFOUND;
5156  }
5157 
5158  nheurs = SCIPgetNHeurs(scip);
5159  heurs = SCIPgetHeurs(scip);
5160 
5161  for( i = 0; i < nheurs; ++i )
5162  {
5163  if( !SCIPdialogHasEntry(submenu, SCIPheurGetName(heurs[i])) )
5164  {
5165  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
5166  NULL,
5167  SCIPdialogExecMenu, NULL, NULL,
5168  SCIPheurGetName(heurs[i]), SCIPheurGetDesc(heurs[i]), TRUE, NULL) );
5169  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
5170  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
5171  }
5172  }
5173 
5174  /* fix limits */
5175  if( !SCIPdialogHasEntry(fixmenu, "limits") )
5176  {
5177  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
5178  NULL,
5179  SCIPdialogExecMenu, NULL, NULL,
5180  "limits", "fix parameters for time, memory, objective value, and other limits", TRUE, NULL) );
5181  SCIP_CALL( SCIPaddDialogEntry(scip, fixmenu, submenu) );
5182 
5183  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
5184  }
5185 
5186  /* fix LP */
5187  if( !SCIPdialogHasEntry(fixmenu, "lp") )
5188  {
5189  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
5190  NULL,
5191  SCIPdialogExecMenu, NULL, NULL,
5192  "lp", "fix parameters for linear programming relaxations", TRUE, NULL) );
5193  SCIP_CALL( SCIPaddDialogEntry(scip, fixmenu, submenu) );
5194  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
5195  }
5196 
5197  /* fix NLP */
5198  if( !SCIPdialogHasEntry(fixmenu, "nlp") )
5199  {
5200  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
5201  NULL,
5202  SCIPdialogExecMenu, NULL, NULL,
5203  "nlp", "fix parameters for nonlinear programming relaxations", TRUE, NULL) );
5204  SCIP_CALL( SCIPaddDialogEntry(scip, fixmenu, submenu) );
5205  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
5206  }
5207 
5208  /* fix memory */
5209  if( !SCIPdialogHasEntry(fixmenu, "memory") )
5210  {
5211  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
5212  NULL,
5213  SCIPdialogExecMenu, NULL, NULL,
5214  "memory", "fix parameters for memory management", TRUE, NULL) );
5215  SCIP_CALL( SCIPaddDialogEntry(scip, fixmenu, submenu) );
5216  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
5217  }
5218 
5219  /* fix misc */
5220  if( !SCIPdialogHasEntry(fixmenu, "misc") )
5221  {
5222  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
5223  NULL,
5224  SCIPdialogExecMenu, NULL, NULL,
5225  "misc", "fix parameters for miscellaneous stuff", TRUE, NULL) );
5226  SCIP_CALL( SCIPaddDialogEntry(scip, fixmenu, submenu) );
5227  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
5228  }
5229 
5230  /* fix nlpi */
5231  if( !SCIPdialogHasEntry(fixmenu, "nlpi") )
5232  {
5233  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
5234  NULL,
5235  SCIPdialogExecMenu, NULL, NULL,
5236  "nlpi", "fix parameters for NLP solver interfaces", TRUE, NULL) );
5237  SCIP_CALL( SCIPaddDialogEntry(scip, fixmenu, submenu) );
5238  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
5239  }
5240  if( SCIPdialogFindEntry(fixmenu, "nlpi", &submenu) != 1 )
5241  {
5242  SCIPerrorMessage("nlpi sub menu not found\n");
5243  return SCIP_PLUGINNOTFOUND;
5244  }
5245 
5246  nnlpis = SCIPgetNNlpis(scip);
5247  nlpis = SCIPgetNlpis(scip);
5248 
5249  for( i = 0; i < nnlpis; ++i )
5250  {
5251  if( !SCIPdialogHasEntry(submenu, SCIPnlpiGetName(nlpis[i])) )
5252  {
5253  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
5254  NULL,
5255  SCIPdialogExecMenu, NULL, NULL,
5256  SCIPnlpiGetName(nlpis[i]), SCIPnlpiGetDesc(nlpis[i]), TRUE, NULL) );
5257  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
5258  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
5259  }
5260  }
5261 
5262  /* fix nodeselection */
5263  if( !SCIPdialogHasEntry(fixmenu, "nodeselection") )
5264  {
5265  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
5266  NULL,
5267  SCIPdialogExecMenu, NULL, NULL,
5268  "nodeselection", "fix parameters for node selectors", TRUE, NULL) );
5269  SCIP_CALL( SCIPaddDialogEntry(scip, fixmenu, submenu) );
5270  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
5271  }
5272  if( SCIPdialogFindEntry(fixmenu, "nodeselection", &submenu) != 1 )
5273  {
5274  SCIPerrorMessage("nodeselection sub menu not found\n");
5275  return SCIP_PLUGINNOTFOUND;
5276  }
5277 
5278  nnodesels = SCIPgetNNodesels(scip);
5279  nodesels = SCIPgetNodesels(scip);
5280 
5281  for( i = 0; i < nnodesels; ++i )
5282  {
5283  if( !SCIPdialogHasEntry(submenu, SCIPnodeselGetName(nodesels[i])) )
5284  {
5285  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
5286  NULL,
5287  SCIPdialogExecMenu, NULL, NULL,
5288  SCIPnodeselGetName(nodesels[i]), SCIPnodeselGetDesc(nodesels[i]), TRUE, NULL) );
5289  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
5290  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
5291  }
5292  }
5293 
5294  /* fix numerics */
5295  if( !SCIPdialogHasEntry(fixmenu, "numerics") )
5296  {
5297  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
5298  NULL,
5299  SCIPdialogExecMenu, NULL, NULL,
5300  "numerics", "fix parameters for numerical values", TRUE, NULL) );
5301  SCIP_CALL( SCIPaddDialogEntry(scip, fixmenu, submenu) );
5302  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
5303  }
5304 
5305  /* fix presolving */
5306  if( !SCIPdialogHasEntry(fixmenu, "presolving") )
5307  {
5308  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
5309  NULL,
5310  SCIPdialogExecMenu, NULL, NULL,
5311  "presolving", "fix parameters for presolving", TRUE, NULL) );
5312  SCIP_CALL( SCIPaddDialogEntry(scip, fixmenu, submenu) );
5313  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
5314  }
5315  if( SCIPdialogFindEntry(fixmenu, "presolving", &submenu) != 1 )
5316  {
5317  SCIPerrorMessage("presolving sub menu not found\n");
5318  return SCIP_PLUGINNOTFOUND;
5319  }
5320 
5321  npresols = SCIPgetNPresols(scip);
5322  presols = SCIPgetPresols(scip);
5323 
5324  for( i = 0; i < npresols; ++i )
5325  {
5326  if( !SCIPdialogHasEntry(submenu, SCIPpresolGetName(presols[i])) )
5327  {
5328  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
5329  NULL, SCIPdialogExecMenu, NULL, NULL,
5330  SCIPpresolGetName(presols[i]), SCIPpresolGetDesc(presols[i]), TRUE, NULL) );
5331  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
5332  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
5333  }
5334  }
5335 
5336  /* fix pricing */
5337  if( !SCIPdialogHasEntry(fixmenu, "pricing") )
5338  {
5339  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
5340  NULL,
5341  SCIPdialogExecMenu, NULL, NULL,
5342  "pricing", "fix parameters for pricing variables", TRUE, NULL) );
5343  SCIP_CALL( SCIPaddDialogEntry(scip, fixmenu, submenu) );
5344  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
5345  }
5346  if( SCIPdialogFindEntry(fixmenu, "pricing", &submenu) != 1 )
5347  {
5348  SCIPerrorMessage("pricing sub menu not found\n");
5349  return SCIP_PLUGINNOTFOUND;
5350  }
5351 
5352  npricers = SCIPgetNPricers(scip);
5353  pricers = SCIPgetPricers(scip);
5354 
5355  for( i = 0; i < npricers; ++i )
5356  {
5357  if( !SCIPdialogHasEntry(submenu, SCIPpricerGetName(pricers[i])) )
5358  {
5359  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
5360  NULL,
5361  SCIPdialogExecMenu, NULL, NULL,
5362  SCIPpricerGetName(pricers[i]), SCIPpricerGetDesc(pricers[i]), TRUE, NULL) );
5363  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
5364  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
5365  }
5366  }
5367 
5368  /* fix propagation */
5369  if( !SCIPdialogHasEntry(fixmenu, "propagating") )
5370  {
5371  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
5372  NULL,
5373  SCIPdialogExecMenu, NULL, NULL,
5374  "propagating", "fix parameters for constraint propagation", TRUE, NULL) );
5375  SCIP_CALL( SCIPaddDialogEntry(scip, fixmenu, submenu) );
5376  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
5377  }
5378 
5379  /* fix reading */
5380  if( !SCIPdialogHasEntry(fixmenu, "reading") )
5381  {
5382  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
5383  NULL,
5384  SCIPdialogExecMenu, NULL, NULL,
5385  "reading", "fix parameters for problem file readers", TRUE, NULL) );
5386  SCIP_CALL( SCIPaddDialogEntry(scip, fixmenu, submenu) );
5387  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
5388  }
5389  if( SCIPdialogFindEntry(fixmenu, "reading", &submenu) != 1 )
5390  {
5391  SCIPerrorMessage("reading sub menu not found\n");
5392  return SCIP_PLUGINNOTFOUND;
5393  }
5394 
5395  nreaders = SCIPgetNReaders(scip);
5396  readers = SCIPgetReaders(scip);
5397 
5398  for( i = 0; i < nreaders; ++i )
5399  {
5400  if( !SCIPdialogHasEntry(submenu, SCIPreaderGetName(readers[i])) )
5401  {
5402  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
5403  NULL,
5404  SCIPdialogExecMenu, NULL, NULL,
5405  SCIPreaderGetName(readers[i]), SCIPreaderGetDesc(readers[i]), TRUE, NULL) );
5406  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
5407  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
5408  }
5409  }
5410 
5411  /* fix separating */
5412  if( !SCIPdialogHasEntry(fixmenu, "separating") )
5413  {
5414  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
5415  NULL, SCIPdialogExecMenu, NULL, NULL,
5416  "separating", "fix parameters for cut separators", TRUE, NULL) );
5417  SCIP_CALL( SCIPaddDialogEntry(scip, fixmenu, submenu) );
5418  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
5419  }
5420  if( SCIPdialogFindEntry(fixmenu, "separating", &submenu) != 1 )
5421  {
5422  SCIPerrorMessage("separating sub menu not found\n");
5423  return SCIP_PLUGINNOTFOUND;
5424  }
5425 
5426  nsepas = SCIPgetNSepas(scip);
5427  sepas = SCIPgetSepas(scip);
5428 
5429  for( i = 0; i < nsepas; ++i )
5430  {
5431  if( !SCIPdialogHasEntry(submenu, SCIPsepaGetName(sepas[i])) )
5432  {
5433  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
5434  NULL, SCIPdialogExecMenu, NULL, NULL,
5435  SCIPsepaGetName(sepas[i]), SCIPsepaGetDesc(sepas[i]), TRUE, NULL) );
5436  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
5437  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
5438  }
5439  }
5440 
5441  /* fix timing */
5442  if( !SCIPdialogHasEntry(fixmenu, "timing") )
5443  {
5444  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
5445  NULL, SCIPdialogExecMenu, NULL, NULL,
5446  "timing", "fix parameters for timing issues", TRUE, NULL) );
5447  SCIP_CALL( SCIPaddDialogEntry(scip, fixmenu, submenu) );
5448  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
5449  }
5450 
5451  /* get SCIP's parameters */
5452  params = SCIPgetParams(scip);
5453  nparams = SCIPgetNParams(scip);
5454 
5455  /* insert each parameter into the fix menu */
5456  for( i = 0; i < nparams; ++i )
5457  {
5458  const char* pname;
5459 
5460  pname = SCIPparamGetName(params[i]);
5461  SCIP_ALLOC( BMSduplicateMemoryArray(&paramname, pname, strlen(pname)+1) );
5462  SCIP_CALL( addFixParamDialog(scip, fixmenu, params[i], paramname) );
5463  BMSfreeMemoryArray(&paramname);
5464  }
5465 
5466  return SCIP_OKAY;
5467 }
int SCIPcomprGetMinNodes(SCIP_COMPR *compr)
Definition: compr.c:453
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip.c:41572
#define BMSfreeMemoryArray(ptr)
Definition: memory.h:102
SCIP_Bool SCIPreaderCanWrite(SCIP_READER *reader)
Definition: reader.c:550
SCIP_RETCODE SCIPprintStatistics(SCIP *scip, FILE *file)
Definition: scip.c:40329
SCIP_RETCODE SCIPresetParams(SCIP *scip)
Definition: scip.c:4335
SCIP_RETCODE SCIPchgCharParam(SCIP *scip, SCIP_PARAM *param, char value)
Definition: scip.c:4128
const char * SCIPvarGetName(SCIP_VAR *var)
Definition: var.c:16443
SCIP_RETCODE SCIPchgVarBranchDirection(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR branchdirection)
Definition: scip.c:22592
SCIP_HEUR ** SCIPgetHeurs(SCIP *scip)
Definition: scip.c:7406
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
Definition: scip.c:41648
SCIP_RETCODE SCIPwriteLP(SCIP *scip, const char *filename)
Definition: scip.c:27155
const char * SCIPheurGetDesc(SCIP_HEUR *heur)
Definition: heur.c:1157
const char * SCIPreaderGetName(SCIP_READER *reader)
Definition: reader.c:510
int SCIPgetNReaders(SCIP *scip)
Definition: scip.c:4713
const char * SCIPheurGetName(SCIP_HEUR *heur)
Definition: heur.c:1147
int SCIPgetNNodesels(SCIP *scip)
Definition: scip.c:8148
int SCIPgetNPricers(SCIP *scip)
Definition: scip.c:5006
SCIP_Real SCIPbranchruleGetMaxbounddist(SCIP_BRANCHRULE *branchrule)
Definition: branch.c:1943
const char * SCIPnlpiGetName(SCIP_NLPI *nlpi)
Definition: nlpi.c:740
SCIP_PRESOL ** SCIPgetPresols(SCIP *scip)
Definition: scip.c:6335
#define SCIP_MAXSTRLEN
Definition: def.h:201
static SCIP_DECL_DIALOGCOPY(dialogCopyDefault)
char SCIPparamGetChar(SCIP_PARAM *param)
Definition: paramset.c:847
SCIP_RETCODE SCIPprintLPSolutionQuality(SCIP *scip, FILE *file)
Definition: scip.c:27275
#define NULL
Definition: lpi_spx.cpp:130
int SCIPgetNConshdlrs(SCIP *scip)
Definition: scip.c:5902
int SCIPgetNProps(SCIP *scip)
Definition: scip.c:7149
void SCIPdialogMessage(SCIP *scip, FILE *file, const char *formatstr,...)
Definition: scip.c:1264
internal methods for NLPI solver interfaces
int SCIPconshdlrGetSepaPriority(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4721
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
Definition: var.c:17067
int SCIPnodeselGetMemsavePriority(SCIP_NODESEL *nodesel)
Definition: nodesel.c:1036
int SCIPpropGetFreq(SCIP_PROP *prop)
Definition: prop.c:955
SCIP_RETCODE SCIPparseCons(SCIP *scip, SCIP_CONS **cons, const char *str, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode, SCIP_Bool *success)
Definition: scip.c:24856
const char * SCIPpresolGetName(SCIP_PRESOL *presol)
Definition: presol.c:553
SCIP_RETCODE SCIPwriteTransProblem(SCIP *scip, const char *filename, const char *extension, SCIP_Bool genericnames)
Definition: scip.c:9554
static SCIP_RETCODE dialogExecMenu(SCIP *scip, SCIP_DIALOG *dialog, SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG **nextdialog)
SCIP_RETCODE SCIPdialogDisplayCompletions(SCIP_DIALOG *dialog, SCIP *scip, const char *entryname)
Definition: dialog.c:1115
const char * SCIPdispGetDesc(SCIP_DISP *disp)
Definition: disp.c:292
#define FALSE
Definition: def.h:56
SCIP_COMPR ** SCIPgetComprs(SCIP *scip)
Definition: scip.c:7640
const char * SCIPsepaGetDesc(SCIP_SEPA *sepa)
Definition: sepa.c:643
int SCIPsepaGetFreq(SCIP_SEPA *sepa)
Definition: sepa.c:677
SCIP_RETCODE SCIPprintStatus(SCIP *scip, FILE *file)
Definition: scip.c:931
int SCIPsnprintf(char *t, int len, const char *s,...)
Definition: misc.c:8174
int SCIPgetNRelaxs(SCIP *scip)
Definition: scip.c:6580
#define TRUE
Definition: def.h:55
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
#define SCIP_PRESOLTIMING_EXHAUSTIVE
Definition: type_timing.h:45
#define SCIP_CALL(x)
Definition: def.h:266
const char * SCIPbranchruleGetName(SCIP_BRANCHRULE *branchrule)
Definition: branch.c:1877
const char * SCIPparamGetName(SCIP_PARAM *param)
Definition: paramset.c:631
SCIP_VAR ** SCIPgetFixedVars(SCIP *scip)
Definition: scip.c:10972
struct SCIP_DialogData SCIP_DIALOGDATA
Definition: type_dialog.h:42
SCIP_Bool SCIPstrToIntValue(const char *str, int *value, char **endptr)
Definition: misc.c:8214
SCIP_RETCODE SCIPsetRootDialog(SCIP *scip, SCIP_DIALOG *dialog)
Definition: scip.c:8880
SCIP_RETCODE SCIPdialogWriteHistory(const char *filename)
Definition: dialog.c:1251
SCIP_RETCODE SCIPfreeTransform(SCIP *scip)
Definition: scip.c:15373
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
Definition: scip.c:34983
SCIP_RETCODE SCIPchgIntParam(SCIP *scip, SCIP_PARAM *param, int value)
Definition: scip.c:3975
SCIP_Bool SCIPpricerIsDelayed(SCIP_PRICER *pricer)
Definition: pricer.c:656
SCIP_Real SCIPvarGetObj(SCIP_VAR *var)
Definition: var.c:16905
int SCIPnodeselGetStdPriority(SCIP_NODESEL *nodesel)
Definition: nodesel.c:1012
SCIP_Bool SCIPdialoghdlrIsBufferEmpty(SCIP_DIALOGHDLR *dialoghdlr)
Definition: dialog.c:446
SCIP_SEPA ** SCIPgetSepas(SCIP *scip)
Definition: scip.c:6811
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
Definition: scip.c:24949
const char * SCIPdispGetHeader(SCIP_DISP *disp)
Definition: disp.c:302
const char * SCIPsepaGetName(SCIP_SEPA *sepa)
Definition: sepa.c:633
int SCIPgetNSepas(SCIP *scip)
Definition: scip.c:6824
SCIP_Real SCIPparamGetReal(SCIP_PARAM *param)
Definition: paramset.c:800
int SCIPpresolGetPriority(SCIP_PRESOL *presol)
Definition: presol.c:573
int SCIPgetNParams(SCIP *scip)
Definition: scip.c:4491
#define SCIP_PRESOLTIMING_FAST
Definition: type_timing.h:43
SCIP_Bool SCIPsepaIsDelayed(SCIP_SEPA *sepa)
Definition: sepa.c:860
SCIP_DIALOG * SCIPgetRootDialog(SCIP *scip)
Definition: scip.c:8896
SCIP_RETCODE SCIPcheckSolOrig(SCIP *scip, SCIP_SOL *sol, SCIP_Bool *feasible, SCIP_Bool printreason, SCIP_Bool completely)
Definition: scip.c:36470
SCIP_DISP ** SCIPgetDisps(SCIP *scip)
Definition: scip.c:8573
SCIP_RETCODE SCIPchgBoolParam(SCIP *scip, SCIP_PARAM *param, SCIP_Bool value)
Definition: scip.c:3912
#define SCIP_REAL_FORMAT
Definition: def.h:130
int SCIPgetNSols(SCIP *scip)
Definition: scip.c:35668
const char * SCIPpricerGetName(SCIP_PRICER *pricer)
Definition: pricer.c:550
SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)
Definition: var.c:16562
SCIP_Bool SCIPfileExists(const char *filename)
Definition: misc.c:8347
SCIP_RETCODE SCIPchgLongintParam(SCIP *scip, SCIP_PARAM *param, SCIP_Longint value)
Definition: scip.c:4020
SCIP_DIALOGDATA * SCIPdialogGetData(SCIP_DIALOG *dialog)
Definition: dialog.c:1230
SCIP_RETCODE SCIPdialogDisplayMenu(SCIP_DIALOG *dialog, SCIP *scip)
Definition: dialog.c:1047
SCIP_CONFLICTHDLR ** SCIPgetConflicthdlrs(SCIP *scip)
Definition: scip.c:6103
SCIP_Longint SCIPparamGetLongint(SCIP_PARAM *param)
Definition: paramset.c:753
char * SCIPparamGetString(SCIP_PARAM *param)
Definition: paramset.c:883
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip.c:41585
int SCIPdispGetPriority(SCIP_DISP *disp)
Definition: disp.c:322
SCIP_RETCODE SCIPreadProb(SCIP *scip, const char *filename, const char *extension)
Definition: scip.c:9236
const char * SCIPreaderGetDesc(SCIP_READER *reader)
Definition: reader.c:520
#define SCIP_PRESOLTIMING_MEDIUM
Definition: type_timing.h:44
const char * SCIPpropGetDesc(SCIP_PROP *prop)
Definition: prop.c:897
SCIP_CONSHDLR ** SCIPgetConshdlrs(SCIP *scip)
Definition: scip.c:5891
SCIP_DISPSTATUS SCIPdispGetStatus(SCIP_DISP *disp)
Definition: disp.c:342
SCIP_DIALOG * SCIPdialoghdlrGetRoot(SCIP_DIALOGHDLR *dialoghdlr)
Definition: dialog.c:425
SCIP_RETCODE SCIPwriteParams(SCIP *scip, const char *filename, SCIP_Bool comments, SCIP_Bool onlychanged)
Definition: scip.c:4295
SCIP_RETCODE SCIPchgVarUbGlobal(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
Definition: scip.c:20049
#define SCIPerrorMessage
Definition: pub_message.h:45
SCIP_NODESEL ** SCIPgetNodesels(SCIP *scip)
Definition: scip.c:8137
SCIP_RETCODE SCIPprintDualSol(SCIP *scip, FILE *file, SCIP_Bool printzeros)
Definition: scip.c:35558
SCIP_RETCODE SCIPaddDialogEntry(SCIP *scip, SCIP_DIALOG *dialog, SCIP_DIALOG *subdialog)
Definition: scip.c:8910
SCIP_RETCODE SCIPwriteMIP(SCIP *scip, const char *filename, SCIP_Bool genericnames, SCIP_Bool origobj, SCIP_Bool lazyconss)
Definition: scip.c:27189
const char * SCIPconshdlrGetName(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:3897
static SCIP_RETCODE addSetParamDialog(SCIP *scip, SCIP_DIALOG *menu, SCIP_PARAM *param, char *paramname)
int SCIPconshdlrGetEnfoPriority(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4731
SCIP_RETCODE SCIPprintBranchingStatistics(SCIP *scip, FILE *file)
Definition: scip.c:40508
SCIP_Bool SCIPisNLPConstructed(SCIP *scip)
Definition: scip.c:28407
static SCIP_RETCODE addFixParamDialog(SCIP *scip, SCIP_DIALOG *menu, SCIP_PARAM *param, char *paramname)
static SCIP_RETCODE writeProblem(SCIP *scip, SCIP_DIALOG *dialog, SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG **nextdialog, SCIP_Bool transformed, SCIP_Bool genericnames)
SCIP_Bool SCIPparamIsFixed(SCIP_PARAM *param)
Definition: paramset.c:671
void SCIPescapeString(char *t, int bufsize, const char *s)
Definition: misc.c:8146
int SCIPconshdlrGetCheckPriority(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4741
SCIP_RETCODE SCIPprintBestTransSol(SCIP *scip, FILE *file, SCIP_Bool printzeros)
Definition: scip.c:35873
SCIP_RETCODE SCIPsetSeparating(SCIP *scip, SCIP_PARAMSETTING paramsetting, SCIP_Bool quiet)
Definition: scip.c:4457
int SCIPsepaGetPriority(SCIP_SEPA *sepa)
Definition: sepa.c:653
int SCIPdispGetWidth(SCIP_DISP *disp)
Definition: disp.c:312
SCIP_RETCODE SCIPwriteCliqueGraph(SCIP *scip, const char *fname, SCIP_Bool writenodeweights)
Definition: scip.c:22217
int SCIPbranchruleGetMaxdepth(SCIP_BRANCHRULE *branchrule)
Definition: branch.c:1921
SCIP_NLPI ** SCIPgetNlpis(SCIP *scip)
Definition: scip.c:8672
SCIP_DECL_DIALOGEXEC(SCIPdialogExecMenu)
static SCIP_Bool parseBoolValue(SCIP *scip, const char *valuestr, SCIP_Bool *error)
SCIP_RETCODE SCIPincludeDialogDefaultFix(SCIP *scip)
SCIP_RETCODE SCIPpresolve(SCIP *scip)
Definition: scip.c:14342
void SCIPsortPtr(void **ptrarray, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), int len)
int SCIPdispGetPosition(SCIP_DISP *disp)
Definition: disp.c:332
int SCIPpresolGetMaxrounds(SCIP_PRESOL *presol)
Definition: presol.c:583
SCIP_RETCODE SCIPincludeDialogDefaultSet(SCIP *scip)
int SCIPvarGetBranchPriority(SCIP_VAR *var)
Definition: var.c:17229
SCIP_SOL ** SCIPgetSols(SCIP *scip)
Definition: scip.c:35717
void SCIPprintMemoryDiagnostic(SCIP *scip)
Definition: scip.c:41464
int SCIPgetNCompr(SCIP *scip)
Definition: scip.c:7653
SCIP_RETCODE SCIPdialoghdlrGetWord(SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG *dialog, const char *prompt, char **inputword, SCIP_Bool *endoffile)
Definition: dialog.c:536
int SCIPrelaxGetFreq(SCIP_RELAX *relax)
Definition: relax.c:485
int SCIPconshdlrGetPropFreq(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4761
const char * SCIPconflicthdlrGetName(SCIP_CONFLICTHDLR *conflicthdlr)
Definition: conflict.c:706
SCIP_RETCODE SCIPchgFeastol(SCIP *scip, SCIP_Real feastol)
Definition: scip.c:41217
SCIP_RETCODE SCIPtransformProb(SCIP *scip)
Definition: scip.c:12623
#define SCIPfreeBufferArrayNull(scip, ptr)
Definition: scip.h:20598
SCIP_RETCODE SCIPcreateFiniteSolCopy(SCIP *scip, SCIP_SOL **sol, SCIP_SOL *sourcesol, SCIP_Bool *success)
Definition: scip.c:34369
#define BMSduplicateMemoryArray(ptr, source, num)
Definition: memory.h:98
SCIP_BRANCHRULE ** SCIPgetBranchrules(SCIP *scip)
Definition: scip.c:8451
SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip.c:41611
char SCIPheurGetDispchar(SCIP_HEUR *heur)
Definition: heur.c:1167
const char * SCIPbranchruleGetDesc(SCIP_BRANCHRULE *branchrule)
Definition: branch.c:1887
int SCIPconshdlrGetSepaFreq(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4751
int SCIPpropGetPresolPriority(SCIP_PROP *prop)
Definition: prop.c:917
SCIP_Bool SCIPisTransformed(SCIP *scip)
Definition: scip.c:997
SCIP_PARAMTYPE SCIPparamGetType(SCIP_PARAM *param)
Definition: paramset.c:621
const char * SCIPconflicthdlrGetDesc(SCIP_CONFLICTHDLR *conflicthdlr)
Definition: conflict.c:716
int SCIPgetNPresols(SCIP *scip)
Definition: scip.c:6348
#define SCIP_Bool
Definition: def.h:53
SCIP_RETCODE SCIPfreeSolve(SCIP *scip, SCIP_Bool restart)
Definition: scip.c:15306
SCIP_MESSAGEHDLR * SCIPgetMessagehdlr(SCIP *scip)
Definition: scip.c:1216
const char * SCIPnodeselGetName(SCIP_NODESEL *nodesel)
Definition: nodesel.c:992
SCIP_PRESOLTIMING SCIPpresolGetTiming(SCIP_PRESOL *presol)
Definition: presol.c:607
void SCIPprintSysError(const char *message)
Definition: misc.c:8110
static const char * paramname[]
Definition: lpi_msk.c:4201
SCIP_STAGE SCIPgetStage(SCIP *scip)
Definition: scip.c:801
int SCIPpropGetPriority(SCIP_PROP *prop)
Definition: prop.c:907
int SCIPgetNConflicthdlrs(SCIP *scip)
Definition: scip.c:6116
SCIP_RETCODE SCIPprintReoptStatistics(SCIP *scip, FILE *file)
Definition: scip.c:40436
int SCIPheurGetPriority(SCIP_HEUR *heur)
Definition: heur.c:1208
SCIP_Bool SCIPpropIsDelayed(SCIP_PROP *prop)
Definition: prop.c:1082
SCIP_Real SCIPsepaGetMaxbounddist(SCIP_SEPA *sepa)
Definition: sepa.c:698
const char * SCIPcomprGetName(SCIP_COMPR *compr)
Definition: compr.c:409
const char * SCIPcomprGetDesc(SCIP_COMPR *compr)
Definition: compr.c:419
int SCIPgetNHeurs(SCIP *scip)
Definition: scip.c:7419
SCIP_PARAM ** SCIPgetParams(SCIP *scip)
Definition: scip.c:4477
SCIP_RETCODE SCIPchgVarBranchPriority(SCIP *scip, SCIP_VAR *var, int branchpriority)
Definition: scip.c:22487
SCIP_RETCODE SCIPprintOrigProblem(SCIP *scip, FILE *file, const char *extension, SCIP_Bool genericnames)
Definition: scip.c:39265
SCIP_RETCODE SCIPsetPresolving(SCIP *scip, SCIP_PARAMSETTING paramsetting, SCIP_Bool quiet)
Definition: scip.c:4431
SCIP_Bool SCIPparamGetBool(SCIP_PARAM *param)
Definition: paramset.c:681
SCIP_RETCODE SCIPchgStringParam(SCIP *scip, SCIP_PARAM *param, const char *value)
Definition: scip.c:4191
SCIP_PRICER ** SCIPgetPricers(SCIP *scip)
Definition: scip.c:4993
SCIP_Bool SCIPdialogHasEntry(SCIP_DIALOG *dialog, const char *entryname)
Definition: dialog.c:970
int SCIPgetNDisps(SCIP *scip)
Definition: scip.c:8584
SCIP_RETCODE SCIPcreateRootDialog(SCIP *scip, SCIP_DIALOG **root)
int SCIPgetNBranchrules(SCIP *scip)
Definition: scip.c:8462
int SCIPparamGetIntMax(SCIP_PARAM *param)
Definition: paramset.c:731
SCIP_Bool SCIPsolIsOriginal(SCIP_SOL *sol)
Definition: sol.c:2179
SCIP_Real SCIPtransformObj(SCIP *scip, SCIP_Real obj)
Definition: scip.c:35173
int SCIPnlpiGetPriority(SCIP_NLPI *nlpi)
Definition: nlpi.c:760
SCIP_PROP ** SCIPgetProps(SCIP *scip)
Definition: scip.c:7136
SCIP_RETCODE SCIPincludeDialog(SCIP *scip, SCIP_DIALOG **dialog, SCIP_DECL_DIALOGCOPY((*dialogcopy)), SCIP_DECL_DIALOGEXEC((*dialogexec)), SCIP_DECL_DIALOGDESC((*dialogdesc)), SCIP_DECL_DIALOGFREE((*dialogfree)), const char *name, const char *desc, SCIP_Bool issubmenu, SCIP_DIALOGDATA *dialogdata)
Definition: scip.c:8798
int SCIPparamGetInt(SCIP_PARAM *param)
Definition: paramset.c:706
SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)
Definition: scip.c:11477
SCIP_RETCODE SCIPreadParams(SCIP *scip, const char *filename)
Definition: scip.c:4254
SCIP_RETCODE SCIPsolve(SCIP *scip)
Definition: scip.c:14503
SCIP_RETCODE SCIPsetHeuristics(SCIP *scip, SCIP_PARAMSETTING paramsetting, SCIP_Bool quiet)
Definition: scip.c:4405
SCIP_RETCODE SCIPchgRealParam(SCIP *scip, SCIP_PARAM *param, SCIP_Real value)
Definition: scip.c:4083
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
Definition: var.c:17057
int SCIPgetNFixedVars(SCIP *scip)
Definition: scip.c:11015
SCIP_RETCODE SCIPsetObjsense(SCIP *scip, SCIP_OBJSENSE objsense)
Definition: scip.c:10014
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
Definition: scip.c:1281
SCIP_RELAX ** SCIPgetRelaxs(SCIP *scip)
Definition: scip.c:6567
int SCIPconshdlrGetEagerFreq(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4771
#define SCIPduplicateBufferArray(scip, ptr, source, num)
Definition: scip.h:20593
SCIP_DECL_DIALOGDESC(SCIPdialogDescSetParam)
SCIP_RETCODE SCIPdialoghdlrAddHistory(SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG *dialog, const char *command, SCIP_Bool escapecommand)
Definition: dialog.c:711
int SCIPbranchruleGetPriority(SCIP_BRANCHRULE *branchrule)
Definition: branch.c:1897
SCIP_PRESOLTIMING SCIPconshdlrGetPresolTiming(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4893
SCIP_RETCODE SCIPwriteOrigProblem(SCIP *scip, const char *filename, const char *extension, SCIP_Bool genericnames)
Definition: scip.c:9507
void SCIPmessageFPrintInfo(SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char *formatstr,...)
Definition: message.c:602
const char * SCIPnlpiGetDesc(SCIP_NLPI *nlpi)
Definition: nlpi.c:750
SCIP_Longint SCIPparamGetLongintMax(SCIP_PARAM *param)
Definition: paramset.c:778
const char * SCIPparamGetDesc(SCIP_PARAM *param)
Definition: paramset.c:641
SCIP_RETCODE SCIPreleaseDialog(SCIP *scip, SCIP_DIALOG **dialog)
Definition: scip.c:8863
default user interface dialog
int SCIPdialogFindEntry(SCIP_DIALOG *dialog, const char *entryname, SCIP_DIALOG **subdialog)
Definition: dialog.c:1003
#define SCIP_Real
Definition: def.h:127
SCIP_Real SCIPgetObjlimit(SCIP *scip)
Definition: scip.c:10251
int SCIPheurGetFreq(SCIP_HEUR *heur)
Definition: heur.c:1232
const char * SCIPdispGetName(SCIP_DISP *disp)
Definition: disp.c:282
const char * SCIPnodeselGetDesc(SCIP_NODESEL *nodesel)
Definition: nodesel.c:1002
int SCIPparamGetIntMin(SCIP_PARAM *param)
Definition: paramset.c:720
SCIP_VAR * SCIPfindVar(SCIP *scip, const char *name)
Definition: scip.c:11392
SCIP_RETCODE SCIPchgVarLbGlobal(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
Definition: scip.c:19972
SCIP_PRESOLTIMING SCIPpropGetPresolTiming(SCIP_PROP *prop)
Definition: prop.c:1242
SCIP_Real SCIPfeastol(SCIP *scip)
Definition: scip.c:41146
SCIP_RETCODE SCIPsetObjlimit(SCIP *scip, SCIP_Real objlimit)
Definition: scip.c:10194
const char * SCIPrelaxGetName(SCIP_RELAX *relax)
Definition: relax.c:441
#define SCIP_Longint
Definition: def.h:112
int SCIPgetNNlpis(SCIP *scip)
Definition: scip.c:8685
SCIP_RETCODE SCIPwriteNLP(SCIP *scip, const char *filename)
Definition: scip.c:29109
SCIP_RETCODE SCIPsetEmphasis(SCIP *scip, SCIP_PARAMEMPHASIS paramemphasis, SCIP_Bool quiet)
Definition: scip.c:4360
static void displayReaders(SCIP *scip, SCIP_Bool reader, SCIP_Bool writer)
void SCIPdialoghdlrClearBuffer(SCIP_DIALOGHDLR *dialoghdlr)
Definition: dialog.c:435
int SCIPrelaxGetPriority(SCIP_RELAX *relax)
Definition: relax.c:461
SCIP_RETCODE SCIPdialoghdlrGetLine(SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG *dialog, const char *prompt, char **inputline, SCIP_Bool *endoffile)
Definition: dialog.c:459
SCIP_RETCODE SCIPincludeDialogDefault(SCIP *scip)
SCIP_Real SCIPparamGetRealMin(SCIP_PARAM *param)
Definition: paramset.c:814
#define SCIPfreeBufferArray(scip, ptr)
Definition: scip.h:20597
SCIP_RETCODE SCIPgetRealParam(SCIP *scip, const char *name, SCIP_Real *value)
Definition: scip.c:3797
const char * SCIPpresolGetDesc(SCIP_PRESOL *presol)
Definition: presol.c:563
const char * SCIPconshdlrGetDesc(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:3907
static SCIP_RETCODE createEmphasisSubmenu(SCIP *scip, SCIP_DIALOG *root, SCIP_DIALOG **submenu)
SCIP_Longint SCIPparamGetLongintMin(SCIP_PARAM *param)
Definition: paramset.c:767
SCIP_Bool SCIPparamIsAdvanced(SCIP_PARAM *param)
Definition: paramset.c:661
SCIP_SOL * SCIPgetBestSol(SCIP *scip)
Definition: scip.c:35767
#define SCIP_ALLOC(x)
Definition: def.h:277
SCIP_BRANCHDIR SCIPvarGetBranchDirection(SCIP_VAR *var)
Definition: var.c:17239
const char * SCIPrelaxGetDesc(SCIP_RELAX *relax)
Definition: relax.c:451
SCIP_Bool SCIPreaderCanRead(SCIP_READER *reader)
Definition: reader.c:540
SCIP_RETCODE SCIPfreeProb(SCIP *scip)
Definition: scip.c:9600
SCIP_READER ** SCIPgetReaders(SCIP *scip)
Definition: scip.c:4702
int SCIPpricerGetPriority(SCIP_PRICER *pricer)
Definition: pricer.c:570
SCIP_RETCODE SCIPgetBoolParam(SCIP *scip, const char *name, SCIP_Bool *value)
Definition: scip.c:3740
const char * SCIPpropGetName(SCIP_PROP *prop)
Definition: prop.c:887
SCIP_RETCODE SCIPprintBestSol(SCIP *scip, FILE *file, SCIP_Bool printzeros)
Definition: scip.c:35833
SCIP_Real SCIPparamGetRealMax(SCIP_PARAM *param)
Definition: paramset.c:825
SCIP_RETCODE SCIPprintTransProblem(SCIP *scip, FILE *file, const char *extension, SCIP_Bool genericnames)
Definition: scip.c:39309
const char * SCIPpricerGetDesc(SCIP_PRICER *pricer)
Definition: pricer.c:560
void SCIPparamSetFixed(SCIP_PARAM *param, SCIP_Bool fixed)
Definition: paramset.c:4123
SCIP_RETCODE SCIPprintSol(SCIP *scip, SCIP_SOL *sol, FILE *file, SCIP_Bool printzeros)
Definition: scip.c:35397
SCIP_RETCODE SCIPfreeSol(SCIP *scip, SCIP_SOL **sol)
Definition: scip.c:34607
int SCIPcomprGetPriority(SCIP_COMPR *compr)
Definition: compr.c:429
int SCIPconflicthdlrGetPriority(SCIP_CONFLICTHDLR *conflicthdlr)
Definition: conflict.c:726
const char * SCIPreaderGetExtension(SCIP_READER *reader)
Definition: reader.c:530
SCIP_DIALOG * SCIPdialogGetParent(SCIP_DIALOG *dialog)
Definition: dialog.c:1200
int SCIPheurGetFreqofs(SCIP_HEUR *heur)
Definition: heur.c:1253