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