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  SCIP_CALL( SCIPgetBoolParam(scip, "write/printzeros", &printzeros) );
1185 
1186  SCIPdialogMessage(scip, NULL, "\n");
1187  SCIP_CALL( SCIPprintBestSol(scip, NULL, printzeros) );
1188  SCIPdialogMessage(scip, NULL, "\n");
1189 
1190  /* check if there are infinite fixings and print a reference to 'display finitesolution', if needed */
1191  fixedvars = SCIPgetFixedVars(scip);
1192  nfixedvars = SCIPgetNFixedVars(scip);
1193  assert(fixedvars != NULL || nfixedvars == 0);
1194 
1195  /* check whether there are variables fixed to an infinite value */
1196  for( v = 0; v < nfixedvars; ++v )
1197  {
1198  var = fixedvars[v]; /*lint !e613*/
1199 
1200  /* skip (multi-)aggregated variables */
1202  continue;
1203 
1205  {
1206  SCIPdialogMessage(scip, NULL, "The primal solution contains variables fixed to infinite values.\n\
1207 If you want SCIP to display an optimal solution without infinite values, use 'display finitesolution'.\n");
1208  SCIPdialogMessage(scip, NULL, "\n");
1209  break;
1210  }
1211  }
1212 
1213  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1214 
1215  return SCIP_OKAY;
1216 }
1217 
1218 /** dialog execution method for the display finitesolution command */
1219 SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayFiniteSolution)
1220 { /*lint --e{715}*/
1221  SCIP_SOL* bestsol = SCIPgetBestSol(scip);
1222 
1223  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
1224 
1225  SCIPdialogMessage(scip, NULL, "\n");
1226  if( bestsol != NULL )
1227  {
1228  SCIP_SOL* sol;
1229  SCIP_Bool success;
1230  SCIP_RETCODE retcode;
1231 
1232  /* create copy of solution with finite values */
1233  retcode = SCIPcreateFiniteSolCopy(scip, &sol, bestsol, &success);
1234 
1235  if( retcode == SCIP_OKAY && success )
1236  {
1237  SCIP_Bool printzeros;
1238 
1239  SCIP_CALL( SCIPgetBoolParam(scip, "write/printzeros", &printzeros) );
1240  retcode = SCIPprintSol(scip, sol, NULL, printzeros);
1241  SCIPdialogMessage(scip, NULL, "\n");
1242  }
1243  else
1244  {
1245  SCIPdialogMessage(scip, NULL, "error while creating finite solution\n");
1246  }
1247 
1248  /* free solution copy */
1249  if( retcode == SCIP_OKAY )
1250  {
1251  SCIP_CALL( SCIPfreeSol(scip, &sol) );
1252  }
1253  }
1254  else
1255  {
1256  SCIP_Bool printzeros;
1257 
1258  SCIP_CALL( SCIPgetBoolParam(scip, "write/printzeros", &printzeros) );
1259  SCIP_CALL( SCIPprintBestSol(scip, NULL, printzeros) );
1260  SCIPdialogMessage(scip, NULL, "\n");
1261  }
1262 
1263  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1264 
1265  return SCIP_OKAY;
1266 }
1267 
1268 /** dialog execution method for the display dual solution command */
1269 SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayDualSolution)
1270 { /*lint --e{715}*/
1271  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
1272 
1273  SCIPdialogMessage(scip, NULL, "\n");
1275  SCIPdialogMessage(scip, NULL, "\n");
1276 
1277  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1278 
1279  return SCIP_OKAY;
1280 }
1281 
1282 
1283 /** dialog execution method for the display of solutions in the pool command */
1284 SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplaySolutionPool)
1285 { /*lint --e{715}*/
1286  char prompt[SCIP_MAXSTRLEN];
1287  SCIP_Bool endoffile;
1288  SCIP_SOL** sols;
1289  char* idxstr;
1290  char* endstr;
1291  int nsols;
1292  int idx;
1293 
1294  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
1295  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1296  SCIPdialogMessage(scip, NULL, "\n");
1297 
1299  {
1300  SCIPdialogMessage(scip, NULL, "No solution available.\n\n");
1301  return SCIP_OKAY;
1302  }
1303 
1304  nsols = SCIPgetNSols(scip);
1305  if ( nsols == 0 )
1306  {
1307  SCIPdialogMessage(scip, NULL, "No solution available.\n\n");
1308  return SCIP_OKAY;
1309  }
1310 
1311  /* parse solution number */
1312  (void) SCIPsnprintf(prompt, SCIP_MAXSTRLEN-1, "index of solution [0-%d]: ", nsols-1);
1313 
1314  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, prompt, &idxstr, &endoffile) );
1315 
1316  if( endoffile )
1317  {
1318  *nextdialog = NULL;
1319  return SCIP_OKAY;
1320  }
1321 
1322  if ( SCIPstrToIntValue(idxstr, &idx, &endstr) )
1323  {
1324  SCIP_Bool printzeros;
1325 
1326  if ( idx < 0 || idx >= nsols )
1327  {
1328  SCIPdialogMessage(scip, NULL, "Solution index out of bounds [0-%d].\n", nsols-1);
1329  return SCIP_OKAY;
1330  }
1331 
1332  SCIP_CALL( SCIPgetBoolParam(scip, "write/printzeros", &printzeros) );
1333 
1334  sols = SCIPgetSols(scip);
1335  assert( sols[idx] != NULL );
1336  SCIP_CALL( SCIPprintSol(scip, sols[idx], NULL, FALSE) );
1337  }
1338  SCIPdialogMessage(scip, NULL, "\n");
1339 
1340  return SCIP_OKAY;
1341 }
1342 
1343 /** dialog execution method for the display statistics command */
1344 SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayStatistics)
1345 { /*lint --e{715}*/
1346  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
1347 
1348  SCIPdialogMessage(scip, NULL, "\n");
1350  SCIPdialogMessage(scip, NULL, "\n");
1351 
1352  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1353 
1354  return SCIP_OKAY;
1355 }
1356 
1357 /** dialog execution method for the display reoptstatistics command */
1358 SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayReoptStatistics)
1359 { /*lint --e{715}*/
1360  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
1361 
1362  SCIPdialogMessage(scip, NULL, "\n");
1364  SCIPdialogMessage(scip, NULL, "\n");
1365 
1366  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1367 
1368  return SCIP_OKAY;
1369 }
1370 
1371 /** dialog execution method for the display compression command */
1372 SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayCompression)
1373 { /*lint --e{715}*/
1374  SCIP_COMPR** comprs;
1375  SCIP_COMPR** sorted;
1376  int ncomprs;
1377  int i;
1378 
1379  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
1380 
1381  comprs = SCIPgetComprs(scip);
1382  ncomprs = SCIPgetNCompr(scip);
1383 
1384  /* copy compression array into temporary memory for sorting */
1385  SCIP_CALL( SCIPduplicateBufferArray(scip, &sorted, comprs, ncomprs) );
1386 
1387  /* sort the compression t */
1388  SCIPsortPtr((void**)sorted, SCIPcomprComp, ncomprs);
1389 
1390  /* display sorted list of branching rules */
1391  SCIPdialogMessage(scip, NULL, "\n");
1392  SCIPdialogMessage(scip, NULL, " compression method priority minnodes description\n");
1393  SCIPdialogMessage(scip, NULL, " ------------------ -------- -------- -----------\n");
1394  for( i = 0; i < ncomprs; ++i )
1395  {
1396  SCIPdialogMessage(scip, NULL, " %-24s ", SCIPcomprGetName(sorted[i]));
1397  if( strlen(SCIPcomprGetName(sorted[i])) > 24 )
1398  SCIPdialogMessage(scip, NULL, "\n %24s ", "-->");
1399  SCIPdialogMessage(scip, NULL, "%8d %8d ", SCIPcomprGetPriority(sorted[i]), SCIPcomprGetMinNodes(sorted[i]));
1400  SCIPdialogMessage(scip, NULL, "%s", SCIPcomprGetDesc(sorted[i]));
1401  SCIPdialogMessage(scip, NULL, "\n");
1402  }
1403  SCIPdialogMessage(scip, NULL, "\n");
1404 
1405  /* free temporary memory */
1406  SCIPfreeBufferArray(scip, &sorted);
1407 
1408  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1409 
1410  return SCIP_OKAY;
1411 }
1412 
1413 /** dialog execution method for the display transproblem command */
1414 SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayTransproblem)
1415 { /*lint --e{715}*/
1416  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
1417 
1418  SCIPdialogMessage(scip, NULL, "\n");
1420  {
1422  }
1423  else
1424  SCIPdialogMessage(scip, NULL, "no transformed problem available\n");
1425 
1426  SCIPdialogMessage(scip, NULL, "\n");
1427 
1428  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1429 
1430  return SCIP_OKAY;
1431 }
1432 
1433 /** dialog execution method for the display value command */
1434 SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayValue)
1435 { /*lint --e{715}*/
1436  SCIP_SOL* sol;
1437  SCIP_VAR* var;
1438  char* varname;
1439  SCIP_Real solval;
1440  SCIP_Bool endoffile;
1441 
1442  SCIPdialogMessage(scip, NULL, "\n");
1443 
1445  sol = SCIPgetBestSol(scip);
1446  else
1447  sol = NULL;
1448 
1449  if( sol == NULL )
1450  {
1451  SCIPdialogMessage(scip, NULL, "no feasible solution available\n");
1452  SCIPdialoghdlrClearBuffer(dialoghdlr);
1453  }
1454  else
1455  {
1456  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "enter variable name: ", &varname, &endoffile) );
1457  if( endoffile )
1458  {
1459  *nextdialog = NULL;
1460  return SCIP_OKAY;
1461  }
1462 
1463  if( varname[0] != '\0' )
1464  {
1465  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, varname, TRUE) );
1466 
1467  var = SCIPfindVar(scip, varname);
1468  if( var == NULL )
1469  SCIPdialogMessage(scip, NULL, "variable <%s> not found\n", varname);
1470  else
1471  {
1472  solval = SCIPgetSolVal(scip, sol, var);
1473  SCIPdialogMessage(scip, NULL, "%-32s", SCIPvarGetName(var));
1474  if( SCIPisInfinity(scip, solval) )
1475  SCIPdialogMessage(scip, NULL, " +infinity");
1476  else if( SCIPisInfinity(scip, -solval) )
1477  SCIPdialogMessage(scip, NULL, " -infinity");
1478  else
1479  SCIPdialogMessage(scip, NULL, " %20.15g", solval);
1480  SCIPdialogMessage(scip, NULL, " \t(obj:%.15g)\n", SCIPvarGetObj(var));
1481  }
1482  }
1483  }
1484  SCIPdialogMessage(scip, NULL, "\n");
1485 
1486  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1487 
1488  return SCIP_OKAY;
1489 }
1490 
1491 /** dialog execution method for the display varbranchstatistics command */
1492 SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayVarbranchstatistics)
1493 { /*lint --e{715}*/
1494  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
1495 
1496  SCIPdialogMessage(scip, NULL, "\n");
1498  SCIPdialogMessage(scip, NULL, "\n");
1499 
1500  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1501 
1502  return SCIP_OKAY;
1503 }
1504 
1505 /** dialog execution method for the display LP solution quality command */
1506 SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayLPSolutionQuality)
1507 { /*lint --e{715}*/
1508  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
1509 
1510  SCIPdialogMessage(scip, NULL, "\n");
1512  SCIPdialogMessage(scip, NULL, "\n");
1513 
1514  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1515 
1516  return SCIP_OKAY;
1517 }
1518 
1519 /** dialog execution method for the help command */
1520 SCIP_DECL_DIALOGEXEC(SCIPdialogExecHelp)
1521 { /*lint --e{715}*/
1522  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
1523 
1524  SCIPdialogMessage(scip, NULL, "\n");
1526  SCIPdialogMessage(scip, NULL, "\n");
1527 
1528  *nextdialog = SCIPdialogGetParent(dialog);
1529 
1530  return SCIP_OKAY;
1531 }
1532 
1533 /** dialog execution method for the display transsolution command */
1534 SCIP_DECL_DIALOGEXEC(SCIPdialogExecDisplayTranssolution)
1535 { /*lint --e{715}*/
1536  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
1537 
1538  SCIPdialogMessage(scip, NULL, "\n");
1540  {
1542  {
1543  SCIPdialogMessage(scip, NULL, "best solution exists only in original problem space\n");
1544  }
1545  else
1546  {
1548  }
1549  }
1550  else
1551  SCIPdialogMessage(scip, NULL, "no solution available\n");
1552  SCIPdialogMessage(scip, NULL, "\n");
1553 
1554  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1555 
1556  return SCIP_OKAY;
1557 }
1558 
1559 /** dialog execution method for the free command */
1560 SCIP_DECL_DIALOGEXEC(SCIPdialogExecFree)
1561 { /*lint --e{715}*/
1562  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
1563 
1565 
1566  *nextdialog = SCIPdialogGetParent(dialog);
1567 
1568  return SCIP_OKAY;
1569 }
1570 
1571 /** dialog execution method for the newstart command */
1572 SCIP_DECL_DIALOGEXEC(SCIPdialogExecNewstart)
1573 { /*lint --e{715}*/
1574  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
1575 
1577 
1578  *nextdialog = SCIPdialogGetParent(dialog);
1579 
1580  return SCIP_OKAY;
1581 }
1582 
1583 /** dialog execution method for the transform command */
1584 SCIP_DECL_DIALOGEXEC(SCIPdialogExecTransform)
1585 { /*lint --e{715}*/
1586  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
1587 
1588  SCIPdialogMessage(scip, NULL, "\n");
1589  switch( SCIPgetStage(scip) )
1590  {
1591  case SCIP_STAGE_INIT:
1592  SCIPdialogMessage(scip, NULL, "no problem exists\n");
1593  break;
1594 
1595  case SCIP_STAGE_PROBLEM:
1597  break;
1598 
1600  SCIPdialogMessage(scip, NULL, "problem is already transformed\n");
1601  break;
1602 
1605  case SCIP_STAGE_PRESOLVING:
1606  case SCIP_STAGE_PRESOLVED:
1608  case SCIP_STAGE_INITSOLVE:
1609  case SCIP_STAGE_SOLVING:
1610  case SCIP_STAGE_SOLVED:
1611  case SCIP_STAGE_EXITSOLVE:
1612  case SCIP_STAGE_FREETRANS:
1613  case SCIP_STAGE_FREE:
1614  default:
1615  SCIPerrorMessage("invalid SCIP stage\n");
1616  return SCIP_INVALIDCALL;
1617  }
1618  SCIPdialogMessage(scip, NULL, "\n");
1619 
1620  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1621 
1622  return SCIP_OKAY;
1623 }
1624 
1625 /** dialog execution method for the concurrentopt command */
1626 SCIP_DECL_DIALOGEXEC(SCIPdialogExecConcurrentOpt)
1627 { /*lint --e{715}*/
1628  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
1629 
1630  SCIPdialogMessage(scip, NULL, "\n");
1631  switch( SCIPgetStage(scip) )
1632  {
1633  case SCIP_STAGE_INIT:
1634  SCIPdialogMessage(scip, NULL, "no problem exists\n");
1635  break;
1636 
1637  case SCIP_STAGE_PROBLEM:
1639  case SCIP_STAGE_PRESOLVING:
1640  case SCIP_STAGE_PRESOLVED:
1641  case SCIP_STAGE_SOLVING:
1643  break;
1644 
1645  case SCIP_STAGE_SOLVED:
1646  SCIPdialogMessage(scip, NULL, "problem is already solved\n");
1647  break;
1648 
1652  case SCIP_STAGE_INITSOLVE:
1653  case SCIP_STAGE_EXITSOLVE:
1654  case SCIP_STAGE_FREETRANS:
1655  case SCIP_STAGE_FREE:
1656  default:
1657  SCIPerrorMessage("invalid SCIP stage\n");
1658  return SCIP_INVALIDCALL;
1659  }
1660  SCIPdialogMessage(scip, NULL, "\n");
1661 
1662  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1663 
1664  return SCIP_OKAY;
1665 }
1666 
1667 /** dialog execution method for the optimize command */
1668 SCIP_DECL_DIALOGEXEC(SCIPdialogExecOptimize)
1669 { /*lint --e{715}*/
1670  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
1671 
1672  SCIPdialogMessage(scip, NULL, "\n");
1673  switch( SCIPgetStage(scip) )
1674  {
1675  case SCIP_STAGE_INIT:
1676  SCIPdialogMessage(scip, NULL, "no problem exists\n");
1677  break;
1678 
1679  case SCIP_STAGE_PROBLEM:
1681  case SCIP_STAGE_PRESOLVING:
1682  case SCIP_STAGE_PRESOLVED:
1683  case SCIP_STAGE_SOLVING:
1684  SCIP_CALL( SCIPsolve(scip) );
1685  break;
1686 
1687  case SCIP_STAGE_SOLVED:
1688  SCIPdialogMessage(scip, NULL, "problem is already solved\n");
1689  break;
1690 
1694  case SCIP_STAGE_INITSOLVE:
1695  case SCIP_STAGE_EXITSOLVE:
1696  case SCIP_STAGE_FREETRANS:
1697  case SCIP_STAGE_FREE:
1698  default:
1699  SCIPerrorMessage("invalid SCIP stage\n");
1700  return SCIP_INVALIDCALL;
1701  }
1702  SCIPdialogMessage(scip, NULL, "\n");
1703 
1704  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1705 
1706  return SCIP_OKAY;
1707 }
1708 
1709 /** dialog execution method for the presolve command */
1710 SCIP_DECL_DIALOGEXEC(SCIPdialogExecPresolve)
1711 { /*lint --e{715}*/
1712  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
1713 
1714  SCIPdialogMessage(scip, NULL, "\n");
1715  switch( SCIPgetStage(scip) )
1716  {
1717  case SCIP_STAGE_INIT:
1718  SCIPdialogMessage(scip, NULL, "no problem exists\n");
1719  break;
1720 
1721  case SCIP_STAGE_PROBLEM:
1723  case SCIP_STAGE_PRESOLVING:
1725  break;
1726 
1727  case SCIP_STAGE_PRESOLVED:
1728  case SCIP_STAGE_SOLVING:
1729  SCIPdialogMessage(scip, NULL, "problem is already presolved\n");
1730  break;
1731 
1732  case SCIP_STAGE_SOLVED:
1733  SCIPdialogMessage(scip, NULL, "problem is already solved\n");
1734  break;
1735 
1739  case SCIP_STAGE_INITSOLVE:
1740  case SCIP_STAGE_EXITSOLVE:
1741  case SCIP_STAGE_FREETRANS:
1742  case SCIP_STAGE_FREE:
1743  default:
1744  SCIPerrorMessage("invalid SCIP stage\n");
1745  return SCIP_INVALIDCALL;
1746  }
1747  SCIPdialogMessage(scip, NULL, "\n");
1748 
1749  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1750 
1751  return SCIP_OKAY;
1752 }
1753 
1754 /** dialog execution method for the quit command */
1755 SCIP_DECL_DIALOGEXEC(SCIPdialogExecQuit)
1756 { /*lint --e{715}*/
1757  SCIPdialogMessage(scip, NULL, "\n");
1758 
1759  *nextdialog = NULL;
1760 
1761  return SCIP_OKAY;
1762 }
1763 
1764 /** dialog execution method for the read command */
1765 SCIP_DECL_DIALOGEXEC(SCIPdialogExecRead)
1766 { /*lint --e{715}*/
1767  SCIP_RETCODE retcode;
1768  char* filename;
1769  SCIP_Bool endoffile;
1770 
1771  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "enter filename: ", &filename, &endoffile) );
1772  if( endoffile )
1773  {
1774  *nextdialog = NULL;
1775  return SCIP_OKAY;
1776  }
1777 
1778  if( filename[0] != '\0' )
1779  {
1780  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, filename, TRUE) );
1781 
1782  if( SCIPfileExists(filename) )
1783  {
1784  char* tmpfilename;
1785  char* extension;
1786 
1787  /* copy filename */
1788  SCIP_CALL( SCIPduplicateBufferArray(scip, &tmpfilename, filename, (int)strlen(filename)+1) );
1789  extension = NULL;
1790 
1791  SCIPinfoMessage(scip, NULL, "\n");
1792  SCIPinfoMessage(scip, NULL, "read problem <%s>\n", filename);
1793  SCIPinfoMessage(scip, NULL, "============\n");
1794  SCIPinfoMessage(scip, NULL, "\n");
1795 
1796  do
1797  {
1798  retcode = SCIPreadProb(scip, tmpfilename, extension);
1799  if( retcode == SCIP_READERROR || retcode == SCIP_NOFILE )
1800  {
1801  if( extension == NULL )
1802  SCIPdialogMessage(scip, NULL, "error reading file <%s>\n", tmpfilename);
1803  else
1804  SCIPdialogMessage(scip, NULL, "error reading file <%s> using <%s> file format\n",
1805  tmpfilename, extension);
1806 
1808  break;
1809  }
1810  else if( retcode == SCIP_PLUGINNOTFOUND )
1811  {
1812  /* ask user once for a suitable reader */
1813  if( extension == NULL )
1814  {
1815  SCIPdialogMessage(scip, NULL, "no reader for input file <%s> available\n", tmpfilename);
1816 
1817  SCIPdialogMessage(scip, NULL, "following readers are avaliable for reading:\n");
1819 
1820  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog,
1821  "select a suitable reader by extension (or return): ", &extension, &endoffile) );
1822 
1823  if( extension[0] == '\0' )
1824  break;
1825  }
1826  else
1827  {
1828  SCIPdialogMessage(scip, NULL, "no reader for file extension <%s> available\n", extension);
1829  extension = NULL;
1830  }
1831  }
1832  else
1833  {
1834  /* check if an unexpected error occurred during the reading process */
1835  SCIP_CALL( retcode );
1836  break;
1837  }
1838  }
1839  while( extension != NULL );
1840 
1841  /* free buffer array */
1842  SCIPfreeBufferArray(scip, &tmpfilename);
1843  }
1844  else
1845  {
1846  SCIPdialogMessage(scip, NULL, "file <%s> not found\n", filename);
1847  SCIPdialoghdlrClearBuffer(dialoghdlr);
1848  }
1849  }
1850 
1851  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1852 
1853  return SCIP_OKAY;
1854 }
1855 
1856 /** dialog execution method for the set default command */
1857 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetDefault)
1858 { /*lint --e{715}*/
1859  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
1860 
1862  SCIPdialogMessage(scip, NULL, "reset parameters to their default values\n");
1863 
1864  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1865 
1866  return SCIP_OKAY;
1867 }
1868 
1869 /** dialog execution method for the set load command */
1870 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetLoad)
1871 { /*lint --e{715}*/
1872  char* filename;
1873  SCIP_Bool endoffile;
1874 
1875  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "enter filename: ", &filename, &endoffile) );
1876  if( endoffile )
1877  {
1878  *nextdialog = NULL;
1879  return SCIP_OKAY;
1880  }
1881 
1882  if( filename[0] != '\0' )
1883  {
1884  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, filename, TRUE) );
1885 
1886  if( SCIPfileExists(filename) )
1887  {
1888  SCIP_CALL( SCIPreadParams(scip, filename) );
1889  SCIPdialogMessage(scip, NULL, "loaded parameter file <%s>\n", filename);
1890  }
1891  else
1892  {
1893  SCIPdialogMessage(scip, NULL, "file <%s> not found\n", filename);
1894  SCIPdialoghdlrClearBuffer(dialoghdlr);
1895  }
1896  }
1897 
1898  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1899 
1900  return SCIP_OKAY;
1901 }
1902 
1903 /** dialog execution method for the set save command */
1904 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetSave)
1905 { /*lint --e{715}*/
1906  char* filename;
1907  SCIP_Bool endoffile;
1908 
1909  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "enter filename: ", &filename, &endoffile) );
1910  if( endoffile )
1911  {
1912  *nextdialog = NULL;
1913  return SCIP_OKAY;
1914  }
1915 
1916  if( filename[0] != '\0' )
1917  {
1918  SCIP_RETCODE retcode;
1919 
1920  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, filename, TRUE) );
1921 
1922  retcode = SCIPwriteParams(scip, filename, TRUE, FALSE);
1923 
1924  if( retcode == SCIP_FILECREATEERROR )
1925  {
1926  SCIPdialogMessage(scip, NULL, "error creating file <%s>\n", filename);
1927  }
1928  else
1929  {
1930  SCIP_CALL( retcode );
1931  SCIPdialogMessage(scip, NULL, "saved parameter file <%s>\n", filename);
1932  }
1933  }
1934 
1935  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1936 
1937  return SCIP_OKAY;
1938 }
1939 
1940 /** dialog execution method for the set diffsave command */
1941 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetDiffsave)
1942 { /*lint --e{715}*/
1943  char* filename;
1944  SCIP_Bool endoffile;
1945 
1946  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "enter filename: ", &filename, &endoffile) );
1947  if( endoffile )
1948  {
1949  *nextdialog = NULL;
1950  return SCIP_OKAY;
1951  }
1952 
1953  if( filename[0] != '\0' )
1954  {
1955  SCIP_RETCODE retcode;
1956 
1957  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, filename, TRUE) );
1958 
1959  retcode = SCIPwriteParams(scip, filename, TRUE, TRUE);
1960 
1961  if( retcode == SCIP_FILECREATEERROR )
1962  {
1963  SCIPdialogMessage(scip, NULL, "error creating file <%s>\n", filename);
1964  }
1965  else
1966  {
1967  SCIP_CALL( retcode );
1968  SCIPdialogMessage(scip, NULL, "saved non-default parameter settings to file <%s>\n", filename);
1969  }
1970  }
1971 
1972  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1973 
1974  return SCIP_OKAY;
1975 }
1976 
1977 /** dialog execution method for the set parameter command */
1978 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetParam)
1979 { /*lint --e{715}*/
1980  SCIP_PARAM* param;
1981  char prompt[SCIP_MAXSTRLEN];
1982  char* valuestr;
1983  SCIP_Bool boolval;
1984  int intval;
1985  SCIP_Longint longintval;
1986  SCIP_Real realval;
1987  char charval;
1988  SCIP_Bool endoffile;
1989  SCIP_Bool error;
1990 
1991  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1992 
1993  /* get the parameter to set */
1994  param = (SCIP_PARAM*)SCIPdialogGetData(dialog);
1995 
1996  /* depending on the parameter type, request a user input */
1997  switch( SCIPparamGetType(param) )
1998  {
1999  case SCIP_PARAMTYPE_BOOL:
2000  (void) SCIPsnprintf(prompt, SCIP_MAXSTRLEN, "current value: %s, new value (TRUE/FALSE): ",
2001  SCIPparamGetBool(param) ? "TRUE" : "FALSE");
2002  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, prompt, &valuestr, &endoffile) );
2003  if( endoffile )
2004  {
2005  *nextdialog = NULL;
2006  return SCIP_OKAY;
2007  }
2008  if( valuestr[0] == '\0' )
2009  return SCIP_OKAY;
2010 
2011  boolval = parseBoolValue(scip, valuestr, &error);
2012 
2013  if( error )
2014  {
2015  SCIPdialogMessage(scip, NULL, "\nInvalid value <%s> for bool parameter <%s>. Must be <0>, <1>, <FALSE>, or <TRUE>.\n\n",
2016  valuestr, SCIPparamGetName(param));
2017  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, valuestr, TRUE) );
2018  }
2019  else
2020  {
2021  assert(SCIPisBoolParamValid(scip, param, boolval));
2022 
2023  SCIP_CALL( SCIPchgBoolParam(scip, param, boolval) );
2024  SCIPdialogMessage(scip, NULL, "%s = %s\n", SCIPparamGetName(param), boolval ? "TRUE" : "FALSE");
2025  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, boolval ? "TRUE" : "FALSE", TRUE) );
2026 
2027  }
2028 
2029  break;
2030 
2031  case SCIP_PARAMTYPE_INT:
2032  (void) SCIPsnprintf(prompt, SCIP_MAXSTRLEN, "current value: %d, new value [%d,%d]: ",
2033  SCIPparamGetInt(param), SCIPparamGetIntMin(param), SCIPparamGetIntMax(param));
2034  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, prompt, &valuestr, &endoffile) );
2035  if( endoffile )
2036  {
2037  *nextdialog = NULL;
2038  return SCIP_OKAY;
2039  }
2040  if( valuestr[0] == '\0' )
2041  return SCIP_OKAY;
2042 
2043  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, valuestr, TRUE) );
2044 
2045  if( sscanf(valuestr, "%d", &intval) != 1 || !SCIPisIntParamValid(scip, param, intval) )
2046  {
2047  SCIPdialogMessage(scip, NULL, "\nInvalid value <%s> for int parameter <%s>. Must be integral in range [%d,%d].\n\n",
2048  valuestr, SCIPparamGetName(param), SCIPparamGetIntMin(param), SCIPparamGetIntMax(param));
2049  }
2050  else
2051  {
2052  SCIP_CALL( SCIPchgIntParam(scip, param, intval) );
2053  SCIPdialogMessage(scip, NULL, "%s = %d\n", SCIPparamGetName(param), intval);
2054  }
2055 
2056  break;
2057 
2059  (void) SCIPsnprintf(prompt, SCIP_MAXSTRLEN, "current value: %" SCIP_LONGINT_FORMAT ", new value [%" SCIP_LONGINT_FORMAT ",%" SCIP_LONGINT_FORMAT "]: ",
2061  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, prompt, &valuestr, &endoffile) );
2062  if( endoffile )
2063  {
2064  *nextdialog = NULL;
2065  return SCIP_OKAY;
2066  }
2067  if( valuestr[0] == '\0' )
2068  return SCIP_OKAY;
2069 
2070  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, valuestr, TRUE) );
2071 
2072  if( sscanf(valuestr, "%" SCIP_LONGINT_FORMAT, &longintval) != 1 || !SCIPisLongintParamValid(scip, param, longintval) )
2073  {
2074  SCIPdialogMessage(scip, NULL, "\nInvalid value <%s> for longint parameter <%s>. Must be integral in range [%" SCIP_LONGINT_FORMAT ",%" SCIP_LONGINT_FORMAT "].\n\n",
2075  valuestr, SCIPparamGetName(param), SCIPparamGetLongintMin(param), SCIPparamGetLongintMax(param));
2076  }
2077  else
2078  {
2079  SCIP_CALL( SCIPchgLongintParam(scip, param, longintval) );
2080  SCIPdialogMessage(scip, NULL, "%s = %" SCIP_LONGINT_FORMAT "\n", SCIPparamGetName(param), longintval);
2081  }
2082  break;
2083 
2084  case SCIP_PARAMTYPE_REAL:
2085  (void) SCIPsnprintf(prompt, SCIP_MAXSTRLEN, "current value: %.15g, new value [%.15g,%.15g]: ",
2087  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, prompt, &valuestr, &endoffile) );
2088  if( endoffile )
2089  {
2090  *nextdialog = NULL;
2091  return SCIP_OKAY;
2092  }
2093  if( valuestr[0] == '\0' )
2094  return SCIP_OKAY;
2095 
2096  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, valuestr, TRUE) );
2097 
2098  if( sscanf(valuestr, "%" SCIP_REAL_FORMAT, &realval) != 1 || !SCIPisRealParamValid(scip, param, realval) )
2099  {
2100  SCIPdialogMessage(scip, NULL, "\nInvalid real parameter value <%s> for parameter <%s>. Must be in range [%.15g,%.15g].\n\n",
2101  valuestr, SCIPparamGetName(param), SCIPparamGetRealMin(param), SCIPparamGetRealMax(param));
2102  }
2103  else
2104  {
2105  SCIP_CALL( SCIPchgRealParam(scip, param, realval) );
2106  SCIPdialogMessage(scip, NULL, "%s = %.15g\n", SCIPparamGetName(param), realval);
2107  }
2108  break;
2109 
2110  case SCIP_PARAMTYPE_CHAR:
2111  (void) SCIPsnprintf(prompt, SCIP_MAXSTRLEN, "current value: <%c>, new value: ", SCIPparamGetChar(param));
2112  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, prompt, &valuestr, &endoffile) );
2113  if( endoffile )
2114  {
2115  *nextdialog = NULL;
2116  return SCIP_OKAY;
2117  }
2118  if( valuestr[0] == '\0' )
2119  return SCIP_OKAY;
2120 
2121  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, valuestr, TRUE) );
2122 
2123  if( sscanf(valuestr, "%c", &charval) != 1 || !SCIPisCharParamValid(scip, param, charval) )
2124  {
2125  SCIPdialogMessage(scip, NULL, "\nInvalid char parameter value <%s>. Must be in set {%s}.\n\n",
2126  valuestr, SCIPparamGetCharAllowedValues(param));
2127  }
2128  else
2129  {
2130  SCIP_CALL( SCIPchgCharParam(scip, param, charval) );
2131  SCIPdialogMessage(scip, NULL, "%s = %c\n", SCIPparamGetName(param), charval);
2132  }
2133  break;
2134 
2135  case SCIP_PARAMTYPE_STRING:
2136  (void) SCIPsnprintf(prompt, SCIP_MAXSTRLEN, "current value: <%s>, new value: ", SCIPparamGetString(param));
2137  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, prompt, &valuestr, &endoffile) );
2138  if( endoffile )
2139  {
2140  *nextdialog = NULL;
2141  return SCIP_OKAY;
2142  }
2143  if( valuestr[0] == '\0' )
2144  return SCIP_OKAY;
2145 
2146  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, valuestr, TRUE) );
2147 
2148  if ( !SCIPisStringParamValid(scip, param, valuestr) )
2149  {
2150  SCIPdialogMessage(scip, NULL, "\nInvalid character in string parameter.\n\n");
2151  }
2152  else
2153  {
2154  SCIP_CALL( SCIPchgStringParam(scip, param, valuestr) );
2155  SCIPdialogMessage(scip, NULL, "%s = %s\n", SCIPparamGetName(param), valuestr);
2156  }
2157  break;
2158 
2159  default:
2160  SCIPerrorMessage("invalid parameter type\n");
2161  return SCIP_INVALIDDATA;
2162  }
2163 
2164  return SCIP_OKAY;
2165 }
2166 
2167 /** dialog description method for the set parameter command */
2168 SCIP_DECL_DIALOGDESC(SCIPdialogDescSetParam)
2169 { /*lint --e{715}*/
2170  SCIP_PARAM* param;
2171  char valuestr[SCIP_MAXSTRLEN];
2172 
2173  /* get the parameter to set */
2174  param = (SCIP_PARAM*)SCIPdialogGetData(dialog);
2175 
2176  /* retrieve parameter's current value */
2177  switch( SCIPparamGetType(param) )
2178  {
2179  case SCIP_PARAMTYPE_BOOL:
2180  if( SCIPparamGetBool(param) )
2181  (void) SCIPsnprintf(valuestr, SCIP_MAXSTRLEN, "TRUE");
2182  else
2183  (void) SCIPsnprintf(valuestr, SCIP_MAXSTRLEN, "FALSE");
2184  break;
2185 
2186  case SCIP_PARAMTYPE_INT:
2187  (void) SCIPsnprintf(valuestr, SCIP_MAXSTRLEN, "%d", SCIPparamGetInt(param));
2188  break;
2189 
2191  (void) SCIPsnprintf(valuestr, SCIP_MAXSTRLEN, "%" SCIP_LONGINT_FORMAT, SCIPparamGetLongint(param));
2192  break;
2193 
2194  case SCIP_PARAMTYPE_REAL:
2195  (void) SCIPsnprintf(valuestr, SCIP_MAXSTRLEN, "%.15g", SCIPparamGetReal(param));
2196  if( strchr(valuestr, '.') == NULL && strchr(valuestr, 'e') == NULL )
2197  (void) SCIPsnprintf(valuestr, SCIP_MAXSTRLEN, "%.1f", SCIPparamGetReal(param));
2198  break;
2199 
2200  case SCIP_PARAMTYPE_CHAR:
2201  (void) SCIPsnprintf(valuestr, SCIP_MAXSTRLEN, "%c", SCIPparamGetChar(param));
2202  break;
2203 
2204  case SCIP_PARAMTYPE_STRING:
2205  (void) SCIPsnprintf(valuestr, SCIP_MAXSTRLEN, "%s", SCIPparamGetString(param));
2206  break;
2207 
2208  default:
2209  SCIPerrorMessage("invalid parameter type\n");
2210  return SCIP_INVALIDDATA;
2211  }
2212  valuestr[SCIP_MAXSTRLEN-1] = '\0';
2213 
2214  /* display parameter's description */
2215  SCIPdialogMessage(scip, NULL, "%s", SCIPparamGetDesc(param));
2216 
2217  /* display parameter's current value */
2218  SCIPdialogMessage(scip, NULL, " [%s]", valuestr);
2219 
2220  return SCIP_OKAY;
2221 }
2222 
2223 /** dialog execution method for the fix parameter command */
2224 SCIP_DECL_DIALOGEXEC(SCIPdialogExecFixParam)
2225 { /*lint --e{715}*/
2226  SCIP_PARAM* param;
2227  char prompt[SCIP_MAXSTRLEN];
2228  char* valuestr;
2229  SCIP_Bool fix;
2230  SCIP_Bool endoffile;
2231  SCIP_Bool error;
2232 
2233  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2234 
2235  /* get the parameter to fix */
2236  param = (SCIP_PARAM*)SCIPdialogGetData(dialog);
2237 
2238  (void) SCIPsnprintf(prompt, SCIP_MAXSTRLEN, "current fixing status: %s, new value (TRUE/FALSE): ",
2239  SCIPparamIsFixed(param) ? "TRUE" : "FALSE");
2240  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, prompt, &valuestr, &endoffile) );
2241  if( endoffile )
2242  {
2243  *nextdialog = NULL;
2244  return SCIP_OKAY;
2245  }
2246  if( valuestr[0] == '\0' )
2247  return SCIP_OKAY;
2248 
2249  fix = parseBoolValue(scip, valuestr, &error);
2250 
2251  if( !error )
2252  {
2253  SCIPparamSetFixed(param, fix);
2254  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, (fix ? "TRUE" : "FALSE"), TRUE) );
2255  SCIPdialogMessage(scip, NULL, "<%s> %s\n", SCIPparamGetName(param), (fix ? "fixed" : "unfixed"));
2256  }
2257  else
2258  {
2259  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, valuestr, TRUE) );
2260  SCIPdialogMessage(scip, NULL, "\nInvalid value <%s> for fixing status. Must be <0>, <1>, <FALSE>, or <TRUE>.\n\n",
2261  valuestr);
2262  }
2263 
2264  return SCIP_OKAY;
2265 }
2266 
2267 /** dialog description method for the fix parameter command */
2268 SCIP_DECL_DIALOGDESC(SCIPdialogDescFixParam)
2269 { /*lint --e{715}*/
2270  SCIP_PARAM* param;
2271 
2272  /* get the parameter to set */
2273  param = (SCIP_PARAM*)SCIPdialogGetData(dialog);
2274 
2275  /* display parameter's description */
2276  SCIPdialogMessage(scip, NULL, "%s", SCIPparamGetDesc(param));
2277 
2278  /* display parameter's current fixing status */
2279  if( SCIPparamIsFixed(param) )
2280  SCIPdialogMessage(scip, NULL, " [fixed]");
2281  else
2282  SCIPdialogMessage(scip, NULL, " [not fixed]");
2283 
2284  return SCIP_OKAY;
2285 }
2286 
2287 /** dialog execution method for the set branching direction command */
2288 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetBranchingDirection)
2289 { /*lint --e{715}*/
2290  SCIP_VAR* var;
2291  char prompt[SCIP_MAXSTRLEN];
2292  char* valuestr;
2293  int direction;
2294  SCIP_Bool endoffile;
2295 
2296  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2297 
2298  /* branching priorities cannot be set, if no problem was created */
2300  {
2301  SCIPdialogMessage(scip, NULL, "cannot set branching directions before problem was created\n");
2302  return SCIP_OKAY;
2303  }
2304 
2305  /* get variable name from user */
2306  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "variable name: ", &valuestr, &endoffile) );
2307  if( endoffile )
2308  {
2309  *nextdialog = NULL;
2310  return SCIP_OKAY;
2311  }
2312  if( valuestr[0] == '\0' )
2313  return SCIP_OKAY;
2314 
2315  /* find variable */
2316  var = SCIPfindVar(scip, valuestr);
2317  if( var == NULL )
2318  {
2319  SCIPdialogMessage(scip, NULL, "variable <%s> does not exist in problem\n", valuestr);
2320  return SCIP_OKAY;
2321  }
2322 
2323  /* get new branching direction from user */
2324  switch( SCIPvarGetBranchDirection(var) )
2325  {
2327  direction = -1;
2328  break;
2329  case SCIP_BRANCHDIR_AUTO:
2330  direction = 0;
2331  break;
2333  direction = +1;
2334  break;
2335  case SCIP_BRANCHDIR_FIXED:
2336  default:
2337  SCIPerrorMessage("invalid preferred branching direction <%d> of variable <%s>\n",
2339  return SCIP_INVALIDDATA;
2340  }
2341  (void) SCIPsnprintf(prompt, SCIP_MAXSTRLEN, "current value: %d, new value: ", direction);
2342  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, prompt, &valuestr, &endoffile) );
2343  if( endoffile )
2344  {
2345  *nextdialog = NULL;
2346  return SCIP_OKAY;
2347  }
2349  (void) SCIPsnprintf(prompt, SCIP_MAXSTRLEN, "%s %s", prompt, valuestr);
2350  if( valuestr[0] == '\0' )
2351  return SCIP_OKAY;
2352 
2353  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, prompt, FALSE) );
2354 
2355  if( sscanf(valuestr, "%d", &direction) != 1 )
2356  {
2357  SCIPdialogMessage(scip, NULL, "\ninvalid input <%s>\n\n", valuestr);
2358  return SCIP_OKAY;
2359  }
2360  if( direction < -1 || direction > +1 )
2361  {
2362  SCIPdialogMessage(scip, NULL, "\ninvalid input <%d>: direction must be -1, 0, or +1\n\n", direction);
2363  return SCIP_OKAY;
2364  }
2365 
2366  /* set new branching direction */
2367  if( direction == -1 )
2369  else if( direction == 0 )
2371  else
2373 
2374  SCIPdialogMessage(scip, NULL, "branching direction of variable <%s> set to %d\n", SCIPvarGetName(var), direction);
2375 
2376  return SCIP_OKAY;
2377 }
2378 
2379 /** dialog execution method for the set branching priority command */
2380 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetBranchingPriority)
2381 { /*lint --e{715}*/
2382  SCIP_VAR* var;
2383  char prompt[SCIP_MAXSTRLEN];
2384  char* valuestr;
2385  int priority;
2386  SCIP_Bool endoffile;
2387 
2388  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2389 
2390  /* branching priorities cannot be set, if no problem was created */
2392  {
2393  SCIPdialogMessage(scip, NULL, "cannot set branching priorities before problem was created\n");
2394  return SCIP_OKAY;
2395  }
2396 
2397  /* get variable name from user */
2398  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "variable name: ", &valuestr, &endoffile) );
2399  if( endoffile )
2400  {
2401  *nextdialog = NULL;
2402  return SCIP_OKAY;
2403  }
2404  if( valuestr[0] == '\0' )
2405  return SCIP_OKAY;
2406 
2407  /* find variable */
2408  var = SCIPfindVar(scip, valuestr);
2409  if( var == NULL )
2410  {
2411  SCIPdialogMessage(scip, NULL, "variable <%s> does not exist in problem\n", valuestr);
2412  return SCIP_OKAY;
2413  }
2414 
2415  /* get new branching priority from user */
2416  (void) SCIPsnprintf(prompt, SCIP_MAXSTRLEN, "current value: %d, new value: ", SCIPvarGetBranchPriority(var));
2417  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, prompt, &valuestr, &endoffile) );
2418  if( endoffile )
2419  {
2420  *nextdialog = NULL;
2421  return SCIP_OKAY;
2422  }
2424  (void) SCIPsnprintf(prompt, SCIP_MAXSTRLEN, "%s %s", prompt, valuestr);
2425  if( valuestr[0] == '\0' )
2426  return SCIP_OKAY;
2427 
2428  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, prompt, FALSE) );
2429 
2430  if( sscanf(valuestr, "%d", &priority) != 1 )
2431  {
2432  SCIPdialogMessage(scip, NULL, "\ninvalid input <%s>\n\n", valuestr);
2433  return SCIP_OKAY;
2434  }
2435 
2436  /* set new branching priority */
2437  SCIP_CALL( SCIPchgVarBranchPriority(scip, var, priority) );
2438  SCIPdialogMessage(scip, NULL, "branching priority of variable <%s> set to %d\n", SCIPvarGetName(var), SCIPvarGetBranchPriority(var));
2439 
2440  return SCIP_OKAY;
2441 }
2442 
2443 /** dialog execution method for the set heuristics aggressive command */
2444 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetHeuristicsAggressive)
2445 { /*lint --e{715}*/
2446  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
2447 
2448  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2449 
2451 
2452  return SCIP_OKAY;
2453 }
2454 
2455 /** dialog execution method for the set heuristics default command */
2456 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetHeuristicsDefault)
2457 { /*lint --e{715}*/
2458  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
2459 
2460  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2461 
2463 
2464  return SCIP_OKAY;
2465 }
2466 
2467 /** dialog execution method for the set heuristics fast command */
2468 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetHeuristicsFast)
2469 { /*lint --e{715}*/
2470  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
2471 
2472  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2473 
2475 
2476  return SCIP_OKAY;
2477 }
2478 
2479 /** dialog execution method for the set heuristics off command */
2480 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetHeuristicsOff)
2481 { /*lint --e{715}*/
2482  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
2483 
2484  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2485 
2487 
2488  return SCIP_OKAY;
2489 }
2490 
2491 /** dialog execution method for the set presolving aggressive command */
2492 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetPresolvingAggressive)
2493 { /*lint --e{715}*/
2494  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
2495 
2496  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2497 
2499 
2500  return SCIP_OKAY;
2501 }
2502 
2503 /** dialog execution method for the set presolving default command */
2504 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetPresolvingDefault)
2505 { /*lint --e{715}*/
2506  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
2507 
2508  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2509 
2511 
2512  return SCIP_OKAY;
2513 }
2514 
2515 /** dialog execution method for the set presolving fast command */
2516 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetPresolvingFast)
2517 { /*lint --e{715}*/
2518  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
2519 
2520  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2521 
2523 
2524  return SCIP_OKAY;
2525 }
2526 
2527 /** dialog execution method for the set presolving off command */
2528 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetPresolvingOff)
2529 { /*lint --e{715}*/
2530  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
2531 
2532  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2533 
2535 
2536  return SCIP_OKAY;
2537 }
2538 
2539 /** dialog execution method for the set separating aggressive command */
2540 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetSeparatingAggressive)
2541 { /*lint --e{715}*/
2542  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
2543 
2544  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2545 
2547 
2548  return SCIP_OKAY;
2549 }
2550 
2551 /** dialog execution method for the set separating default command */
2552 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetSeparatingDefault)
2553 { /*lint --e{715}*/
2554  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
2555 
2556  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2557 
2559 
2560  return SCIP_OKAY;
2561 }
2562 
2563 /** dialog execution method for the set separating fast command */
2564 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetSeparatingFast)
2565 { /*lint --e{715}*/
2566  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
2567 
2568  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2569 
2571 
2572  return SCIP_OKAY;
2573 }
2574 
2575 /** dialog execution method for the set separating off command */
2576 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetSeparatingOff)
2577 { /*lint --e{715}*/
2578  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
2579 
2580  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2581 
2583 
2584  return SCIP_OKAY;
2585 }
2586 
2587 /** dialog execution method for the set emphasis counter command */
2588 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetEmphasisCounter)
2589 { /*lint --e{715}*/
2590  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
2591 
2592  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2593 
2594  /* reset SCIP parameters */
2596 
2597  /* set parameters for counting problems */
2599 
2600  return SCIP_OKAY;
2601 }
2602 
2603 /** dialog execution method for the set emphasis cpsolver command */
2604 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetEmphasisCpsolver)
2605 { /*lint --e{715}*/
2606  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
2607 
2608  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2609 
2610  /* reset SCIP parameters */
2612 
2613  /* set parameters for CP like search problems */
2615 
2616  return SCIP_OKAY;
2617 }
2618 
2619 /** dialog execution method for the set emphasis easy CIP command */
2620 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetEmphasisEasycip)
2621 { /*lint --e{715}*/
2622  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
2623 
2624  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2625 
2626  /* reset SCIP parameters */
2628 
2629  /* set parameters for easy CIP problems */
2631 
2632  return SCIP_OKAY;
2633 }
2634 
2635 /** dialog execution method for the set emphasis feasibility command */
2636 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetEmphasisFeasibility)
2637 { /*lint --e{715}*/
2638  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
2639 
2640  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2641 
2642  /* reset SCIP parameters */
2644 
2645  /* set parameters for feasibility problems */
2647 
2648  return SCIP_OKAY;
2649 }
2650 
2651 /** dialog execution method for the set emphasis hard LP command */
2652 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetEmphasisHardlp)
2653 { /*lint --e{715}*/
2654  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
2655 
2656  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2657 
2658  /* reset SCIP parameters */
2660 
2661  /* set parameters for problems with hard LP */
2663 
2664  return SCIP_OKAY;
2665 }
2666 
2667 /** dialog execution method for the set emphasis optimality command */
2668 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetEmphasisOptimality)
2669 { /*lint --e{715}*/
2670  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
2671 
2672  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2673 
2674  /* reset SCIP parameters */
2676 
2677  /* set parameters for problems to prove optimality fast */
2679 
2680  return SCIP_OKAY;
2681 }
2682 
2683 /** dialog execution method for the set limits objective command */
2684 SCIP_DECL_DIALOGEXEC(SCIPdialogExecSetLimitsObjective)
2685 { /*lint --e{715}*/
2686  char prompt[SCIP_MAXSTRLEN];
2687  char* valuestr;
2688  SCIP_Real objlim;
2689  SCIP_Bool endoffile;
2690 
2691  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2692 
2693  /* objective limit cannot be set, if no problem was created */
2695  {
2696  SCIPdialogMessage(scip, NULL, "cannot set objective limit before problem was created\n");
2697  return SCIP_OKAY;
2698  }
2699 
2700  /* get new objective limit from user */
2701  (void) SCIPsnprintf(prompt, SCIP_MAXSTRLEN, "current value: %.15g, new value: ", SCIPgetObjlimit(scip));
2702  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, prompt, &valuestr, &endoffile) );
2703  if( endoffile )
2704  {
2705  *nextdialog = NULL;
2706  return SCIP_OKAY;
2707  }
2708  if( valuestr[0] == '\0' )
2709  return SCIP_OKAY;
2710 
2711  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, valuestr, TRUE) );
2712 
2713  if( sscanf(valuestr, "%" SCIP_REAL_FORMAT, &objlim) != 1 )
2714  {
2715  SCIPdialogMessage(scip, NULL, "\ninvalid input <%s>\n\n", valuestr);
2716  return SCIP_OKAY;
2717  }
2718 
2719  /* check, if new objective limit is valid */
2722  {
2723  SCIPdialogMessage(scip, NULL, "\ncannot relax objective limit from %.15g to %.15g after problem was transformed\n\n",
2724  SCIPgetObjlimit(scip), objlim);
2725  return SCIP_OKAY;
2726  }
2727 
2728  /* set new objective limit */
2729  SCIP_CALL( SCIPsetObjlimit(scip, objlim) );
2730  SCIPdialogMessage(scip, NULL, "objective value limit set to %.15g\n", SCIPgetObjlimit(scip));
2731 
2732  return SCIP_OKAY;
2733 }
2734 
2735 /** dialog execution method for the write LP command */
2736 static
2737 SCIP_DECL_DIALOGEXEC(SCIPdialogExecWriteLp)
2738 { /*lint --e{715}*/
2739  char* filename;
2740  SCIP_Bool endoffile;
2741 
2742  SCIPdialogMessage(scip, NULL, "\n");
2743 
2744  /* node relaxations only exist in solving & solved stage */
2746  {
2747  SCIPdialogMessage(scip, NULL, "There is no node LP relaxation before solving starts\n");
2748  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2749  return SCIP_OKAY;
2750  }
2752  {
2753  SCIPdialogMessage(scip, NULL, "There is no node LP relaxation after problem was solved\n");
2754  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2755  return SCIP_OKAY;
2756  }
2757 
2758  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "enter filename: ", &filename, &endoffile) );
2759  if( endoffile )
2760  {
2761  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2762  return SCIP_OKAY;
2763  }
2764  if( filename[0] != '\0' )
2765  {
2766  SCIP_RETCODE retcode;
2767 
2768  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, filename, TRUE) );
2769  retcode = SCIPwriteLP(scip, filename);
2770 
2771  if( retcode == SCIP_FILECREATEERROR )
2772  {
2773  SCIPdialogMessage(scip, NULL, "error not creating file <%s>\n", filename);
2774  }
2775  else
2776  {
2777  SCIP_CALL( retcode );
2778 
2779  SCIPdialogMessage(scip, NULL, "written node LP relaxation to file <%s>\n", filename);
2780  }
2781  }
2782 
2783  SCIPdialogMessage(scip, NULL, "\n");
2784 
2785  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2786 
2787  return SCIP_OKAY;
2788 }
2789 
2790 /** dialog execution method for the write MIP command */
2791 static
2792 SCIP_DECL_DIALOGEXEC(SCIPdialogExecWriteMip)
2793 { /*lint --e{715}*/
2794  char command[SCIP_MAXSTRLEN];
2795  char filename[SCIP_MAXSTRLEN];
2796  SCIP_Bool endoffile;
2797  char* valuestr;
2798  SCIP_Bool offset;
2799  SCIP_Bool generic;
2800  SCIP_Bool lazyconss;
2801  SCIP_Bool error;
2802 
2803  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2804 
2805  /* node relaxations only exist in solving & solved stage */
2807  {
2808  SCIPdialogMessage(scip, NULL, "There is no node MIP relaxation before solving starts\n");
2809  return SCIP_OKAY;
2810  }
2812  {
2813  SCIPdialogMessage(scip, NULL, "There is no node MIP relaxation after problem was solved\n");
2814  return SCIP_OKAY;
2815  }
2816 
2817  /* first get file name */
2818  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "enter filename: ", &valuestr, &endoffile) );
2819  if( endoffile )
2820  {
2821  *nextdialog = NULL;
2822  return SCIP_OKAY;
2823  }
2824  if( valuestr[0] == '\0' )
2825  return SCIP_OKAY;
2826 
2827  (void)strncpy(filename, valuestr, SCIP_MAXSTRLEN-1);
2828 
2829  /* second ask for generic variable and row names */
2830  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog,
2831  "using generic variable and row names (TRUE/FALSE): ",
2832  &valuestr, &endoffile) );
2833 
2834  if( endoffile )
2835  {
2836  *nextdialog = NULL;
2837  return SCIP_OKAY;
2838  }
2839  if( valuestr[0] == '\0' )
2840  return SCIP_OKAY;
2841 
2842  generic = parseBoolValue(scip, valuestr, &error);
2843 
2844  if( error )
2845  {
2846  SCIPdialogMessage(scip, NULL, "\nInvalid value <%s>. Must be <0>, <1>, <FALSE>, or <TRUE>.\n\n",
2847  valuestr);
2848 
2849  return SCIP_OKAY;
2850  }
2851 
2852  /* adjust command and add to the history */
2853  SCIPescapeString(command, SCIP_MAXSTRLEN, filename);
2854  (void) SCIPsnprintf(command, SCIP_MAXSTRLEN, "%s %s", command, generic ? "TRUE" : "FALSE");
2855 
2856  /* third ask if for adjusting the objective offset */
2857  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog,
2858  "using original objective function (TRUE/FALSE): ",
2859  &valuestr, &endoffile) );
2860 
2861  if( endoffile )
2862  {
2863  *nextdialog = NULL;
2864  return SCIP_OKAY;
2865  }
2866  if( valuestr[0] == '\0' )
2867  return SCIP_OKAY;
2868 
2869  offset = parseBoolValue(scip, valuestr, &error);
2870 
2871  if( error )
2872  {
2873  SCIPdialogMessage(scip, NULL, "\nInvalid value <%s>. Must be <0>, <1>, <FALSE>, or <TRUE>.\n\n",
2874  valuestr);
2875 
2876  return SCIP_OKAY;
2877  }
2878 
2879  (void) SCIPsnprintf(command, SCIP_MAXSTRLEN, "%s %s", command, offset ? "TRUE" : "FALSE");
2880  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, command, FALSE) );
2881 
2882  /* fourth ask for lazy constraints */
2883  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog,
2884  "output removable rows as lazy constraints (TRUE/FALSE): ",
2885  &valuestr, &endoffile) );
2886 
2887  if( endoffile )
2888  {
2889  *nextdialog = NULL;
2890  return SCIP_OKAY;
2891  }
2892  if( valuestr[0] == '\0' )
2893  return SCIP_OKAY;
2894 
2895  lazyconss = parseBoolValue(scip, valuestr, &error);
2896 
2897  if( error )
2898  {
2899  SCIPdialogMessage(scip, NULL, "\nInvalid value <%s>. Must be <0>, <1>, <FALSE>, or <TRUE>.\n\n",
2900  valuestr);
2901 
2902  return SCIP_OKAY;
2903  }
2904 
2905  /* adjust command and add to the history */
2906  SCIPescapeString(command, SCIP_MAXSTRLEN, filename);
2907  (void) SCIPsnprintf(command, SCIP_MAXSTRLEN, "%s %s", command, lazyconss ? "TRUE" : "FALSE");
2908 
2909  /* execute command */
2910  SCIP_CALL( SCIPwriteMIP(scip, filename, generic, offset, lazyconss) );
2911  SCIPdialogMessage(scip, NULL, "written node MIP relaxation to file <%s>\n", filename);
2912 
2913  SCIPdialogMessage(scip, NULL, "\n");
2914 
2915  return SCIP_OKAY;
2916 }
2917 
2918 
2919 /** dialog execution method for the write NLP command */
2920 static
2921 SCIP_DECL_DIALOGEXEC(SCIPdialogExecWriteNlp)
2922 { /*lint --e{715}*/
2923  char* filename;
2924  SCIP_Bool endoffile;
2925 
2926  SCIPdialogMessage(scip, NULL, "\n");
2927 
2928  /* node relaxations only exist in solving & solved stage */
2930  {
2931  SCIPdialogMessage(scip, NULL, "There is no node NLP relaxation before solving starts\n");
2932  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2933  return SCIP_OKAY;
2934  }
2936  {
2937  SCIPdialogMessage(scip, NULL, "There is no node NLP relaxation after problem was solved\n");
2938  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2939  return SCIP_OKAY;
2940  }
2941  if( !SCIPisNLPConstructed(scip) )
2942  {
2943  SCIPdialogMessage(scip, NULL, "There has been no node NLP relaxation constructed\n");
2944  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2945  return SCIP_OKAY;
2946  }
2947 
2948  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "enter filename: ", &filename, &endoffile) );
2949  if( endoffile )
2950  {
2951  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2952  return SCIP_OKAY;
2953  }
2954  if( filename[0] != '\0' )
2955  {
2956  SCIP_RETCODE retcode;
2957 
2958  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, filename, TRUE) );
2959  retcode = SCIPwriteNLP(scip, filename);
2960 
2961  if( retcode == SCIP_FILECREATEERROR )
2962  {
2963  SCIPdialogMessage(scip, NULL, "error not creating file <%s>\n", filename);
2964  }
2965  else
2966  {
2967  SCIP_CALL( retcode );
2968 
2969  SCIPdialogMessage(scip, NULL, "written node NLP relaxation to file <%s>\n", filename);
2970  }
2971  }
2972 
2973  SCIPdialogMessage(scip, NULL, "\n");
2974 
2975  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2976 
2977  return SCIP_OKAY;
2978 }
2979 
2980 /** dialog execution method for the write problem command */
2981 static
2982 SCIP_DECL_DIALOGEXEC(SCIPdialogExecWriteProblem)
2983 { /*lint --e{715}*/
2984  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
2985 
2987  {
2988  SCIP_CALL( writeProblem(scip, dialog, dialoghdlr, nextdialog, FALSE, FALSE) );
2989  }
2990  else
2991  SCIPdialogMessage(scip, NULL, "no problem available\n");
2992 
2993  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2994 
2995  return SCIP_OKAY;
2996 }
2997 
2998 /** dialog execution method for the write generic problem command */
2999 static
3000 SCIP_DECL_DIALOGEXEC(SCIPdialogExecWriteGenProblem)
3001 { /*lint --e{715}*/
3002  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
3003 
3005  {
3006  SCIP_CALL( writeProblem(scip, dialog, dialoghdlr, nextdialog, FALSE, TRUE) );
3007  }
3008  else
3009  SCIPdialogMessage(scip, NULL, "no problem available\n");
3010 
3011  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
3012 
3013  return SCIP_OKAY;
3014 }
3015 
3016 /** dialog execution method for the write solution command */
3017 static
3018 SCIP_DECL_DIALOGEXEC(SCIPdialogExecWriteSolution)
3019 { /*lint --e{715}*/
3020  char* filename;
3021  SCIP_Bool endoffile;
3022 
3023  SCIPdialogMessage(scip, NULL, "\n");
3024 
3025  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "enter filename: ", &filename, &endoffile) );
3026  if( endoffile )
3027  {
3028  *nextdialog = NULL;
3029  return SCIP_OKAY;
3030  }
3031  if( filename[0] != '\0' )
3032  {
3033  FILE* file;
3034 
3035  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, filename, TRUE) );
3036 
3037  file = fopen(filename, "w");
3038  if( file == NULL )
3039  {
3040  SCIPdialogMessage(scip, NULL, "error creating file <%s>\n", filename);
3041  SCIPdialoghdlrClearBuffer(dialoghdlr);
3042  }
3043  else
3044  {
3045  SCIP_Bool printzeros;
3046 
3047  SCIPinfoMessage(scip, file, "solution status: ");
3048  SCIP_CALL_FINALLY( SCIPprintStatus(scip, file), fclose(file) );
3049 
3050  SCIP_CALL_FINALLY( SCIPgetBoolParam(scip, "write/printzeros", &printzeros), fclose(file) );
3051 
3052  SCIPinfoMessage(scip, file, "\n");
3053  SCIP_CALL_FINALLY( SCIPprintBestSol(scip, file, printzeros), fclose(file) );
3054 
3055  SCIPdialogMessage(scip, NULL, "written solution information to file <%s>\n", filename);
3056  fclose(file);
3057  }
3058  }
3059 
3060  SCIPdialogMessage(scip, NULL, "\n");
3061 
3062  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
3063 
3064  return SCIP_OKAY;
3065 }
3066 
3067 /** dialog execution method for the write mipstart command */
3068 static
3069 SCIP_DECL_DIALOGEXEC(SCIPdialogExecWriteMIPStart)
3070 { /*lint --e{715}*/
3071  char* filename;
3072  SCIP_Bool endoffile;
3073 
3074  SCIPdialogMessage(scip, NULL, "\n");
3075 
3076  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "enter filename: ", &filename, &endoffile) );
3077  if( endoffile )
3078  {
3079  *nextdialog = NULL;
3080  return SCIP_OKAY;
3081  }
3082  if( filename[0] != '\0' )
3083  {
3084  FILE* file;
3085 
3086  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, filename, TRUE) );
3087 
3088  file = fopen(filename, "w");
3089  if( file == NULL )
3090  {
3091  SCIPdialogMessage(scip, NULL, "error creating file <%s>\n", filename);
3092  SCIPdialoghdlrClearBuffer(dialoghdlr);
3093  }
3094  else
3095  {
3096  SCIP_SOL* sol;
3097 
3098  SCIPinfoMessage(scip, file, "\n");
3099 
3100  sol = SCIPgetBestSol(scip);
3101 
3102  if( sol == NULL )
3103  {
3104  SCIPdialogMessage(scip, NULL, "no mip start available\n");
3105  fclose(file);
3106  }
3107  else
3108  {
3109  SCIP_CALL_FINALLY( SCIPprintMIPStart(scip, sol, file), fclose(file) );
3110 
3111  SCIPdialogMessage(scip, NULL, "written mip start information to file <%s>\n", filename);
3112  fclose(file);
3113  }
3114  }
3115  }
3116 
3117  SCIPdialogMessage(scip, NULL, "\n");
3118 
3119  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
3120 
3121  return SCIP_OKAY;
3122 }
3123 
3124 /** dialog execution method for writing command line history */
3125 static
3126 SCIP_DECL_DIALOGEXEC(SCIPdialogExecWriteCommandHistory)
3127 { /*lint --e{715}*/
3128  char* filename;
3129  SCIP_Bool endoffile;
3130 
3131  SCIPdialogMessage(scip, NULL, "\n");
3132 
3133  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "enter filename: ", &filename, &endoffile) );
3134  if( endoffile )
3135  {
3136  *nextdialog = NULL;
3137  return SCIP_OKAY;
3138  }
3139  if( filename[0] != '\0' )
3140  {
3141  SCIP_RETCODE retcode;
3142 
3143  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, filename, TRUE) );
3144 
3145  retcode = SCIPdialogWriteHistory(filename);
3146 
3147  if( retcode != SCIP_OKAY )
3148  {
3149  SCIPdialogMessage(scip, NULL, "error writing to file <%s>\n"
3150  "check that the directory exists and that you have correct permissions\n", filename);
3151  SCIPdialoghdlrClearBuffer(dialoghdlr);
3152  }
3153  else
3154  {
3155  SCIPdialogMessage(scip, NULL, "wrote available command line history to <%s>\n", filename);
3156  }
3157  }
3158 
3159  SCIPdialogMessage(scip, NULL, "\n");
3160 
3161  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
3162 
3163  return SCIP_OKAY;
3164 }
3165 
3166 /** dialog execution method for the write finitesolution command */
3167 static
3168 SCIP_DECL_DIALOGEXEC(SCIPdialogExecWriteFiniteSolution)
3169 { /*lint --e{715}*/
3170  char* filename;
3171  SCIP_Bool endoffile;
3172 
3173  SCIPdialogMessage(scip, NULL, "\n");
3174 
3175  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "enter filename: ", &filename, &endoffile) );
3176  if( endoffile )
3177  {
3178  *nextdialog = NULL;
3179  return SCIP_OKAY;
3180  }
3181  if( filename[0] != '\0' )
3182  {
3183  FILE* file;
3184 
3185  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, filename, TRUE) );
3186 
3187  file = fopen(filename, "w");
3188  if( file == NULL )
3189  {
3190  SCIPdialogMessage(scip, NULL, "error creating file <%s>\n", filename);
3191  SCIPdialoghdlrClearBuffer(dialoghdlr);
3192  }
3193  else
3194  {
3195  SCIP_SOL* bestsol = SCIPgetBestSol(scip);
3196  SCIP_Bool printzeros;
3197 
3198  SCIPinfoMessage(scip, file, "solution status: ");
3199 
3200  SCIP_CALL_FINALLY( SCIPprintStatus(scip, file), fclose(file) );
3201 
3202  SCIPinfoMessage(scip, file, "\n");
3203 
3204  if( bestsol != NULL )
3205  {
3206  SCIP_SOL* sol;
3207  SCIP_Bool success;
3208 
3209  SCIP_CALL_FINALLY( SCIPcreateFiniteSolCopy(scip, &sol, bestsol, &success), fclose(file) );
3210 
3211  SCIP_CALL_FINALLY( SCIPgetBoolParam(scip, "write/printzeros", &printzeros), fclose(file) );
3212 
3213  SCIP_CALL_FINALLY( SCIPprintSol(scip, sol, file, printzeros), fclose(file) );
3214 
3215  SCIPdialogMessage(scip, NULL, "written solution information to file <%s>\n", filename);
3216 
3217  SCIP_CALL_FINALLY( SCIPfreeSol(scip, &sol), fclose(file) );
3218  }
3219  else
3220  {
3221  SCIPmessageFPrintInfo(SCIPgetMessagehdlr(scip), file, "no solution available\n");
3222  SCIPdialogMessage(scip, NULL, "no solution available\n", filename);
3223  }
3224 
3225  fclose(file);
3226  }
3227  }
3228 
3229  SCIPdialogMessage(scip, NULL, "\n");
3230 
3231  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
3232 
3233  return SCIP_OKAY;
3234 }
3235 
3236 /** dialog execution method for the write statistics command */
3237 static
3238 SCIP_DECL_DIALOGEXEC(SCIPdialogExecWriteStatistics)
3239 { /*lint --e{715}*/
3240  char* filename;
3241  SCIP_Bool endoffile;
3242 
3243  SCIPdialogMessage(scip, NULL, "\n");
3244 
3245  SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "enter filename: ", &filename, &endoffile) );
3246  if( endoffile )
3247  {
3248  *nextdialog = NULL;
3249  return SCIP_OKAY;
3250  }
3251  if( filename[0] != '\0' )
3252  {
3253  FILE* file;
3254 
3255  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, filename, TRUE) );
3256 
3257  file = fopen(filename, "w");
3258  if( file == NULL )
3259  {
3260  SCIPdialogMessage(scip, NULL, "error creating file <%s>\n", filename);
3261  SCIPprintSysError(filename);
3262  SCIPdialoghdlrClearBuffer(dialoghdlr);
3263  }
3264  else
3265  {
3266  SCIP_CALL_FINALLY( SCIPprintStatistics(scip, file), fclose(file) );
3267 
3268  SCIPdialogMessage(scip, NULL, "written statistics to file <%s>\n", filename);
3269  fclose(file);
3270  }
3271  }
3272 
3273  SCIPdialogMessage(scip, NULL, "\n");
3274 
3275  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
3276 
3277  return SCIP_OKAY;
3278 }
3279 
3280 /** dialog execution method for the write transproblem command */
3281 static
3282 SCIP_DECL_DIALOGEXEC(SCIPdialogExecWriteTransproblem)
3283 { /*lint --e{715}*/
3284  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
3285 
3287  {
3288  SCIP_CALL( writeProblem(scip, dialog, dialoghdlr, nextdialog, TRUE, FALSE) );
3289  }
3290  else
3291  SCIPdialogMessage(scip, NULL, "no transformed problem available\n");
3292 
3293  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
3294 
3295  return SCIP_OKAY;
3296 }
3297 
3298 /** dialog execution method for the write generic transproblem command */
3299 static
3300 SCIP_DECL_DIALOGEXEC(SCIPdialogExecWriteGenTransproblem)
3301 { /*lint --e{715}*/
3302  SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, NULL, FALSE) );
3303 
3305  {
3306  SCIP_CALL( writeProblem(scip, dialog, dialoghdlr, nextdialog, TRUE, TRUE) );
3307  }
3308  else
3309  SCIPdialogMessage(scip, NULL, "no transformed problem available\n");
3310 
3311  *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
3312 
3313  return SCIP_OKAY;
3314 }
3315 
3316 /** creates a root dialog */
3318  SCIP* scip, /**< SCIP data structure */
3319  SCIP_DIALOG** root /**< pointer to store the root dialog */
3320  )
3321 {
3322  SCIP_CALL( SCIPincludeDialog(scip, root,
3323  dialogCopyDefault,
3324  SCIPdialogExecMenuLazy, NULL, NULL,
3325  "SCIP", "SCIP's main menu", TRUE, NULL) );
3326 
3327  SCIP_CALL( SCIPsetRootDialog(scip, *root) );
3328  SCIP_CALL( SCIPreleaseDialog(scip, root) );
3329  *root = SCIPgetRootDialog(scip);
3330 
3331  return SCIP_OKAY;
3332 }
3333 
3334 
3335 /** includes or updates the default dialog menus in SCIP */
3337  SCIP* scip /**< SCIP data structure */
3338  )
3339 {
3340  SCIP_DIALOG* root;
3341  SCIP_DIALOG* submenu;
3342  SCIP_DIALOG* dialog;
3343 
3344  /* root menu */
3345  root = SCIPgetRootDialog(scip);
3346  if( root == NULL )
3347  {
3348  SCIP_CALL( SCIPcreateRootDialog(scip, &root) );
3349  }
3350 
3351  /* change */
3352  if( !SCIPdialogHasEntry(root, "change") )
3353  {
3354  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
3355  NULL,
3356  SCIPdialogExecMenu, NULL, NULL,
3357  "change", "change the problem", TRUE, NULL) );
3358  SCIP_CALL( SCIPaddDialogEntry(scip, root, submenu) );
3359  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
3360  }
3361  if( SCIPdialogFindEntry(root, "change", &submenu) != 1 )
3362  {
3363  SCIPerrorMessage("change sub menu not found\n");
3364  return SCIP_PLUGINNOTFOUND;
3365  }
3366 
3367  /* change add */
3368  if( !SCIPdialogHasEntry(submenu, "add") )
3369  {
3370  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3371  NULL,
3372  SCIPdialogExecChangeAddCons, NULL, NULL,
3373  "add", "add constraint", FALSE, NULL) );
3374  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3375  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3376  }
3377 
3378  /* change bounds */
3379  if( !SCIPdialogHasEntry(submenu, "bounds") )
3380  {
3381  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3382  NULL,
3383  SCIPdialogExecChangeBounds, NULL, NULL,
3384  "bounds", "change bounds of a variable", FALSE, NULL) );
3385  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3386  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3387  }
3388 
3389  /* free transformed problem */
3390  if( !SCIPdialogHasEntry(submenu, "freetransproblem") )
3391  {
3392  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3393  NULL,
3394  SCIPdialogExecChangeFreetransproblem, NULL, NULL,
3395  "freetransproblem", "free transformed problem", FALSE, NULL) );
3396  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3397  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3398  }
3399 
3400  /* change objective sense */
3401  if( !SCIPdialogHasEntry(submenu, "objsense") )
3402  {
3403  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3404  NULL,
3405  SCIPdialogExecChangeObjSense, NULL, NULL,
3406  "objsense", "change objective sense", FALSE, NULL) );
3407  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3408  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3409  }
3410 
3411  /* checksol */
3412  if( !SCIPdialogHasEntry(root, "checksol") )
3413  {
3414  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3415  NULL,
3416  SCIPdialogExecChecksol, NULL, NULL,
3417  "checksol", "double checks best solution w.r.t. original problem", FALSE, NULL) );
3418  SCIP_CALL( SCIPaddDialogEntry(scip, root, dialog) );
3419  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3420  }
3421 
3422  /* display */
3423  if( !SCIPdialogHasEntry(root, "display") )
3424  {
3425  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
3426  NULL,
3427  SCIPdialogExecMenu, NULL, NULL,
3428  "display", "display information", TRUE, NULL) );
3429  SCIP_CALL( SCIPaddDialogEntry(scip, root, submenu) );
3430  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
3431  }
3432  if( SCIPdialogFindEntry(root, "display", &submenu) != 1 )
3433  {
3434  SCIPerrorMessage("display sub menu not found\n");
3435  return SCIP_PLUGINNOTFOUND;
3436  }
3437 
3438  /* display branching */
3439  if( !SCIPdialogHasEntry(submenu, "branching") )
3440  {
3441  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3442  NULL,
3443  SCIPdialogExecDisplayBranching, NULL, NULL,
3444  "branching", "display branching rules", FALSE, NULL) );
3445  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3446  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3447  }
3448 
3449  /* display compressions */
3450  if( !SCIPdialogHasEntry(submenu, "compression") )
3451  {
3452  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3453  NULL,
3454  SCIPdialogExecDisplayCompression, NULL, NULL,
3455  "compression", "display compression techniques", FALSE, NULL) );
3456  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3457  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3458  }
3459 
3460  /* display conflict */
3461  if( !SCIPdialogHasEntry(submenu, "conflict") )
3462  {
3463  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3464  NULL,
3465  SCIPdialogExecDisplayConflict, NULL, NULL,
3466  "conflict", "display conflict handlers", FALSE, NULL) );
3467  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3468  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3469  }
3470 
3471  /* display conshdlrs */
3472  if( !SCIPdialogHasEntry(submenu, "conshdlrs") )
3473  {
3474  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3475  NULL,
3476  SCIPdialogExecDisplayConshdlrs, NULL, NULL,
3477  "conshdlrs", "display constraint handlers", FALSE, NULL) );
3478  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3479  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3480  }
3481 
3482  /* display displaycols */
3483  if( !SCIPdialogHasEntry(submenu, "displaycols") )
3484  {
3485  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3486  NULL,
3487  SCIPdialogExecDisplayDisplaycols, NULL, NULL,
3488  "displaycols", "display display columns", FALSE, NULL) );
3489  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3490  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3491  }
3492 
3493  /* display heuristics */
3494  if( !SCIPdialogHasEntry(submenu, "heuristics") )
3495  {
3496  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3497  NULL,
3498  SCIPdialogExecDisplayHeuristics, NULL, NULL,
3499  "heuristics", "display primal heuristics", FALSE, NULL) );
3500  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3501  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3502  }
3503 
3504  /* display memory */
3505  if( !SCIPdialogHasEntry(submenu, "memory") )
3506  {
3507  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3508  NULL,
3509  SCIPdialogExecDisplayMemory, NULL, NULL,
3510  "memory", "display memory diagnostics", FALSE, NULL) );
3511  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3512  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3513  }
3514 
3515  /* display nlpi */
3516  if( !SCIPdialogHasEntry(submenu, "nlpis") )
3517  {
3518  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3519  NULL,
3520  SCIPdialogExecDisplayNlpi, NULL, NULL,
3521  "nlpis", "display NLP solver interfaces", FALSE, NULL) );
3522  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3523  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3524  }
3525 
3526  /* display nodeselectors */
3527  if( !SCIPdialogHasEntry(submenu, "nodeselectors") )
3528  {
3529  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3530  NULL,
3531  SCIPdialogExecDisplayNodeselectors, NULL, NULL,
3532  "nodeselectors", "display node selectors", FALSE, NULL) );
3533  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3534  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3535  }
3536 
3537  /* display parameters */
3538  if( !SCIPdialogHasEntry(submenu, "parameters") )
3539  {
3540  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3541  NULL,
3542  SCIPdialogExecDisplayParameters, NULL, NULL,
3543  "parameters", "display non-default parameter settings", FALSE, NULL) );
3544  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3545  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3546  }
3547 
3548  /* display presolvers */
3549  if( !SCIPdialogHasEntry(submenu, "presolvers") )
3550  {
3551  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3552  NULL,
3553  SCIPdialogExecDisplayPresolvers, NULL, NULL,
3554  "presolvers", "display presolvers", FALSE, NULL) );
3555  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3556  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3557  }
3558 
3559  /* display pricers */
3560  if( !SCIPdialogHasEntry(submenu, "pricers") )
3561  {
3562  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3563  NULL,
3564  SCIPdialogExecDisplayPricers, NULL, NULL,
3565  "pricers", "display pricers", FALSE, NULL) );
3566  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3567  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3568  }
3569 
3570  /* display problem */
3571  if( !SCIPdialogHasEntry(submenu, "problem") )
3572  {
3573  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3574  NULL,
3575  SCIPdialogExecDisplayProblem, NULL, NULL,
3576  "problem", "display original problem", FALSE, NULL) );
3577  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3578  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3579  }
3580 
3581  /* display propagators */
3582  if( !SCIPdialogHasEntry(submenu, "propagators") )
3583  {
3584  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3585  NULL,
3586  SCIPdialogExecDisplayPropagators, NULL, NULL,
3587  "propagators", "display propagators", FALSE, NULL) );
3588  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3589  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3590  }
3591 
3592  /* display readers */
3593  if( !SCIPdialogHasEntry(submenu, "readers") )
3594  {
3595  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3596  NULL,
3597  SCIPdialogExecDisplayReaders, NULL, NULL,
3598  "readers", "display file readers", FALSE, NULL) );
3599  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3600  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3601  }
3602 
3603  /* display relaxing */
3604  if( !SCIPdialogHasEntry(submenu, "relaxators") )
3605  {
3606  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3607  NULL,
3608  SCIPdialogExecDisplayRelaxators, NULL, NULL,
3609  "relaxators", "display relaxators", FALSE, NULL) );
3610  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3611  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3612  }
3613 
3614  /* display separators */
3615  if( !SCIPdialogHasEntry(submenu, "separators") )
3616  {
3617  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3618  NULL,
3619  SCIPdialogExecDisplaySeparators, NULL, NULL,
3620  "separators", "display cut separators", FALSE, NULL) );
3621  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3622  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3623  }
3624 
3625  /* display solution */
3626  if( !SCIPdialogHasEntry(submenu, "solution") )
3627  {
3628  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3629  NULL,
3630  SCIPdialogExecDisplaySolution, NULL, NULL,
3631  "solution", "display best primal solution", FALSE, NULL) );
3632  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3633  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3634  }
3635 
3636  /* display finite solution */
3637  if( !SCIPdialogHasEntry(submenu, "finitesolution") )
3638  {
3639  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3640  NULL,
3641  SCIPdialogExecDisplayFiniteSolution, NULL, NULL,
3642  "finitesolution", "display best primal solution (try to make solution values finite, first)", FALSE, NULL) );
3643  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3644  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3645  }
3646 
3647  /* display solution */
3648  if( !SCIPdialogHasEntry(submenu, "dualsolution") )
3649  {
3650  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3651  NULL,
3652  SCIPdialogExecDisplayDualSolution, NULL, NULL,
3653  "dualsolution", "display dual solution vector (LP only, without presolving)", FALSE, NULL) );
3654  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3655  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3656  }
3657 
3658  /* display solution */
3659  if( !SCIPdialogHasEntry(submenu, "sols") )
3660  {
3661  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3662  NULL,
3663  SCIPdialogExecDisplaySolutionPool, NULL, NULL,
3664  "sols", "display solutions from pool", FALSE, NULL) );
3665  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3666  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3667  }
3668 
3669  /* display statistics */
3670  if( !SCIPdialogHasEntry(submenu, "statistics") )
3671  {
3672  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3673  NULL,
3674  SCIPdialogExecDisplayStatistics, NULL, NULL,
3675  "statistics", "display problem and optimization statistics", FALSE, NULL) );
3676  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3677  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3678  }
3679 
3680  /* display reoptimization statistics */
3681  if( !SCIPdialogHasEntry(submenu, "reoptstatistics") )
3682  {
3683  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3684  NULL,
3685  SCIPdialogExecDisplayReoptStatistics, NULL, NULL,
3686  "reoptstatistics", "display reoptimitazion statistics", FALSE, NULL) );
3687  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3688  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3689  }
3690 
3691  /* display transproblem */
3692  if( !SCIPdialogHasEntry(submenu, "transproblem") )
3693  {
3694  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3695  NULL,
3696  SCIPdialogExecDisplayTransproblem, NULL, NULL,
3697  "transproblem", "display current node transformed problem", FALSE, NULL) );
3698  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3699  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3700  }
3701 
3702  /* display value */
3703  if( !SCIPdialogHasEntry(submenu, "value") )
3704  {
3705  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3706  NULL,
3707  SCIPdialogExecDisplayValue, NULL, NULL,
3708  "value", "display value of single variable in best primal solution", FALSE, NULL) );
3709  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3710  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3711  }
3712 
3713  /* display varbranchstatistics */
3714  if( !SCIPdialogHasEntry(submenu, "varbranchstatistics") )
3715  {
3716  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3717  NULL,
3718  SCIPdialogExecDisplayVarbranchstatistics, NULL, NULL,
3719  "varbranchstatistics", "display statistics for branching on variables", FALSE, NULL) );
3720  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3721  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3722  }
3723 
3724  /* display varbranchstatistics */
3725  if( !SCIPdialogHasEntry(submenu, "lpsolquality") )
3726  {
3727  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3728  NULL,
3729  SCIPdialogExecDisplayLPSolutionQuality, NULL, NULL,
3730  "lpsolquality", "display quality of the current LP solution, if available", FALSE, NULL) );
3731  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3732  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3733  }
3734 
3735  /* display transsolution */
3736  if( !SCIPdialogHasEntry(submenu, "transsolution") )
3737  {
3738  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3739  NULL,
3740  SCIPdialogExecDisplayTranssolution, NULL, NULL,
3741  "transsolution", "display best primal solution in transformed variables", FALSE, NULL) );
3742  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3743  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3744  }
3745 
3746  /* free */
3747  if( !SCIPdialogHasEntry(root, "free") )
3748  {
3749  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3750  NULL,
3751  SCIPdialogExecFree, NULL, NULL,
3752  "free", "free current problem from memory", FALSE, NULL) );
3753  SCIP_CALL( SCIPaddDialogEntry(scip, root, dialog) );
3754  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3755  }
3756 
3757  /* help */
3758  if( !SCIPdialogHasEntry(root, "help") )
3759  {
3760  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3761  NULL,
3762  SCIPdialogExecHelp, NULL, NULL,
3763  "help", "display this help", FALSE, NULL) );
3764  SCIP_CALL( SCIPaddDialogEntry(scip, root, dialog) );
3765  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3766  }
3767 
3768  /* newstart */
3769  if( !SCIPdialogHasEntry(root, "newstart") )
3770  {
3771  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3772  NULL,
3773  SCIPdialogExecNewstart, NULL, NULL,
3774  "newstart", "reset branch and bound tree to start again from root", FALSE, NULL) );
3775  SCIP_CALL( SCIPaddDialogEntry(scip, root, dialog) );
3776  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3777  }
3778 
3779 #ifndef NDEBUG
3780  /* transform problem (for debugging) */
3781  if( !SCIPdialogHasEntry(root, "transform") )
3782  {
3783  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3784  NULL,
3785  SCIPdialogExecTransform, NULL, NULL,
3786  "transform", "transforms problem from original state", FALSE, NULL) );
3787  SCIP_CALL( SCIPaddDialogEntry(scip, root, dialog) );
3788  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3789  }
3790 #endif
3791 
3792  /* optimize */
3793  if( !SCIPdialogHasEntry(root, "optimize") )
3794  {
3795  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3796  NULL,
3797  SCIPdialogExecOptimize, NULL, NULL,
3798  "optimize", "solve the problem", FALSE, NULL) );
3799  SCIP_CALL( SCIPaddDialogEntry(scip, root, dialog) );
3800  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3801  }
3802 
3803  /* optimize */
3804  if( !SCIPdialogHasEntry(root, "concurrentopt") )
3805  {
3806  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3807  NULL,
3808  SCIPdialogExecConcurrentOpt, NULL, NULL,
3809  "concurrentopt", "solve the problem using concurrent solvers", FALSE, NULL) );
3810  SCIP_CALL( SCIPaddDialogEntry(scip, root, dialog) );
3811  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3812  }
3813 
3814  /* presolve */
3815  if( !SCIPdialogHasEntry(root, "presolve") )
3816  {
3817  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3818  NULL,
3819  SCIPdialogExecPresolve, NULL, NULL,
3820  "presolve", "solve the problem, but stop after presolving stage", FALSE, NULL) );
3821  SCIP_CALL( SCIPaddDialogEntry(scip, root, dialog) );
3822  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3823  }
3824 
3825  /* quit */
3826  if( !SCIPdialogHasEntry(root, "quit") )
3827  {
3828  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3829  NULL,
3830  SCIPdialogExecQuit, NULL, NULL,
3831  "quit", "leave SCIP", FALSE, NULL) );
3832  SCIP_CALL( SCIPaddDialogEntry(scip, root, dialog) );
3833  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3834  }
3835 
3836  /* read */
3837  if( !SCIPdialogHasEntry(root, "read") )
3838  {
3839  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3840  NULL,
3841  SCIPdialogExecRead, NULL, NULL,
3842  "read", "read a problem", FALSE, NULL) );
3843  SCIP_CALL( SCIPaddDialogEntry(scip, root, dialog) );
3844  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3845  }
3846 
3847  /* set */
3849 
3850  /* fix */
3852 
3853  /* write */
3854  if( !SCIPdialogHasEntry(root, "write") )
3855  {
3856  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
3857  NULL,
3858  SCIPdialogExecMenu, NULL, NULL,
3859  "write", "write information to file", TRUE, NULL) );
3860  SCIP_CALL( SCIPaddDialogEntry(scip, root, submenu) );
3861  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
3862  }
3863  if( SCIPdialogFindEntry(root, "write", &submenu) != 1 )
3864  {
3865  SCIPerrorMessage("write sub menu not found\n");
3866  return SCIP_PLUGINNOTFOUND;
3867  }
3868 
3869  /* write LP */
3870  if( !SCIPdialogHasEntry(submenu, "lp") )
3871  {
3872  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3873  NULL,
3874  SCIPdialogExecWriteLp, NULL, NULL,
3875  "lp", "write current node LP relaxation in LP format to file", FALSE, NULL) );
3876  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3877  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3878  }
3879 
3880  /* write MIP */
3881  if( !SCIPdialogHasEntry(submenu, "mip") )
3882  {
3883  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3884  NULL,
3885  SCIPdialogExecWriteMip, NULL, NULL,
3886  "mip", "write current node MIP relaxation in LP format to file", FALSE, NULL) );
3887  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3888  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3889  }
3890 
3891  /* write NLP */
3892  if( !SCIPdialogHasEntry(submenu, "nlp") )
3893  {
3894  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3895  NULL,
3896  SCIPdialogExecWriteNlp, NULL, NULL,
3897  "nlp", "write current node NLP relaxation to file", FALSE, NULL) );
3898  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3899  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3900  }
3901 
3902  /* write problem */
3903  if( !SCIPdialogHasEntry(submenu, "problem") )
3904  {
3905  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3906  NULL,
3907  SCIPdialogExecWriteProblem, NULL, NULL,
3908  "problem",
3909  "write original problem to file (format is given by file extension, e.g., orig.{lp,rlp,cip,mps})",
3910  FALSE, NULL) );
3911  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3912  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3913  }
3914 
3915  /* write generic problem */
3916  if( !SCIPdialogHasEntry(submenu, "genproblem") )
3917  {
3918  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3919  NULL,
3920  SCIPdialogExecWriteGenProblem, NULL, NULL,
3921  "genproblem",
3922  "write original problem with generic names to file (format is given by file extension, e.g., orig.{lp,rlp,cip,mps})",
3923  FALSE, NULL) );
3924  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3925  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3926  }
3927 
3928  /* write solution */
3929  if( !SCIPdialogHasEntry(submenu, "solution") )
3930  {
3931  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3932  NULL,
3933  SCIPdialogExecWriteSolution, NULL, NULL,
3934  "solution", "write best primal solution to file", FALSE, NULL) );
3935  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3936  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3937  }
3938 
3939  /* write finite solution */
3940  if( !SCIPdialogHasEntry(submenu, "finitesolution") )
3941  {
3942  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3943  NULL,
3944  SCIPdialogExecWriteFiniteSolution, NULL, NULL,
3945  "finitesolution", "write best primal solution to file (try to make solution values finite, first)", FALSE, NULL) );
3946  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3947  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3948  }
3949 
3950  /* write mip start */
3951  if( !SCIPdialogHasEntry(submenu, "mipstart") )
3952  {
3953  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3954  NULL,
3955  SCIPdialogExecWriteMIPStart, NULL, NULL,
3956  "mipstart", "write mip start to file", FALSE, NULL) );
3957  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3958  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3959  }
3960 
3961  /* write statistics */
3962  if( !SCIPdialogHasEntry(submenu, "statistics") )
3963  {
3964  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3965  NULL,
3966  SCIPdialogExecWriteStatistics, NULL, NULL,
3967  "statistics", "write statistics to file", FALSE, NULL) );
3968  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3969  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3970  }
3971 
3972  /* write transproblem */
3973  if( !SCIPdialogHasEntry(submenu, "transproblem") )
3974  {
3975  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3976  NULL,
3977  SCIPdialogExecWriteTransproblem, NULL, NULL,
3978  "transproblem",
3979  "write current node transformed problem to file (format is given by file extension, e.g., trans.{lp,rlp,cip,mps})",
3980  FALSE, NULL) );
3981  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3982  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3983  }
3984 
3985  /* write transproblem with generic names */
3986  if( !SCIPdialogHasEntry(submenu, "gentransproblem") )
3987  {
3988  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
3989  NULL,
3990  SCIPdialogExecWriteGenTransproblem, NULL, NULL,
3991  "gentransproblem",
3992  "write current node transformed problem with generic names to file (format is given by file extension, e.g., trans.{lp,rlp,cip,mps})",
3993  FALSE, NULL) );
3994  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
3995  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
3996  }
3997 
3998  /* write cliquegraph */
3999  if( !SCIPdialogHasEntry(submenu, "cliquegraph") )
4000  {
4001  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4002  NULL,
4003  SCIPdialogExecCliquegraph, NULL, NULL,
4004  "cliquegraph",
4005  "write graph of cliques and implications of binary variables to GML file (better call after presolving)",
4006  FALSE, NULL) );
4007  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
4008  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4009  }
4010 
4011  /* write command line history */
4012  if( !SCIPdialogHasEntry(submenu, "history") )
4013  {
4014  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4015  NULL,
4016  SCIPdialogExecWriteCommandHistory, NULL, NULL,
4017  "history",
4018  "writes command line history to a file (only works if SCIP was compiled with 'readline')",
4019  FALSE, NULL) );
4020  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
4021  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4022  }
4023 
4024  return SCIP_OKAY;
4025 }
4026 
4027 /** if a '/' occurs in the parameter's name, adds a sub menu dialog to the given menu and inserts the parameter dialog
4028  * recursively in the sub menu; if no '/' occurs in the name, adds a parameter change dialog into the given dialog menu
4029  */
4030 static
4032  SCIP* scip, /**< SCIP data structure */
4033  SCIP_DIALOG* menu, /**< dialog menu to insert the parameter into */
4034  SCIP_PARAM* param, /**< parameter to add a dialog for */
4035  char* paramname /**< parameter name to parse */
4036  )
4037 {
4038  char* slash;
4039  char* dirname;
4040 
4041  assert(paramname != NULL);
4042 
4043  /* check for a '/' */
4044  slash = strchr(paramname, '/');
4045 
4046  if( slash == NULL )
4047  {
4048  /* check, if the corresponding dialog already exists */
4049  if( !SCIPdialogHasEntry(menu, paramname) )
4050  {
4051  SCIP_DIALOG* paramdialog;
4052 
4053  if( SCIPparamIsAdvanced(param) )
4054  {
4055  SCIP_DIALOG* advmenu;
4056 
4057  if( !SCIPdialogHasEntry(menu, "advanced") )
4058  {
4059  /* if not yet existing, create an advanced sub menu */
4060  char desc[SCIP_MAXSTRLEN];
4061 
4062  (void) SCIPsnprintf(desc, SCIP_MAXSTRLEN, "advanced parameters");
4063  SCIP_CALL( SCIPincludeDialog(scip, &advmenu,
4064  NULL,
4065  SCIPdialogExecMenu, NULL, NULL, "advanced", desc, TRUE, NULL) );
4066  SCIP_CALL( SCIPaddDialogEntry(scip, menu, advmenu) );
4067  SCIP_CALL( SCIPreleaseDialog(scip, &advmenu) );
4068  }
4069 
4070  /* find the corresponding sub menu */
4071  (void)SCIPdialogFindEntry(menu, "advanced", &advmenu);
4072  if( advmenu == NULL )
4073  {
4074  SCIPerrorMessage("dialog sub menu not found\n");
4075  return SCIP_PLUGINNOTFOUND;
4076  }
4077 
4078  if( !SCIPdialogHasEntry(advmenu, paramname) )
4079  {
4080  /* create a parameter change dialog */
4081  SCIP_CALL( SCIPincludeDialog(scip, &paramdialog,
4082  NULL,
4083  SCIPdialogExecSetParam, SCIPdialogDescSetParam, NULL,
4084  paramname, SCIPparamGetDesc(param), FALSE, (SCIP_DIALOGDATA*)param) );
4085  SCIP_CALL( SCIPaddDialogEntry(scip, advmenu, paramdialog) );
4086  SCIP_CALL( SCIPreleaseDialog(scip, &paramdialog) );
4087  }
4088  }
4089  else
4090  {
4091  /* create a parameter change dialog */
4092  SCIP_CALL( SCIPincludeDialog(scip, &paramdialog,
4093  NULL,
4094  SCIPdialogExecSetParam, SCIPdialogDescSetParam, NULL,
4095  paramname, SCIPparamGetDesc(param), FALSE, (SCIP_DIALOGDATA*)param) );
4096  SCIP_CALL( SCIPaddDialogEntry(scip, menu, paramdialog) );
4097  SCIP_CALL( SCIPreleaseDialog(scip, &paramdialog) );
4098  }
4099  }
4100  }
4101  else
4102  {
4103  SCIP_DIALOG* submenu;
4104 
4105  /* split the parameter name into dirname and parameter name */
4106  dirname = paramname;
4107  paramname = slash+1;
4108  *slash = '\0';
4109 
4110  /* if not yet existing, create a corresponding sub menu */
4111  if( !SCIPdialogHasEntry(menu, dirname) )
4112  {
4113  char desc[SCIP_MAXSTRLEN];
4114 
4115  (void) SCIPsnprintf(desc, SCIP_MAXSTRLEN, "parameters for <%s>", dirname);
4116  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
4117  NULL,
4118  SCIPdialogExecMenu, NULL, NULL, dirname, desc, TRUE, NULL) );
4119  SCIP_CALL( SCIPaddDialogEntry(scip, menu, submenu) );
4120  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
4121  }
4122 
4123  /* find the corresponding sub menu */
4124  (void)SCIPdialogFindEntry(menu, dirname, &submenu);
4125  if( submenu == NULL )
4126  {
4127  SCIPerrorMessage("dialog sub menu not found\n");
4128  return SCIP_PLUGINNOTFOUND;
4129  }
4130 
4131  /* recursively call add parameter method */
4132  SCIP_CALL( addSetParamDialog(scip, submenu, param, paramname) );
4133  }
4134 
4135  return SCIP_OKAY;
4136 }
4137 
4138 /** if a '/' occurs in the parameter's name, adds a sub menu dialog to the given menu and inserts the parameter dialog
4139  * recursively in the sub menu; if no '/' occurs in the name, adds a fix parameter dialog into the given dialog menu
4140  */
4141 static
4143  SCIP* scip, /**< SCIP data structure */
4144  SCIP_DIALOG* menu, /**< dialog menu to insert the parameter into */
4145  SCIP_PARAM* param, /**< parameter to add a dialog for */
4146  char* paramname /**< parameter name to parse */
4147  )
4148 {
4149  char* slash;
4150  char* dirname;
4151 
4152  assert(paramname != NULL);
4153 
4154  /* check for a '/' */
4155  slash = strchr(paramname, '/');
4156 
4157  if( slash == NULL )
4158  {
4159  /* check, if the corresponding dialog already exists */
4160  if( !SCIPdialogHasEntry(menu, paramname) )
4161  {
4162  SCIP_DIALOG* paramdialog;
4163 
4164  if( SCIPparamIsAdvanced(param) )
4165  {
4166  SCIP_DIALOG* advmenu;
4167 
4168  if( !SCIPdialogHasEntry(menu, "advanced") )
4169  {
4170  /* if not yet existing, create an advanced sub menu */
4171  char desc[SCIP_MAXSTRLEN];
4172 
4173  (void) SCIPsnprintf(desc, SCIP_MAXSTRLEN, "advanced parameters");
4174  SCIP_CALL( SCIPincludeDialog(scip, &advmenu,
4175  NULL,
4176  SCIPdialogExecMenu, NULL, NULL, "advanced", desc, TRUE, NULL) );
4177  SCIP_CALL( SCIPaddDialogEntry(scip, menu, advmenu) );
4178  SCIP_CALL( SCIPreleaseDialog(scip, &advmenu) );
4179  }
4180 
4181  /* find the corresponding sub menu */
4182  (void)SCIPdialogFindEntry(menu, "advanced", &advmenu);
4183  if( advmenu == NULL )
4184  {
4185  SCIPerrorMessage("dialog sub menu not found\n");
4186  return SCIP_PLUGINNOTFOUND;
4187  }
4188 
4189  if( !SCIPdialogHasEntry(advmenu, paramname) )
4190  {
4191  /* create a fix parameter dialog */
4192  SCIP_CALL( SCIPincludeDialog(scip, &paramdialog,
4193  NULL,
4194  SCIPdialogExecFixParam, SCIPdialogDescFixParam, NULL,
4195  paramname, SCIPparamGetDesc(param), FALSE, (SCIP_DIALOGDATA*)param) );
4196  SCIP_CALL( SCIPaddDialogEntry(scip, advmenu, paramdialog) );
4197  SCIP_CALL( SCIPreleaseDialog(scip, &paramdialog) );
4198  }
4199  }
4200  else
4201  {
4202  /* create a fix parameter dialog */
4203  SCIP_CALL( SCIPincludeDialog(scip, &paramdialog,
4204  NULL,
4205  SCIPdialogExecFixParam, SCIPdialogDescFixParam, NULL,
4206  paramname, SCIPparamGetDesc(param), FALSE, (SCIP_DIALOGDATA*)param) );
4207  SCIP_CALL( SCIPaddDialogEntry(scip, menu, paramdialog) );
4208  SCIP_CALL( SCIPreleaseDialog(scip, &paramdialog) );
4209  }
4210  }
4211  }
4212  else
4213  {
4214  SCIP_DIALOG* submenu;
4215 
4216  /* split the parameter name into dirname and parameter name */
4217  dirname = paramname;
4218  paramname = slash+1;
4219  *slash = '\0';
4220 
4221  /* if not yet existing, create a corresponding sub menu */
4222  if( !SCIPdialogHasEntry(menu, dirname) )
4223  {
4224  char desc[SCIP_MAXSTRLEN];
4225 
4226  (void) SCIPsnprintf(desc, SCIP_MAXSTRLEN, "parameters for <%s>", dirname);
4227  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
4228  NULL,
4229  SCIPdialogExecMenu, NULL, NULL, dirname, desc, TRUE, NULL) );
4230  SCIP_CALL( SCIPaddDialogEntry(scip, menu, submenu) );
4231  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
4232  }
4233 
4234  /* find the corresponding sub menu */
4235  (void)SCIPdialogFindEntry(menu, dirname, &submenu);
4236  if( submenu == NULL )
4237  {
4238  SCIPerrorMessage("dialog sub menu not found\n");
4239  return SCIP_PLUGINNOTFOUND;
4240  }
4241 
4242  /* recursively call add parameter method */
4243  SCIP_CALL( addFixParamDialog(scip, submenu, param, paramname) );
4244  }
4245 
4246  return SCIP_OKAY;
4247 }
4248 
4249 /** create a "emphasis" sub menu */
4250 static
4252  SCIP* scip, /**< SCIP data structure */
4253  SCIP_DIALOG* root, /**< the menu to add the empty sub menu */
4254  SCIP_DIALOG** submenu /**< pointer to store the created emphasis sub menu */
4255  )
4256 {
4257  if( !SCIPdialogHasEntry(root, "emphasis") )
4258  {
4259  SCIP_CALL( SCIPincludeDialog(scip, submenu,
4260  NULL, SCIPdialogExecMenu, NULL, NULL,
4261  "emphasis", "predefined parameter settings", TRUE, NULL) );
4262  SCIP_CALL( SCIPaddDialogEntry(scip, root, *submenu) );
4263  SCIP_CALL( SCIPreleaseDialog(scip, submenu) );
4264  }
4265  else if( SCIPdialogFindEntry(root, "emphasis", submenu) != 1 )
4266  {
4267  SCIPerrorMessage("emphasis sub menu not found\n");
4268  return SCIP_PLUGINNOTFOUND;
4269  }
4270 
4271  assert(*submenu != NULL);
4272 
4273  return SCIP_OKAY;
4274 }
4275 
4276 
4277 /** includes or updates the "set" menu for each available parameter setting */
4279  SCIP* scip /**< SCIP data structure */
4280  )
4281 {
4282  SCIP_DIALOG* root;
4283  SCIP_DIALOG* setmenu;
4284  SCIP_DIALOG* emphasismenu;
4285  SCIP_DIALOG* submenu;
4286  SCIP_DIALOG* dialog;
4287  SCIP_PARAM** params;
4288  char* paramname;
4289  int nparams;
4290  int i;
4291 
4292  SCIP_BRANCHRULE** branchrules;
4293  SCIP_CONFLICTHDLR** conflicthdlrs;
4294  SCIP_CONSHDLR** conshdlrs;
4295  SCIP_DISP** disps;
4296  SCIP_HEUR** heurs;
4297  SCIP_NLPI** nlpis;
4298  SCIP_NODESEL** nodesels;
4299  SCIP_PRESOL** presols;
4300  SCIP_PRICER** pricers;
4301  SCIP_READER** readers;
4302  SCIP_SEPA** sepas;
4303  int nbranchrules;
4304  int nconflicthdlrs;
4305  int nconshdlrs;
4306  int ndisps;
4307  int nheurs;
4308  int nnlpis;
4309  int nnodesels;
4310  int npresols;
4311  int npricers;
4312  int nreaders;
4313  int nsepas;
4314 
4315  /* get root dialog */
4316  root = SCIPgetRootDialog(scip);
4317  if( root == NULL )
4318  {
4319  SCIPerrorMessage("root dialog not found\n");
4320  return SCIP_PLUGINNOTFOUND;
4321  }
4322 
4323  /* find (or create) the "set" menu of the root dialog */
4324  if( !SCIPdialogHasEntry(root, "set") )
4325  {
4326  SCIP_CALL( SCIPincludeDialog(scip, &setmenu,
4327  NULL, SCIPdialogExecMenu, NULL, NULL,
4328  "set", "load/save/change parameters", TRUE, NULL) );
4329  SCIP_CALL( SCIPaddDialogEntry(scip, root, setmenu) );
4330  SCIP_CALL( SCIPreleaseDialog(scip, &setmenu) );
4331  }
4332  if( SCIPdialogFindEntry(root, "set", &setmenu) != 1 )
4333  {
4334  SCIPerrorMessage("set sub menu not found\n");
4335  return SCIP_PLUGINNOTFOUND;
4336  }
4337 
4338  /* set default */
4339  if( !SCIPdialogHasEntry(setmenu, "default") )
4340  {
4341  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4342  NULL,
4343  SCIPdialogExecSetDefault, NULL, NULL,
4344  "default", "reset parameter settings to their default values", FALSE, NULL) );
4345  SCIP_CALL( SCIPaddDialogEntry(scip, setmenu, dialog) );
4346  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4347  }
4348 
4349  /* set load */
4350  if( !SCIPdialogHasEntry(setmenu, "load") )
4351  {
4352  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4353  NULL,
4354  SCIPdialogExecSetLoad, NULL, NULL,
4355  "load", "load parameter settings from a file", FALSE, NULL) );
4356  SCIP_CALL( SCIPaddDialogEntry(scip, setmenu, dialog) );
4357  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4358  }
4359 
4360  /* set save */
4361  if( !SCIPdialogHasEntry(setmenu, "save") )
4362  {
4363  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4364  NULL,
4365  SCIPdialogExecSetSave, NULL, NULL,
4366  "save", "save parameter settings to a file", FALSE, NULL) );
4367  SCIP_CALL( SCIPaddDialogEntry(scip, setmenu, dialog) );
4368  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4369  }
4370 
4371  /* set diffsave */
4372  if( !SCIPdialogHasEntry(setmenu, "diffsave") )
4373  {
4374  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4375  NULL,
4376  SCIPdialogExecSetDiffsave, NULL, NULL,
4377  "diffsave", "save non-default parameter settings to a file", FALSE, NULL) );
4378  SCIP_CALL( SCIPaddDialogEntry(scip, setmenu, dialog) );
4379  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4380  }
4381 
4382  /* set branching */
4383  if( !SCIPdialogHasEntry(setmenu, "branching") )
4384  {
4385  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
4386  NULL,
4387  SCIPdialogExecMenu, NULL, NULL,
4388  "branching", "change parameters for branching rules", TRUE, NULL) );
4389  SCIP_CALL( SCIPaddDialogEntry(scip, setmenu, submenu) );
4390  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
4391  }
4392  if( SCIPdialogFindEntry(setmenu, "branching", &submenu) != 1 )
4393  {
4394  SCIPerrorMessage("branching sub menu not found\n");
4395  return SCIP_PLUGINNOTFOUND;
4396  }
4397 
4398  nbranchrules = SCIPgetNBranchrules(scip);
4399  branchrules = SCIPgetBranchrules(scip);
4400 
4401  for( i = 0; i < nbranchrules; ++i )
4402  {
4403  if( !SCIPdialogHasEntry(submenu, SCIPbranchruleGetName(branchrules[i])) )
4404  {
4405  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4406  NULL,
4407  SCIPdialogExecMenu, NULL, NULL,
4408  SCIPbranchruleGetName(branchrules[i]), SCIPbranchruleGetDesc(branchrules[i]), TRUE, NULL) );
4409  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
4410  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4411  }
4412  }
4413 
4414  /* set branching priority */
4415  if( !SCIPdialogHasEntry(submenu, "priority") )
4416  {
4417  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4418  NULL,
4419  SCIPdialogExecSetBranchingPriority, NULL, NULL,
4420  "priority", "change branching priority of a single variable", FALSE, NULL) );
4421  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
4422  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4423  }
4424 
4425  /* set branching direction */
4426  if( !SCIPdialogHasEntry(submenu, "direction") )
4427  {
4428  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4429  NULL,
4430  SCIPdialogExecSetBranchingDirection, NULL, NULL,
4431  "direction", "change preferred branching direction of a single variable (-1:down, 0:auto, +1:up)",
4432  FALSE, NULL) );
4433  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
4434  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4435  }
4436 
4437  /* set conflict */
4438  if( !SCIPdialogHasEntry(setmenu, "conflict") )
4439  {
4440  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
4441  NULL,
4442  SCIPdialogExecMenu, NULL, NULL,
4443  "conflict", "change parameters for conflict handlers", TRUE, NULL) );
4444  SCIP_CALL( SCIPaddDialogEntry(scip, setmenu, submenu) );
4445  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
4446  }
4447  if( SCIPdialogFindEntry(setmenu, "conflict", &submenu) != 1 )
4448  {
4449  SCIPerrorMessage("conflict sub menu not found\n");
4450  return SCIP_PLUGINNOTFOUND;
4451  }
4452 
4453  nconflicthdlrs = SCIPgetNConflicthdlrs(scip);
4454  conflicthdlrs = SCIPgetConflicthdlrs(scip);
4455 
4456  for( i = 0; i < nconflicthdlrs; ++i )
4457  {
4458  if( !SCIPdialogHasEntry(submenu, SCIPconflicthdlrGetName(conflicthdlrs[i])) )
4459  {
4460  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4461  NULL,
4462  SCIPdialogExecMenu, NULL, NULL,
4463  SCIPconflicthdlrGetName(conflicthdlrs[i]), SCIPconflicthdlrGetDesc(conflicthdlrs[i]), TRUE, NULL) );
4464  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
4465  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4466  }
4467  }
4468 
4469  /* set constraints */
4470  if( !SCIPdialogHasEntry(setmenu, "constraints") )
4471  {
4472  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
4473  NULL,
4474  SCIPdialogExecMenu, NULL, NULL,
4475  "constraints", "change parameters for constraint handlers", TRUE, NULL) );
4476  SCIP_CALL( SCIPaddDialogEntry(scip, setmenu, submenu) );
4477  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
4478  }
4479  if( SCIPdialogFindEntry(setmenu, "constraints", &submenu) != 1 )
4480  {
4481  SCIPerrorMessage("constraints sub menu not found\n");
4482  return SCIP_PLUGINNOTFOUND;
4483  }
4484 
4485  nconshdlrs = SCIPgetNConshdlrs(scip);
4486  conshdlrs = SCIPgetConshdlrs(scip);
4487 
4488  for( i = 0; i < nconshdlrs; ++i )
4489  {
4490  if( !SCIPdialogHasEntry(submenu, SCIPconshdlrGetName(conshdlrs[i])) )
4491  {
4492  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4493  NULL,
4494  SCIPdialogExecMenu, NULL, NULL,
4495  SCIPconshdlrGetName(conshdlrs[i]), SCIPconshdlrGetDesc(conshdlrs[i]), TRUE, NULL) );
4496  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
4497  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4498  }
4499  }
4500 
4501  /* set display */
4502  if( !SCIPdialogHasEntry(setmenu, "display") )
4503  {
4504  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
4505  NULL,
4506  SCIPdialogExecMenu, NULL, NULL,
4507  "display", "change parameters for display columns", TRUE, NULL) );
4508  SCIP_CALL( SCIPaddDialogEntry(scip, setmenu, submenu) );
4509  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
4510  }
4511  if( SCIPdialogFindEntry(setmenu, "display", &submenu) != 1 )
4512  {
4513  SCIPerrorMessage("display sub menu not found\n");
4514  return SCIP_PLUGINNOTFOUND;
4515  }
4516 
4517  ndisps = SCIPgetNDisps(scip);
4518  disps = SCIPgetDisps(scip);
4519 
4520  for( i = 0; i < ndisps; ++i )
4521  {
4522  if( !SCIPdialogHasEntry(submenu, SCIPdispGetName(disps[i])) )
4523  {
4524  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4525  NULL,
4526  SCIPdialogExecMenu, NULL, NULL,
4527  SCIPdispGetName(disps[i]), SCIPdispGetDesc(disps[i]), TRUE, NULL) );
4528  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
4529  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4530  }
4531  }
4532 
4533  /* set heuristics */
4534  if( !SCIPdialogHasEntry(setmenu, "heuristics") )
4535  {
4536  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
4537  NULL,
4538  SCIPdialogExecMenu, NULL, NULL,
4539  "heuristics", "change parameters for primal heuristics", TRUE, NULL) );
4540  SCIP_CALL( SCIPaddDialogEntry(scip, setmenu, submenu) );
4541  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
4542  }
4543  if( SCIPdialogFindEntry(setmenu, "heuristics", &submenu) != 1 )
4544  {
4545  SCIPerrorMessage("heuristics sub menu not found\n");
4546  return SCIP_PLUGINNOTFOUND;
4547  }
4548 
4549  nheurs = SCIPgetNHeurs(scip);
4550  heurs = SCIPgetHeurs(scip);
4551 
4552  for( i = 0; i < nheurs; ++i )
4553  {
4554  if( !SCIPdialogHasEntry(submenu, SCIPheurGetName(heurs[i])) )
4555  {
4556  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4557  NULL,
4558  SCIPdialogExecMenu, NULL, NULL,
4559  SCIPheurGetName(heurs[i]), SCIPheurGetDesc(heurs[i]), TRUE, NULL) );
4560  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
4561  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4562  }
4563  }
4564 
4565  /* create set heuristics emphasis */
4566  SCIP_CALL( createEmphasisSubmenu(scip, submenu, &emphasismenu) );
4567  assert(emphasismenu != NULL);
4568 
4569  /* set heuristics emphasis aggressive */
4570  if( !SCIPdialogHasEntry(emphasismenu, "aggressive") )
4571  {
4572  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4573  NULL, SCIPdialogExecSetHeuristicsAggressive, NULL, NULL,
4574  "aggressive", "sets heuristics <aggressive>", FALSE, NULL) );
4575  SCIP_CALL( SCIPaddDialogEntry(scip, emphasismenu, dialog) );
4576  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4577  }
4578 
4579  /* set heuristics emphasis default */
4580  if( !SCIPdialogHasEntry(emphasismenu, "default") )
4581  {
4582  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4583  NULL, SCIPdialogExecSetHeuristicsDefault, NULL, NULL,
4584  "default", "sets heuristics settings to <default> ", FALSE, NULL) );
4585  SCIP_CALL( SCIPaddDialogEntry(scip, emphasismenu, dialog) );
4586  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4587  }
4588 
4589  /* set heuristics emphasis fast */
4590  if( !SCIPdialogHasEntry(emphasismenu, "fast") )
4591  {
4592  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4593  NULL, SCIPdialogExecSetHeuristicsFast, NULL, NULL,
4594  "fast", "sets heuristics <fast>", FALSE, NULL) );
4595  SCIP_CALL( SCIPaddDialogEntry(scip, emphasismenu, dialog) );
4596  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4597  }
4598 
4599  /* set heuristics emphasis off */
4600  if( !SCIPdialogHasEntry(emphasismenu, "off") )
4601  {
4602  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4603  NULL, SCIPdialogExecSetHeuristicsOff, NULL, NULL,
4604  "off", "turns <off> all heuristics", FALSE, NULL) );
4605  SCIP_CALL( SCIPaddDialogEntry(scip, emphasismenu, dialog) );
4606  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4607  }
4608 
4609  /* set limits */
4610  if( !SCIPdialogHasEntry(setmenu, "limits") )
4611  {
4612  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
4613  NULL,
4614  SCIPdialogExecMenu, NULL, NULL,
4615  "limits", "change parameters for time, memory, objective value, and other limits", TRUE, NULL) );
4616  SCIP_CALL( SCIPaddDialogEntry(scip, setmenu, submenu) );
4617 
4618  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4619  NULL,
4620  SCIPdialogExecSetLimitsObjective, NULL, NULL,
4621  "objective", "set limit on objective function, such that only solutions better than this limit are accepted", FALSE, NULL) );
4622  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
4623  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4624 
4625  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
4626  }
4627 
4628  /* set LP */
4629  if( !SCIPdialogHasEntry(setmenu, "lp") )
4630  {
4631  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
4632  NULL,
4633  SCIPdialogExecMenu, NULL, NULL,
4634  "lp", "change parameters for linear programming relaxations", TRUE, NULL) );
4635  SCIP_CALL( SCIPaddDialogEntry(scip, setmenu, submenu) );
4636  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
4637  }
4638 
4639  /* set NLP */
4640  if( !SCIPdialogHasEntry(setmenu, "nlp") )
4641  {
4642  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
4643  NULL,
4644  SCIPdialogExecMenu, NULL, NULL,
4645  "nlp", "change parameters for nonlinear programming relaxations", TRUE, NULL) );
4646  SCIP_CALL( SCIPaddDialogEntry(scip, setmenu, submenu) );
4647  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
4648  }
4649 
4650  /* set memory */
4651  if( !SCIPdialogHasEntry(setmenu, "memory") )
4652  {
4653  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
4654  NULL,
4655  SCIPdialogExecMenu, NULL, NULL,
4656  "memory", "change parameters for memory management", TRUE, NULL) );
4657  SCIP_CALL( SCIPaddDialogEntry(scip, setmenu, submenu) );
4658  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
4659  }
4660 
4661  /* set misc */
4662  if( !SCIPdialogHasEntry(setmenu, "misc") )
4663  {
4664  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
4665  NULL,
4666  SCIPdialogExecMenu, NULL, NULL,
4667  "misc", "change parameters for miscellaneous stuff", TRUE, NULL) );
4668  SCIP_CALL( SCIPaddDialogEntry(scip, setmenu, submenu) );
4669  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
4670  }
4671 
4672  /* set nlpi */
4673  if( !SCIPdialogHasEntry(setmenu, "nlpi") )
4674  {
4675  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
4676  NULL,
4677  SCIPdialogExecMenu, NULL, NULL,
4678  "nlpi", "change parameters for NLP solver interfaces", TRUE, NULL) );
4679  SCIP_CALL( SCIPaddDialogEntry(scip, setmenu, submenu) );
4680  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
4681  }
4682  if( SCIPdialogFindEntry(setmenu, "nlpi", &submenu) != 1 )
4683  {
4684  SCIPerrorMessage("nlpi sub menu not found\n");
4685  return SCIP_PLUGINNOTFOUND;
4686  }
4687 
4688  nnlpis = SCIPgetNNlpis(scip);
4689  nlpis = SCIPgetNlpis(scip);
4690 
4691  for( i = 0; i < nnlpis; ++i )
4692  {
4693  if( !SCIPdialogHasEntry(submenu, SCIPnlpiGetName(nlpis[i])) )
4694  {
4695  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4696  NULL,
4697  SCIPdialogExecMenu, NULL, NULL,
4698  SCIPnlpiGetName(nlpis[i]), SCIPnlpiGetDesc(nlpis[i]), TRUE, NULL) );
4699  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
4700  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4701  }
4702  }
4703 
4704  /* set nodeselection */
4705  if( !SCIPdialogHasEntry(setmenu, "nodeselection") )
4706  {
4707  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
4708  NULL,
4709  SCIPdialogExecMenu, NULL, NULL,
4710  "nodeselection", "change parameters for node selectors", TRUE, NULL) );
4711  SCIP_CALL( SCIPaddDialogEntry(scip, setmenu, submenu) );
4712  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
4713  }
4714  if( SCIPdialogFindEntry(setmenu, "nodeselection", &submenu) != 1 )
4715  {
4716  SCIPerrorMessage("nodeselection sub menu not found\n");
4717  return SCIP_PLUGINNOTFOUND;
4718  }
4719 
4720  nnodesels = SCIPgetNNodesels(scip);
4721  nodesels = SCIPgetNodesels(scip);
4722 
4723  for( i = 0; i < nnodesels; ++i )
4724  {
4725  if( !SCIPdialogHasEntry(submenu, SCIPnodeselGetName(nodesels[i])) )
4726  {
4727  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4728  NULL,
4729  SCIPdialogExecMenu, NULL, NULL,
4730  SCIPnodeselGetName(nodesels[i]), SCIPnodeselGetDesc(nodesels[i]), TRUE, NULL) );
4731  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
4732  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4733  }
4734  }
4735 
4736  /* set numerics */
4737  if( !SCIPdialogHasEntry(setmenu, "numerics") )
4738  {
4739  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
4740  NULL,
4741  SCIPdialogExecMenu, NULL, NULL,
4742  "numerics", "change parameters for numerical values", TRUE, NULL) );
4743  SCIP_CALL( SCIPaddDialogEntry(scip, setmenu, submenu) );
4744  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
4745  }
4746 
4747  /* set parallel */
4748  if( !SCIPdialogHasEntry(setmenu, "parallel") )
4749  {
4750  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
4751  NULL,
4752  SCIPdialogExecMenu, NULL, NULL,
4753  "parallel", "change parameters for parallel implementation", TRUE, NULL) );
4754  SCIP_CALL( SCIPaddDialogEntry(scip, setmenu, submenu) );
4755  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
4756  }
4757 
4758  /* set presolving */
4759  if( !SCIPdialogHasEntry(setmenu, "presolving") )
4760  {
4761  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
4762  NULL,
4763  SCIPdialogExecMenu, NULL, NULL,
4764  "presolving", "change parameters for presolving", TRUE, NULL) );
4765  SCIP_CALL( SCIPaddDialogEntry(scip, setmenu, submenu) );
4766  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
4767  }
4768  if( SCIPdialogFindEntry(setmenu, "presolving", &submenu) != 1 )
4769  {
4770  SCIPerrorMessage("presolving sub menu not found\n");
4771  return SCIP_PLUGINNOTFOUND;
4772  }
4773 
4774  npresols = SCIPgetNPresols(scip);
4775  presols = SCIPgetPresols(scip);
4776 
4777  for( i = 0; i < npresols; ++i )
4778  {
4779  if( !SCIPdialogHasEntry(submenu, SCIPpresolGetName(presols[i])) )
4780  {
4781  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4782  NULL, SCIPdialogExecMenu, NULL, NULL,
4783  SCIPpresolGetName(presols[i]), SCIPpresolGetDesc(presols[i]), TRUE, NULL) );
4784  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
4785  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4786  }
4787  }
4788 
4789  /* create set presolving emphasis */
4790  SCIP_CALL( createEmphasisSubmenu(scip, submenu, &emphasismenu) );
4791  assert(emphasismenu != NULL);
4792 
4793  /* set presolving emphasis aggressive */
4794  if( !SCIPdialogHasEntry(emphasismenu, "aggressive") )
4795  {
4796  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4797  NULL, SCIPdialogExecSetPresolvingAggressive, NULL, NULL,
4798  "aggressive", "sets presolving <aggressive>", FALSE, NULL) );
4799  SCIP_CALL( SCIPaddDialogEntry(scip, emphasismenu, dialog) );
4800  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4801  }
4802 
4803  /* set presolving emphasis default */
4804  if( !SCIPdialogHasEntry(emphasismenu, "default") )
4805  {
4806  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4807  NULL, SCIPdialogExecSetPresolvingDefault, NULL, NULL,
4808  "default", "sets presolving settings to <default>", FALSE, NULL) );
4809  SCIP_CALL( SCIPaddDialogEntry(scip, emphasismenu, dialog) );
4810  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4811  }
4812 
4813  /* set presolving emphasis fast */
4814  if( !SCIPdialogHasEntry(emphasismenu, "fast") )
4815  {
4816  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4817  NULL, SCIPdialogExecSetPresolvingFast, NULL, NULL,
4818  "fast", "sets presolving <fast>", FALSE, NULL) );
4819  SCIP_CALL( SCIPaddDialogEntry(scip, emphasismenu, dialog) );
4820  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4821  }
4822 
4823  /* set presolving emphasis off */
4824  if( !SCIPdialogHasEntry(emphasismenu, "off") )
4825  {
4826  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4827  NULL, SCIPdialogExecSetPresolvingOff, NULL, NULL,
4828  "off", "turns <off> all presolving", FALSE, NULL) );
4829  SCIP_CALL( SCIPaddDialogEntry(scip, emphasismenu, dialog) );
4830  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4831  }
4832 
4833  /* set pricing */
4834  if( !SCIPdialogHasEntry(setmenu, "pricing") )
4835  {
4836  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
4837  NULL,
4838  SCIPdialogExecMenu, NULL, NULL,
4839  "pricing", "change parameters for pricing variables", TRUE, NULL) );
4840  SCIP_CALL( SCIPaddDialogEntry(scip, setmenu, submenu) );
4841  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
4842  }
4843  if( SCIPdialogFindEntry(setmenu, "pricing", &submenu) != 1 )
4844  {
4845  SCIPerrorMessage("pricing sub menu not found\n");
4846  return SCIP_PLUGINNOTFOUND;
4847  }
4848 
4849  npricers = SCIPgetNPricers(scip);
4850  pricers = SCIPgetPricers(scip);
4851 
4852  for( i = 0; i < npricers; ++i )
4853  {
4854  if( !SCIPdialogHasEntry(submenu, SCIPpricerGetName(pricers[i])) )
4855  {
4856  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4857  NULL,
4858  SCIPdialogExecMenu, NULL, NULL,
4859  SCIPpricerGetName(pricers[i]), SCIPpricerGetDesc(pricers[i]), TRUE, NULL) );
4860  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
4861  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4862  }
4863  }
4864 
4865  /* set propagation */
4866  if( !SCIPdialogHasEntry(setmenu, "propagating") )
4867  {
4868  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
4869  NULL,
4870  SCIPdialogExecMenu, NULL, NULL,
4871  "propagating", "change parameters for constraint propagation", TRUE, NULL) );
4872  SCIP_CALL( SCIPaddDialogEntry(scip, setmenu, submenu) );
4873  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
4874  }
4875 
4876  /* set reading */
4877  if( !SCIPdialogHasEntry(setmenu, "reading") )
4878  {
4879  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
4880  NULL,
4881  SCIPdialogExecMenu, NULL, NULL,
4882  "reading", "change parameters for problem file readers", TRUE, NULL) );
4883  SCIP_CALL( SCIPaddDialogEntry(scip, setmenu, submenu) );
4884  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
4885  }
4886  if( SCIPdialogFindEntry(setmenu, "reading", &submenu) != 1 )
4887  {
4888  SCIPerrorMessage("reading sub menu not found\n");
4889  return SCIP_PLUGINNOTFOUND;
4890  }
4891 
4892  nreaders = SCIPgetNReaders(scip);
4893  readers = SCIPgetReaders(scip);
4894 
4895  for( i = 0; i < nreaders; ++i )
4896  {
4897  if( !SCIPdialogHasEntry(submenu, SCIPreaderGetName(readers[i])) )
4898  {
4899  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4900  NULL,
4901  SCIPdialogExecMenu, NULL, NULL,
4902  SCIPreaderGetName(readers[i]), SCIPreaderGetDesc(readers[i]), TRUE, NULL) );
4903  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
4904  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4905  }
4906  }
4907 
4908  /* set separating */
4909  if( !SCIPdialogHasEntry(setmenu, "separating") )
4910  {
4911  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
4912  NULL, SCIPdialogExecMenu, NULL, NULL,
4913  "separating", "change parameters for cut separators", TRUE, NULL) );
4914  SCIP_CALL( SCIPaddDialogEntry(scip, setmenu, submenu) );
4915  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
4916  }
4917  if( SCIPdialogFindEntry(setmenu, "separating", &submenu) != 1 )
4918  {
4919  SCIPerrorMessage("separating sub menu not found\n");
4920  return SCIP_PLUGINNOTFOUND;
4921  }
4922 
4923  nsepas = SCIPgetNSepas(scip);
4924  sepas = SCIPgetSepas(scip);
4925 
4926  for( i = 0; i < nsepas; ++i )
4927  {
4928  if( !SCIPdialogHasEntry(submenu, SCIPsepaGetName(sepas[i])) )
4929  {
4930  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4931  NULL, SCIPdialogExecMenu, NULL, NULL,
4932  SCIPsepaGetName(sepas[i]), SCIPsepaGetDesc(sepas[i]), TRUE, NULL) );
4933  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
4934  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4935  }
4936  }
4937 
4938  /* create set separating emphasis */
4939  SCIP_CALL( createEmphasisSubmenu(scip, submenu, &emphasismenu) );
4940  assert(emphasismenu != NULL);
4941 
4942  /* set separating emphasis aggressive */
4943  if( !SCIPdialogHasEntry(emphasismenu, "aggressive") )
4944  {
4945  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4946  NULL, SCIPdialogExecSetSeparatingAggressive, NULL, NULL,
4947  "aggressive", "sets separating <aggressive>", FALSE, NULL) );
4948  SCIP_CALL( SCIPaddDialogEntry(scip, emphasismenu, dialog) );
4949  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4950  }
4951 
4952  /* set separating emphasis default */
4953  if( !SCIPdialogHasEntry(emphasismenu, "default") )
4954  {
4955  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4956  NULL, SCIPdialogExecSetSeparatingDefault, NULL, NULL,
4957  "default", "sets separating settings to <default>", FALSE, NULL) );
4958  SCIP_CALL( SCIPaddDialogEntry(scip, emphasismenu, dialog) );
4959  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4960  }
4961 
4962  /* set separating emphasis fast */
4963  if( !SCIPdialogHasEntry(emphasismenu, "fast") )
4964  {
4965  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4966  NULL, SCIPdialogExecSetSeparatingFast, NULL, NULL,
4967  "fast", "sets separating <fast>", FALSE, NULL) );
4968  SCIP_CALL( SCIPaddDialogEntry(scip, emphasismenu, dialog) );
4969  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4970  }
4971 
4972  /* set separating emphasis off */
4973  if( !SCIPdialogHasEntry(emphasismenu, "off") )
4974  {
4975  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
4976  NULL, SCIPdialogExecSetSeparatingOff, NULL, NULL,
4977  "off", "turns <off> all separation", FALSE, NULL) );
4978  SCIP_CALL( SCIPaddDialogEntry(scip, emphasismenu, dialog) );
4979  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
4980  }
4981 
4982  /* set timing */
4983  if( !SCIPdialogHasEntry(setmenu, "timing") )
4984  {
4985  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
4986  NULL, SCIPdialogExecMenu, NULL, NULL,
4987  "timing", "change parameters for timing issues", TRUE, NULL) );
4988  SCIP_CALL( SCIPaddDialogEntry(scip, setmenu, submenu) );
4989  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
4990  }
4991 
4992  /* set visualization */
4993  if( !SCIPdialogHasEntry(setmenu, "visual") )
4994  {
4995  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
4996  NULL, SCIPdialogExecMenu, NULL, NULL,
4997  "visual", "change parameters for visualization output", TRUE, NULL) );
4998  SCIP_CALL( SCIPaddDialogEntry(scip, setmenu, submenu) );
4999  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
5000  }
5001 
5002  /* set emphasis */
5003  SCIP_CALL( createEmphasisSubmenu(scip, setmenu, &submenu) );
5004 
5005  /* get SCIP's parameters */
5006  params = SCIPgetParams(scip);
5007  nparams = SCIPgetNParams(scip);
5008 
5009  /* insert each parameter into the set menu */
5010  for( i = 0; i < nparams; ++i )
5011  {
5012  const char* pname;
5013 
5014  pname = SCIPparamGetName(params[i]);
5015  SCIP_ALLOC( BMSduplicateMemoryArray(&paramname, pname, strlen(pname)+1) );
5016  SCIP_CALL( addSetParamDialog(scip, setmenu, params[i], paramname) );
5017  BMSfreeMemoryArray(&paramname);
5018  }
5019 
5020  /* set emphasis feasibility */
5021  /* add "counter" dialog to "set/emphasis" sub menu */
5022  if( !SCIPdialogHasEntry(submenu, "counter") )
5023  {
5024  SCIP_CALL( SCIPincludeDialog(scip, &dialog, NULL, SCIPdialogExecSetEmphasisCounter, NULL, NULL,
5025  "counter", "predefined parameter settings for a \"feasible\" and \"fast\" counting process", FALSE, NULL) );
5026  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
5027  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
5028  }
5029 
5030  /* add "cpsolver" dialog to "set/emphasis" sub menu */
5031  if( !SCIPdialogHasEntry(submenu, "cpsolver") )
5032  {
5033  SCIP_CALL( SCIPincludeDialog(scip, &dialog, NULL, SCIPdialogExecSetEmphasisCpsolver, NULL, NULL,
5034  "cpsolver", "predefined parameter settings for CP like search", FALSE, NULL) );
5035  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
5036  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
5037  }
5038 
5039  /* add "easycip" dialog to "set/emphasis" sub menu */
5040  if( !SCIPdialogHasEntry(submenu, "easycip") )
5041  {
5042  SCIP_CALL( SCIPincludeDialog(scip, &dialog, NULL, SCIPdialogExecSetEmphasisEasycip, NULL, NULL,
5043  "easycip", "predefined parameter settings for easy problems", FALSE, NULL) );
5044  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
5045  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
5046  }
5047 
5048  /* add "feasibility" dialog to "set/emphasis" sub menu */
5049  if( !SCIPdialogHasEntry(submenu, "feasibility") )
5050  {
5051  SCIP_CALL( SCIPincludeDialog(scip, &dialog, NULL, SCIPdialogExecSetEmphasisFeasibility, NULL, NULL,
5052  "feasibility", "predefined parameter settings for feasibility problems", FALSE, NULL) );
5053  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
5054  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
5055  }
5056 
5057  /* add "hardlp" dialog to "set/emphasis" sub menu */
5058  if( !SCIPdialogHasEntry(submenu, "hardlp") )
5059  {
5060  SCIP_CALL( SCIPincludeDialog(scip, &dialog, NULL, SCIPdialogExecSetEmphasisHardlp, NULL, NULL,
5061  "hardlp", "predefined parameter settings for problems with a hard LP", FALSE, NULL) );
5062  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
5063  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
5064  }
5065 
5066  /* add "optimality" dialog to "set/emphasis" sub menu */
5067  if( !SCIPdialogHasEntry(submenu, "optimality") )
5068  {
5069  SCIP_CALL( SCIPincludeDialog(scip, &dialog, NULL, SCIPdialogExecSetEmphasisOptimality, NULL, NULL,
5070  "optimality", "predefined parameter settings for proving optimality fast", FALSE, NULL) );
5071  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
5072  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
5073  }
5074 
5075  return SCIP_OKAY;
5076 }
5077 
5078 /** includes or updates the "fix" menu for each available parameter setting */
5080  SCIP* scip /**< SCIP data structure */
5081  )
5082 {
5083  SCIP_DIALOG* root;
5084  SCIP_DIALOG* fixmenu;
5085  SCIP_DIALOG* submenu;
5086  SCIP_DIALOG* dialog;
5087  SCIP_PARAM** params;
5088  char* paramname;
5089  int nparams;
5090  int i;
5091 
5092  SCIP_BRANCHRULE** branchrules;
5093  SCIP_CONFLICTHDLR** conflicthdlrs;
5094  SCIP_CONSHDLR** conshdlrs;
5095  SCIP_DISP** disps;
5096  SCIP_HEUR** heurs;
5097  SCIP_NLPI** nlpis;
5098  SCIP_NODESEL** nodesels;
5099  SCIP_PRESOL** presols;
5100  SCIP_PRICER** pricers;
5101  SCIP_READER** readers;
5102  SCIP_SEPA** sepas;
5103  int nbranchrules;
5104  int nconflicthdlrs;
5105  int nconshdlrs;
5106  int ndisps;
5107  int nheurs;
5108  int nnlpis;
5109  int nnodesels;
5110  int npresols;
5111  int npricers;
5112  int nreaders;
5113  int nsepas;
5114 
5115  /* get root dialog */
5116  root = SCIPgetRootDialog(scip);
5117  if( root == NULL )
5118  {
5119  SCIPerrorMessage("root dialog not found\n");
5120  return SCIP_PLUGINNOTFOUND;
5121  }
5122 
5123  /* find (or create) the "fix" menu of the root dialog */
5124  if( !SCIPdialogHasEntry(root, "fix") )
5125  {
5126  SCIP_CALL( SCIPincludeDialog(scip, &fixmenu,
5127  NULL, SCIPdialogExecMenu, NULL, NULL,
5128  "fix", "fix/unfix parameters", TRUE, NULL) );
5129  SCIP_CALL( SCIPaddDialogEntry(scip, root, fixmenu) );
5130  SCIP_CALL( SCIPreleaseDialog(scip, &fixmenu) );
5131  }
5132  if( SCIPdialogFindEntry(root, "fix", &fixmenu) != 1 )
5133  {
5134  SCIPerrorMessage("fix sub menu not found\n");
5135  return SCIP_PLUGINNOTFOUND;
5136  }
5137 
5138  /* fix branching */
5139  if( !SCIPdialogHasEntry(fixmenu, "branching") )
5140  {
5141  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
5142  NULL,
5143  SCIPdialogExecMenu, NULL, NULL,
5144  "branching", "fix parameters for branching rules", TRUE, NULL) );
5145  SCIP_CALL( SCIPaddDialogEntry(scip, fixmenu, submenu) );
5146  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
5147  }
5148  if( SCIPdialogFindEntry(fixmenu, "branching", &submenu) != 1 )
5149  {
5150  SCIPerrorMessage("branching sub menu not found\n");
5151  return SCIP_PLUGINNOTFOUND;
5152  }
5153 
5154  nbranchrules = SCIPgetNBranchrules(scip);
5155  branchrules = SCIPgetBranchrules(scip);
5156 
5157  for( i = 0; i < nbranchrules; ++i )
5158  {
5159  if( !SCIPdialogHasEntry(submenu, SCIPbranchruleGetName(branchrules[i])) )
5160  {
5161  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
5162  NULL,
5163  SCIPdialogExecMenu, NULL, NULL,
5164  SCIPbranchruleGetName(branchrules[i]), SCIPbranchruleGetDesc(branchrules[i]), TRUE, NULL) );
5165  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
5166  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
5167  }
5168  }
5169 
5170  /* fix conflict */
5171  if( !SCIPdialogHasEntry(fixmenu, "conflict") )
5172  {
5173  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
5174  NULL,
5175  SCIPdialogExecMenu, NULL, NULL,
5176  "conflict", "fix parameters for conflict handlers", TRUE, NULL) );
5177  SCIP_CALL( SCIPaddDialogEntry(scip, fixmenu, submenu) );
5178  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
5179  }
5180  if( SCIPdialogFindEntry(fixmenu, "conflict", &submenu) != 1 )
5181  {
5182  SCIPerrorMessage("conflict sub menu not found\n");
5183  return SCIP_PLUGINNOTFOUND;
5184  }
5185 
5186  nconflicthdlrs = SCIPgetNConflicthdlrs(scip);
5187  conflicthdlrs = SCIPgetConflicthdlrs(scip);
5188 
5189  for( i = 0; i < nconflicthdlrs; ++i )
5190  {
5191  if( !SCIPdialogHasEntry(submenu, SCIPconflicthdlrGetName(conflicthdlrs[i])) )
5192  {
5193  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
5194  NULL,
5195  SCIPdialogExecMenu, NULL, NULL,
5196  SCIPconflicthdlrGetName(conflicthdlrs[i]), SCIPconflicthdlrGetDesc(conflicthdlrs[i]), TRUE, NULL) );
5197  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
5198  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
5199  }
5200  }
5201 
5202  /* fix constraints */
5203  if( !SCIPdialogHasEntry(fixmenu, "constraints") )
5204  {
5205  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
5206  NULL,
5207  SCIPdialogExecMenu, NULL, NULL,
5208  "constraints", "fix parameters for constraint handlers", TRUE, NULL) );
5209  SCIP_CALL( SCIPaddDialogEntry(scip, fixmenu, submenu) );
5210  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
5211  }
5212  if( SCIPdialogFindEntry(fixmenu, "constraints", &submenu) != 1 )
5213  {
5214  SCIPerrorMessage("constraints sub menu not found\n");
5215  return SCIP_PLUGINNOTFOUND;
5216  }
5217 
5218  nconshdlrs = SCIPgetNConshdlrs(scip);
5219  conshdlrs = SCIPgetConshdlrs(scip);
5220 
5221  for( i = 0; i < nconshdlrs; ++i )
5222  {
5223  if( !SCIPdialogHasEntry(submenu, SCIPconshdlrGetName(conshdlrs[i])) )
5224  {
5225  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
5226  NULL,
5227  SCIPdialogExecMenu, NULL, NULL,
5228  SCIPconshdlrGetName(conshdlrs[i]), SCIPconshdlrGetDesc(conshdlrs[i]), TRUE, NULL) );
5229  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
5230  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
5231  }
5232  }
5233 
5234  /* fix display */
5235  if( !SCIPdialogHasEntry(fixmenu, "display") )
5236  {
5237  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
5238  NULL,
5239  SCIPdialogExecMenu, NULL, NULL,
5240  "display", "fix parameters for display columns", TRUE, NULL) );
5241  SCIP_CALL( SCIPaddDialogEntry(scip, fixmenu, submenu) );
5242  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
5243  }
5244  if( SCIPdialogFindEntry(fixmenu, "display", &submenu) != 1 )
5245  {
5246  SCIPerrorMessage("display sub menu not found\n");
5247  return SCIP_PLUGINNOTFOUND;
5248  }
5249 
5250  ndisps = SCIPgetNDisps(scip);
5251  disps = SCIPgetDisps(scip);
5252 
5253  for( i = 0; i < ndisps; ++i )
5254  {
5255  if( !SCIPdialogHasEntry(submenu, SCIPdispGetName(disps[i])) )
5256  {
5257  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
5258  NULL,
5259  SCIPdialogExecMenu, NULL, NULL,
5260  SCIPdispGetName(disps[i]), SCIPdispGetDesc(disps[i]), TRUE, NULL) );
5261  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
5262  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
5263  }
5264  }
5265 
5266  /* fix heuristics */
5267  if( !SCIPdialogHasEntry(fixmenu, "heuristics") )
5268  {
5269  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
5270  NULL,
5271  SCIPdialogExecMenu, NULL, NULL,
5272  "heuristics", "fix parameters for primal heuristics", TRUE, NULL) );
5273  SCIP_CALL( SCIPaddDialogEntry(scip, fixmenu, submenu) );
5274  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
5275  }
5276  if( SCIPdialogFindEntry(fixmenu, "heuristics", &submenu) != 1 )
5277  {
5278  SCIPerrorMessage("heuristics sub menu not found\n");
5279  return SCIP_PLUGINNOTFOUND;
5280  }
5281 
5282  nheurs = SCIPgetNHeurs(scip);
5283  heurs = SCIPgetHeurs(scip);
5284 
5285  for( i = 0; i < nheurs; ++i )
5286  {
5287  if( !SCIPdialogHasEntry(submenu, SCIPheurGetName(heurs[i])) )
5288  {
5289  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
5290  NULL,
5291  SCIPdialogExecMenu, NULL, NULL,
5292  SCIPheurGetName(heurs[i]), SCIPheurGetDesc(heurs[i]), TRUE, NULL) );
5293  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
5294  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
5295  }
5296  }
5297 
5298  /* fix limits */
5299  if( !SCIPdialogHasEntry(fixmenu, "limits") )
5300  {
5301  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
5302  NULL,
5303  SCIPdialogExecMenu, NULL, NULL,
5304  "limits", "fix parameters for time, memory, objective value, and other limits", TRUE, NULL) );
5305  SCIP_CALL( SCIPaddDialogEntry(scip, fixmenu, submenu) );
5306 
5307  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
5308  }
5309 
5310  /* fix LP */
5311  if( !SCIPdialogHasEntry(fixmenu, "lp") )
5312  {
5313  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
5314  NULL,
5315  SCIPdialogExecMenu, NULL, NULL,
5316  "lp", "fix parameters for linear programming relaxations", TRUE, NULL) );
5317  SCIP_CALL( SCIPaddDialogEntry(scip, fixmenu, submenu) );
5318  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
5319  }
5320 
5321  /* fix NLP */
5322  if( !SCIPdialogHasEntry(fixmenu, "nlp") )
5323  {
5324  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
5325  NULL,
5326  SCIPdialogExecMenu, NULL, NULL,
5327  "nlp", "fix parameters for nonlinear programming relaxations", TRUE, NULL) );
5328  SCIP_CALL( SCIPaddDialogEntry(scip, fixmenu, submenu) );
5329  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
5330  }
5331 
5332  /* fix memory */
5333  if( !SCIPdialogHasEntry(fixmenu, "memory") )
5334  {
5335  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
5336  NULL,
5337  SCIPdialogExecMenu, NULL, NULL,
5338  "memory", "fix parameters for memory management", TRUE, NULL) );
5339  SCIP_CALL( SCIPaddDialogEntry(scip, fixmenu, submenu) );
5340  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
5341  }
5342 
5343  /* fix misc */
5344  if( !SCIPdialogHasEntry(fixmenu, "misc") )
5345  {
5346  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
5347  NULL,
5348  SCIPdialogExecMenu, NULL, NULL,
5349  "misc", "fix parameters for miscellaneous stuff", TRUE, NULL) );
5350  SCIP_CALL( SCIPaddDialogEntry(scip, fixmenu, submenu) );
5351  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
5352  }
5353 
5354  /* fix nlpi */
5355  if( !SCIPdialogHasEntry(fixmenu, "nlpi") )
5356  {
5357  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
5358  NULL,
5359  SCIPdialogExecMenu, NULL, NULL,
5360  "nlpi", "fix parameters for NLP solver interfaces", TRUE, NULL) );
5361  SCIP_CALL( SCIPaddDialogEntry(scip, fixmenu, submenu) );
5362  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
5363  }
5364  if( SCIPdialogFindEntry(fixmenu, "nlpi", &submenu) != 1 )
5365  {
5366  SCIPerrorMessage("nlpi sub menu not found\n");
5367  return SCIP_PLUGINNOTFOUND;
5368  }
5369 
5370  nnlpis = SCIPgetNNlpis(scip);
5371  nlpis = SCIPgetNlpis(scip);
5372 
5373  for( i = 0; i < nnlpis; ++i )
5374  {
5375  if( !SCIPdialogHasEntry(submenu, SCIPnlpiGetName(nlpis[i])) )
5376  {
5377  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
5378  NULL,
5379  SCIPdialogExecMenu, NULL, NULL,
5380  SCIPnlpiGetName(nlpis[i]), SCIPnlpiGetDesc(nlpis[i]), TRUE, NULL) );
5381  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
5382  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
5383  }
5384  }
5385 
5386  /* fix nodeselection */
5387  if( !SCIPdialogHasEntry(fixmenu, "nodeselection") )
5388  {
5389  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
5390  NULL,
5391  SCIPdialogExecMenu, NULL, NULL,
5392  "nodeselection", "fix parameters for node selectors", TRUE, NULL) );
5393  SCIP_CALL( SCIPaddDialogEntry(scip, fixmenu, submenu) );
5394  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
5395  }
5396  if( SCIPdialogFindEntry(fixmenu, "nodeselection", &submenu) != 1 )
5397  {
5398  SCIPerrorMessage("nodeselection sub menu not found\n");
5399  return SCIP_PLUGINNOTFOUND;
5400  }
5401 
5402  nnodesels = SCIPgetNNodesels(scip);
5403  nodesels = SCIPgetNodesels(scip);
5404 
5405  for( i = 0; i < nnodesels; ++i )
5406  {
5407  if( !SCIPdialogHasEntry(submenu, SCIPnodeselGetName(nodesels[i])) )
5408  {
5409  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
5410  NULL,
5411  SCIPdialogExecMenu, NULL, NULL,
5412  SCIPnodeselGetName(nodesels[i]), SCIPnodeselGetDesc(nodesels[i]), TRUE, NULL) );
5413  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
5414  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
5415  }
5416  }
5417 
5418  /* fix numerics */
5419  if( !SCIPdialogHasEntry(fixmenu, "numerics") )
5420  {
5421  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
5422  NULL,
5423  SCIPdialogExecMenu, NULL, NULL,
5424  "numerics", "fix parameters for numerical values", TRUE, NULL) );
5425  SCIP_CALL( SCIPaddDialogEntry(scip, fixmenu, submenu) );
5426  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
5427  }
5428 
5429  /* fix presolving */
5430  if( !SCIPdialogHasEntry(fixmenu, "presolving") )
5431  {
5432  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
5433  NULL,
5434  SCIPdialogExecMenu, NULL, NULL,
5435  "presolving", "fix parameters for presolving", TRUE, NULL) );
5436  SCIP_CALL( SCIPaddDialogEntry(scip, fixmenu, submenu) );
5437  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
5438  }
5439  if( SCIPdialogFindEntry(fixmenu, "presolving", &submenu) != 1 )
5440  {
5441  SCIPerrorMessage("presolving sub menu not found\n");
5442  return SCIP_PLUGINNOTFOUND;
5443  }
5444 
5445  npresols = SCIPgetNPresols(scip);
5446  presols = SCIPgetPresols(scip);
5447 
5448  for( i = 0; i < npresols; ++i )
5449  {
5450  if( !SCIPdialogHasEntry(submenu, SCIPpresolGetName(presols[i])) )
5451  {
5452  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
5453  NULL, SCIPdialogExecMenu, NULL, NULL,
5454  SCIPpresolGetName(presols[i]), SCIPpresolGetDesc(presols[i]), TRUE, NULL) );
5455  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
5456  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
5457  }
5458  }
5459 
5460  /* fix pricing */
5461  if( !SCIPdialogHasEntry(fixmenu, "pricing") )
5462  {
5463  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
5464  NULL,
5465  SCIPdialogExecMenu, NULL, NULL,
5466  "pricing", "fix parameters for pricing variables", TRUE, NULL) );
5467  SCIP_CALL( SCIPaddDialogEntry(scip, fixmenu, submenu) );
5468  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
5469  }
5470  if( SCIPdialogFindEntry(fixmenu, "pricing", &submenu) != 1 )
5471  {
5472  SCIPerrorMessage("pricing sub menu not found\n");
5473  return SCIP_PLUGINNOTFOUND;
5474  }
5475 
5476  npricers = SCIPgetNPricers(scip);
5477  pricers = SCIPgetPricers(scip);
5478 
5479  for( i = 0; i < npricers; ++i )
5480  {
5481  if( !SCIPdialogHasEntry(submenu, SCIPpricerGetName(pricers[i])) )
5482  {
5483  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
5484  NULL,
5485  SCIPdialogExecMenu, NULL, NULL,
5486  SCIPpricerGetName(pricers[i]), SCIPpricerGetDesc(pricers[i]), TRUE, NULL) );
5487  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
5488  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
5489  }
5490  }
5491 
5492  /* fix propagation */
5493  if( !SCIPdialogHasEntry(fixmenu, "propagating") )
5494  {
5495  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
5496  NULL,
5497  SCIPdialogExecMenu, NULL, NULL,
5498  "propagating", "fix parameters for constraint propagation", TRUE, NULL) );
5499  SCIP_CALL( SCIPaddDialogEntry(scip, fixmenu, submenu) );
5500  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
5501  }
5502 
5503  /* fix reading */
5504  if( !SCIPdialogHasEntry(fixmenu, "reading") )
5505  {
5506  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
5507  NULL,
5508  SCIPdialogExecMenu, NULL, NULL,
5509  "reading", "fix parameters for problem file readers", TRUE, NULL) );
5510  SCIP_CALL( SCIPaddDialogEntry(scip, fixmenu, submenu) );
5511  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
5512  }
5513  if( SCIPdialogFindEntry(fixmenu, "reading", &submenu) != 1 )
5514  {
5515  SCIPerrorMessage("reading sub menu not found\n");
5516  return SCIP_PLUGINNOTFOUND;
5517  }
5518 
5519  nreaders = SCIPgetNReaders(scip);
5520  readers = SCIPgetReaders(scip);
5521 
5522  for( i = 0; i < nreaders; ++i )
5523  {
5524  if( !SCIPdialogHasEntry(submenu, SCIPreaderGetName(readers[i])) )
5525  {
5526  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
5527  NULL,
5528  SCIPdialogExecMenu, NULL, NULL,
5529  SCIPreaderGetName(readers[i]), SCIPreaderGetDesc(readers[i]), TRUE, NULL) );
5530  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
5531  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
5532  }
5533  }
5534 
5535  /* fix separating */
5536  if( !SCIPdialogHasEntry(fixmenu, "separating") )
5537  {
5538  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
5539  NULL, SCIPdialogExecMenu, NULL, NULL,
5540  "separating", "fix parameters for cut separators", TRUE, NULL) );
5541  SCIP_CALL( SCIPaddDialogEntry(scip, fixmenu, submenu) );
5542  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
5543  }
5544  if( SCIPdialogFindEntry(fixmenu, "separating", &submenu) != 1 )
5545  {
5546  SCIPerrorMessage("separating sub menu not found\n");
5547  return SCIP_PLUGINNOTFOUND;
5548  }
5549 
5550  nsepas = SCIPgetNSepas(scip);
5551  sepas = SCIPgetSepas(scip);
5552 
5553  for( i = 0; i < nsepas; ++i )
5554  {
5555  if( !SCIPdialogHasEntry(submenu, SCIPsepaGetName(sepas[i])) )
5556  {
5557  SCIP_CALL( SCIPincludeDialog(scip, &dialog,
5558  NULL, SCIPdialogExecMenu, NULL, NULL,
5559  SCIPsepaGetName(sepas[i]), SCIPsepaGetDesc(sepas[i]), TRUE, NULL) );
5560  SCIP_CALL( SCIPaddDialogEntry(scip, submenu, dialog) );
5561  SCIP_CALL( SCIPreleaseDialog(scip, &dialog) );
5562  }
5563  }
5564 
5565  /* fix timing */
5566  if( !SCIPdialogHasEntry(fixmenu, "timing") )
5567  {
5568  SCIP_CALL( SCIPincludeDialog(scip, &submenu,
5569  NULL, SCIPdialogExecMenu, NULL, NULL,
5570  "timing", "fix parameters for timing issues", TRUE, NULL) );
5571  SCIP_CALL( SCIPaddDialogEntry(scip, fixmenu, submenu) );
5572  SCIP_CALL( SCIPreleaseDialog(scip, &submenu) );
5573  }
5574 
5575  /* get SCIP's parameters */
5576  params = SCIPgetParams(scip);
5577  nparams = SCIPgetNParams(scip);
5578 
5579  /* insert each parameter into the fix menu */
5580  for( i = 0; i < nparams; ++i )
5581  {
5582  const char* pname;
5583 
5584  pname = SCIPparamGetName(params[i]);
5585  SCIP_ALLOC( BMSduplicateMemoryArray(&paramname, pname, strlen(pname)+1) );
5586  SCIP_CALL( addFixParamDialog(scip, fixmenu, params[i], paramname) );
5587  BMSfreeMemoryArray(&paramname);
5588  }
5589 
5590  return SCIP_OKAY;
5591 }
SCIP_Bool SCIPsolIsOriginal(SCIP_SOL *sol)
Definition: sol.c:2299
SCIP_RETCODE SCIPprintReoptStatistics(SCIP *scip, FILE *file)
Definition: scip.c:44535
SCIP_RETCODE SCIPprintBestSol(SCIP *scip, FILE *file, SCIP_Bool printzeros)
Definition: scip.c:38997
SCIP_DECL_DIALOGDESC(SCIPdialogDescSetParam)
const char * SCIPcomprGetDesc(SCIP_COMPR *compr)
Definition: compr.c:419
SCIP_PARAM ** SCIPgetParams(SCIP *scip)
Definition: scip.c:5115
SCIP_RETCODE SCIPchgVarLbGlobal(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
Definition: scip.c:21877
SCIP_RETCODE SCIPsetSeparating(SCIP *scip, SCIP_PARAMSETTING paramsetting, SCIP_Bool quiet)
Definition: scip.c:5095
SCIP_RETCODE SCIPincludeDialogDefault(SCIP *scip)
SCIP_Real SCIPfeastol(SCIP *scip)
Definition: scip.c:45274
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:30835
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:8885
SCIP_PRESOLTIMING SCIPpropGetPresolTiming(SCIP_PROP *prop)
Definition: prop.c:1242
int SCIPgetNRelaxs(SCIP *scip)
Definition: scip.c:7245
SCIP_DISPSTATUS SCIPdispGetStatus(SCIP_DISP *disp)
Definition: disp.c:343
SCIP_Real SCIPbranchruleGetMaxbounddist(SCIP_BRANCHRULE *branchrule)
Definition: branch.c:1962
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:9669
SCIP_BRANCHDIR SCIPvarGetBranchDirection(SCIP_VAR *var)
Definition: var.c:17348
SCIP_RETCODE SCIPwriteLP(SCIP *scip, const char *filename)
Definition: scip.c:29569
SCIP_Bool SCIPreaderCanWrite(SCIP_READER *reader)
Definition: reader.c:555
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
Definition: var.c:17166
SCIP_RETCODE SCIPgetRealParam(SCIP *scip, const char *name, SCIP_Real *value)
Definition: scip.c:4426
#define SCIP_MAXSTRLEN
Definition: def.h:215
int SCIPnlpiGetPriority(SCIP_NLPI *nlpi)
Definition: nlpi.c:760
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:4872
int SCIPpropGetPriority(SCIP_PROP *prop)
Definition: prop.c:907
#define SCIP_CALL_FINALLY(x, y)
Definition: def.h:348
SCIP_RELAX ** SCIPgetRelaxs(SCIP *scip)
Definition: scip.c:7232
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:43309
const char * SCIPreaderGetName(SCIP_READER *reader)
Definition: reader.c:515
const char * SCIPbranchruleGetDesc(SCIP_BRANCHRULE *branchrule)
Definition: branch.c:1906
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:5043
SCIP_RETCODE SCIPdialogDisplayCompletions(SCIP_DIALOG *dialog, SCIP *scip, const char *entryname)
Definition: dialog.c:1133
SCIP_SOL ** SCIPgetSols(SCIP *scip)
Definition: scip.c:38881
#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:4640
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:27230
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:10268
SCIP_RETCODE SCIPsetPresolving(SCIP *scip, SCIP_PARAMSETTING paramsetting, SCIP_Bool quiet)
Definition: scip.c:5069
int SCIPheurGetFreqofs(SCIP_HEUR *heur)
Definition: heur.c:1287
SCIP_HEUR ** SCIPgetHeurs(SCIP *scip)
Definition: scip.c:8153
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:1021
SCIP_RETCODE SCIPchgRealParam(SCIP *scip, SCIP_PARAM *param, SCIP_Real value)
Definition: scip.c:4715
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:21933
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:7011
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip.c:45751
#define SCIPfreeBufferArray(scip, ptr)
Definition: scip.h:21937
SCIP_Bool SCIPisTransformed(SCIP *scip)
Definition: scip.c:1010
SCIP_RETCODE SCIPchgStringParam(SCIP *scip, SCIP_PARAM *param, const char *value)
Definition: scip.c:4831
SCIP_RETCODE SCIPchgVarUbGlobal(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
Definition: scip.c:21964
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:44425
SCIP_DIALOG * SCIPdialogGetParent(SCIP_DIALOG *dialog)
Definition: dialog.c:1218
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:138
int SCIPgetNConshdlrs(SCIP *scip)
Definition: scip.c:6565
SCIP_RETCODE SCIPprintBranchingStatistics(SCIP *scip, FILE *file)
Definition: scip.c:44597
SCIP_Bool SCIPfileExists(const char *filename)
Definition: misc.c:9513
int SCIPgetNFixedVars(SCIP *scip)
Definition: scip.c:11948
int SCIPpricerGetPriority(SCIP_PRICER *pricer)
Definition: pricer.c:570
SCIP_VAR * SCIPfindVar(SCIP *scip, const char *name)
Definition: scip.c:12325
SCIP_VAR ** SCIPgetFixedVars(SCIP *scip)
Definition: scip.c:11905
SCIP_Bool SCIPisCharParamValid(SCIP *scip, SCIP_PARAM *param, const char value)
Definition: scip.c:4814
SCIP_RETCODE SCIPresetParams(SCIP *scip)
Definition: scip.c:4970
int SCIPconshdlrGetCheckPriority(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4989
SCIP_DIALOG * SCIPgetRootDialog(SCIP *scip)
Definition: scip.c:9655
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
Definition: var.c:17176
SCIP_READER ** SCIPgetReaders(SCIP *scip)
Definition: scip.c:5340
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:9557
void SCIPprintMemoryDiagnostic(SCIP *scip)
Definition: scip.c:45643
int SCIPconshdlrGetEagerFreq(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:5019
SCIP_RETCODE SCIPsetObjsense(SCIP *scip, SCIP_OBJSENSE objsense)
Definition: scip.c:10898
SCIP_Bool SCIPisBoolParamValid(SCIP *scip, SCIP_PARAM *param, SCIP_Bool value)
Definition: scip.c:4582
SCIP_CONFLICTHDLR ** SCIPgetConflicthdlrs(SCIP *scip)
Definition: scip.c:6766
#define SCIP_PRESOLTIMING_MEDIUM
Definition: type_timing.h:44
SCIP_RETCODE SCIPsolve(SCIP *scip)
Definition: scip.c:15777
SCIP_PROP ** SCIPgetProps(SCIP *scip)
Definition: scip.c:7801
const char * SCIPheurGetName(SCIP_HEUR *heur)
Definition: heur.c:1181
#define BMSfreeMemoryArray(ptr)
Definition: memory.h:102
#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:12410
SCIP_CONSHDLR ** SCIPgetConshdlrs(SCIP *scip)
Definition: scip.c:6554
SCIP_RETCODE SCIPincludeDialogDefaultFix(SCIP *scip)
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip.c:45764
SCIP_RETCODE SCIPwriteNLP(SCIP *scip, const char *filename)
Definition: scip.c:31537
SCIP_RETCODE SCIPfreeProb(SCIP *scip)
Definition: scip.c:10361
SCIP_RETCODE SCIPreadProb(SCIP *scip, const char *filename, const char *extension)
Definition: scip.c:9998
SCIP_RETCODE SCIPdialogWriteHistory(const char *filename)
Definition: dialog.c:1269
int SCIPgetNConflicthdlrs(SCIP *scip)
Definition: scip.c:6779
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:4773
SCIP_Bool SCIPreaderCanRead(SCIP_READER *reader)
Definition: reader.c:545
#define SCIPfreeBufferArrayNull(scip, ptr)
Definition: scip.h:21938
static SCIP_RETCODE addFixParamDialog(SCIP *scip, SCIP_DIALOG *menu, SCIP_PARAM *param, char *paramname)
SCIP_RETCODE SCIPpresolve(SCIP *scip)
Definition: scip.c:15616
int SCIPgetNDisps(SCIP *scip)
Definition: scip.c:9332
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:40086
SCIP_RETCODE SCIPdialogDisplayMenu(SCIP_DIALOG *dialog, SCIP *scip)
Definition: dialog.c:1065
const char * SCIPheurGetDesc(SCIP_HEUR *heur)
Definition: heur.c:1191
const char * SCIPvarGetName(SCIP_VAR *var)
Definition: var.c:16552
SCIP_RETCODE SCIPgetBoolParam(SCIP *scip, const char *name, SCIP_Bool *value)
Definition: scip.c:4369
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:43265
#define NULL
Definition: lpi_spx1.cpp:137
int SCIPpresolGetPriority(SCIP_PRESOL *presol)
Definition: presol.c:573
int SCIPgetNNlpis(SCIP *scip)
Definition: scip.c:9444
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:306
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:4998
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:4698
const char * SCIPsepaGetDesc(SCIP_SEPA *sepa)
Definition: sepa.c:642
#define BMSduplicateMemoryArray(ptr, source, num)
Definition: memory.h:98
SCIP_PARAMTYPE SCIPparamGetType(SCIP_PARAM *param)
Definition: paramset.c:631
SCIP_COMPR ** SCIPgetComprs(SCIP *scip)
Definition: scip.c:8387
SCIP_RETCODE SCIPfreeTransform(SCIP *scip)
Definition: scip.c:16873
int SCIPdispGetPosition(SCIP_DISP *disp)
Definition: disp.c:333
#define SCIP_Bool
Definition: def.h:61
SCIP_Real SCIPgetObjlimit(SCIP *scip)
Definition: scip.c:11135
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:10315
void SCIPprintSysError(const char *message)
Definition: misc.c:9276
SCIP_RETCODE SCIPprintBestTransSol(SCIP *scip, FILE *file, SCIP_Bool printzeros)
Definition: scip.c:39037
static const char * paramname[]
Definition: lpi_msk.c:4268
SCIP_RETCODE SCIPsetObjlimit(SCIP *scip, SCIP_Real objlimit)
Definition: scip.c:11078
int SCIPgetNPricers(SCIP *scip)
Definition: scip.c:5644
int SCIPvarGetBranchPriority(SCIP_VAR *var)
Definition: var.c:17338
SCIP_Bool SCIPdialogHasEntry(SCIP_DIALOG *dialog, const char *entryname)
Definition: dialog.c:988
SCIP_RETCODE SCIPchgLongintParam(SCIP *scip, SCIP_PARAM *param, SCIP_Longint value)
Definition: scip.c:4657
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:24581
SCIP_RETCODE SCIPfreeSol(SCIP *scip, SCIP_SOL **sol)
Definition: scip.c:37631
SCIP_Real SCIPvarGetObj(SCIP_VAR *var)
Definition: var.c:17014
SCIP_RETCODE SCIPprintDualSol(SCIP *scip, FILE *file, SCIP_Bool printzeros)
Definition: scip.c:38763
int SCIPgetNSols(SCIP *scip)
Definition: scip.c:38832
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:24851
SCIP_RETCODE SCIPchgFeastol(SCIP *scip, SCIP_Real feastol)
Definition: scip.c:45345
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:4756
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
Definition: scip.c:45827
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:717
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:1940
int SCIPparamGetInt(SCIP_PARAM *param)
Definition: paramset.c:716
SCIP_PRESOL ** SCIPgetPresols(SCIP *scip)
Definition: scip.c:6998
int SCIPgetNHeurs(SCIP *scip)
Definition: scip.c:8166
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:29689
SCIP_RETCODE SCIPwriteMIP(SCIP *scip, const char *filename, SCIP_Bool genericnames, SCIP_Bool origobj, SCIP_Bool lazyconss)
Definition: scip.c:29603
SCIP_SOL * SCIPgetBestSol(SCIP *scip)
Definition: scip.c:38931
SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip.c:45790
SCIP_RETCODE SCIPprintMIPStart(SCIP *scip, SCIP_SOL *sol, FILE *file)
Definition: scip.c:38560
int SCIPgetNNodesels(SCIP *scip)
Definition: scip.c:8896
SCIP_Real SCIPtransformObj(SCIP *scip, SCIP_Real obj)
Definition: scip.c:38197
char * SCIPparamGetCharAllowedValues(SCIP_PARAM *param)
Definition: paramset.c:871
int SCIPgetNReaders(SCIP *scip)
Definition: scip.c:5351
int SCIPgetNBranchrules(SCIP *scip)
Definition: scip.c:9210
SCIP_Bool SCIPdialoghdlrIsBufferEmpty(SCIP_DIALOGHDLR *dialoghdlr)
Definition: dialog.c:446
SCIP_BRANCHRULE ** SCIPgetBranchrules(SCIP *scip)
Definition: scip.c:9199
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
Definition: scip.c:27323
SCIP_RETCODE SCIPreadParams(SCIP *scip, const char *filename)
Definition: scip.c:4889
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:16671
default user interface dialog
SCIP_Bool SCIPsepaIsDelayed(SCIP_SEPA *sepa)
Definition: sepa.c:859
#define SCIP_Real
Definition: def.h:135
const char * SCIPbranchruleGetName(SCIP_BRANCHRULE *branchrule)
Definition: branch.c:1896
const char * SCIPpricerGetDesc(SCIP_PRICER *pricer)
Definition: pricer.c:560
SCIP_RETCODE SCIPsolveParallel(SCIP *scip)
Definition: scip.c:16057
SCIP_RETCODE SCIPchgVarBranchDirection(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR branchdirection)
Definition: scip.c:24956
char SCIPheurGetDispchar(SCIP_HEUR *heur)
Definition: heur.c:1201
int SCIPparamGetIntMin(SCIP_PARAM *param)
Definition: paramset.c:730
int SCIPgetNCompr(SCIP *scip)
Definition: scip.c:8400
#define SCIP_Longint
Definition: def.h:120
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:9622
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:13668
SCIP_SEPA ** SCIPgetSepas(SCIP *scip)
Definition: scip.c:7476
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:4930
SCIP_NLPI ** SCIPgetNlpis(SCIP *scip)
Definition: scip.c:9431
SCIP_DISP ** SCIPgetDisps(SCIP *scip)
Definition: scip.c:9321
int SCIPgetNSepas(SCIP *scip)
Definition: scip.c:7489
static SCIP_RETCODE createEmphasisSubmenu(SCIP *scip, SCIP_DIALOG *root, SCIP_DIALOG **submenu)
SCIP_DIALOGDATA * SCIPdialogGetData(SCIP_DIALOG *dialog)
Definition: dialog.c:1248
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:16740
SCIP_RETCODE SCIPchgIntParam(SCIP *scip, SCIP_PARAM *param, int value)
Definition: scip.c:4599
#define SCIP_ALLOC(x)
Definition: def.h:317
SCIP_RETCODE SCIPsetRootDialog(SCIP *scip, SCIP_DIALOG *dialog)
Definition: scip.c:9639
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:5129
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
Definition: scip.c:38007
SCIP_RETCODE SCIPchgBoolParam(SCIP *scip, SCIP_PARAM *param, SCIP_Bool value)
Definition: scip.c:4541
int SCIPgetNProps(SCIP *scip)
Definition: scip.c:7814
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:37393
int SCIPbranchruleGetPriority(SCIP_BRANCHRULE *branchrule)
Definition: branch.c:1916
SCIP_PRICER ** SCIPgetPricers(SCIP *scip)
Definition: scip.c:5631
SCIP_RETCODE SCIPprintSol(SCIP *scip, SCIP_SOL *sol, FILE *file, SCIP_Bool printzeros)
Definition: scip.c:38421