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