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