SCIP Doxygen Documentation
 
Loading...
Searching...
No Matches
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-2024 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_message.h"
49#include "scip/pub_misc.h"
50#include "scip/pub_misc_sort.h"
51#include "scip/pub_nodesel.h"
52#include "scip/pub_paramset.h"
53#include "scip/pub_presol.h"
54#include "scip/pub_pricer.h"
55#include "scip/pub_prop.h"
56#include "scip/pub_reader.h"
57#include "scip/pub_relax.h"
58#include "scip/pub_sepa.h"
59#include "scip/pub_sol.h"
60#include "scip/pub_var.h"
61#include "scip/scip_benders.h"
62#include "scip/scip_branch.h"
63#include "scip/scip_compr.h"
64#include "scip/scip_conflict.h"
65#include "scip/scip_cons.h"
66#include "scip/scip_cutsel.h"
67#include "scip/scip_dialog.h"
68#include "scip/scip_disp.h"
69#include "scip/scip_expr.h"
70#include "scip/scip_general.h"
71#include "scip/scip_heur.h"
72#include "scip/scip_lp.h"
73#include "scip/scip_mem.h"
74#include "scip/scip_message.h"
75#include "scip/scip_nlp.h"
76#include "scip/scip_nlpi.h"
77#include "scip/scip_nodesel.h"
78#include "scip/scip_numerics.h"
79#include "scip/scip_param.h"
80#include "scip/scip_presol.h"
81#include "scip/scip_pricer.h"
82#include "scip/scip_prob.h"
83#include "scip/scip_prop.h"
84#include "scip/scip_reader.h"
85#include "scip/scip_relax.h"
86#include "scip/scip_sepa.h"
87#include "scip/scip_sol.h"
88#include "scip/scip_solve.h"
91#include "scip/scip_var.h"
92#include <stdlib.h>
93#include <string.h>
94
95
96/** executes a menu dialog */
97static
99 SCIP* scip, /**< SCIP data structure */
100 SCIP_DIALOG* dialog, /**< dialog menu */
101 SCIP_DIALOGHDLR* dialoghdlr, /**< dialog handler */
102 SCIP_DIALOG** nextdialog /**< pointer to store next dialog to execute */
103 )
104{
105 char* command;
106 SCIP_Bool again;
107 SCIP_Bool endoffile;
108 int nfound;
109
110 do
111 {
112 again = FALSE;
113
114 /* get the next word of the command string */
116 if( endoffile )
117 {
118 *nextdialog = NULL;
119 return SCIP_OKAY;
120 }
121
122 /* exit to the root dialog, if command is empty */
123 if( command[0] == '\0' )
124 {
125 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
126 return SCIP_OKAY;
127 }
128 else if( strcmp(command, "..") == 0 )
129 {
131 if( *nextdialog == NULL )
132 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
133 return SCIP_OKAY;
134 }
135
136 /* find command in dialog */
138
139 /* check result */
140 if( nfound == 0 )
141 {
142 SCIPdialogMessage(scip, NULL, "command <%s> not available\n", command);
143 SCIPdialoghdlrClearBuffer(dialoghdlr);
145 }
146 else if( nfound >= 2 )
147 {
148 SCIPdialogMessage(scip, NULL, "\npossible completions:\n");
151 SCIPdialoghdlrClearBuffer(dialoghdlr);
152 again = TRUE;
153 }
154 }
155 while( again );
156
157 return SCIP_OKAY;
158}
159
160
161/* parse the given string to detect a Boolean value and returns it */
162static
164 SCIP* scip, /**< SCIP data structure */
165 const char* valuestr, /**< string to parse */
166 SCIP_Bool* error /**< pointer to store the error result */
167 )
168{
169 assert( scip != NULL );
170 assert( valuestr != NULL );
171 assert( error != NULL );
172
173 *error = FALSE;
174
175 switch( valuestr[0] )
176 {
177 case 'f':
178 case 'F':
179 case '0':
180 case 'n':
181 case 'N':
182 return FALSE;
183 case 't':
184 case 'T':
185 case '1':
186 case 'y':
187 case 'Y':
188 return TRUE;
189 default:
190 *error = TRUE;
191 break;
192 }
193
194 return FALSE;
195}
196
197
198/* display the reader information */
199static
201 SCIP* scip, /**< SCIP data structure */
202 SCIP_Bool reader, /**< display reader which can read */
203 SCIP_Bool writer /**< display reader which can write */
204 )
205{
206 SCIP_READER** readers;
207 int nreaders;
208 int r;
209
210 assert( scip != NULL );
211
212 readers = SCIPgetReaders(scip);
213 nreaders = SCIPgetNReaders(scip);
214
215 /* display list of readers */
217 SCIPdialogMessage(scip, NULL, " file reader extension description\n");
218 SCIPdialogMessage(scip, NULL, " ----------- --------- -----------\n");
219 for( r = 0; r < nreaders; ++r )
220 {
221 if( (reader && SCIPreaderCanRead(readers[r])) || (writer && SCIPreaderCanWrite(readers[r])) )
222 {
223 SCIPdialogMessage(scip, NULL, " %-20s ", SCIPreaderGetName(readers[r]));
224 if( strlen(SCIPreaderGetName(readers[r])) > 20 )
225 SCIPdialogMessage(scip, NULL, "\n %20s ", "-->");
227 SCIPdialogMessage(scip, NULL, "%s", SCIPreaderGetDesc(readers[r]));
229 }
230 }
232}
233
234
235/* writes problem to file */
236static
238 SCIP* scip, /**< SCIP data structure */
239 SCIP_DIALOG* dialog, /**< dialog menu */
240 SCIP_DIALOGHDLR* dialoghdlr, /**< dialog handler */
241 SCIP_DIALOG** nextdialog, /**< pointer to store next dialog to execute */
242 SCIP_Bool transformed, /**< output the transformed problem? */
243 SCIP_Bool genericnames /**< using generic variable and constraint names? */
244 )
245{
246 char* filename;
247 SCIP_Bool endoffile;
248 SCIP_RETCODE retcode;
249
250 SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "enter filename: ", &filename, &endoffile) );
251 if( endoffile )
252 {
253 *nextdialog = NULL;
254 return SCIP_OKAY;
255 }
256
257 if( filename[0] != '\0' )
258 {
259 char* tmpfilename;
260 char* extension;
261
262 SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, filename, TRUE) );
263
264 /* copy filename */
265 SCIP_CALL( SCIPduplicateBufferArray(scip, &tmpfilename, filename, (int)strlen(filename)+1) );
266 extension = NULL;
267
268 do
269 {
270 if( transformed )
271 retcode = SCIPwriteTransProblem(scip, tmpfilename, extension, genericnames);
272 else
273 retcode = SCIPwriteOrigProblem(scip, tmpfilename, extension, genericnames);
274
275 if( retcode == SCIP_FILECREATEERROR )
276 {
277 SCIPdialogMessage(scip, NULL, "error creating the file <%s>\n", filename);
278 SCIPdialoghdlrClearBuffer(dialoghdlr);
279 break;
280 }
281 else if(retcode == SCIP_WRITEERROR )
282 {
283 SCIPdialogMessage(scip, NULL, "error writing file <%s>\n", filename);
284 SCIPdialoghdlrClearBuffer(dialoghdlr);
285 break;
286 }
287 else if( retcode == SCIP_PLUGINNOTFOUND )
288 {
289 /* ask user once for a suitable reader */
290 if( extension == NULL )
291 {
292 SCIPdialogMessage(scip, NULL, "no reader for requested output format\n");
293
294 SCIPdialogMessage(scip, NULL, "The following readers are available for writing:\n");
296
298 "select a suitable reader by extension (or return): ", &extension, &endoffile) );
299
300 if( extension[0] == '\0' )
301 break;
302 }
303 else
304 {
305 SCIPdialogMessage(scip, NULL, "no reader for output in <%s> format\n", extension);
306 extension = NULL;
307 }
308 }
309 else
310 {
311 /* check for unexpected errors */
312 SCIP_CALL( retcode );
313
314 /* print result message if writing was successful */
315 if( transformed )
316 SCIPdialogMessage(scip, NULL, "written transformed problem to file <%s>\n", tmpfilename);
317 else
318 SCIPdialogMessage(scip, NULL, "written original problem to file <%s>\n", tmpfilename);
319 break;
320 }
321 }
322 while( extension != NULL );
323
325 }
326
327 return SCIP_OKAY;
328}
329
330/** copy method for dialog plugins (called when SCIP copies plugins) */
331static
333{ /*lint --e{715}*/
334 assert(scip != NULL);
335 assert(dialog != NULL);
336
337 /* call inclusion method of basic dialog entries
338 * "set" and "fix" dialog entries will be added when SCIPstartInteraction() is called on target SCIP
339 */
341
342 return SCIP_OKAY;
343}
344
345/** standard menu dialog execution method, that displays it's help screen if the remaining command line is empty */
347{ /*lint --e{715}*/
348 /* if remaining command string is empty, display menu of available options */
349 if( SCIPdialoghdlrIsBufferEmpty(dialoghdlr) )
350 {
354 }
355
357
358 return SCIP_OKAY;
359}
360
361/** standard menu dialog execution method, that doesn't display it's help screen */
363{ /*lint --e{715}*/
365
366 return SCIP_OKAY;
367}
368
369/** dialog execution method for the change add constraint */
371{ /*lint --e{715}*/
372 assert( scip != NULL );
373
375 SCIPdialogMessage(scip, NULL, "cannot call method after problem was transformed\n");
377 SCIPdialogMessage(scip, NULL, "cannot call method before problem was created\n");
378 else
379 {
380 SCIP_CONS* cons;
381 SCIP_Bool endoffile;
382 char* str;
383
384 cons = NULL;
385
386 SCIP_CALL( SCIPdialoghdlrGetLine(dialoghdlr, dialog, "write constraint in <cip> format\n", &str, &endoffile) );
387
388 if( str[0] != '\0' )
389 {
390 SCIP_Bool success;
391
392 printf("<%s>\n", str);
393
395
396 if( success )
397 {
399
400 /* add and release constraint */
401 SCIP_CALL( SCIPaddCons(scip, cons) );
402 SCIP_CALL( SCIPreleaseCons(scip, &cons) );
403
404 SCIPdialogMessage(scip, NULL, "successfully added constraint\n");
406
408 }
409 else
410 {
411 SCIPdialogMessage(scip, NULL, "constraint was not recognizable\n");
412 }
413 }
414 }
415
416 /* set root dialog as next dialog */
417 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
418
419 return SCIP_OKAY;
420}
421
422/** dialog execution method for the change bounds command */
424{ /*lint --e{715}*/
425 assert( scip != NULL );
426
428 SCIPdialogMessage(scip, NULL, "cannot call method after problem was transformed\n");
430 SCIPdialogMessage(scip, NULL, "cannot call method before problem was created\n");
431 else
432 {
433 SCIP_VAR* var;
434 SCIP_Bool endoffile;
435 char* varname;
436
437 var = NULL;
438
440
441 do
442 {
443 SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "enter variable name: ", &varname, &endoffile) );
444
445 /* if we get a return or we reached the end of the file, then we stop */
446 if( varname[0] == '\0' || endoffile )
447 break;
448
450
451 if( var == NULL )
452 SCIPdialogMessage(scip, NULL, "variable <%s> does not exist\n", varname);
453 }
454 while( var == NULL );
455
456 if( var != NULL )
457 {
458 do
459 {
460 char* boundstr;
462 SCIP_Real bound;
463
465
466 (void)SCIPsnprintf(message, SCIP_MAXSTRLEN, "current lower bound <%.15g> (Return to skip): ", SCIPvarGetLbGlobal(var));
468
469 /* if we reached the end of the file, then we stop */
470 if( endoffile )
471 break;
472
473 if( boundstr[0] != '\0' )
474 {
475 char* endptr;
476
478 if( endptr == boundstr || *endptr != '\0' )
479 {
480 printf("<%s> <%s>\n", endptr, boundstr);
481 SCIPdialogMessage(scip, NULL, "ignore none value string\n");
482 }
484 {
485 SCIPdialogMessage(scip, NULL, "ignore lower bound <%.15g> since it is larger than the current upper bound <%.15g>\n",
487 }
488 else
489 {
491 }
492 }
493
494 (void)SCIPsnprintf(message, SCIP_MAXSTRLEN, "current upper bound <%.15g> (Return to skip): ", SCIPvarGetUbGlobal(var));
496
497 /* if we reached the end of the file, then we stop */
498 if( endoffile )
499 break;
500
501 if( boundstr[0] != '\0' )
502 {
503 char* endptr;
504
506 if( endptr == boundstr || *endptr != '\0' )
507 {
508 SCIPdialogMessage(scip, NULL, "ignore none value string\n");
509 }
511 {
512 SCIPdialogMessage(scip, NULL, "ignore new upper bound <%.15g> since it is smaller than the current lower bound <%.15g>\n",
514 }
515 else
516 {
518 }
519 }
520 }
521 while( FALSE);
522
523 SCIPdialogMessage(scip, NULL, "variable <%s> global bounds [%.15g,%.15g]\n", SCIPvarGetName(var), SCIPvarGetLbGlobal(var), SCIPvarGetUbGlobal(var));
524 }
525 }
526
527 /* set root dialog as next dialog */
528 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
529
530 return SCIP_OKAY;
531}
532
533/** dialog execution method for the freetransproblem command */
535{ /*lint --e{715}*/
537
538 /* free transformed problem */
540
541 /* set root dialog as next dialog */
542 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
543
544 return SCIP_OKAY;
545}
546
547/** dialog execution method for the changing the objective sense */
549{ /*lint --e{715}*/
551
553 SCIPdialogMessage(scip, NULL, "cannot call method after problem was transformed\n");
555 SCIPdialogMessage(scip, NULL, "cannot call method before problem was created\n");
556 else
557 {
558 SCIP_Bool endoffile;
559 char* objsense;
560
561 SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "new objective sense {min,max}: ", &objsense, &endoffile) );
562
563 /* if we get a return or we reached the end of the file, then we stop */
564 if( objsense[0] != '\0' && !endoffile )
565 {
566 if( strncmp(objsense, "max", 3) == 0 )
567 {
569 }
570 else if( strncmp(objsense , "min", 3) == 0 )
571 {
573 }
574 else
575 {
576 SCIPdialogMessage(scip, NULL, "invalid argument <%s>\n", objsense);
577 }
578 }
579 }
580
581 /* set root dialog as next dialog */
582 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
583
584 return SCIP_OKAY;
585}
586
587/** dialog execution method for the checksol command */
589{ /*lint --e{715}*/
590 SCIP_SOL* sol;
591 SCIP_Bool feasible;
592
594
598 else
599 sol = NULL;
600
601 if( sol == NULL )
602 SCIPdialogMessage(scip, NULL, "no feasible solution available\n");
603 else
604 {
605 SCIP_Real oldfeastol;
606 SCIP_Real checkfeastolfac;
607 SCIP_Bool dispallviols;
608
610 SCIP_CALL( SCIPgetRealParam(scip, "numerics/checkfeastolfac", &checkfeastolfac) );
611 SCIP_CALL( SCIPgetBoolParam(scip, "display/allviols", &dispallviols) );
612
613 /* scale feasibility tolerance by set->num_checkfeastolfac */
614 if( !SCIPisEQ(scip, checkfeastolfac, 1.0) )
615 {
617 }
618
619 SCIPinfoMessage(scip, NULL, "check best solution\n");
621
622 /* restore old feasibilty tolerance */
623 if( !SCIPisEQ(scip, checkfeastolfac, 1.0) )
624 {
626 }
627
628 if( feasible )
629 SCIPdialogMessage(scip, NULL, "solution is feasible in original problem\n");
630
631 SCIPdialogMessage(scip, NULL, "%-19s: %11s %11s\n", "Violation", "absolute", "relative");
633 SCIPdialogMessage(scip, NULL, "%-19s: %11.5e %11s\n", " integrality", SCIPsolGetAbsIntegralityViolation(sol), "-");
635 SCIPdialogMessage(scip, NULL, "%-19s: %11.5e %11.5e\n", " constraints", SCIPsolGetAbsConsViolation(sol), SCIPsolGetRelConsViolation(sol));
636 }
638
640
641 return SCIP_OKAY;
642}
643
644/** dialog execution method for the cliquegraph command */
646{ /*lint --e{715}*/
647 SCIP_RETCODE retcode;
648 SCIP_Bool endoffile;
649 char* filename;
650
652
653 *nextdialog = NULL;
654
655 if( !SCIPisTransformed(scip) )
656 {
657 SCIPdialogMessage(scip, NULL, "cannot call method before problem was transformed\n");
658 SCIPdialoghdlrClearBuffer(dialoghdlr);
659 }
660 else
661 {
662 SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "enter filename: ", &filename, &endoffile) );
663 if( endoffile )
664 {
665 *nextdialog = NULL;
666 return SCIP_OKAY;
667 }
668
669 if( filename[0] != '\0' )
670 {
671 SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, filename, TRUE) );
672
673 retcode = SCIPwriteCliqueGraph(scip, filename, FALSE);
674 if( retcode == SCIP_FILECREATEERROR )
675 SCIPdialogMessage(scip, NULL, "error creating file <%s>\n", filename);
676 else
677 {
678 SCIP_CALL( retcode );
679 }
680 }
681 }
682
683 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
684
685 return SCIP_OKAY;
686}
687
688/** dialog execution method for the display benders command */
690{ /*lint --e{715}*/
691 SCIP_BENDERS** benders;
692 int nbenders;
693 int i;
694
696
697 benders = SCIPgetBenders(scip);
698 nbenders = SCIPgetNBenders(scip);
699
700 /* display list of benders */
702 SCIPdialogMessage(scip, NULL, " benders priority description\n");
703 SCIPdialogMessage(scip, NULL, " ---------- -------- -----------\n");
704 for( i = 0; i < nbenders; ++i )
705 {
706 SCIPdialogMessage(scip, NULL, " %-20s ", SCIPbendersGetName(benders[i]));
707 if( strlen(SCIPbendersGetName(benders[i])) > 20 )
708 SCIPdialogMessage(scip, NULL, "\n %20s ", "-->");
712 }
714
715 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
716
717 return SCIP_OKAY;
718}
719
720/** dialog execution method for the display branching command */
722{ /*lint --e{715}*/
723 SCIP_BRANCHRULE** branchrules;
724 SCIP_BRANCHRULE** sorted;
725 int nbranchrules;
726 int i;
727
729
730 branchrules = SCIPgetBranchrules(scip);
731 nbranchrules = SCIPgetNBranchrules(scip);
732
733 /* copy branchrules array into temporary memory for sorting */
734 SCIP_CALL( SCIPduplicateBufferArray(scip, &sorted, branchrules, nbranchrules) );
735
736 /* sort the branching rules */
737 SCIPsortPtr((void**)sorted, SCIPbranchruleComp, nbranchrules);
738
739 /* display sorted list of branching rules */
741 SCIPdialogMessage(scip, NULL, " branching rule priority maxdepth maxbddist description\n");
742 SCIPdialogMessage(scip, NULL, " -------------- -------- -------- --------- -----------\n");
743 for( i = 0; i < nbranchrules; ++i )
744 {
745 SCIPdialogMessage(scip, NULL, " %-20s ", SCIPbranchruleGetName(sorted[i]));
746 if( strlen(SCIPbranchruleGetName(sorted[i])) > 20 )
747 SCIPdialogMessage(scip, NULL, "\n %20s ", "-->");
748 SCIPdialogMessage(scip, NULL, "%8d %8d %8.1f%% ", SCIPbranchruleGetPriority(sorted[i]),
752 }
754
755 /* free temporary memory */
756 SCIPfreeBufferArray(scip, &sorted);
757
758 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
759
760 return SCIP_OKAY;
761}
762
763/** dialog execution method for the display relaxators command */
765{ /*lint --e{715}*/
766 SCIP_RELAX** relaxs;
767 SCIP_RELAX** sorted;
768 int nrelaxs;
769 int i;
770
772
773 relaxs = SCIPgetRelaxs(scip);
774 nrelaxs = SCIPgetNRelaxs(scip);
775
776 /* copy relaxs array into temporary memory for sorting */
777 if( nrelaxs != 0 )
778 {
779 SCIP_CALL( SCIPduplicateBufferArray(scip, &sorted, relaxs, nrelaxs) );
780 }
781 else
782 sorted = NULL;
783
784 /* sort the relaxators */
785 SCIPsortPtr((void**)sorted, SCIPrelaxComp, nrelaxs);
786
787 /* display sorted list of relaxators */
789 SCIPdialogMessage(scip, NULL, " relaxator priority freq description\n");
790 SCIPdialogMessage(scip, NULL, " -------------- -------- ---- -----------\n");
791 for( i = 0; i < nrelaxs; ++i )
792 {
793 assert(sorted != NULL); /* for flexelint */
794 SCIPdialogMessage(scip, NULL, " %-20s ", SCIPrelaxGetName(sorted[i]));
795 if( strlen(SCIPrelaxGetName(sorted[i])) > 20 )
796 SCIPdialogMessage(scip, NULL, "\n %20s ", "-->");
797 SCIPdialogMessage(scip, NULL, "%8d %4d ", SCIPrelaxGetPriority(sorted[i]),
798 SCIPrelaxGetFreq(sorted[i]));
799 SCIPdialogMessage(scip, NULL, "%s", SCIPrelaxGetDesc(sorted[i]));
801 }
803
804 /* free temporary memory */
806
807 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
808
809 return SCIP_OKAY;
810}
811
812/** dialog execution method for the display conflict command */
814{ /*lint --e{715}*/
815 SCIP_CONFLICTHDLR** conflicthdlrs;
816 SCIP_CONFLICTHDLR** sorted;
817 int nconflicthdlrs;
818 int i;
819
821
822 conflicthdlrs = SCIPgetConflicthdlrs(scip);
823 nconflicthdlrs = SCIPgetNConflicthdlrs(scip);
824
825 /* copy conflicthdlrs array into temporary memory for sorting */
826 SCIP_CALL( SCIPduplicateBufferArray(scip, &sorted, conflicthdlrs, nconflicthdlrs) );
827
828 /* sort the conflict handlers */
829 SCIPsortPtr((void**)sorted, SCIPconflicthdlrComp, nconflicthdlrs);
830
831 /* display sorted list of conflict handlers */
833 SCIPdialogMessage(scip, NULL, " conflict handler priority description\n");
834 SCIPdialogMessage(scip, NULL, " ---------------- -------- -----------\n");
835 for( i = 0; i < nconflicthdlrs; ++i )
836 {
837 SCIPdialogMessage(scip, NULL, " %-20s ", SCIPconflicthdlrGetName(sorted[i]));
838 if( strlen(SCIPconflicthdlrGetName(sorted[i])) > 20 )
839 SCIPdialogMessage(scip, NULL, "\n %20s ", "-->");
843 }
845
846 /* free temporary memory */
847 SCIPfreeBufferArray(scip, &sorted);
848
849 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
850
851 return SCIP_OKAY;
852}
853
854/** dialog execution method for the display conshdlrs command */
856{ /*lint --e{715}*/
857 SCIP_CONSHDLR** conshdlrs;
858 int nconshdlrs;
859 int i;
860
862
863 conshdlrs = SCIPgetConshdlrs(scip);
864 nconshdlrs = SCIPgetNConshdlrs(scip);
865
866 /* display list of constraint handlers */
868 SCIPdialogMessage(scip, NULL, " Legend:\n");
869 SCIPdialogMessage(scip, NULL, " prestim (presolve timing): 'f'ast, 'm'edium, 'e'xhaustive\n\n");
870 SCIPdialogMessage(scip, NULL, " constraint handler chckprio enfoprio sepaprio sepaf propf eager prestim description\n");
871 SCIPdialogMessage(scip, NULL, " ------------------ -------- -------- -------- ----- ----- ----- ------- -----------\n");
872 for( i = 0; i < nconshdlrs; ++i )
873 {
874 SCIPdialogMessage(scip, NULL, " %-20s ", SCIPconshdlrGetName(conshdlrs[i]));
875 if( strlen(SCIPconshdlrGetName(conshdlrs[i])) > 20 )
876 SCIPdialogMessage(scip, NULL, "\n %20s ", "-->");
877 SCIPdialogMessage(scip, NULL, "%8d %8d %8d %5d %5d %5d ",
879 SCIPconshdlrGetEnfoPriority(conshdlrs[i]),
880 SCIPconshdlrGetSepaPriority(conshdlrs[i]),
881 SCIPconshdlrGetSepaFreq(conshdlrs[i]),
882 SCIPconshdlrGetPropFreq(conshdlrs[i]),
883 SCIPconshdlrGetEagerFreq(conshdlrs[i]));
887 SCIPdialogMessage(scip, NULL, "%s", SCIPconshdlrGetDesc(conshdlrs[i]));
889 }
891
892 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
893
894 return SCIP_OKAY;
895}
896
897/** dialog execution method for the display displaycols command */
899{ /*lint --e{715}*/
900 SCIP_DISP** disps;
901 int ndisps;
902 int i;
903
905
906 disps = SCIPgetDisps(scip);
907 ndisps = SCIPgetNDisps(scip);
908
909 /* display list of display columns */
911 SCIPdialogMessage(scip, NULL, " display column header position width priority status description\n");
912 SCIPdialogMessage(scip, NULL, " -------------- ------ -------- ----- -------- ------ -----------\n");
913 for( i = 0; i < ndisps; ++i )
914 {
915 SCIPdialogMessage(scip, NULL, " %-20s ", SCIPdispGetName(disps[i]));
916 if( strlen(SCIPdispGetName(disps[i])) > 20 )
917 SCIPdialogMessage(scip, NULL, "\n %20s ", "-->");
918 SCIPdialogMessage(scip, NULL, "%-16s ", SCIPdispGetHeader(disps[i]));
919 if( strlen(SCIPdispGetHeader(disps[i])) > 16 )
920 SCIPdialogMessage(scip, NULL, "\n %20s %16s ", "", "-->");
922 SCIPdialogMessage(scip, NULL, "%5d ", SCIPdispGetWidth(disps[i]));
924 switch( SCIPdispGetStatus(disps[i]) )
925 {
927 SCIPdialogMessage(scip, NULL, "%6s ", "off");
928 break;
930 SCIPdialogMessage(scip, NULL, "%6s ", "auto");
931 break;
933 SCIPdialogMessage(scip, NULL, "%6s ", "on");
934 break;
935 default:
936 SCIPdialogMessage(scip, NULL, "%6s ", "?");
937 break;
938 }
941 }
943
944 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
945
946 return SCIP_OKAY;
947}
948
949/** dialog execution method for the display exprhdlrs command */
951{ /*lint --e{715}*/
952 SCIP_EXPRHDLR **exprhdlrs;
953 int nexprhdlrs;
954 int i;
955
957
958 exprhdlrs = SCIPgetExprhdlrs(scip);
959 nexprhdlrs = SCIPgetNExprhdlrs(scip);
960
961 /* display list of expression handler */
963 SCIPdialogMessage(scip, NULL, " expression handler precedence description\n");
964 SCIPdialogMessage(scip, NULL, " ------------------ ---------- -----------\n");
965 for( i = 0; i < nexprhdlrs; ++i )
966 {
967 SCIPdialogMessage(scip, NULL, " %-18s ", SCIPexprhdlrGetName(exprhdlrs[i]));
968 SCIPdialogMessage(scip, NULL, " %10u ", SCIPexprhdlrGetPrecedence(exprhdlrs[i]));
971 }
973
974 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
975
976 return SCIP_OKAY;
977}
978
979/** dialog execution method for the display cutselectors command */
981{ /*lint --e{715}*/
982 SCIP_CUTSEL** cutsels;
983 int ncutsels;
984 int i;
985
987
988 cutsels = SCIPgetCutsels(scip);
989 ncutsels = SCIPgetNCutsels(scip);
990
991 /* display list of cut selectors */
993 SCIPdialogMessage(scip, NULL, " cut selector priority description\n");
994 SCIPdialogMessage(scip, NULL, " ------------ -------- -----------\n");
995 for( i = 0; i < ncutsels; ++i )
996 {
997 SCIPdialogMessage(scip, NULL, " %-20s ", SCIPcutselGetName(cutsels[i]));
998 if( strlen(SCIPcutselGetName(cutsels[i])) > 20 )
999 SCIPdialogMessage(scip, NULL, "\n %20s ", "-->");
1000 SCIPdialogMessage(scip, NULL, "%8d ", SCIPcutselGetPriority(cutsels[i]));
1001 SCIPdialogMessage(scip, NULL, "%s", SCIPcutselGetDesc(cutsels[i]));
1002 SCIPdialogMessage(scip, NULL, "\n");
1003 }
1004 SCIPdialogMessage(scip, NULL, "\n");
1005
1006 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1007
1008 return SCIP_OKAY;
1009}
1010
1011/** dialog execution method for the display heuristics command */
1013{ /*lint --e{715}*/
1014 SCIP_HEUR** heurs;
1015 SCIP_HEUR** sorted;
1016 int nheurs;
1017 int i;
1018
1020
1021 heurs = SCIPgetHeurs(scip);
1022 nheurs = SCIPgetNHeurs(scip);
1023
1024 /* copy heurs array into temporary memory for sorting */
1025 SCIP_CALL( SCIPduplicateBufferArray(scip, &sorted, heurs, nheurs) );
1026
1027 /* sort the heuristics */
1028 SCIPsortPtr((void**)sorted, SCIPheurCompPriority, nheurs);
1029
1030 /* display sorted list of primal heuristics */
1031 SCIPdialogMessage(scip, NULL, "\n");
1032 SCIPdialogMessage(scip, NULL, " primal heuristic c priority freq ofs description\n");
1033 SCIPdialogMessage(scip, NULL, " ---------------- - -------- ---- --- -----------\n");
1034 for( i = 0; i < nheurs; ++i )
1035 {
1036 SCIPdialogMessage(scip, NULL, " %-20s ", SCIPheurGetName(sorted[i]));
1037 if( strlen(SCIPheurGetName(sorted[i])) > 20 )
1038 SCIPdialogMessage(scip, NULL, "\n %20s ", "-->");
1039 SCIPdialogMessage(scip, NULL, "%c ", SCIPheurGetDispchar(sorted[i]));
1040 SCIPdialogMessage(scip, NULL, "%8d ", SCIPheurGetPriority(sorted[i]));
1041 SCIPdialogMessage(scip, NULL, "%4d ", SCIPheurGetFreq(sorted[i]));
1042 SCIPdialogMessage(scip, NULL, "%3d ", SCIPheurGetFreqofs(sorted[i]));
1043 SCIPdialogMessage(scip, NULL, "%s", SCIPheurGetDesc(sorted[i]));
1044 SCIPdialogMessage(scip, NULL, "\n");
1045 }
1046 SCIPdialogMessage(scip, NULL, "\n");
1047
1048 /* free temporary memory */
1049 SCIPfreeBufferArray(scip, &sorted);
1050
1051 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1052
1053 return SCIP_OKAY;
1054}
1055
1056/** dialog execution method for the display memory command */
1058{ /*lint --e{715}*/
1060
1061 SCIPdialogMessage(scip, NULL, "\n");
1063 SCIPdialogMessage(scip, NULL, "\n");
1064
1065 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1066
1067 return SCIP_OKAY;
1068}
1069
1070/** dialog execution method for the display nlpi command */
1072{ /*lint --e{715}*/
1073 SCIP_NLPI** nlpis;
1074 SCIP_NLPI** sorted;
1075 int nnlpis;
1076 int i;
1077
1079
1080 nlpis = SCIPgetNlpis(scip);
1081 nnlpis = SCIPgetNNlpis(scip);
1082
1083 /* copy nlpis array into temporary memory for sorting */
1084 if( nnlpis != 0 )
1085 {
1086 SCIP_CALL( SCIPduplicateBufferArray(scip, &sorted, nlpis, nnlpis) );
1087 }
1088 else
1089 sorted = NULL;
1090
1091 /* sort the branching rules */
1092 SCIPsortPtr((void**)sorted, SCIPnlpiComp, nnlpis);
1093
1094 /* display sorted list of branching rules */
1095 SCIPdialogMessage(scip, NULL, "\n");
1096 SCIPdialogMessage(scip, NULL, " NLP interface priority description\n");
1097 SCIPdialogMessage(scip, NULL, " ------------- -------- -----------\n");
1098 for( i = 0; i < nnlpis; ++i )
1099 {
1100 assert(sorted != NULL);
1101 SCIPdialogMessage(scip, NULL, " %-20s ", SCIPnlpiGetName(sorted[i]));
1102 if( strlen(SCIPnlpiGetName(sorted[i])) > 20 )
1103 SCIPdialogMessage(scip, NULL, "\n %20s ", "-->");
1104 SCIPdialogMessage(scip, NULL, "%8d ", SCIPnlpiGetPriority(sorted[i]));
1105 SCIPdialogMessage(scip, NULL, "%s", SCIPnlpiGetDesc(sorted[i]));
1106 SCIPdialogMessage(scip, NULL, "\n");
1107 }
1108 SCIPdialogMessage(scip, NULL, "\n");
1109
1110 /* free temporary memory */
1111 if( nnlpis != 0 )
1112 {
1113 SCIPfreeBufferArray(scip, &sorted);
1114 }
1115
1116 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1117
1118 return SCIP_OKAY;
1119}
1120
1121/** dialog execution method for the display nodeselectors command */
1123{ /*lint --e{715}*/
1124 SCIP_NODESEL** nodesels;
1125 int nnodesels;
1126 int i;
1127
1129
1130 nodesels = SCIPgetNodesels(scip);
1131 nnodesels = SCIPgetNNodesels(scip);
1132
1133 /* display list of node selectors */
1134 SCIPdialogMessage(scip, NULL, "\n");
1135 SCIPdialogMessage(scip, NULL, " node selector std priority memsave prio description\n");
1136 SCIPdialogMessage(scip, NULL, " ------------- ------------ ------------ -----------\n");
1137 for( i = 0; i < nnodesels; ++i )
1138 {
1139 SCIPdialogMessage(scip, NULL, " %-20s ", SCIPnodeselGetName(nodesels[i]));
1140 if( strlen(SCIPnodeselGetName(nodesels[i])) > 20 )
1141 SCIPdialogMessage(scip, NULL, "\n %20s ", "-->");
1142 SCIPdialogMessage(scip, NULL, "%12d ", SCIPnodeselGetStdPriority(nodesels[i]));
1144 SCIPdialogMessage(scip, NULL, "%s", SCIPnodeselGetDesc(nodesels[i]));
1145 SCIPdialogMessage(scip, NULL, "\n");
1146 }
1147 SCIPdialogMessage(scip, NULL, "\n");
1148
1149 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1150
1151 return SCIP_OKAY;
1152}
1153
1154/** dialog execution method for the display parameters command */
1156{ /*lint --e{715}*/
1158
1159 SCIPdialogMessage(scip, NULL, "\n");
1160 SCIPdialogMessage(scip, NULL, "number of parameters = %d\n", SCIPgetNParams(scip));
1161 SCIPdialogMessage(scip, NULL, "non-default parameter settings:\n");
1163 SCIPdialogMessage(scip, NULL, "\n");
1164
1165 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1166
1167 return SCIP_OKAY;
1168}
1169
1170/** dialog execution method for the display presolvers command */
1172{ /*lint --e{715}*/
1173 SCIP_PRESOL** presols;
1174 int npresols;
1175 int i;
1176
1178
1179 presols = SCIPgetPresols(scip);
1180 npresols = SCIPgetNPresols(scip);
1181
1182 /* display list of presolvers */
1183 SCIPdialogMessage(scip, NULL, "\n");
1184 SCIPdialogMessage(scip, NULL, " Legend:\n");
1185 SCIPdialogMessage(scip, NULL, " priority: presolver called before constraint handlers iff priority > 0\n");
1186 SCIPdialogMessage(scip, NULL, " timing: 'f'ast, 'm'edium, 'e'xhaustive\n\n");
1187 SCIPdialogMessage(scip, NULL, " maxrounds: -1: no limit, 0: off, >0: limited number of rounds\n\n");
1188 SCIPdialogMessage(scip, NULL, " presolver priority timing maxrounds description\n");
1189 SCIPdialogMessage(scip, NULL, " --------- -------- ------ --------- -----------\n");
1190 for( i = 0; i < npresols; ++i )
1191 {
1192 SCIPdialogMessage(scip, NULL, " %-20s ", SCIPpresolGetName(presols[i]));
1193 if( strlen(SCIPpresolGetName(presols[i])) > 20 )
1194 SCIPdialogMessage(scip, NULL, "\n %20s ", "-->");
1195 SCIPdialogMessage(scip, NULL, "%8d ", SCIPpresolGetPriority(presols[i]));
1196 SCIPdialogMessage(scip, NULL, " %c", (SCIPpresolGetTiming(presols[i]) & SCIP_PRESOLTIMING_FAST) ? 'f' : ' ');
1197 SCIPdialogMessage(scip, NULL, "%c", (SCIPpresolGetTiming(presols[i]) & SCIP_PRESOLTIMING_MEDIUM) ? 'm' : ' ');
1199 SCIPdialogMessage(scip, NULL, "%9d ", SCIPpresolGetMaxrounds(presols[i]));
1200 SCIPdialogMessage(scip, NULL, "%s", SCIPpresolGetDesc(presols[i]));
1201 SCIPdialogMessage(scip, NULL, "\n");
1202 }
1203 SCIPdialogMessage(scip, NULL, "\n");
1204
1205 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1206
1207 return SCIP_OKAY;
1208}
1209
1210/** dialog execution method for the display pricer command */
1212{ /*lint --e{715}*/
1213 SCIP_PRICER** pricers;
1214 int npricers;
1215 int i;
1216
1218
1219 pricers = SCIPgetPricers(scip);
1220 npricers = SCIPgetNPricers(scip);
1221
1222 /* display list of pricers */
1223 SCIPdialogMessage(scip, NULL, "\n");
1224 SCIPdialogMessage(scip, NULL, " pricer priority description\n");
1225 SCIPdialogMessage(scip, NULL, " ---------- -------- -----------\n");
1226 for( i = 0; i < npricers; ++i )
1227 {
1228 SCIPdialogMessage(scip, NULL, " %-20s ", SCIPpricerGetName(pricers[i]));
1229 if( strlen(SCIPpricerGetName(pricers[i])) > 20 )
1230 SCIPdialogMessage(scip, NULL, "\n %20s ", "-->");
1231 SCIPdialogMessage(scip, NULL, "%8d%c ", SCIPpricerGetPriority(pricers[i]), SCIPpricerIsDelayed(pricers[i]) ? 'd' : ' ');
1232 SCIPdialogMessage(scip, NULL, "%s", SCIPpricerGetDesc(pricers[i]));
1233 SCIPdialogMessage(scip, NULL, "\n");
1234 }
1235 SCIPdialogMessage(scip, NULL, "\n");
1236
1237 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1238
1239 return SCIP_OKAY;
1240}
1241
1242/** dialog execution method for the display problem command */
1244{ /*lint --e{715}*/
1246
1247 SCIPdialogMessage(scip, NULL, "\n");
1248
1250 {
1252 }
1253 else
1254 SCIPdialogMessage(scip, NULL, "no problem available\n");
1255
1256 SCIPdialogMessage(scip, NULL, "\n");
1257
1258 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1259
1260 return SCIP_OKAY;
1261}
1262
1263/** dialog execution method for the display propagators command */
1265{ /*lint --e{715}*/
1266 SCIP_PROP** props;
1267 int nprops;
1268 int i;
1269
1271
1272 props = SCIPgetProps(scip);
1273 nprops = SCIPgetNProps(scip);
1274
1275 /* display list of propagators */
1276 SCIPdialogMessage(scip, NULL, "\n");
1277 SCIPdialogMessage(scip, NULL, " Legend:\n");
1278 SCIPdialogMessage(scip, NULL, " presprio: propagator presolving called before constraint handlers iff presprio > 0\n");
1279 SCIPdialogMessage(scip, NULL, " prestim (presolve timing): 'f'ast, 'm'edium, 'e'xhaustive\n\n");
1280
1281 SCIPdialogMessage(scip, NULL, " propagator propprio freq presprio prestim description\n");
1282 SCIPdialogMessage(scip, NULL, " ---------- -------- ---- -------- ------- -----------\n");
1283 for( i = 0; i < nprops; ++i )
1284 {
1285 SCIPdialogMessage(scip, NULL, " %-20s ", SCIPpropGetName(props[i]));
1286 if( strlen(SCIPpropGetName(props[i])) > 20 )
1287 SCIPdialogMessage(scip, NULL, "\n %20s ", "-->");
1288 SCIPdialogMessage(scip, NULL, "%8d%c ", SCIPpropGetPriority(props[i]), SCIPpropIsDelayed(props[i]) ? 'd' : ' ');
1289 SCIPdialogMessage(scip, NULL, "%4d ", SCIPpropGetFreq(props[i]));
1294 SCIPdialogMessage(scip, NULL, "%s", SCIPpropGetDesc(props[i]));
1295 SCIPdialogMessage(scip, NULL, "\n");
1296 }
1297 SCIPdialogMessage(scip, NULL, "\n");
1298
1299 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1300
1301 return SCIP_OKAY;
1302}
1303
1304/** dialog execution method for the display readers command */
1306{ /*lint --e{715}*/
1308
1309 /* print reader information */
1311
1312 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1313
1314 return SCIP_OKAY;
1315}
1316
1317/** dialog execution method for the display separators command */
1319{ /*lint --e{715}*/
1320 SCIP_SEPA** sepas;
1321 int nsepas;
1322 int i;
1323
1325
1326 sepas = SCIPgetSepas(scip);
1327 nsepas = SCIPgetNSepas(scip);
1328
1329 /* display list of separators */
1330 SCIPdialogMessage(scip, NULL, "\n");
1331 SCIPdialogMessage(scip, NULL, " separator priority freq bddist description\n");
1332 SCIPdialogMessage(scip, NULL, " --------- -------- ---- ------ -----------\n");
1333 for( i = 0; i < nsepas; ++i )
1334 {
1335 SCIPdialogMessage(scip, NULL, " %-20s ", SCIPsepaGetName(sepas[i]));
1336 if( strlen(SCIPsepaGetName(sepas[i])) > 20 )
1337 SCIPdialogMessage(scip, NULL, "\n %20s ", "-->");
1338 SCIPdialogMessage(scip, NULL, "%8d%c ", SCIPsepaGetPriority(sepas[i]), SCIPsepaIsDelayed(sepas[i]) ? 'd' : ' ');
1339 SCIPdialogMessage(scip, NULL, "%4d ", SCIPsepaGetFreq(sepas[i]));
1341 SCIPdialogMessage(scip, NULL, "%s", SCIPsepaGetDesc(sepas[i]));
1342 SCIPdialogMessage(scip, NULL, "\n");
1343 }
1344 SCIPdialogMessage(scip, NULL, "\n");
1345
1346 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1347
1348 return SCIP_OKAY;
1349}
1350
1351/** dialog execution method for the display solution command */
1353{ /*lint --e{715}*/
1354 SCIP_VAR** fixedvars;
1355 SCIP_VAR* var;
1356 SCIP_Bool printzeros;
1357 int nfixedvars;
1358 int v;
1359
1361
1363 SCIPdialogMessage(scip, NULL, "No problem exists. Read (and solve) problem first.\n");
1364 else
1365 {
1366 SCIP_CALL( SCIPgetBoolParam(scip, "write/printzeros", &printzeros) );
1367
1368 SCIPdialogMessage(scip, NULL, "\n");
1370 SCIPdialogMessage(scip, NULL, "\n");
1371
1372 /* check if there are infinite fixings and print a reference to 'display finitesolution', if needed */
1373 fixedvars = SCIPgetFixedVars(scip);
1374 nfixedvars = SCIPgetNFixedVars(scip);
1375 assert(fixedvars != NULL || nfixedvars == 0);
1376
1377 /* check whether there are variables fixed to an infinite value */
1378 for( v = 0; v < nfixedvars; ++v )
1379 {
1380 var = fixedvars[v]; /*lint !e613*/
1381
1382 /* skip (multi-)aggregated variables */
1384 continue;
1385
1387 {
1388 SCIPdialogMessage(scip, NULL, "The primal solution contains variables fixed to infinite values.\n\
1389If you want SCIP to display an optimal solution without infinite values, use 'display finitesolution'.\n");
1390 SCIPdialogMessage(scip, NULL, "\n");
1391 break;
1392 }
1393 }
1394 }
1395 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1396
1397 return SCIP_OKAY;
1398}
1399
1400/** dialog execution method for the display finitesolution command */
1402{ /*lint --e{715}*/
1403 SCIP_SOL* bestsol = SCIPgetBestSol(scip);
1404
1406
1407 SCIPdialogMessage(scip, NULL, "\n");
1408 if( bestsol != NULL )
1409 {
1410 SCIP_SOL* sol;
1411 SCIP_Bool success;
1412 SCIP_RETCODE retcode;
1413
1414 /* create copy of solution with finite values */
1415 retcode = SCIPcreateFiniteSolCopy(scip, &sol, bestsol, &success);
1416
1417 if( retcode == SCIP_OKAY && success )
1418 {
1419 SCIP_Bool printzeros;
1420
1421 SCIP_CALL( SCIPgetBoolParam(scip, "write/printzeros", &printzeros) );
1422 retcode = SCIPprintSol(scip, sol, NULL, printzeros);
1423 SCIPdialogMessage(scip, NULL, "\n");
1424 }
1425 else
1426 {
1427 SCIPdialogMessage(scip, NULL, "error while creating finite solution\n");
1428 }
1429
1430 /* free solution copy */
1431 if( retcode == SCIP_OKAY && sol != NULL )
1432 {
1434 }
1435 }
1436 else
1437 {
1438 SCIP_Bool printzeros;
1439
1440 SCIP_CALL( SCIPgetBoolParam(scip, "write/printzeros", &printzeros) );
1442 SCIPdialogMessage(scip, NULL, "\n");
1443 }
1444
1445 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1446
1447 return SCIP_OKAY;
1448}
1449
1450/** dialog execution method for the display dual solution command */
1452{ /*lint --e{715}*/
1454
1455 SCIPdialogMessage(scip, NULL, "\n");
1457 SCIPdialogMessage(scip, NULL, "\n");
1458
1459 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1460
1461 return SCIP_OKAY;
1462}
1463
1464
1465/** dialog execution method for the display of solutions in the pool command */
1467{ /*lint --e{715}*/
1468 char prompt[SCIP_MAXSTRLEN];
1469 SCIP_Bool endoffile;
1470 SCIP_SOL** sols;
1471 char* idxstr;
1472 char* endstr;
1473 int nsols;
1474 int idx;
1475
1477 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1478 SCIPdialogMessage(scip, NULL, "\n");
1479
1481 {
1482 SCIPdialogMessage(scip, NULL, "No solution available.\n\n");
1483 return SCIP_OKAY;
1484 }
1485
1486 nsols = SCIPgetNSols(scip);
1487 if ( nsols == 0 )
1488 {
1489 SCIPdialogMessage(scip, NULL, "No solution available.\n\n");
1490 return SCIP_OKAY;
1491 }
1492
1493 /* parse solution number */
1494 (void) SCIPsnprintf(prompt, SCIP_MAXSTRLEN, "index of solution [0-%d]: ", nsols-1);
1495
1497
1498 if( endoffile )
1499 {
1500 *nextdialog = NULL;
1501 return SCIP_OKAY;
1502 }
1503
1504 if ( SCIPstrToIntValue(idxstr, &idx, &endstr) )
1505 {
1506 SCIP_Bool printzeros;
1507
1508 if ( idx < 0 || idx >= nsols )
1509 {
1510 SCIPdialogMessage(scip, NULL, "Solution index out of bounds [0-%d].\n", nsols-1);
1511 return SCIP_OKAY;
1512 }
1513
1514 SCIP_CALL( SCIPgetBoolParam(scip, "write/printzeros", &printzeros) );
1515
1516 sols = SCIPgetSols(scip);
1517 assert( sols[idx] != NULL );
1518 SCIP_CALL( SCIPprintSol(scip, sols[idx], NULL, FALSE) );
1519 }
1520 SCIPdialogMessage(scip, NULL, "\n");
1521
1522 return SCIP_OKAY;
1523}
1524
1525/** dialog execution method for the display subproblem command */
1527{ /*lint --e{715}*/
1528 SCIP_BENDERS** benders;
1529 char prompt[SCIP_MAXSTRLEN];
1530 int nactivebenders;
1531 int nbenders;
1532 SCIP_Bool endoffile;
1533 char* idxstr;
1534 char* endstr;
1535 int count;
1536 int idx;
1537 int subidx;
1538 int i;
1539
1540 idxstr = NULL;
1541 idx = 0;
1542 subidx = 0;
1543
1545
1546 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1547
1548 SCIPdialogMessage(scip, NULL, "\n");
1549
1551 {
1552 SCIPdialogMessage(scip, NULL, "problem must be transformed to display subproblems\n\n");
1553 return SCIP_OKAY;
1554 }
1555
1556 /* if there are no active Benders' decompositions, then there are no subproblem */
1557 nactivebenders = SCIPgetNActiveBenders(scip);
1558 if( nactivebenders == 0 )
1559 {
1560 SCIPdialogMessage(scip, NULL, "no active Benders' decomposition\n\n");
1561 return SCIP_OKAY;
1562 }
1563
1564 nbenders = SCIPgetNBenders(scip);
1565 benders = SCIPgetBenders(scip);
1566
1567 /* if there is only one active Benders decomposition, then there is no need to display the list of Benders */
1568 if( nactivebenders > 1 )
1569 {
1570 SCIPdialogMessage(scip, NULL, "Active Benders' decomposition:\n");
1571 count = 0;
1572 for( i = 0; i < nbenders; i++ )
1573 {
1574 if( SCIPbendersIsActive(benders[i]) )
1575 {
1576 assert(i >= count);
1577 benders[count] = benders[i];
1578 SCIPdialogMessage(scip, NULL, " %d: %s\n", count, SCIPbendersGetName(benders[count]));
1579 count++;
1580 }
1581 }
1582
1583 /* parse decomposition number */
1584 (void) SCIPsnprintf(prompt, SCIP_MAXSTRLEN-1, "index of decomposition [0-%d]: ", nactivebenders-1);
1585
1587
1588 if( endoffile )
1589 {
1590 *nextdialog = NULL;
1591 return SCIP_OKAY;
1592 }
1593 }
1594 else
1595 idx = 0;
1596
1597 /* coverity[var_deref_model] */
1598 if ( nactivebenders == 1 || SCIPstrToIntValue(idxstr, &idx, &endstr) )
1599 {
1600 int nsubproblems;
1601
1602 if ( idx < 0 || idx >= nactivebenders)
1603 {
1604 SCIPdialogMessage(scip, NULL, "Decomposition index out of bounds [0-%d].\n", nactivebenders-1);
1605 return SCIP_OKAY;
1606 }
1607
1608 nsubproblems = SCIPbendersGetNSubproblems(benders[idx]);
1609
1610 /* if there is only one subproblem, then there is no need to ask for a prompt */
1611 if( nsubproblems > 1 )
1612 {
1613 /* parse subproblem number */
1614 (void) SCIPsnprintf(prompt, SCIP_MAXSTRLEN-1, "index of subproblem [0-%d] or -1 for all: ", nsubproblems-1);
1615
1617
1618 if( endoffile )
1619 {
1620 *nextdialog = NULL;
1621 return SCIP_OKAY;
1622 }
1623 }
1624 else
1625 subidx = 0;
1626
1627 /* coverity[var_deref_model] */
1628 if ( nsubproblems == 1 || SCIPstrToIntValue(idxstr, &subidx, &endstr) )
1629 {
1631 int nsubdisplay;
1632
1633 if ( subidx < -1 || subidx >= nsubproblems)
1634 {
1635 SCIPdialogMessage(scip, NULL, "Subproblem index out of bounds [0-%d] or -1.\n", nsubproblems-1);
1636 return SCIP_OKAY;
1637 }
1638
1639 if( subidx == -1 )
1640 nsubdisplay = nsubproblems;
1641 else
1642 nsubdisplay = 1;
1643
1644 for( i = 0; i < nsubdisplay; i++ )
1645 {
1646 if( nsubdisplay > 1 )
1647 subidx = i;
1648
1649 subproblem = SCIPbendersSubproblem(benders[idx], subidx);
1650
1652 {
1653 SCIPdialogMessage(scip, NULL, "\n");
1654 SCIPdialogMessage(scip, NULL, "Subproblem %d\n", subidx);
1656 SCIPdialogMessage(scip, NULL, "\n");
1657 }
1658 else
1659 SCIPdialogMessage(scip, NULL, "no problem available\n");
1660 }
1661 }
1662 }
1663
1664 SCIPdialogMessage(scip, NULL, "\n");
1665
1666 return SCIP_OKAY;
1667}
1668
1669/** dialog execution method for the display subsolution command */
1671{ /*lint --e{715}*/
1672 SCIP_BENDERS** benders;
1673 char prompt[SCIP_MAXSTRLEN];
1674 int nactivebenders;
1675 int nbenders;
1676 SCIP_Bool endoffile;
1677 SCIP_Bool printzeros;
1678 char* idxstr;
1679 char* endstr;
1680 int count;
1681 int idx;
1682 int subidx;
1683 int i;
1684
1685 idxstr = NULL;
1686 idx = 0;
1687 subidx = 0;
1688
1690
1691 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1692
1693 SCIPdialogMessage(scip, NULL, "\n");
1694
1696 {
1697 SCIPdialogMessage(scip, NULL, "problem must be transformed to display subproblems\n\n");
1698 return SCIP_OKAY;
1699 }
1700
1701 /* if there are no active Benders' decompositions, then there are no subproblem */
1702 nactivebenders = SCIPgetNActiveBenders(scip);
1703 if( nactivebenders == 0 )
1704 {
1705 SCIPdialogMessage(scip, NULL, "no active Benders' decomposition\n\n");
1706 return SCIP_OKAY;
1707 }
1708
1709 nbenders = SCIPgetNBenders(scip);
1710 benders = SCIPgetBenders(scip);
1711
1712 /* if there is only one active Benders decomposition, then there is no need to display the list of Benders */
1713 if( nactivebenders > 1 )
1714 {
1715 SCIPdialogMessage(scip, NULL, "Active Benders' decomposition:\n");
1716 count = 0;
1717 for( i = 0; i < nbenders; i++ )
1718 {
1719 if( SCIPbendersIsActive(benders[i]) )
1720 {
1721 assert(i >= count);
1722 benders[count] = benders[i];
1723 SCIPdialogMessage(scip, NULL, " %d: %s\n", count, SCIPbendersGetName(benders[count]));
1724 count++;
1725 }
1726 }
1727
1728 /* parse decomposition number */
1729 (void) SCIPsnprintf(prompt, SCIP_MAXSTRLEN-1, "index of decomposition [0-%d]: ", nactivebenders-1);
1730
1732
1733 if( endoffile )
1734 {
1735 *nextdialog = NULL;
1736 return SCIP_OKAY;
1737 }
1738 }
1739 else
1740 idx = 0;
1741
1742 /* coverity[var_deref_model] */
1743 if ( nactivebenders == 1 || SCIPstrToIntValue(idxstr, &idx, &endstr) )
1744 {
1745 int nsubproblems;
1746
1747 SCIP_CALL( SCIPgetBoolParam(scip, "write/printzeros", &printzeros) );
1748
1749 if ( idx < 0 || idx >= nactivebenders)
1750 {
1751 SCIPdialogMessage(scip, NULL, "Decomposition index out of bounds [0-%d].\n", nactivebenders-1);
1752 return SCIP_OKAY;
1753 }
1754
1755 nsubproblems = SCIPbendersGetNSubproblems(benders[idx]);
1756
1757 /* if there is only one subproblem, then there is no need to ask for a prompt */
1758 if( nsubproblems > 1 )
1759 {
1760 /* parse subproblem number */
1761 (void) SCIPsnprintf(prompt, SCIP_MAXSTRLEN-1, "index of subproblem [0-%d] or -1 for all: ", nsubproblems-1);
1762
1764
1765 if( endoffile )
1766 {
1767 *nextdialog = NULL;
1768 return SCIP_OKAY;
1769 }
1770 }
1771 else
1772 subidx = 0;
1773
1774 /* coverity[var_deref_model] */
1775 if ( nsubproblems == 1 || SCIPstrToIntValue(idxstr, &subidx, &endstr) )
1776 {
1778 SCIP_SOL* bestsol;
1779 int nsubdisplay;
1780 SCIP_Bool infeasible;
1781
1782 if ( subidx < -1 || subidx >= nsubproblems)
1783 {
1784 SCIPdialogMessage(scip, NULL, "Subproblem index out of bounds [0-%d] or -1.\n", nsubproblems-1);
1785 return SCIP_OKAY;
1786 }
1787
1788 bestsol = SCIPgetBestSol(scip);
1789
1790 if( subidx == -1 )
1791 nsubdisplay = nsubproblems;
1792 else
1793 nsubdisplay = 1;
1794
1795 for( i = 0; i < nsubdisplay; i++ )
1796 {
1797 if( nsubdisplay > 1 )
1798 subidx = i;
1799
1800 subproblem = SCIPbendersSubproblem(benders[idx], subidx);
1801
1803 {
1804 /* setting up the subproblem with the best solution to the master problem */
1806
1807 /* solving the subproblem using the best solution to the master problem */
1808 SCIP_CALL( SCIPsolveBendersSubproblem(scip, benders[idx], bestsol, subidx, &infeasible,
1809 TRUE, NULL) );
1810
1811 if( infeasible )
1812 SCIPdialogMessage(scip, NULL, "subproblem %d is infeasible.\n", subidx);
1813 else
1814 {
1815 SCIPdialogMessage(scip, NULL, "\n");
1816 SCIPdialogMessage(scip, NULL, "Subproblem %d\n", subidx);
1818 {
1819 /* need to check whether the subproblem is an NLP and solved as an NLP */
1821 {
1822 SCIP_SOL* nlpsol;
1825 SCIP_CALL( SCIPfreeSol(subproblem, &nlpsol) );
1826 }
1827 else
1828 {
1830 }
1831 }
1832 else
1834 SCIPdialogMessage(scip, NULL, "\n");
1835 }
1836
1837 /* freeing the subproblem */
1839 }
1840 else
1841 SCIPdialogMessage(scip, NULL, "no problem available\n");
1842 }
1843 }
1844 }
1845
1846 SCIPdialogMessage(scip, NULL, "\n");
1847
1848 return SCIP_OKAY;
1849}
1850
1851/** dialog execution method for the display statistics command */
1853{ /*lint --e{715}*/
1855
1856 SCIPdialogMessage(scip, NULL, "\n");
1858 SCIPdialogMessage(scip, NULL, "\n");
1859
1860 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1861
1862 return SCIP_OKAY;
1863}
1864
1865/** dialog execution method for the display reoptstatistics command */
1867{ /*lint --e{715}*/
1869
1870 SCIPdialogMessage(scip, NULL, "\n");
1872 SCIPdialogMessage(scip, NULL, "\n");
1873
1874 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1875
1876 return SCIP_OKAY;
1877}
1878
1879/** dialog execution method for the display compression command */
1881{ /*lint --e{715}*/
1882 SCIP_COMPR** comprs;
1883 SCIP_COMPR** sorted;
1884 int ncomprs;
1885 int i;
1886
1888
1889 comprs = SCIPgetComprs(scip);
1890 ncomprs = SCIPgetNCompr(scip);
1891
1892 /* copy compression array into temporary memory for sorting */
1893 SCIP_CALL( SCIPduplicateBufferArray(scip, &sorted, comprs, ncomprs) );
1894
1895 /* sort the compression t */
1896 SCIPsortPtr((void**)sorted, SCIPcomprComp, ncomprs);
1897
1898 /* display sorted list of branching rules */
1899 SCIPdialogMessage(scip, NULL, "\n");
1900 SCIPdialogMessage(scip, NULL, " compression method priority minnodes description\n");
1901 SCIPdialogMessage(scip, NULL, " ------------------ -------- -------- -----------\n");
1902 for( i = 0; i < ncomprs; ++i )
1903 {
1904 SCIPdialogMessage(scip, NULL, " %-24s ", SCIPcomprGetName(sorted[i]));
1905 if( strlen(SCIPcomprGetName(sorted[i])) > 24 )
1906 SCIPdialogMessage(scip, NULL, "\n %24s ", "-->");
1907 SCIPdialogMessage(scip, NULL, "%8d %8d ", SCIPcomprGetPriority(sorted[i]), SCIPcomprGetMinNodes(sorted[i]));
1908 SCIPdialogMessage(scip, NULL, "%s", SCIPcomprGetDesc(sorted[i]));
1909 SCIPdialogMessage(scip, NULL, "\n");
1910 }
1911 SCIPdialogMessage(scip, NULL, "\n");
1912
1913 /* free temporary memory */
1914 SCIPfreeBufferArray(scip, &sorted);
1915
1916 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1917
1918 return SCIP_OKAY;
1919}
1920
1921/** dialog execution method for the display transproblem command */
1923{ /*lint --e{715}*/
1925
1926 SCIPdialogMessage(scip, NULL, "\n");
1928 {
1930 }
1931 else
1932 SCIPdialogMessage(scip, NULL, "no transformed problem available\n");
1933
1934 SCIPdialogMessage(scip, NULL, "\n");
1935
1936 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1937
1938 return SCIP_OKAY;
1939}
1940
1941/** dialog execution method for the display value command */
1943{ /*lint --e{715}*/
1944 SCIP_SOL* sol;
1945 SCIP_VAR* var;
1946 char* varname;
1947 SCIP_Real solval;
1948 SCIP_Bool endoffile;
1949
1950 SCIPdialogMessage(scip, NULL, "\n");
1951
1954 else
1955 sol = NULL;
1956
1957 if( sol == NULL )
1958 {
1959 SCIPdialogMessage(scip, NULL, "no feasible solution available\n");
1960 SCIPdialoghdlrClearBuffer(dialoghdlr);
1961 }
1962 else
1963 {
1964 SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "enter variable name: ", &varname, &endoffile) );
1965 if( endoffile )
1966 {
1967 *nextdialog = NULL;
1968 return SCIP_OKAY;
1969 }
1970
1971 if( varname[0] != '\0' )
1972 {
1974
1976 if( var == NULL )
1977 SCIPdialogMessage(scip, NULL, "variable <%s> not found\n", varname);
1978 else
1979 {
1980 solval = SCIPgetSolVal(scip, sol, var);
1982 if( SCIPisInfinity(scip, solval) )
1983 SCIPdialogMessage(scip, NULL, " +infinity");
1984 else if( SCIPisInfinity(scip, -solval) )
1985 SCIPdialogMessage(scip, NULL, " -infinity");
1986 else
1987 SCIPdialogMessage(scip, NULL, " %20.15g", solval);
1988 SCIPdialogMessage(scip, NULL, " \t(obj:%.15g)\n", SCIPvarGetObj(var));
1989 }
1990 }
1991 }
1992 SCIPdialogMessage(scip, NULL, "\n");
1993
1994 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
1995
1996 return SCIP_OKAY;
1997}
1998
1999/** dialog execution method for the display varbranchstatistics command */
2012
2013/** dialog execution method for the display LP solution quality command */
2015{ /*lint --e{715}*/
2017
2018 SCIPdialogMessage(scip, NULL, "\n");
2020 SCIPdialogMessage(scip, NULL, "\n");
2021
2022 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2023
2024 return SCIP_OKAY;
2025}
2026
2027/** dialog execution method for the help command */
2040
2041/** dialog execution method for the display transsolution command */
2043{ /*lint --e{715}*/
2045
2046 SCIPdialogMessage(scip, NULL, "\n");
2048 {
2050 {
2051 SCIPdialogMessage(scip, NULL, "best solution exists only in original problem space\n");
2052 }
2053 else
2054 {
2056 }
2057 }
2058 else
2059 SCIPdialogMessage(scip, NULL, "no solution available\n");
2060 SCIPdialogMessage(scip, NULL, "\n");
2061
2062 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2063
2064 return SCIP_OKAY;
2065}
2066
2067/** dialog execution method for the free command */
2069{ /*lint --e{715}*/
2071
2073
2075
2076 return SCIP_OKAY;
2077}
2078
2079/** dialog execution method for the newstart command */
2081{ /*lint --e{715}*/
2083
2085
2087
2088 return SCIP_OKAY;
2089}
2090
2091/** dialog execution method for the transform command */
2093{ /*lint --e{715}*/
2095
2096 SCIPdialogMessage(scip, NULL, "\n");
2097 switch( SCIPgetStage(scip) )
2098 {
2099 case SCIP_STAGE_INIT:
2100 SCIPdialogMessage(scip, NULL, "no problem exists\n");
2101 break;
2102
2103 case SCIP_STAGE_PROBLEM:
2105 break;
2106
2108 SCIPdialogMessage(scip, NULL, "problem is already transformed\n");
2109 break;
2110
2117 case SCIP_STAGE_SOLVING:
2118 case SCIP_STAGE_SOLVED:
2121 case SCIP_STAGE_FREE:
2122 default:
2123 SCIPerrorMessage("invalid SCIP stage\n");
2124 return SCIP_INVALIDCALL;
2125 }
2126 SCIPdialogMessage(scip, NULL, "\n");
2127
2128 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2129
2130 return SCIP_OKAY;
2131}
2132
2133/** dialog execution method for the concurrentopt command */
2135{ /*lint --e{715}*/
2137
2138 SCIPdialogMessage(scip, NULL, "\n");
2139 switch( SCIPgetStage(scip) )
2140 {
2141 case SCIP_STAGE_INIT:
2142 SCIPdialogMessage(scip, NULL, "no problem exists\n");
2143 break;
2144
2145 case SCIP_STAGE_PROBLEM:
2149 case SCIP_STAGE_SOLVING:
2151 break;
2152
2153 case SCIP_STAGE_SOLVED:
2154 SCIPdialogMessage(scip, NULL, "problem is already solved\n");
2155 break;
2156
2163 case SCIP_STAGE_FREE:
2164 default:
2165 SCIPerrorMessage("invalid SCIP stage\n");
2166 return SCIP_INVALIDCALL;
2167 }
2168 SCIPdialogMessage(scip, NULL, "\n");
2169
2170 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2171
2172 return SCIP_OKAY;
2173}
2174
2175/** dialog execution method for the optimize command */
2177{ /*lint --e{715}*/
2179
2180 SCIPdialogMessage(scip, NULL, "\n");
2181 switch( SCIPgetStage(scip) )
2182 {
2183 case SCIP_STAGE_INIT:
2184 SCIPdialogMessage(scip, NULL, "no problem exists\n");
2185 break;
2186
2187 case SCIP_STAGE_PROBLEM:
2191 case SCIP_STAGE_SOLVING:
2193 break;
2194
2195 case SCIP_STAGE_SOLVED:
2196 SCIPdialogMessage(scip, NULL, "problem is already solved\n");
2197 break;
2198
2205 case SCIP_STAGE_FREE:
2206 default:
2207 SCIPerrorMessage("invalid SCIP stage\n");
2208 return SCIP_INVALIDCALL;
2209 }
2210 SCIPdialogMessage(scip, NULL, "\n");
2211
2212 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2213
2214 return SCIP_OKAY;
2215}
2216
2217/** dialog execution method for the presolve command */
2219{ /*lint --e{715}*/
2221
2222 SCIPdialogMessage(scip, NULL, "\n");
2223 switch( SCIPgetStage(scip) )
2224 {
2225 case SCIP_STAGE_INIT:
2226 SCIPdialogMessage(scip, NULL, "no problem exists\n");
2227 break;
2228
2229 case SCIP_STAGE_PROBLEM:
2233 break;
2234
2236 case SCIP_STAGE_SOLVING:
2237 SCIPdialogMessage(scip, NULL, "problem is already presolved\n");
2238 break;
2239
2240 case SCIP_STAGE_SOLVED:
2241 SCIPdialogMessage(scip, NULL, "problem is already solved\n");
2242 break;
2243
2250 case SCIP_STAGE_FREE:
2251 default:
2252 SCIPerrorMessage("invalid SCIP stage\n");
2253 return SCIP_INVALIDCALL;
2254 }
2255 SCIPdialogMessage(scip, NULL, "\n");
2256
2257 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2258
2259 return SCIP_OKAY;
2260}
2261
2262/** dialog execution method for the quit command */
2264{ /*lint --e{715}*/
2265 SCIPdialogMessage(scip, NULL, "\n");
2266
2267 *nextdialog = NULL;
2268
2269 return SCIP_OKAY;
2270}
2271
2272/** dialog execution method for the read command */
2274{ /*lint --e{715}*/
2275 SCIP_RETCODE retcode;
2276 char* filename;
2277 SCIP_Bool endoffile;
2278
2279 SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "enter filename: ", &filename, &endoffile) );
2280 if( endoffile )
2281 {
2282 *nextdialog = NULL;
2283 return SCIP_OKAY;
2284 }
2285
2286 if( filename[0] != '\0' )
2287 {
2288 SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, filename, TRUE) );
2289
2290 if( SCIPfileExists(filename) )
2291 {
2292 char* tmpfilename;
2293 char* extension;
2294
2295 /* copy filename */
2296 SCIP_CALL( SCIPduplicateBufferArray(scip, &tmpfilename, filename, (int)strlen(filename)+1) );
2297 extension = NULL;
2298
2299 SCIPinfoMessage(scip, NULL, "\n");
2300 SCIPinfoMessage(scip, NULL, "read problem <%s>\n", filename);
2301 SCIPinfoMessage(scip, NULL, "============\n");
2302 SCIPinfoMessage(scip, NULL, "\n");
2303
2304 do
2305 {
2306 retcode = SCIPreadProb(scip, tmpfilename, extension);
2307 if( retcode == SCIP_READERROR || retcode == SCIP_NOFILE )
2308 {
2309 if( extension == NULL )
2310 SCIPdialogMessage(scip, NULL, "error reading file <%s>\n", tmpfilename);
2311 else
2312 SCIPdialogMessage(scip, NULL, "error reading file <%s> using <%s> file format\n",
2313 tmpfilename, extension);
2314
2316 break;
2317 }
2318 else if( retcode == SCIP_PLUGINNOTFOUND )
2319 {
2320 /* ask user once for a suitable reader */
2321 if( extension == NULL )
2322 {
2323 SCIPdialogMessage(scip, NULL, "no reader for input file <%s> available\n", tmpfilename);
2324
2325 SCIPdialogMessage(scip, NULL, "The following readers are available for reading:\n");
2327
2329 "select a suitable reader by extension (or return): ", &extension, &endoffile) );
2330
2331 if( extension[0] == '\0' )
2332 break;
2333 }
2334 else
2335 {
2336 SCIPdialogMessage(scip, NULL, "no reader for file extension <%s> available\n", extension);
2337 extension = NULL;
2338 }
2339 }
2340 else
2341 {
2342 /* check if an unexpected error occurred during the reading process */
2343 SCIP_CALL( retcode );
2344 break;
2345 }
2346 }
2347 while( extension != NULL );
2348
2349 /* free buffer array */
2351 }
2352 else
2353 {
2354 SCIPdialogMessage(scip, NULL, "file <%s> not found\n", filename);
2355 SCIPdialoghdlrClearBuffer(dialoghdlr);
2356 }
2357 }
2358
2359 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2360
2361 return SCIP_OKAY;
2362}
2363
2364/** dialog execution method for the set default command */
2366{ /*lint --e{715}*/
2368
2370 SCIPdialogMessage(scip, NULL, "reset parameters to their default values\n");
2371
2372 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2373
2374 return SCIP_OKAY;
2375}
2376
2377/** dialog execution method for the set load command */
2379{ /*lint --e{715}*/
2380 char* filename;
2381 SCIP_Bool endoffile;
2382
2383 SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "enter filename: ", &filename, &endoffile) );
2384 if( endoffile )
2385 {
2386 *nextdialog = NULL;
2387 return SCIP_OKAY;
2388 }
2389
2390 if( filename[0] != '\0' )
2391 {
2392 SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, filename, TRUE) );
2393
2394 if( SCIPfileExists(filename) )
2395 {
2396 SCIP_CALL( SCIPreadParams(scip, filename) );
2397 SCIPdialogMessage(scip, NULL, "loaded parameter file <%s>\n", filename);
2398 }
2399 else
2400 {
2401 SCIPdialogMessage(scip, NULL, "file <%s> not found\n", filename);
2402 SCIPdialoghdlrClearBuffer(dialoghdlr);
2403 }
2404 }
2405
2406 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2407
2408 return SCIP_OKAY;
2409}
2410
2411/** dialog execution method for the set save command */
2413{ /*lint --e{715}*/
2414 char* filename;
2415 SCIP_Bool endoffile;
2416
2417 SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "enter filename: ", &filename, &endoffile) );
2418 if( endoffile )
2419 {
2420 *nextdialog = NULL;
2421 return SCIP_OKAY;
2422 }
2423
2424 if( filename[0] != '\0' )
2425 {
2426 SCIP_RETCODE retcode;
2427
2428 SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, filename, TRUE) );
2429
2430 retcode = SCIPwriteParams(scip, filename, TRUE, FALSE);
2431
2432 if( retcode == SCIP_FILECREATEERROR )
2433 {
2434 SCIPdialogMessage(scip, NULL, "error creating file <%s>\n", filename);
2435 }
2436 else
2437 {
2438 SCIP_CALL( retcode );
2439 SCIPdialogMessage(scip, NULL, "saved parameter file <%s>\n", filename);
2440 }
2441 }
2442
2443 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2444
2445 return SCIP_OKAY;
2446}
2447
2448/** dialog execution method for the set diffsave command */
2450{ /*lint --e{715}*/
2451 char* filename;
2452 SCIP_Bool endoffile;
2453
2454 SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "enter filename: ", &filename, &endoffile) );
2455 if( endoffile )
2456 {
2457 *nextdialog = NULL;
2458 return SCIP_OKAY;
2459 }
2460
2461 if( filename[0] != '\0' )
2462 {
2463 SCIP_RETCODE retcode;
2464
2465 SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, filename, TRUE) );
2466
2467 retcode = SCIPwriteParams(scip, filename, TRUE, TRUE);
2468
2469 if( retcode == SCIP_FILECREATEERROR )
2470 {
2471 SCIPdialogMessage(scip, NULL, "error creating file <%s>\n", filename);
2472 }
2473 else
2474 {
2475 SCIP_CALL( retcode );
2476 SCIPdialogMessage(scip, NULL, "saved non-default parameter settings to file <%s>\n", filename);
2477 }
2478 }
2479
2480 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2481
2482 return SCIP_OKAY;
2483}
2484
2485/** dialog execution method for the set parameter command */
2487{ /*lint --e{715}*/
2488 SCIP_PARAM* param;
2489 char prompt[SCIP_MAXSTRLEN];
2490 char* valuestr;
2491 SCIP_Bool boolval;
2492 int intval;
2493 SCIP_Longint longintval;
2494 SCIP_Real realval;
2495 char charval;
2496 SCIP_Bool endoffile;
2497 SCIP_Bool error;
2498 SCIP_RETCODE retcode;
2499
2500 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2501
2502 /* get the parameter to set */
2504
2505 /* depending on the parameter type, request a user input */
2506 switch( SCIPparamGetType(param) )
2507 {
2509 (void) SCIPsnprintf(prompt, SCIP_MAXSTRLEN, "current value: %s, new value (TRUE/FALSE): ",
2510 SCIPparamGetBool(param) ? "TRUE" : "FALSE");
2512 if( endoffile )
2513 {
2514 *nextdialog = NULL;
2515 return SCIP_OKAY;
2516 }
2517 if( valuestr[0] == '\0' )
2518 return SCIP_OKAY;
2519
2521
2522 if( error )
2523 {
2524 SCIPdialogMessage(scip, NULL, "\nInvalid value <%s> for bool parameter <%s>. Must be <0>, <1>, <FALSE>, or <TRUE>.\n\n",
2525 valuestr, SCIPparamGetName(param));
2527 }
2528 else
2529 {
2531
2532 retcode = SCIPchgBoolParam(scip, param, boolval);
2533 if( retcode == SCIP_PARAMETERWRONGVAL )
2534 {
2535 SCIPdialogMessage(scip, NULL, "\nWrong value <%s> for bool parameter <%s>.\n\n",
2536 valuestr, SCIPparamGetName(param));
2537 }
2538 else
2539 {
2540 SCIP_CALL( retcode );
2541 }
2542
2543 SCIPdialogMessage(scip, NULL, "%s = %s\n", SCIPparamGetName(param), SCIPparamGetBool(param) ? "TRUE" : "FALSE");
2544 SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, boolval ? "TRUE" : "FALSE", TRUE) );
2545 }
2546
2547 break;
2548
2549 case SCIP_PARAMTYPE_INT:
2550 (void) SCIPsnprintf(prompt, SCIP_MAXSTRLEN, "current value: %d, new value [%d,%d]: ",
2553 if( endoffile )
2554 {
2555 *nextdialog = NULL;
2556 return SCIP_OKAY;
2557 }
2558 if( valuestr[0] == '\0' )
2559 return SCIP_OKAY;
2560
2562
2563 if( sscanf(valuestr, "%d", &intval) != 1 || !SCIPisIntParamValid(scip, param, intval) )
2564 {
2565 SCIPdialogMessage(scip, NULL, "\nInvalid value <%s> for int parameter <%s>. Must be integral in range [%d,%d].\n\n",
2567 }
2568 else
2569 {
2570 retcode = SCIPchgIntParam(scip, param, intval);
2571
2572 if( retcode == SCIP_PARAMETERWRONGVAL )
2573 {
2574 SCIPdialogMessage(scip, NULL, "\nWrong value <%s> for int parameter <%s>.\n\n",
2575 valuestr, SCIPparamGetName(param));
2576 }
2577 else
2578 {
2579 SCIP_CALL( retcode );
2580 }
2581
2582 SCIPdialogMessage(scip, NULL, "%s = %d\n", SCIPparamGetName(param), SCIPparamGetInt(param));
2583 }
2584
2585 break;
2586
2588 (void) SCIPsnprintf(prompt, SCIP_MAXSTRLEN, "current value: %" SCIP_LONGINT_FORMAT ", new value [%" SCIP_LONGINT_FORMAT ",%" SCIP_LONGINT_FORMAT "]: ",
2591 if( endoffile )
2592 {
2593 *nextdialog = NULL;
2594 return SCIP_OKAY;
2595 }
2596 if( valuestr[0] == '\0' )
2597 return SCIP_OKAY;
2598
2600
2602 {
2603 SCIPdialogMessage(scip, NULL, "\nInvalid value <%s> for longint parameter <%s>. Must be integral in range [%" SCIP_LONGINT_FORMAT ",%" SCIP_LONGINT_FORMAT "].\n\n",
2605 }
2606 else
2607 {
2608 retcode = SCIPchgLongintParam(scip, param, longintval);
2609 if( retcode == SCIP_PARAMETERWRONGVAL )
2610 {
2611 SCIPdialogMessage(scip, NULL, "\nWrong value <%s> for longint parameter <%s>.\n\n",
2612 valuestr, SCIPparamGetName(param));
2613 }
2614 else
2615 {
2616 SCIP_CALL( retcode );
2617 }
2618
2620 SCIPparamGetLongint(param));
2621 }
2622 break;
2623
2625 (void) SCIPsnprintf(prompt, SCIP_MAXSTRLEN, "current value: %.15g, new value [%.15g,%.15g]: ",
2628 if( endoffile )
2629 {
2630 *nextdialog = NULL;
2631 return SCIP_OKAY;
2632 }
2633 if( valuestr[0] == '\0' )
2634 return SCIP_OKAY;
2635
2637
2638 if( sscanf(valuestr, "%" SCIP_REAL_FORMAT, &realval) != 1 || !SCIPisRealParamValid(scip, param, realval) )
2639 {
2640 SCIPdialogMessage(scip, NULL, "\nInvalid real parameter value <%s> for parameter <%s>. Must be in range [%.15g,%.15g].\n\n",
2642 }
2643 else
2644 {
2645 retcode = SCIPchgRealParam(scip, param, realval);
2646 if( retcode == SCIP_PARAMETERWRONGVAL )
2647 {
2648 SCIPdialogMessage(scip, NULL, "\nWrong value <%s> for real parameter <%s>.\n\n",
2649 valuestr, SCIPparamGetName(param));
2650 }
2651 else
2652 {
2653 SCIP_CALL( retcode );
2654 }
2655
2656 SCIPdialogMessage(scip, NULL, "%s = %.15g\n", SCIPparamGetName(param), SCIPparamGetReal(param));
2657 }
2658 break;
2659
2661 (void) SCIPsnprintf(prompt, SCIP_MAXSTRLEN, "current value: <%c>, new value: ", SCIPparamGetChar(param));
2663 if( endoffile )
2664 {
2665 *nextdialog = NULL;
2666 return SCIP_OKAY;
2667 }
2668 if( valuestr[0] == '\0' )
2669 return SCIP_OKAY;
2670
2672
2673 /* coverity[secure_coding] */
2674 if( sscanf(valuestr, "%c", &charval) != 1 || !SCIPisCharParamValid(scip, param, charval) )
2675 {
2676 SCIPdialogMessage(scip, NULL, "\nInvalid char parameter value <%s>. Must be in set {%s}.\n\n",
2678 }
2679 else
2680 {
2681 retcode = SCIPchgCharParam(scip, param, charval);
2682 if( retcode == SCIP_PARAMETERWRONGVAL )
2683 {
2684 SCIPdialogMessage(scip, NULL, "\nWrong value <%s> for char parameter <%s>.\n\n",
2685 valuestr, SCIPparamGetName(param));
2686 }
2687 else
2688 {
2689 SCIP_CALL( retcode );
2690 }
2691
2692 SCIPdialogMessage(scip, NULL, "%s = %c\n", SCIPparamGetName(param), SCIPparamGetChar(param));
2693 }
2694 break;
2695
2697 (void) SCIPsnprintf(prompt, SCIP_MAXSTRLEN, "current value: <%s>, new value: ", SCIPparamGetString(param));
2699 if( endoffile )
2700 {
2701 *nextdialog = NULL;
2702 return SCIP_OKAY;
2703 }
2704 if( valuestr[0] == '\0' )
2705 return SCIP_OKAY;
2706
2708
2709 if( !SCIPisStringParamValid(scip, param, valuestr) )
2710 {
2711 SCIPdialogMessage(scip, NULL, "\nInvalid character in string parameter.\n\n");
2712 }
2713 else
2714 {
2715 retcode = SCIPchgStringParam(scip, param, valuestr);
2716 if( retcode == SCIP_PARAMETERWRONGVAL )
2717 {
2718 SCIPdialogMessage(scip, NULL, "\nWrong value <%s> for string parameter <%s>.\n\n",
2719 valuestr, SCIPparamGetName(param));
2720 }
2721 else
2722 {
2723 SCIP_CALL( retcode );
2724 }
2725
2726 SCIPdialogMessage(scip, NULL, "%s = %s\n", SCIPparamGetName(param), SCIPparamGetString(param));
2727 }
2728 break;
2729
2730 default:
2731 SCIPerrorMessage("invalid parameter type\n");
2732 return SCIP_INVALIDDATA;
2733 }
2734
2735 return SCIP_OKAY;
2736}
2737
2738/** dialog description method for the set parameter command */
2740{ /*lint --e{715}*/
2741 SCIP_PARAM* param;
2743
2744 /* get the parameter to set */
2746
2747 /* retrieve parameter's current value */
2748 switch( SCIPparamGetType(param) )
2749 {
2751 if( SCIPparamGetBool(param) )
2752 (void) SCIPsnprintf(valuestr, SCIP_MAXSTRLEN, "TRUE");
2753 else
2754 (void) SCIPsnprintf(valuestr, SCIP_MAXSTRLEN, "FALSE");
2755 break;
2756
2757 case SCIP_PARAMTYPE_INT:
2759 break;
2760
2763 break;
2764
2767 if( strchr(valuestr, '.') == NULL && strchr(valuestr, 'e') == NULL )
2768 (void) SCIPsnprintf(valuestr, SCIP_MAXSTRLEN, "%.1f", SCIPparamGetReal(param));
2769 break;
2770
2773 break;
2774
2777 break;
2778
2779 default:
2780 SCIPerrorMessage("invalid parameter type\n");
2781 return SCIP_INVALIDDATA;
2782 }
2783 valuestr[SCIP_MAXSTRLEN-1] = '\0';
2784
2785 /* display parameter's description */
2787
2788 /* display parameter's current value */
2789 SCIPdialogMessage(scip, NULL, " [%s]", valuestr);
2790
2791 return SCIP_OKAY;
2792}
2793
2794/** dialog execution method for the fix parameter command */
2796{ /*lint --e{715}*/
2797 SCIP_PARAM* param;
2798 char prompt[SCIP_MAXSTRLEN];
2799 char* valuestr;
2800 SCIP_Bool fix;
2801 SCIP_Bool endoffile;
2802 SCIP_Bool error;
2803
2804 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2805
2806 /* get the parameter to fix */
2808
2809 (void) SCIPsnprintf(prompt, SCIP_MAXSTRLEN, "current fixing status: %s, new value (TRUE/FALSE): ",
2810 SCIPparamIsFixed(param) ? "TRUE" : "FALSE");
2812 if( endoffile )
2813 {
2814 *nextdialog = NULL;
2815 return SCIP_OKAY;
2816 }
2817 if( valuestr[0] == '\0' )
2818 return SCIP_OKAY;
2819
2821
2822 if( !error )
2823 {
2824 SCIPparamSetFixed(param, fix);
2825 SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, (fix ? "TRUE" : "FALSE"), TRUE) );
2826 SCIPdialogMessage(scip, NULL, "<%s> %s\n", SCIPparamGetName(param), (fix ? "fixed" : "unfixed"));
2827 }
2828 else
2829 {
2831 SCIPdialogMessage(scip, NULL, "\nInvalid value <%s> for fixing status. Must be <0>, <1>, <FALSE>, or <TRUE>.\n\n",
2832 valuestr);
2833 }
2834
2835 return SCIP_OKAY;
2836}
2837
2838/** dialog description method for the fix parameter command */
2840{ /*lint --e{715}*/
2841 SCIP_PARAM* param;
2842
2843 /* get the parameter to set */
2845
2846 /* display parameter's description */
2848
2849 /* display parameter's current fixing status */
2850 if( SCIPparamIsFixed(param) )
2851 SCIPdialogMessage(scip, NULL, " [fixed]");
2852 else
2853 SCIPdialogMessage(scip, NULL, " [not fixed]");
2854
2855 return SCIP_OKAY;
2856}
2857
2858/** dialog execution method for the set branching direction command */
2860{ /*lint --e{715}*/
2861 SCIP_VAR* var;
2862 char prompt[SCIP_MAXSTRLEN];
2863 char* valuestr;
2864 int direction;
2865 SCIP_Bool endoffile;
2866
2867 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2868
2869 /* branching priorities cannot be set, if no problem was created */
2871 {
2872 SCIPdialogMessage(scip, NULL, "cannot set branching directions before problem was created\n");
2873 return SCIP_OKAY;
2874 }
2875
2876 /* get variable name from user */
2877 SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "variable name: ", &valuestr, &endoffile) );
2878 if( endoffile )
2879 {
2880 *nextdialog = NULL;
2881 return SCIP_OKAY;
2882 }
2883 if( valuestr[0] == '\0' )
2884 return SCIP_OKAY;
2885
2886 /* find variable */
2888 if( var == NULL )
2889 {
2890 SCIPdialogMessage(scip, NULL, "variable <%s> does not exist in problem\n", valuestr);
2891 return SCIP_OKAY;
2892 }
2893
2894 /* get new branching direction from user */
2896 {
2898 direction = -1;
2899 break;
2901 direction = 0;
2902 break;
2904 direction = +1;
2905 break;
2907 default:
2908 SCIPerrorMessage("invalid preferred branching direction <%d> of variable <%s>\n",
2910 return SCIP_INVALIDDATA;
2911 }
2912 (void) SCIPsnprintf(prompt, SCIP_MAXSTRLEN, "current value: %d, new value: ", direction);
2914 if( endoffile )
2915 {
2916 *nextdialog = NULL;
2917 return SCIP_OKAY;
2918 }
2921 if( valuestr[0] == '\0' )
2922 return SCIP_OKAY;
2923
2925
2926 /* coverity[secure_coding] */
2927 if( sscanf(valuestr, "%d", &direction) != 1 )
2928 {
2929 SCIPdialogMessage(scip, NULL, "\ninvalid input <%s>\n\n", valuestr);
2930 return SCIP_OKAY;
2931 }
2933 {
2934 SCIPdialogMessage(scip, NULL, "\ninvalid input <%d>: direction must be -1, 0, or +1\n\n", direction);
2935 return SCIP_OKAY;
2936 }
2937
2938 /* set new branching direction */
2939 if( direction == -1 )
2941 else if( direction == 0 )
2943 else
2945
2946 SCIPdialogMessage(scip, NULL, "branching direction of variable <%s> set to %d\n", SCIPvarGetName(var), direction);
2947
2948 return SCIP_OKAY;
2949}
2950
2951/** dialog execution method for the set branching priority command */
2953{ /*lint --e{715}*/
2954 SCIP_VAR* var;
2955 char prompt[SCIP_MAXSTRLEN];
2956 char* valuestr;
2957 int priority;
2958 SCIP_Bool endoffile;
2959
2960 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
2961
2962 /* branching priorities cannot be set, if no problem was created */
2964 {
2965 SCIPdialogMessage(scip, NULL, "cannot set branching priorities before problem was created\n");
2966 return SCIP_OKAY;
2967 }
2968
2969 /* get variable name from user */
2970 SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "variable name: ", &valuestr, &endoffile) );
2971 if( endoffile )
2972 {
2973 *nextdialog = NULL;
2974 return SCIP_OKAY;
2975 }
2976 if( valuestr[0] == '\0' )
2977 return SCIP_OKAY;
2978
2979 /* find variable */
2981 if( var == NULL )
2982 {
2983 SCIPdialogMessage(scip, NULL, "variable <%s> does not exist in problem\n", valuestr);
2984 return SCIP_OKAY;
2985 }
2986
2987 /* get new branching priority from user */
2988 (void) SCIPsnprintf(prompt, SCIP_MAXSTRLEN, "current value: %d, new value: ", SCIPvarGetBranchPriority(var));
2990 if( endoffile )
2991 {
2992 *nextdialog = NULL;
2993 return SCIP_OKAY;
2994 }
2997 if( valuestr[0] == '\0' )
2998 return SCIP_OKAY;
2999
3001
3002 /* coverity[secure_coding] */
3003 if( sscanf(valuestr, "%d", &priority) != 1 )
3004 {
3005 SCIPdialogMessage(scip, NULL, "\ninvalid input <%s>\n\n", valuestr);
3006 return SCIP_OKAY;
3007 }
3008
3009 /* set new branching priority */
3011 SCIPdialogMessage(scip, NULL, "branching priority of variable <%s> set to %d\n", SCIPvarGetName(var), SCIPvarGetBranchPriority(var));
3012
3013 return SCIP_OKAY;
3014}
3015
3016/** dialog execution method for the set heuristics aggressive command */
3027
3028/** dialog execution method for the set heuristics default command */
3039
3040/** dialog execution method for the set heuristics fast command */
3051
3052/** dialog execution method for the set heuristics off command */
3063
3064/** dialog execution method for the set presolving aggressive command */
3075
3076/** dialog execution method for the set presolving default command */
3087
3088/** dialog execution method for the set presolving fast command */
3099
3100/** dialog execution method for the set presolving off command */
3111
3112/** dialog execution method for the set separating aggressive command */
3123
3124/** dialog execution method for the set separating default command */
3135
3136/** dialog execution method for the set separating fast command */
3147
3148/** dialog execution method for the set separating off command */
3159
3160/** dialog execution method for the set emphasis counter command */
3162{ /*lint --e{715}*/
3164
3165 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
3166
3167 /* set parameters for counting problems; we do not reset parameters to their default values first, since the user
3168 * should be able to combine emphasis settings in the interactive shell
3169 */
3171
3172 return SCIP_OKAY;
3173}
3174
3175/** dialog execution method for the set emphasis cpsolver command */
3177{ /*lint --e{715}*/
3179
3180 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
3181
3182 /* set parameters for CP like search problems; we do not reset parameters to their default values first, since the
3183 * user should be able to combine emphasis settings in the interactive shell
3184 */
3186
3187 return SCIP_OKAY;
3188}
3189
3190/** dialog execution method for the set emphasis easy CIP command */
3192{ /*lint --e{715}*/
3194
3195 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
3196
3197 /* set parameters for easy CIP problems; we do not reset parameters to their default values first, since the user
3198 * should be able to combine emphasis settings in the interactive shell
3199 */
3201
3202 return SCIP_OKAY;
3203}
3204
3205/** dialog execution method for the set emphasis feasibility command */
3207{ /*lint --e{715}*/
3209
3210 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
3211
3212 /* set parameters for feasibility problems; we do not reset parameters to their default values first, since the user
3213 * should be able to combine emphasis settings in the interactive shell
3214 */
3216
3217 return SCIP_OKAY;
3218}
3219
3220/** dialog execution method for the set emphasis hard LP command */
3222{ /*lint --e{715}*/
3224
3225 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
3226
3227 /* set parameters for problems with hard LP; we do not reset parameters to their default values first, since the user
3228 * should be able to combine emphasis settings in the interactive shell
3229 */
3231
3232 return SCIP_OKAY;
3233}
3234
3235/** dialog execution method for the set emphasis optimality command */
3237{ /*lint --e{715}*/
3239
3240 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
3241
3242 /* set parameters for problems to prove optimality fast; we do not reset parameters to their default values first,
3243 * since the user should be able to combine emphasis settings in the interactive shell
3244 */
3246
3247 return SCIP_OKAY;
3248}
3249
3250/** dialog execution method for the set emphasis numerics command */
3252{ /*lint --e{715}*/
3254
3255 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
3256
3257 /* set parameters for problems to prove optimality fast; we do not reset parameters to their default values first,
3258 * since the user should be able to combine emphasis settings in the interactive shell
3259 */
3261
3262 return SCIP_OKAY;
3263}
3264
3265/** dialog execution method for the set emphasis benchmark command */
3267{ /*lint --e{715}*/
3269
3270 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
3271
3272 /* set parameters for problems to run in benchmark mode; we do not reset parameters to their default values first,
3273 * since the user should be able to combine emphasis settings in the interactive shell
3274 */
3276
3277 return SCIP_OKAY;
3278}
3279
3280/** dialog execution method for the set limits objective command */
3282{ /*lint --e{715}*/
3283 char prompt[SCIP_MAXSTRLEN];
3284 char* valuestr;
3285 SCIP_Real objlim;
3286 SCIP_Bool endoffile;
3287
3288 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
3289
3290 /* objective limit cannot be set, if no problem was created */
3292 {
3293 SCIPdialogMessage(scip, NULL, "cannot set objective limit before problem was created\n");
3294 return SCIP_OKAY;
3295 }
3296
3297 /* get new objective limit from user */
3298 (void) SCIPsnprintf(prompt, SCIP_MAXSTRLEN, "current value: %.15g, new value: ", SCIPgetObjlimit(scip));
3300 if( endoffile )
3301 {
3302 *nextdialog = NULL;
3303 return SCIP_OKAY;
3304 }
3305 if( valuestr[0] == '\0' )
3306 return SCIP_OKAY;
3307
3309
3310 /* coverity[secure_coding] */
3311 if( sscanf(valuestr, "%" SCIP_REAL_FORMAT, &objlim) != 1 )
3312 {
3313 SCIPdialogMessage(scip, NULL, "\ninvalid input <%s>\n\n", valuestr);
3314 return SCIP_OKAY;
3315 }
3316
3317 /* check, if new objective limit is valid */
3320 {
3321 SCIPdialogMessage(scip, NULL, "\ncannot relax objective limit from %.15g to %.15g after problem was transformed\n\n",
3322 SCIPgetObjlimit(scip), objlim);
3323 return SCIP_OKAY;
3324 }
3325
3326 /* set new objective limit */
3327 SCIP_CALL( SCIPsetObjlimit(scip, objlim) );
3328 SCIPdialogMessage(scip, NULL, "objective value limit set to %.15g\n", SCIPgetObjlimit(scip));
3329
3330 return SCIP_OKAY;
3331}
3332
3333/** dialog execution method for the write LP command */
3334static
3336{ /*lint --e{715}*/
3337 char* filename;
3338 SCIP_Bool endoffile;
3339
3340 SCIPdialogMessage(scip, NULL, "\n");
3341
3342 /* node relaxations only exist in solving & solved stage */
3344 {
3345 SCIPdialogMessage(scip, NULL, "There is no node LP relaxation before solving starts\n");
3346 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
3347 return SCIP_OKAY;
3348 }
3350 {
3351 SCIPdialogMessage(scip, NULL, "There is no node LP relaxation after problem was solved\n");
3352 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
3353 return SCIP_OKAY;
3354 }
3355
3356 SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "enter filename: ", &filename, &endoffile) );
3357 if( endoffile )
3358 {
3359 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
3360 return SCIP_OKAY;
3361 }
3362 if( filename[0] != '\0' )
3363 {
3364 SCIP_RETCODE retcode;
3365
3366 SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, filename, TRUE) );
3367 retcode = SCIPwriteLP(scip, filename);
3368
3369 if( retcode == SCIP_FILECREATEERROR )
3370 {
3371 SCIPdialogMessage(scip, NULL, "error not creating file <%s>\n", filename);
3372 }
3373 else
3374 {
3375 SCIP_CALL( retcode );
3376
3377 SCIPdialogMessage(scip, NULL, "written node LP relaxation to file <%s>\n", filename);
3378 }
3379 }
3380
3381 SCIPdialogMessage(scip, NULL, "\n");
3382
3383 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
3384
3385 return SCIP_OKAY;
3386}
3387
3388/** dialog execution method for the write MIP command */
3389static
3391{ /*lint --e{715}*/
3392 char command[SCIP_MAXSTRLEN];
3393 char filename[SCIP_MAXSTRLEN];
3394 SCIP_Bool endoffile;
3395 char* valuestr;
3396 SCIP_Bool offset;
3397 SCIP_Bool generic;
3398 SCIP_Bool lazyconss;
3399 SCIP_Bool error;
3400
3401 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
3402
3403 /* node relaxations only exist in solving & solved stage */
3405 {
3406 SCIPdialogMessage(scip, NULL, "There is no node MIP relaxation before solving starts\n");
3407 return SCIP_OKAY;
3408 }
3410 {
3411 SCIPdialogMessage(scip, NULL, "There is no node MIP relaxation after problem was solved\n");
3412 return SCIP_OKAY;
3413 }
3414
3415 /* first get file name */
3416 SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "enter filename: ", &valuestr, &endoffile) );
3417 if( endoffile )
3418 {
3419 *nextdialog = NULL;
3420 return SCIP_OKAY;
3421 }
3422 if( valuestr[0] == '\0' )
3423 return SCIP_OKAY;
3424
3426
3427 /* second ask for generic variable and row names */
3429 "using generic variable and row names (TRUE/FALSE): ",
3430 &valuestr, &endoffile) );
3431
3432 if( endoffile )
3433 {
3434 *nextdialog = NULL;
3435 return SCIP_OKAY;
3436 }
3437 if( valuestr[0] == '\0' )
3438 return SCIP_OKAY;
3439
3440 generic = parseBoolValue(scip, valuestr, &error);
3441
3442 if( error )
3443 {
3444 SCIPdialogMessage(scip, NULL, "\nInvalid value <%s>. Must be <0>, <1>, <FALSE>, or <TRUE>.\n\n",
3445 valuestr);
3446
3447 return SCIP_OKAY;
3448 }
3449
3450 /* adjust command and add to the history */
3452 (void) SCIPsnprintf(command, SCIP_MAXSTRLEN, "%s %s", command, generic ? "TRUE" : "FALSE");
3453
3454 /* third ask if for adjusting the objective offset */
3456 "using original objective function (TRUE/FALSE): ",
3457 &valuestr, &endoffile) );
3458
3459 if( endoffile )
3460 {
3461 *nextdialog = NULL;
3462 return SCIP_OKAY;
3463 }
3464 if( valuestr[0] == '\0' )
3465 return SCIP_OKAY;
3466
3468
3469 if( error )
3470 {
3471 SCIPdialogMessage(scip, NULL, "\nInvalid value <%s>. Must be <0>, <1>, <FALSE>, or <TRUE>.\n\n",
3472 valuestr);
3473
3474 return SCIP_OKAY;
3475 }
3476
3477 (void) SCIPsnprintf(command, SCIP_MAXSTRLEN, "%s %s", command, offset ? "TRUE" : "FALSE");
3479
3480 /* fourth ask for lazy constraints */
3482 "output removable rows as lazy constraints (TRUE/FALSE): ",
3483 &valuestr, &endoffile) );
3484
3485 if( endoffile )
3486 {
3487 *nextdialog = NULL;
3488 return SCIP_OKAY;
3489 }
3490 if( valuestr[0] == '\0' )
3491 return SCIP_OKAY;
3492
3494
3495 if( error )
3496 {
3497 SCIPdialogMessage(scip, NULL, "\nInvalid value <%s>. Must be <0>, <1>, <FALSE>, or <TRUE>.\n\n",
3498 valuestr);
3499
3500 return SCIP_OKAY;
3501 }
3502
3503 /* adjust command and add to the history */
3505 (void) SCIPsnprintf(command, SCIP_MAXSTRLEN, "%s %s", command, lazyconss ? "TRUE" : "FALSE");
3506
3507 /* execute command */
3509 SCIPdialogMessage(scip, NULL, "written node MIP relaxation to file <%s>\n", filename);
3510
3511 SCIPdialogMessage(scip, NULL, "\n");
3512
3513 return SCIP_OKAY;
3514}
3515
3516
3517/** dialog execution method for the write NLP command */
3518static
3520{ /*lint --e{715}*/
3521 char* filename;
3522 SCIP_Bool endoffile;
3523
3524 SCIPdialogMessage(scip, NULL, "\n");
3525
3526 /* node relaxations only exist in solving & solved stage */
3528 {
3529 SCIPdialogMessage(scip, NULL, "There is no node NLP relaxation before solving starts\n");
3530 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
3531 return SCIP_OKAY;
3532 }
3534 {
3535 SCIPdialogMessage(scip, NULL, "There is no node NLP relaxation after problem was solved\n");
3536 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
3537 return SCIP_OKAY;
3538 }
3540 {
3541 SCIPdialogMessage(scip, NULL, "There has been no node NLP relaxation constructed\n");
3542 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
3543 return SCIP_OKAY;
3544 }
3545
3546 SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "enter filename: ", &filename, &endoffile) );
3547 if( endoffile )
3548 {
3549 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
3550 return SCIP_OKAY;
3551 }
3552 if( filename[0] != '\0' )
3553 {
3554 SCIP_RETCODE retcode;
3555
3556 SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, filename, TRUE) );
3557 retcode = SCIPwriteNLP(scip, filename);
3558
3559 if( retcode == SCIP_FILECREATEERROR )
3560 {
3561 SCIPdialogMessage(scip, NULL, "error not creating file <%s>\n", filename);
3562 }
3563 else
3564 {
3565 SCIP_CALL( retcode );
3566
3567 SCIPdialogMessage(scip, NULL, "written node NLP relaxation to file <%s>\n", filename);
3568 }
3569 }
3570
3571 SCIPdialogMessage(scip, NULL, "\n");
3572
3573 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
3574
3575 return SCIP_OKAY;
3576}
3577
3578/** dialog execution method for the write problem command */
3579static
3581{ /*lint --e{715}*/
3583
3585 {
3587 }
3588 else
3589 SCIPdialogMessage(scip, NULL, "no problem available\n");
3590
3591 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
3592
3593 return SCIP_OKAY;
3594}
3595
3596/** dialog execution method for the write generic problem command */
3597static
3599{ /*lint --e{715}*/
3601
3603 {
3605 }
3606 else
3607 SCIPdialogMessage(scip, NULL, "no problem available\n");
3608
3609 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
3610
3611 return SCIP_OKAY;
3612}
3613
3614/** dialog execution method for the write solution command */
3615static
3617{ /*lint --e{715}*/
3618 char* filename;
3619 SCIP_Bool endoffile;
3620
3621 SCIPdialogMessage(scip, NULL, "\n");
3622
3623 SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "enter filename: ", &filename, &endoffile) );
3624 if( endoffile )
3625 {
3626 *nextdialog = NULL;
3627 return SCIP_OKAY;
3628 }
3629 if( filename[0] != '\0' )
3630 {
3631 FILE* file;
3632
3633 SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, filename, TRUE) );
3634
3635 file = fopen(filename, "w");
3636 if( file == NULL )
3637 {
3638 SCIPdialogMessage(scip, NULL, "error creating file <%s>\n", filename);
3639 SCIPdialoghdlrClearBuffer(dialoghdlr);
3640 }
3641 else
3642 {
3643 SCIP_Bool printzeros;
3644
3645 SCIPinfoMessage(scip, file, "solution status: ");
3647
3648 SCIP_CALL_FINALLY( SCIPgetBoolParam(scip, "write/printzeros", &printzeros), fclose(file) );
3649
3650 SCIPinfoMessage(scip, file, "\n");
3652
3653 SCIPdialogMessage(scip, NULL, "written solution information to file <%s>\n", filename);
3654 fclose(file);
3655 }
3656 } /*lint !e593*/
3657
3658 SCIPdialogMessage(scip, NULL, "\n");
3659
3660 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
3661
3662 return SCIP_OKAY;
3663}
3664
3665/** dialog execution method for the write mipstart command */
3666static
3668{ /*lint --e{715}*/
3669 char* filename;
3670 SCIP_Bool endoffile;
3671
3672 SCIPdialogMessage(scip, NULL, "\n");
3673
3674 SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "enter filename: ", &filename, &endoffile) );
3675 if( endoffile )
3676 {
3677 *nextdialog = NULL;
3678 return SCIP_OKAY;
3679 }
3680 if( filename[0] != '\0' )
3681 {
3682 FILE* file;
3683
3684 SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, filename, TRUE) );
3685
3686 file = fopen(filename, "w");
3687 if( file == NULL )
3688 {
3689 SCIPdialogMessage(scip, NULL, "error creating file <%s>\n", filename);
3690 SCIPdialoghdlrClearBuffer(dialoghdlr);
3691 }
3692 else
3693 {
3694 SCIP_SOL* sol;
3695
3696 SCIPinfoMessage(scip, file, "\n");
3697
3699
3700 if( sol == NULL )
3701 {
3702 SCIPdialogMessage(scip, NULL, "no mip start available\n");
3703 }
3704 else
3705 {
3707
3708 SCIPdialogMessage(scip, NULL, "written mip start information to file <%s>\n", filename);
3709 }
3710 fclose(file);
3711 }
3712 } /*lint !e593*/
3713
3714 SCIPdialogMessage(scip, NULL, "\n");
3715
3716 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
3717
3718 return SCIP_OKAY;
3719}
3720
3721/** dialog execution method for writing command line history */
3722static
3724{ /*lint --e{715}*/
3725 char* filename;
3726 SCIP_Bool endoffile;
3727
3728 SCIPdialogMessage(scip, NULL, "\n");
3729
3730 SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "enter filename: ", &filename, &endoffile) );
3731 if( endoffile )
3732 {
3733 *nextdialog = NULL;
3734 return SCIP_OKAY;
3735 }
3736 if( filename[0] != '\0' )
3737 {
3738 SCIP_RETCODE retcode;
3739
3740 SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, filename, TRUE) );
3741
3742 retcode = SCIPdialogWriteHistory(filename);
3743
3744 if( retcode != SCIP_OKAY )
3745 {
3746 SCIPdialogMessage(scip, NULL, "error writing to file <%s>\n"
3747 "check that the directory exists and that you have correct permissions\n", filename);
3748 SCIPdialoghdlrClearBuffer(dialoghdlr);
3749 }
3750 else
3751 {
3752 SCIPdialogMessage(scip, NULL, "wrote available command line history to <%s>\n", filename);
3753 }
3754 }
3755
3756 SCIPdialogMessage(scip, NULL, "\n");
3757
3758 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
3759
3760 return SCIP_OKAY;
3761}
3762
3763/** dialog execution method for the write finitesolution command */
3764static
3766{ /*lint --e{715}*/
3767 char* filename;
3768 SCIP_Bool endoffile;
3769
3770 SCIPdialogMessage(scip, NULL, "\n");
3771
3772 SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "enter filename: ", &filename, &endoffile) );
3773 if( endoffile )
3774 {
3775 *nextdialog = NULL;
3776 return SCIP_OKAY;
3777 }
3778 if( filename[0] != '\0' )
3779 {
3780 FILE* file;
3781
3782 SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, filename, TRUE) );
3783
3784 file = fopen(filename, "w");
3785 if( file == NULL )
3786 {
3787 SCIPdialogMessage(scip, NULL, "error creating file <%s>\n", filename);
3788 SCIPdialoghdlrClearBuffer(dialoghdlr);
3789 }
3790 else
3791 {
3792 SCIP_SOL* bestsol = SCIPgetBestSol(scip);
3793 SCIP_Bool printzeros;
3794
3795 SCIPinfoMessage(scip, file, "solution status: ");
3796
3798
3799 SCIPinfoMessage(scip, file, "\n");
3800
3801 if( bestsol != NULL )
3802 {
3803 SCIP_SOL* sol;
3804 SCIP_Bool success;
3805
3807
3808 SCIP_CALL_FINALLY( SCIPgetBoolParam(scip, "write/printzeros", &printzeros), fclose(file) );
3809
3810 if( sol != NULL )
3811 {
3813
3814 SCIPdialogMessage(scip, NULL, "written solution information to file <%s>\n", filename);
3815
3817 }
3818 else
3819 {
3820 SCIPmessageFPrintInfo(SCIPgetMessagehdlr(scip), file, "finite solution could not be created\n");
3821 SCIPdialogMessage(scip, NULL, "finite solution could not be created\n");
3822 }
3823 }
3824 else
3825 {
3826 SCIPmessageFPrintInfo(SCIPgetMessagehdlr(scip), file, "no solution available\n");
3827 SCIPdialogMessage(scip, NULL, "no solution available\n");
3828 }
3829
3830 fclose(file);
3831 }
3832 } /*lint !e593*/
3833
3834 SCIPdialogMessage(scip, NULL, "\n");
3835
3836 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
3837
3838 return SCIP_OKAY;
3839}
3840
3841/** dialog execution method for the write statistics command */
3842static
3844{ /*lint --e{715}*/
3845 char* filename;
3846 SCIP_Bool endoffile;
3847
3848 SCIPdialogMessage(scip, NULL, "\n");
3849
3850 SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "enter filename: ", &filename, &endoffile) );
3851 if( endoffile )
3852 {
3853 *nextdialog = NULL;
3854 return SCIP_OKAY;
3855 }
3856 if( filename[0] != '\0' )
3857 {
3858 FILE* file;
3859
3860 SCIP_CALL( SCIPdialoghdlrAddHistory(dialoghdlr, dialog, filename, TRUE) );
3861
3862 file = fopen(filename, "w");
3863 if( file == NULL )
3864 {
3865 SCIPdialogMessage(scip, NULL, "error creating file <%s>\n", filename);
3866 SCIPprintSysError(filename);
3867 SCIPdialoghdlrClearBuffer(dialoghdlr);
3868 }
3869 else
3870 {
3872
3873 SCIPdialogMessage(scip, NULL, "written statistics to file <%s>\n", filename);
3874 fclose(file);
3875 }
3876 } /*lint !e593*/
3877
3878 SCIPdialogMessage(scip, NULL, "\n");
3879
3880 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
3881
3882 return SCIP_OKAY;
3883}
3884
3885/** dialog execution method for the write transproblem command */
3886static
3888{ /*lint --e{715}*/
3890
3892 {
3894 }
3895 else
3896 SCIPdialogMessage(scip, NULL, "no transformed problem available\n");
3897
3898 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
3899
3900 return SCIP_OKAY;
3901}
3902
3903/** dialog execution method for the write generic transproblem command */
3904static
3906{ /*lint --e{715}*/
3908
3910 {
3911 SCIP_CALL( writeProblem(scip, dialog, dialoghdlr, nextdialog, TRUE, TRUE) );
3912 }
3913 else
3914 SCIPdialogMessage(scip, NULL, "no transformed problem available\n");
3915
3916 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
3917
3918 return SCIP_OKAY;
3919}
3920
3921/** dialog execution method for solution validation */
3922static
3924{ /*lint --e{715}*/
3926
3928 {
3929 SCIPdialogMessage(scip, NULL, "\nNo problem available for validation\n");
3930 }
3931 else
3932 {
3933 char *refstrs[2];
3934 SCIP_Real refvals[2] = {SCIP_INVALID, SCIP_INVALID};
3935 const char* primaldual[] = {"primal", "dual"};
3936 char prompt[SCIP_MAXSTRLEN];
3937 int i;
3938
3939 /* read in primal and dual reference values */
3940 for( i = 0; i < 2; ++i )
3941 {
3942 char * endptr;
3943 SCIP_Bool endoffile;
3944
3945 (void)SCIPsnprintf(prompt, SCIP_MAXSTRLEN, "Please enter %s validation reference bound (or use +/-infinity) :", primaldual[i]);
3947
3948 /* treat no input as SCIP_UNKNOWN */
3949 if( endoffile || strncmp(refstrs[i], "\0", 1) == 0 ) /*lint !e840*/
3950 {
3952 }
3953 else if( strncmp(refstrs[i], "q", 1) == 0 )
3954 break;
3955 else if( ! SCIPparseReal(scip, refstrs[i], &refvals[i], &endptr) )
3956 {
3957 SCIPdialogMessage(scip, NULL, "Could not parse value '%s', please try again or type 'q' to quit\n", refstrs[i]);
3958 --i; /*lint !e850*/
3959 }
3960 }
3961
3962 /* check if the loop finished by checking the value of 'i'. Do not validate if user input is missing */
3963 if( i == 2 ) /*lint !e850*/
3964 {
3965 assert(refvals[0] != SCIP_INVALID); /*lint !e777*/
3966 assert(refvals[1] != SCIP_INVALID); /*lint !e777*/
3968 }
3969 }
3970
3971 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
3972
3973 return SCIP_OKAY;
3974}
3975
3976/** dialog execution method for linear constraint type classification */
3978{ /*lint --e{715}*/
3980
3982 SCIPdialogMessage(scip, NULL, "\nNo problem available for classification\n");
3983 else
3984 {
3986
3988
3989 /* call linear constraint classification and print the statistics to standard out */
3991
3993
3995 }
3996
3997 *nextdialog = SCIPdialoghdlrGetRoot(dialoghdlr);
3998
3999 return SCIP_OKAY;
4000}
4001
4002/** creates a root dialog */
4004 SCIP* scip, /**< SCIP data structure */
4005 SCIP_DIALOG** root /**< pointer to store the root dialog */
4006 )
4007{
4011 "SCIP", "SCIP's main menu", TRUE, NULL) );
4012
4013 SCIP_CALL( SCIPsetRootDialog(scip, *root) );
4015 *root = SCIPgetRootDialog(scip);
4016
4017 return SCIP_OKAY;
4018}
4019
4020
4021/** includes or updates the default dialog menus in SCIP except for menus "fix" and "set" */
4023 SCIP* scip /**< SCIP data structure */
4024 )
4025{
4026 SCIP_DIALOG* root;
4029
4030 /* root menu */
4031 root = SCIPgetRootDialog(scip);
4032 if( root == NULL )
4033 {
4035 }
4036
4037 /* change */
4038 if( !SCIPdialogHasEntry(root, "change") )
4039 {
4041 NULL,
4043 "change", "change the problem", TRUE, NULL) );
4046 }
4047 if( SCIPdialogFindEntry(root, "change", &submenu) != 1 )
4048 {
4049 SCIPerrorMessage("change sub menu not found\n");
4050 return SCIP_PLUGINNOTFOUND;
4051 }
4052
4053 /* change add */
4054 if( !SCIPdialogHasEntry(submenu, "add") )
4055 {
4057 NULL,
4059 "add", "add constraint", FALSE, NULL) );
4062 }
4063
4064 /* change bounds */
4065 if( !SCIPdialogHasEntry(submenu, "bounds") )
4066 {
4068 NULL,
4070 "bounds", "change bounds of a variable", FALSE, NULL) );
4073 }
4074
4075 /* free transformed problem */
4076 if( !SCIPdialogHasEntry(submenu, "freetransproblem") )
4077 {
4079 NULL,
4081 "freetransproblem", "free transformed problem", FALSE, NULL) );
4084 }
4085
4086 /* change objective sense */
4087 if( !SCIPdialogHasEntry(submenu, "objsense") )
4088 {
4090 NULL,
4092 "objsense", "change objective sense", FALSE, NULL) );
4095 }
4096
4097 /* checksol */
4098 if( !SCIPdialogHasEntry(root, "checksol") )
4099 {
4101 NULL,
4103 "checksol", "double checks best solution w.r.t. original problem", FALSE, NULL) );
4106 }
4107
4108 /* display */
4109 if( !SCIPdialogHasEntry(root, "display") )
4110 {
4112 NULL,
4114 "display", "display information", TRUE, NULL) );
4117 }
4118 if( SCIPdialogFindEntry(root, "display", &submenu) != 1 )
4119 {
4120 SCIPerrorMessage("display sub menu not found\n");
4121 return SCIP_PLUGINNOTFOUND;
4122 }
4123
4124 /* display benders */
4125 if( !SCIPdialogHasEntry(submenu, "benders") )
4126 {
4128 NULL,
4130 "benders", "display Benders' decomposition", FALSE, NULL) );
4133 }
4134
4135 /* display branching */
4136 if( !SCIPdialogHasEntry(submenu, "branching") )
4137 {
4139 NULL,
4141 "branching", "display branching rules", FALSE, NULL) );
4144 }
4145
4146 /* display compressions */
4147 if( !SCIPdialogHasEntry(submenu, "compression") )
4148 {
4150 NULL,
4152 "compression", "display compression techniques", FALSE, NULL) );
4155 }
4156
4157 /* display conflict */
4158 if( !SCIPdialogHasEntry(submenu, "conflict") )
4159 {
4161 NULL,
4163 "conflict", "display conflict handlers", FALSE, NULL) );
4166 }
4167
4168 /* display conshdlrs */
4169 if( !SCIPdialogHasEntry(submenu, "conshdlrs") )
4170 {
4172 NULL,
4174 "conshdlrs", "display constraint handlers", FALSE, NULL) );
4177 }
4178
4179 /* display displaycols */
4180 if( !SCIPdialogHasEntry(submenu, "displaycols") )
4181 {
4183 NULL,
4185 "displaycols", "display display columns", FALSE, NULL) );
4188 }
4189
4190 /* display exprhdlrs */
4191 if( !SCIPdialogHasEntry(submenu, "exprhdlrs") )
4192 {
4194 NULL,
4196 "exprhdlrs", "display expression handlers", FALSE, NULL) );
4199 }
4200
4201 /* display cut selectors */
4202 if( !SCIPdialogHasEntry(submenu, "cutselectors") ) {
4204 NULL,
4206 "cutselectors", "display cut selectors", FALSE, NULL));
4209 }
4210
4211 /* display heuristics */
4212 if( !SCIPdialogHasEntry(submenu, "heuristics") )
4213 {
4215 NULL,
4217 "heuristics", "display primal heuristics", FALSE, NULL) );
4220 }
4221
4222 /* display memory */
4223 if( !SCIPdialogHasEntry(submenu, "memory") )
4224 {
4226 NULL,
4228 "memory", "display memory diagnostics", FALSE, NULL) );
4231 }
4232
4233 /* display nlpi */
4234 if( !SCIPdialogHasEntry(submenu, "nlpis") )
4235 {
4237 NULL,
4239 "nlpis", "display NLP solver interfaces", FALSE, NULL) );
4242 }
4243
4244 /* display nodeselectors */
4245 if( !SCIPdialogHasEntry(submenu, "nodeselectors") )
4246 {
4248 NULL,
4250 "nodeselectors", "display node selectors", FALSE, NULL) );
4253 }
4254
4255 /* display parameters */
4256 if( !SCIPdialogHasEntry(submenu, "parameters") )
4257 {
4259 NULL,
4261 "parameters", "display non-default parameter settings", FALSE, NULL) );
4264 }
4265
4266 /* display presolvers */
4267 if( !SCIPdialogHasEntry(submenu, "presolvers") )
4268 {
4270 NULL,
4272 "presolvers", "display presolvers", FALSE, NULL) );
4275 }
4276
4277 /* display pricers */
4278 if( !SCIPdialogHasEntry(submenu, "pricers") )
4279 {
4281 NULL,
4283 "pricers", "display pricers", FALSE, NULL) );
4286 }
4287
4288 /* display problem */
4289 if( !SCIPdialogHasEntry(submenu, "problem") )
4290 {
4292 NULL,
4294 "problem", "display original problem", FALSE, NULL) );
4297 }
4298
4299 /* display propagators */
4300 if( !SCIPdialogHasEntry(submenu, "propagators") )
4301 {
4303 NULL,
4305 "propagators", "display propagators", FALSE, NULL) );
4308 }
4309
4310 /* display readers */
4311 if( !SCIPdialogHasEntry(submenu, "readers") )
4312 {
4314 NULL,
4316 "readers", "display file readers", FALSE, NULL) );
4319 }
4320
4321 /* display relaxing */
4322 if( !SCIPdialogHasEntry(submenu, "relaxators") )
4323 {
4325 NULL,
4327 "relaxators", "display relaxators", FALSE, NULL) );
4330 }
4331
4332 /* display separators */
4333 if( !SCIPdialogHasEntry(submenu, "separators") )
4334 {
4336 NULL,
4338 "separators", "display cut separators", FALSE, NULL) );
4341 }
4342
4343 /* display solution */
4344 if( !SCIPdialogHasEntry(submenu, "solution") )
4345 {
4347 NULL,
4349 "solution", "display best primal solution", FALSE, NULL) );
4352 }
4353
4354 /* display finite solution */
4355 if( !SCIPdialogHasEntry(submenu, "finitesolution") )
4356 {
4358 NULL,
4360 "finitesolution", "display best primal solution (try to make solution values finite, first)", FALSE, NULL) );
4363 }
4364
4365 /* display solution */
4366 if( !SCIPdialogHasEntry(submenu, "dualsolution") )
4367 {
4369 NULL,
4371 "dualsolution", "display dual solution vector (LP only, without presolving)", FALSE, NULL) );
4374 }
4375
4376 /* display solution */
4377 if( !SCIPdialogHasEntry(submenu, "sols") )
4378 {
4380 NULL,
4382 "sols", "display solutions from pool", FALSE, NULL) );
4385 }
4386
4387 /* display benders decomposition subproblem */
4388 if( !SCIPdialogHasEntry(submenu, "subproblem") )
4389 {
4391 NULL,
4393 "subproblem", "display subproblem of a Benders' decomposition", FALSE, NULL) );
4396 }
4397
4398 /* display the best solution to the benders decomposition subproblem */
4399 if( !SCIPdialogHasEntry(submenu, "subsolution") )
4400 {
4402 NULL,
4404 "subsolution", "display solution to the Benders' decomposition subproblems given the best master problem solution", FALSE, NULL) );
4407 }
4408
4409 /* display statistics */
4410 if( !SCIPdialogHasEntry(submenu, "statistics") )
4411 {
4413 NULL,
4415 "statistics", "display problem and optimization statistics", FALSE, NULL) );
4418 }
4419
4420 /* display reoptimization statistics */
4421 if( !SCIPdialogHasEntry(submenu, "reoptstatistics") )
4422 {
4424 NULL,
4426 "reoptstatistics", "display reoptimization statistics", FALSE, NULL) );
4429 }
4430
4431 /* display transproblem */
4432 if( !SCIPdialogHasEntry(submenu, "transproblem") )
4433 {
4435 NULL,
4437 "transproblem", "display current node transformed problem", FALSE, NULL) );
4440 }
4441
4442 /* display value */
4443 if( !SCIPdialogHasEntry(submenu, "value") )
4444 {
4446 NULL,
4448 "value", "display value of single variable in best primal solution", FALSE, NULL) );
4451 }
4452
4453 /* display varbranchstatistics */
4454 if( !SCIPdialogHasEntry(submenu, "varbranchstatistics") )
4455 {
4457 NULL,
4459 "varbranchstatistics", "display statistics for branching on variables", FALSE, NULL) );
4462 }
4463
4464 /* display lpsolquality */
4465 if( !SCIPdialogHasEntry(submenu, "lpsolquality") )
4466 {
4468 NULL,
4470 "lpsolquality", "display quality of the current LP solution, if available", FALSE, NULL) );
4473 }
4474
4475 /* display transsolution */
4476 if( !SCIPdialogHasEntry(submenu, "transsolution") )
4477 {
4479 NULL,
4481 "transsolution", "display best primal solution in transformed variables", FALSE, NULL) );
4484 }
4485
4486 /* display linear constraint type classification */
4487 if( !SCIPdialogHasEntry(submenu, "linclass") )
4488 {
4490 NULL,
4492 "linclass", "linear constraint classification as used for MIPLIB", FALSE, NULL) );
4495 }
4496
4497 /* free */
4498 if( !SCIPdialogHasEntry(root, "free") )
4499 {
4501 NULL,
4503 "free", "free current problem from memory", FALSE, NULL) );
4506 }
4507
4508 /* help */
4509 if( !SCIPdialogHasEntry(root, "help") )
4510 {
4512 NULL,
4514 "help", "display this help", FALSE, NULL) );
4517 }
4518
4519 /* newstart */
4520 if( !SCIPdialogHasEntry(root, "newstart") )
4521 {
4523 NULL,
4525 "newstart", "reset branch and bound tree to start again from root", FALSE, NULL) );
4528 }
4529
4530#ifndef NDEBUG
4531 /* transform problem (for debugging) */
4532 if( !SCIPdialogHasEntry(root, "transform") )
4533 {
4535 NULL,
4537 "transform", "transforms problem from original state", FALSE, NULL) );
4540 }
4541#endif
4542
4543 /* optimize */
4544 if( !SCIPdialogHasEntry(root, "optimize") )
4545 {
4547 NULL,
4549 "optimize", "solve the problem", FALSE, NULL) );
4552 }
4553
4554 /* optimize */
4555 if( !SCIPdialogHasEntry(root, "concurrentopt") )
4556 {
4558 NULL,
4560 "concurrentopt", "solve the problem using concurrent solvers", FALSE, NULL) );
4563 }
4564
4565 /* presolve */
4566 if( !SCIPdialogHasEntry(root, "presolve") )
4567 {
4569 NULL,
4571 "presolve", "solve the problem, but stop after presolving stage", FALSE, NULL) );
4574 }
4575
4576 /* quit */
4577 if( !SCIPdialogHasEntry(root, "quit") )
4578 {
4580 NULL,
4582 "quit", "leave SCIP", FALSE, NULL) );
4585 }
4586
4587 /* read */
4588 if( !SCIPdialogHasEntry(root, "read") )
4589 {
4591 NULL,
4593 "read", "read a problem", FALSE, NULL) );
4596 }
4597
4598 /* write */
4599 if( !SCIPdialogHasEntry(root, "write") )
4600 {
4602 NULL,
4604 "write", "write information to file", TRUE, NULL) );
4607 }
4608 if( SCIPdialogFindEntry(root, "write", &submenu) != 1 )
4609 {
4610 SCIPerrorMessage("write sub menu not found\n");
4611 return SCIP_PLUGINNOTFOUND;
4612 }
4613
4614 /* write LP */
4615 if( !SCIPdialogHasEntry(submenu, "lp") )
4616 {
4618 NULL,
4620 "lp", "write current node LP relaxation in LP format to file", FALSE, NULL) );
4623 }
4624
4625 /* write MIP */
4626 if( !SCIPdialogHasEntry(submenu, "mip") )
4627 {
4629 NULL,
4631 "mip", "write current node MIP relaxation in LP format to file", FALSE, NULL) );
4634 }
4635
4636 /* write NLP */
4637 if( !SCIPdialogHasEntry(submenu, "nlp") )
4638 {
4640 NULL,
4642 "nlp", "write current node NLP relaxation to file", FALSE, NULL) );
4645 }
4646
4647 /* write problem */
4648 if( !SCIPdialogHasEntry(submenu, "problem") )
4649 {
4651 NULL,
4653 "problem",
4654 "write original problem to file (format is given by file extension, e.g., orig.{lp,rlp,cip,mps})",
4655 FALSE, NULL) );
4658 }
4659
4660 /* write generic problem */
4661 if( !SCIPdialogHasEntry(submenu, "genproblem") )
4662 {
4664 NULL,
4666 "genproblem",
4667 "write original problem with generic names to file (format is given by file extension, e.g., orig.{lp,rlp,cip,mps})",
4668 FALSE, NULL) );
4671 }
4672
4673 /* write solution */
4674 if( !SCIPdialogHasEntry(submenu, "solution") )
4675 {
4677 NULL,
4679 "solution", "write best primal solution to file", FALSE, NULL) );
4682 }
4683
4684 /* write finite solution */
4685 if( !SCIPdialogHasEntry(submenu, "finitesolution") )
4686 {
4688 NULL,
4690 "finitesolution", "write best primal solution to file (try to make solution values finite, first)", FALSE, NULL) );
4693 }
4694
4695 /* write mip start */
4696 if( !SCIPdialogHasEntry(submenu, "mipstart") )
4697 {
4699 NULL,
4701 "mipstart", "write mip start to file", FALSE, NULL) );
4704 }
4705
4706 /* write statistics */
4707 if( !SCIPdialogHasEntry(submenu, "statistics") )
4708 {
4710 NULL,
4712 "statistics", "write statistics to file", FALSE, NULL) );
4715 }
4716
4717 /* write transproblem */
4718 if( !SCIPdialogHasEntry(submenu, "transproblem") )
4719 {
4721 NULL,
4723 "transproblem",
4724 "write current node transformed problem to file (format is given by file extension, e.g., trans.{lp,rlp,cip,mps})",
4725 FALSE, NULL) );
4728 }
4729
4730 /* write transproblem with generic names */
4731 if( !SCIPdialogHasEntry(submenu, "gentransproblem") )
4732 {
4734 NULL,
4736 "gentransproblem",
4737 "write current node transformed problem with generic names to file (format is given by file extension, e.g., trans.{lp,rlp,cip,mps})",
4738 FALSE, NULL) );
4741 }
4742
4743 /* write cliquegraph */
4744 if( !SCIPdialogHasEntry(submenu, "cliquegraph") )
4745 {
4747 NULL,
4749 "cliquegraph",
4750 "write graph of cliques and implications of binary variables to GML file (better call after presolving)",
4751 FALSE, NULL) );
4754 }
4755
4756 /* write command line history */
4757 if( !SCIPdialogHasEntry(submenu, "history") )
4758 {
4760 NULL,
4762 "history",
4763 "write command line history to a file (only works if SCIP was compiled with 'readline')",
4764 FALSE, NULL) );
4767 }
4768
4769 /* validate solve */
4770 if( !SCIPdialogHasEntry(root, "validatesolve") )
4771 {
4773 "validatesolve",
4774 "validate the solution against external objective reference interval",
4775 FALSE, NULL) );
4778 }
4779
4780 return SCIP_OKAY;
4781}
4782
4783/** if a '/' occurs in the parameter's name, adds a sub menu dialog to the given menu and inserts the parameter dialog
4784 * recursively in the sub menu; if no '/' occurs in the name, adds a parameter change dialog into the given dialog menu
4785 */
4786static
4788 SCIP* scip, /**< SCIP data structure */
4789 SCIP_DIALOG* menu, /**< dialog menu to insert the parameter into */
4790 SCIP_PARAM* param, /**< parameter to add a dialog for */
4791 char* paramname /**< parameter name to parse */
4792 )
4793{
4794 char* slash;
4795 char* dirname;
4796
4797 assert(paramname != NULL);
4798
4799 /* check for a '/' */
4800 slash = strchr(paramname, '/');
4801
4802 if( slash == NULL )
4803 {
4804 /* check, if the corresponding dialog already exists */
4806 {
4808
4809 if( SCIPparamIsAdvanced(param) )
4810 {
4812
4813 if( !SCIPdialogHasEntry(menu, "advanced") )
4814 {
4815 /* if not yet existing, create an advanced sub menu */
4816 char desc[SCIP_MAXSTRLEN];
4817
4818 (void) SCIPsnprintf(desc, SCIP_MAXSTRLEN, "advanced parameters");
4820 NULL,
4821 SCIPdialogExecMenu, NULL, NULL, "advanced", desc, TRUE, NULL) );
4824 }
4825
4826 /* find the corresponding sub menu */
4827 (void)SCIPdialogFindEntry(menu, "advanced", &advmenu);
4828 if( advmenu == NULL )
4829 {
4830 SCIPerrorMessage("dialog sub menu not found\n");
4831 return SCIP_PLUGINNOTFOUND;
4832 }
4833
4835 {
4836 /* create a parameter change dialog */
4838 NULL,
4840 paramname, SCIPparamGetDesc(param), FALSE, (SCIP_DIALOGDATA*)param) );
4843 }
4844 }
4845 else
4846 {
4847 /* create a parameter change dialog */
4849 NULL,
4851 paramname, SCIPparamGetDesc(param), FALSE, (SCIP_DIALOGDATA*)param) );
4854 }
4855 }
4856 }
4857 else
4858 {
4860
4861 /* split the parameter name into dirname and parameter name */
4863 paramname = slash+1;
4864 *slash = '\0';
4865
4866 /* if not yet existing, create a corresponding sub menu */
4868 {
4869 char desc[SCIP_MAXSTRLEN];
4870
4871 (void) SCIPsnprintf(desc, SCIP_MAXSTRLEN, "parameters for <%s>", dirname);
4873 NULL,
4877 }
4878
4879 /* find the corresponding sub menu */
4881 if( submenu == NULL )
4882 {
4883 SCIPerrorMessage("dialog sub menu not found\n");
4884 return SCIP_PLUGINNOTFOUND;
4885 }
4886
4887 /* recursively call add parameter method */
4889 }
4890
4891 return SCIP_OKAY;
4892}
4893
4894/** if a '/' occurs in the parameter's name, adds a sub menu dialog to the given menu and inserts the parameter dialog
4895 * recursively in the sub menu; if no '/' occurs in the name, adds a fix parameter dialog into the given dialog menu
4896 */
4897static
4899 SCIP* scip, /**< SCIP data structure */
4900 SCIP_DIALOG* menu, /**< dialog menu to insert the parameter into */
4901 SCIP_PARAM* param, /**< parameter to add a dialog for */
4902 char* paramname /**< parameter name to parse */
4903 )
4904{
4905 char* slash;
4906 char* dirname;
4907
4908 assert(paramname != NULL);
4909
4910 /* check for a '/' */
4911 slash = strchr(paramname, '/');
4912
4913 if( slash == NULL )
4914 {
4915 /* check, if the corresponding dialog already exists */
4917 {
4919
4920 if( SCIPparamIsAdvanced(param) )
4921 {
4923
4924 if( !SCIPdialogHasEntry(menu, "advanced") )
4925 {
4926 /* if not yet existing, create an advanced sub menu */
4927 char desc[SCIP_MAXSTRLEN];
4928
4929 (void) SCIPsnprintf(desc, SCIP_MAXSTRLEN, "advanced parameters");
4931 NULL,
4932 SCIPdialogExecMenu, NULL, NULL, "advanced", desc, TRUE, NULL) );
4935 }
4936
4937 /* find the corresponding sub menu */
4938 (void)SCIPdialogFindEntry(menu, "advanced", &advmenu);
4939 if( advmenu == NULL )
4940 {
4941 SCIPerrorMessage("dialog sub menu not found\n");
4942 return SCIP_PLUGINNOTFOUND;
4943 }
4944
4946 {
4947 /* create a fix parameter dialog */
4949 NULL,
4951 paramname, SCIPparamGetDesc(param), FALSE, (SCIP_DIALOGDATA*)param) );
4954 }
4955 }
4956 else
4957 {
4958 /* create a fix parameter dialog */
4960 NULL,
4962 paramname, SCIPparamGetDesc(param), FALSE, (SCIP_DIALOGDATA*)param) );
4965 }
4966 }
4967 }
4968 else
4969 {
4971
4972 /* split the parameter name into dirname and parameter name */
4974 paramname = slash+1;
4975 *slash = '\0';
4976
4977 /* if not yet existing, create a corresponding sub menu */
4979 {
4980 char desc[SCIP_MAXSTRLEN];
4981
4982 (void) SCIPsnprintf(desc, SCIP_MAXSTRLEN, "parameters for <%s>", dirname);
4984 NULL,
4988 }
4989
4990 /* find the corresponding sub menu */
4992 if( submenu == NULL )
4993 {
4994 SCIPerrorMessage("dialog sub menu not found\n");
4995 return SCIP_PLUGINNOTFOUND;
4996 }
4997
4998 /* recursively call add parameter method */
5000 }
5001
5002 return SCIP_OKAY;
5003}
5004
5005/** create a "emphasis" sub menu */
5006static
5008 SCIP* scip, /**< SCIP data structure */
5009 SCIP_DIALOG* root, /**< the menu to add the empty sub menu */
5010 SCIP_DIALOG** submenu /**< pointer to store the created emphasis sub menu */
5011 )
5012{
5013 if( !SCIPdialogHasEntry(root, "emphasis") )
5014 {
5017 "emphasis", "predefined parameter settings", TRUE, NULL) );
5020 }
5021 else if( SCIPdialogFindEntry(root, "emphasis", submenu) != 1 )
5022 {
5023 SCIPerrorMessage("emphasis sub menu not found\n");
5024 return SCIP_PLUGINNOTFOUND;
5025 }
5026
5027 assert(*submenu != NULL);
5028
5029 return SCIP_OKAY;
5030}
5031
5032
5033/** includes or updates the "set" menu for each available parameter setting */
5035 SCIP* scip /**< SCIP data structure */
5036 )
5037{
5038 SCIP_DIALOG* root;
5043 SCIP_PARAM** params;
5044 char* paramname;
5045 int nparams;
5046 int i;
5047
5048 SCIP_BRANCHRULE** branchrules;
5049 SCIP_CONFLICTHDLR** conflicthdlrs;
5050 SCIP_CONSHDLR** conshdlrs;
5051 SCIP_CUTSEL** cutsels;
5052 SCIP_DISP** disps;
5053 SCIP_HEUR** heurs;
5054 SCIP_NLPI** nlpis;
5055 SCIP_NODESEL** nodesels;
5056 SCIP_PRESOL** presols;
5057 SCIP_PRICER** pricers;
5058 SCIP_READER** readers;
5059 SCIP_SEPA** sepas;
5060 int nbranchrules;
5061 int nconflicthdlrs;
5062 int nconshdlrs;
5063 int ncutsels;
5064 int ndisps;
5065 int nheurs;
5066 int nnlpis;
5067 int nnodesels;
5068 int npresols;
5069 int npricers;
5070 int nreaders;
5071 int nsepas;
5072
5073 /* get root dialog */
5074 root = SCIPgetRootDialog(scip);
5075 if( root == NULL )
5076 {
5077 SCIPerrorMessage("root dialog not found\n");
5078 return SCIP_PLUGINNOTFOUND;
5079 }
5080
5081 /* find (or create) the "set" menu of the root dialog */
5082 if( !SCIPdialogHasEntry(root, "set") )
5083 {
5086 "set", "load/save/change parameters", TRUE, NULL) );
5089 }
5090 if( SCIPdialogFindEntry(root, "set", &setmenu) != 1 )
5091 {
5092 SCIPerrorMessage("set sub menu not found\n");
5093 return SCIP_PLUGINNOTFOUND;
5094 }
5095
5096 /* set default */
5097 if( !SCIPdialogHasEntry(setmenu, "default") )
5098 {
5100 NULL,
5102 "default", "reset parameter settings to their default values", FALSE, NULL) );
5105 }
5106
5107 /* set load */
5108 if( !SCIPdialogHasEntry(setmenu, "load") )
5109 {
5111 NULL,
5113 "load", "load parameter settings from a file", FALSE, NULL) );
5116 }
5117
5118 /* set save */
5119 if( !SCIPdialogHasEntry(setmenu, "save") )
5120 {
5122 NULL,
5124 "save", "save parameter settings to a file", FALSE, NULL) );
5127 }
5128
5129 /* set diffsave */
5130 if( !SCIPdialogHasEntry(setmenu, "diffsave") )
5131 {
5133 NULL,
5135 "diffsave", "save non-default parameter settings to a file", FALSE, NULL) );
5138 }
5139
5140 /* set branching */
5141 if( !SCIPdialogHasEntry(setmenu, "branching") )
5142 {
5144 NULL,
5146 "branching", "change parameters for branching rules", TRUE, NULL) );
5149 }
5150 if( SCIPdialogFindEntry(setmenu, "branching", &submenu) != 1 )
5151 {
5152 SCIPerrorMessage("branching sub menu not found\n");
5153 return SCIP_PLUGINNOTFOUND;
5154 }
5155
5156 nbranchrules = SCIPgetNBranchrules(scip);
5157 branchrules = SCIPgetBranchrules(scip);
5158
5159 for( i = 0; i < nbranchrules; ++i )
5160 {
5161 if( !SCIPdialogHasEntry(submenu, SCIPbranchruleGetName(branchrules[i])) )
5162 {
5164 NULL,
5166 SCIPbranchruleGetName(branchrules[i]), SCIPbranchruleGetDesc(branchrules[i]), TRUE, NULL) );
5169 }
5170 }
5171
5172 /* set branching priority */
5173 if( !SCIPdialogHasEntry(submenu, "priority") )
5174 {
5176 NULL,
5178 "priority", "change branching priority of a single variable", FALSE, NULL) );
5181 }
5182
5183 /* set branching direction */
5184 if( !SCIPdialogHasEntry(submenu, "direction") )
5185 {
5187 NULL,
5189 "direction", "change preferred branching direction of a single variable (-1:down, 0:auto, +1:up)",
5190 FALSE, NULL) );
5193 }
5194
5195 /* set conflict */
5196 if( !SCIPdialogHasEntry(setmenu, "conflict") )
5197 {
5199 NULL,
5201 "conflict", "change parameters for conflict handlers", TRUE, NULL) );
5204 }
5205 if( SCIPdialogFindEntry(setmenu, "conflict", &submenu) != 1 )
5206 {
5207 SCIPerrorMessage("conflict sub menu not found\n");
5208 return SCIP_PLUGINNOTFOUND;
5209 }
5210
5211 nconflicthdlrs = SCIPgetNConflicthdlrs(scip);
5212 conflicthdlrs = SCIPgetConflicthdlrs(scip);
5213
5214 for( i = 0; i < nconflicthdlrs; ++i )
5215 {
5216 if( !SCIPdialogHasEntry(submenu, SCIPconflicthdlrGetName(conflicthdlrs[i])) )
5217 {
5219 NULL,
5221 SCIPconflicthdlrGetName(conflicthdlrs[i]), SCIPconflicthdlrGetDesc(conflicthdlrs[i]), TRUE, NULL) );
5224 }
5225 }
5226
5227 /* set constraints */
5228 if( !SCIPdialogHasEntry(setmenu, "constraints") )
5229 {
5231 NULL,
5233 "constraints", "change parameters for constraint handlers", TRUE, NULL) );
5236 }
5237 if( SCIPdialogFindEntry(setmenu, "constraints", &submenu) != 1 )
5238 {
5239 SCIPerrorMessage("constraints sub menu not found\n");
5240 return SCIP_PLUGINNOTFOUND;
5241 }
5242
5243 nconshdlrs = SCIPgetNConshdlrs(scip);
5244 conshdlrs = SCIPgetConshdlrs(scip);
5245
5246 for( i = 0; i < nconshdlrs; ++i )
5247 {
5248 if( !SCIPdialogHasEntry(submenu, SCIPconshdlrGetName(conshdlrs[i])) )
5249 {
5251 NULL,
5253 SCIPconshdlrGetName(conshdlrs[i]), SCIPconshdlrGetDesc(conshdlrs[i]), TRUE, NULL) );
5256 }
5257 }
5258
5259 /* set cutselection */
5260 if( !SCIPdialogHasEntry(setmenu, "cutselection") )
5261 {
5263 NULL,
5265 "cutselection", "change parameters for cut selectors", TRUE, NULL) );
5268 }
5269 if( SCIPdialogFindEntry(setmenu, "cutselection", &submenu) != 1 )
5270 {
5271 SCIPerrorMessage("cutselection sub menu not found\n");
5272 return SCIP_PLUGINNOTFOUND;
5273 }
5274
5275 ncutsels = SCIPgetNCutsels(scip);
5276 cutsels = SCIPgetCutsels(scip);
5277
5278 for( i = 0; i < ncutsels; ++i )
5279 {
5281 {
5283 NULL,
5285 SCIPcutselGetName(cutsels[i]), SCIPcutselGetDesc(cutsels[i]), TRUE, NULL) );
5288 }
5289 }
5290
5291 /* set display */
5292 if( !SCIPdialogHasEntry(setmenu, "display") )
5293 {
5295 NULL,
5297 "display", "change parameters for display columns", TRUE, NULL) );
5300 }
5301 if( SCIPdialogFindEntry(setmenu, "display", &submenu) != 1 )
5302 {
5303 SCIPerrorMessage("display sub menu not found\n");
5304 return SCIP_PLUGINNOTFOUND;
5305 }
5306
5307 ndisps = SCIPgetNDisps(scip);
5308 disps = SCIPgetDisps(scip);
5309
5310 for( i = 0; i < ndisps; ++i )
5311 {
5313 {
5315 NULL,
5317 SCIPdispGetName(disps[i]), SCIPdispGetDesc(disps[i]), TRUE, NULL) );
5320 }
5321 }
5322
5323 /* set estimate */
5324 if( !SCIPdialogHasEntry(setmenu, "estimation") )
5325 {
5328 "estimation", "change parameters for restarts and tree size estimation", TRUE, NULL) );
5331 }
5332
5333 /* set expr */
5334 if( !SCIPdialogHasEntry(setmenu, "expr") )
5335 {
5338 "expr", "change parameters for expression handlers", TRUE, NULL) );
5341 }
5342
5343 /* set heuristics */
5344 if( !SCIPdialogHasEntry(setmenu, "heuristics") )
5345 {
5347 NULL,
5349 "heuristics", "change parameters for primal heuristics", TRUE, NULL) );
5352 }
5353 if( SCIPdialogFindEntry(setmenu, "heuristics", &submenu) != 1 )
5354 {
5355 SCIPerrorMessage("heuristics sub menu not found\n");
5356 return SCIP_PLUGINNOTFOUND;
5357 }
5358
5359 nheurs = SCIPgetNHeurs(scip);
5360 heurs = SCIPgetHeurs(scip);
5361
5362 for( i = 0; i < nheurs; ++i )
5363 {
5365 {
5367 NULL,
5369 SCIPheurGetName(heurs[i]), SCIPheurGetDesc(heurs[i]), TRUE, NULL) );
5372 }
5373 }
5374
5375 /* create set heuristics emphasis */
5378
5379 /* set heuristics emphasis aggressive */
5380 if( !SCIPdialogHasEntry(emphasismenu, "aggressive") )
5381 {
5384 "aggressive", "sets heuristics <aggressive>", FALSE, NULL) );
5387 }
5388
5389 /* set heuristics emphasis default */
5390 if( !SCIPdialogHasEntry(emphasismenu, "default") )
5391 {
5394 "default", "sets heuristics settings to <default> ", FALSE, NULL) );
5397 }
5398
5399 /* set heuristics emphasis fast */
5400 if( !SCIPdialogHasEntry(emphasismenu, "fast") )
5401 {
5404 "fast", "sets heuristics <fast>", FALSE, NULL) );
5407 }
5408
5409 /* set heuristics emphasis off */
5410 if( !SCIPdialogHasEntry(emphasismenu, "off") )
5411 {
5414 "off", "turns <off> all heuristics", FALSE, NULL) );
5417 }
5418
5419 /* set limits */
5420 if( !SCIPdialogHasEntry(setmenu, "limits") )
5421 {
5423 NULL,
5425 "limits", "change parameters for time, memory, objective value, and other limits", TRUE, NULL) );
5427
5429 NULL,
5431 "objective", "set limit on objective function, such that only solutions better than this limit are accepted", FALSE, NULL) );
5434
5436 }
5437
5438 /* set LP */
5439 if( !SCIPdialogHasEntry(setmenu, "lp") )
5440 {
5442 NULL,
5444 "lp", "change parameters for linear programming relaxations", TRUE, NULL) );
5447 }
5448
5449 /* set NLP */
5450 if( !SCIPdialogHasEntry(setmenu, "nlp") )
5451 {
5453 NULL,
5455 "nlp", "change parameters for nonlinear programming relaxation", TRUE, NULL) );
5458 }
5459
5460 /* set memory */
5461 if( !SCIPdialogHasEntry(setmenu, "memory") )
5462 {
5464 NULL,
5466 "memory", "change parameters for memory management", TRUE, NULL) );
5469 }
5470
5471 /* set misc */
5472 if( !SCIPdialogHasEntry(setmenu, "misc") )
5473 {
5475 NULL,
5477 "misc", "change parameters for miscellaneous stuff", TRUE, NULL) );
5480 }
5481
5482 /* set nlhdlr */
5483 if( !SCIPdialogHasEntry(setmenu, "nlhdlr") )
5484 {
5487 "nlhdlr", "change parameters for nonlinear handlers", TRUE, NULL) );
5490 }
5491
5492 /* set nlpi */
5493 if( !SCIPdialogHasEntry(setmenu, "nlpi") )
5494 {
5496 NULL,
5498 "nlpi", "change parameters for NLP solver interfaces", TRUE, NULL) );
5501 }
5502 if( SCIPdialogFindEntry(setmenu, "nlpi", &submenu) != 1 )
5503 {
5504 SCIPerrorMessage("nlpi sub menu not found\n");
5505 return SCIP_PLUGINNOTFOUND;
5506 }
5507
5508 nnlpis = SCIPgetNNlpis(scip);
5509 nlpis = SCIPgetNlpis(scip);
5510
5511 for( i = 0; i < nnlpis; ++i )
5512 {
5514 {
5516 NULL,
5518 SCIPnlpiGetName(nlpis[i]), SCIPnlpiGetDesc(nlpis[i]), TRUE, NULL) );
5521 }
5522 }
5523
5524 /* set nodeselection */
5525 if( !SCIPdialogHasEntry(setmenu, "nodeselection") )
5526 {
5528 NULL,
5530 "nodeselection", "change parameters for node selectors", TRUE, NULL) );
5533 }
5534 if( SCIPdialogFindEntry(setmenu, "nodeselection", &submenu) != 1 )
5535 {
5536 SCIPerrorMessage("nodeselection sub menu not found\n");
5537 return SCIP_PLUGINNOTFOUND;
5538 }
5539
5540 nnodesels = SCIPgetNNodesels(scip);
5541 nodesels = SCIPgetNodesels(scip);
5542
5543 for( i = 0; i < nnodesels; ++i )
5544 {
5546 {
5548 NULL,
5550 SCIPnodeselGetName(nodesels[i]), SCIPnodeselGetDesc(nodesels[i]), TRUE, NULL) );
5553 }
5554 }
5555
5556 /* set numerics */
5557 if( !SCIPdialogHasEntry(setmenu, "numerics") )
5558 {
5560 NULL,
5562 "numerics", "change parameters for numerical values", TRUE, NULL) );
5565 }
5566
5567 /* set parallel */
5568 if( !SCIPdialogHasEntry(setmenu, "parallel") )
5569 {
5571 NULL,
5573 "parallel", "change parameters for parallel implementation", TRUE, NULL) );
5576 }
5577
5578 /* set presolving */
5579 if( !SCIPdialogHasEntry(setmenu, "presolving") )
5580 {
5582 NULL,
5584 "presolving", "change parameters for presolving", TRUE, NULL) );
5587 }
5588 if( SCIPdialogFindEntry(setmenu, "presolving", &submenu) != 1 )
5589 {
5590 SCIPerrorMessage("presolving sub menu not found\n");
5591 return SCIP_PLUGINNOTFOUND;
5592 }
5593
5594 npresols = SCIPgetNPresols(scip);
5595 presols = SCIPgetPresols(scip);
5596
5597 for( i = 0; i < npresols; ++i )
5598 {
5600 {
5603 SCIPpresolGetName(presols[i]), SCIPpresolGetDesc(presols[i]), TRUE, NULL) );
5606 }
5607 }
5608
5609 /* create set presolving emphasis */
5612
5613 /* set presolving emphasis aggressive */
5614 if( !SCIPdialogHasEntry(emphasismenu, "aggressive") )
5615 {
5618 "aggressive", "sets presolving <aggressive>", FALSE, NULL) );
5621 }
5622
5623 /* set presolving emphasis default */
5624 if( !SCIPdialogHasEntry(emphasismenu, "default") )
5625 {
5628 "default", "sets presolving settings to <default>", FALSE, NULL) );
5631 }
5632
5633 /* set presolving emphasis fast */
5634 if( !SCIPdialogHasEntry(emphasismenu, "fast") )
5635 {
5638 "fast", "sets presolving <fast>", FALSE, NULL) );
5641 }
5642
5643 /* set presolving emphasis off */
5644 if( !SCIPdialogHasEntry(emphasismenu, "off") )
5645 {
5648 "off", "turns <off> all presolving", FALSE, NULL) );
5651 }
5652
5653 /* set pricing */
5654 if( !SCIPdialogHasEntry(setmenu, "pricing") )
5655 {
5657 NULL,
5659 "pricing", "change parameters for pricing variables", TRUE, NULL) );
5662 }
5663 if( SCIPdialogFindEntry(setmenu, "pricing", &submenu) != 1 )
5664 {
5665 SCIPerrorMessage("pricing sub menu not found\n");
5666 return SCIP_PLUGINNOTFOUND;
5667 }
5668
5669 npricers = SCIPgetNPricers(scip);
5670 pricers = SCIPgetPricers(scip);
5671
5672 for( i = 0; i < npricers; ++i )
5673 {
5675 {
5677 NULL,
5679 SCIPpricerGetName(pricers[i]), SCIPpricerGetDesc(pricers[i]), TRUE, NULL) );
5682 }
5683 }
5684
5685 /* set propagation */
5686 if( !SCIPdialogHasEntry(setmenu, "propagating") )
5687 {
5689 NULL,
5691 "propagating", "change parameters for constraint propagation", TRUE, NULL) );
5694 }
5695
5696 /* set reading */
5697 if( !SCIPdialogHasEntry(setmenu, "reading") )
5698 {
5700 NULL,
5702 "reading", "change parameters for problem file readers", TRUE, NULL) );
5705 }
5706 if( SCIPdialogFindEntry(setmenu, "reading", &submenu) != 1 )
5707 {
5708 SCIPerrorMessage("reading sub menu not found\n");
5709 return SCIP_PLUGINNOTFOUND;
5710 }
5711
5712 nreaders = SCIPgetNReaders(scip);
5713 readers = SCIPgetReaders(scip);
5714
5715 for( i = 0; i < nreaders; ++i )
5716 {
5718 {
5720 NULL,
5722 SCIPreaderGetName(readers[i]), SCIPreaderGetDesc(readers[i]), TRUE, NULL) );
5725 }
5726 }
5727
5728 /* set separating */
5729 if( !SCIPdialogHasEntry(setmenu, "separating") )
5730 {
5733 "separating", "change parameters for cut separators", TRUE, NULL) );
5736 }
5737 if( SCIPdialogFindEntry(setmenu, "separating", &submenu) != 1 )
5738 {
5739 SCIPerrorMessage("separating sub menu not found\n");
5740 return SCIP_PLUGINNOTFOUND;
5741 }
5742
5743 nsepas = SCIPgetNSepas(scip);
5744 sepas = SCIPgetSepas(scip);
5745
5746 for( i = 0; i < nsepas; ++i )
5747 {
5749 {
5752 SCIPsepaGetName(sepas[i]), SCIPsepaGetDesc(sepas[i]), TRUE, NULL) );
5755 }
5756 }
5757
5758 /* create set separating emphasis */
5761
5762 /* set separating emphasis aggressive */
5763 if( !SCIPdialogHasEntry(emphasismenu, "aggressive") )
5764 {
5767 "aggressive", "sets separating <aggressive>", FALSE, NULL) );
5770 }
5771
5772 /* set separating emphasis default */
5773 if( !SCIPdialogHasEntry(emphasismenu, "default") )
5774 {
5777 "default", "sets separating settings to <default>", FALSE, NULL) );
5780 }
5781
5782 /* set separating emphasis fast */
5783 if( !SCIPdialogHasEntry(emphasismenu, "fast") )
5784 {
5787 "fast", "sets separating <fast>", FALSE, NULL) );
5790 }
5791
5792 /* set separating emphasis off */
5793 if( !SCIPdialogHasEntry(emphasismenu, "off") )
5794 {
5797 "off", "turns <off> all separation", FALSE, NULL) );
5800 }
5801
5802 /* set timing */
5803 if( !SCIPdialogHasEntry(setmenu, "timing") )
5804 {
5807 "timing", "change parameters for timing issues", TRUE, NULL) );
5810 }
5811
5812 /* set visualization */
5813 if( !SCIPdialogHasEntry(setmenu, "visual") )
5814 {
5817 "visual", "change parameters for visualization output", TRUE, NULL) );
5820 }
5821
5822 /* set emphasis */
5824
5825 /* get SCIP's parameters */
5826 params = SCIPgetParams(scip);
5827 nparams = SCIPgetNParams(scip);
5828
5829 /* insert each parameter into the set menu */
5830 for( i = 0; i < nparams; ++i )
5831 {
5832 const char* pname;
5833
5834 pname = SCIPparamGetName(params[i]);
5838 }
5839
5840 /* set emphasis feasibility */
5841 /* add "counter" dialog to "set/emphasis" sub menu */
5842 if( !SCIPdialogHasEntry(submenu, "counter") )
5843 {
5845 "counter", "predefined parameter settings for a \"feasible\" and \"fast\" counting process", FALSE, NULL) );
5848 }
5849
5850 /* add "cpsolver" dialog to "set/emphasis" sub menu */
5851 if( !SCIPdialogHasEntry(submenu, "cpsolver") )
5852 {
5854 "cpsolver", "predefined parameter settings for CP like search", FALSE, NULL) );
5857 }
5858
5859 /* add "easycip" dialog to "set/emphasis" sub menu */
5860 if( !SCIPdialogHasEntry(submenu, "easycip") )
5861 {
5863 "easycip", "predefined parameter settings for easy problems", FALSE, NULL) );
5866 }
5867
5868 /* add "feasibility" dialog to "set/emphasis" sub menu */
5869 if( !SCIPdialogHasEntry(submenu, "feasibility") )
5870 {
5872 "feasibility", "predefined parameter settings for feasibility problems", FALSE, NULL) );
5875 }
5876
5877 /* add "hardlp" dialog to "set/emphasis" sub menu */
5878 if( !SCIPdialogHasEntry(submenu, "hardlp") )
5879 {
5881 "hardlp", "predefined parameter settings for problems with a hard LP", FALSE, NULL) );
5884 }
5885
5886 /* add "optimality" dialog to "set/emphasis" sub menu */
5887 if( !SCIPdialogHasEntry(submenu, "optimality") )
5888 {
5890 "optimality", "predefined parameter settings for proving optimality fast", FALSE, NULL) );
5893 }
5894
5895 /* add "numerics" dialog to "set/emphasis" sub menu */
5896 if( !SCIPdialogHasEntry(submenu, "numerics") )
5897 {
5899 "numerics", "predefined parameter settings for increased numerical stability", FALSE, NULL) );
5902 }
5903
5904 /* add "benchmark" dialog to "set/emphasis" sub menu */
5905 if( !SCIPdialogHasEntry(submenu, "benchmark") )
5906 {
5908 "benchmark", "predefined parameter settings for running in benchmark mode", FALSE, NULL) );
5911 }
5912
5913 return SCIP_OKAY;
5914}
5915
5916/** includes or updates the "fix" menu for each available parameter setting */
5918 SCIP* scip /**< SCIP data structure */
5919 )
5920{
5921 SCIP_DIALOG* root;
5925 SCIP_PARAM** params;
5926 char* paramname;
5927 int nparams;
5928 int i;
5929
5930 SCIP_BRANCHRULE** branchrules;
5931 SCIP_CONFLICTHDLR** conflicthdlrs;
5932 SCIP_CONSHDLR** conshdlrs;
5933 SCIP_CUTSEL** cutsels;
5934 SCIP_DISP** disps;
5935 SCIP_HEUR** heurs;
5936 SCIP_NLPI** nlpis;
5937 SCIP_NODESEL** nodesels;
5938 SCIP_PRESOL** presols;
5939 SCIP_PRICER** pricers;
5940 SCIP_READER** readers;
5941 SCIP_SEPA** sepas;
5942 int nbranchrules;
5943 int nconflicthdlrs;
5944 int nconshdlrs;
5945 int ncutsels;
5946 int ndisps;
5947 int nheurs;
5948 int nnlpis;
5949 int nnodesels;
5950 int npresols;
5951 int npricers;
5952 int nreaders;
5953 int nsepas;
5954
5955 /* get root dialog */
5956 root = SCIPgetRootDialog(scip);
5957 if( root == NULL )
5958 {
5959 SCIPerrorMessage("root dialog not found\n");
5960 return SCIP_PLUGINNOTFOUND;
5961 }
5962
5963 /* find (or create) the "fix" menu of the root dialog */
5964 if( !SCIPdialogHasEntry(root, "fix") )
5965 {
5968 "fix", "fix/unfix parameters", TRUE, NULL) );
5971 }
5972 if( SCIPdialogFindEntry(root, "fix", &fixmenu) != 1 )
5973 {
5974 SCIPerrorMessage("fix sub menu not found\n");
5975 return SCIP_PLUGINNOTFOUND;
5976 }
5977
5978 /* fix branching */
5979 if( !SCIPdialogHasEntry(fixmenu, "branching") )
5980 {
5982 NULL,
5984 "branching", "fix parameters for branching rules", TRUE, NULL) );
5987 }
5988 if( SCIPdialogFindEntry(fixmenu, "branching", &submenu) != 1 )
5989 {
5990 SCIPerrorMessage("branching sub menu not found\n");
5991 return SCIP_PLUGINNOTFOUND;
5992 }
5993
5994 nbranchrules = SCIPgetNBranchrules(scip);
5995 branchrules = SCIPgetBranchrules(scip);
5996
5997 for( i = 0; i < nbranchrules; ++i )
5998 {
5999 if( !SCIPdialogHasEntry(submenu, SCIPbranchruleGetName(branchrules[i])) )
6000 {
6002 NULL,
6004 SCIPbranchruleGetName(branchrules[i]), SCIPbranchruleGetDesc(branchrules[i]), TRUE, NULL) );
6007 }
6008 }
6009
6010 /* fix conflict */
6011 if( !SCIPdialogHasEntry(fixmenu, "conflict") )
6012 {
6014 NULL,
6016 "conflict", "fix parameters for conflict handlers", TRUE, NULL) );
6019 }
6020 if( SCIPdialogFindEntry(fixmenu, "conflict", &submenu) != 1 )
6021 {
6022 SCIPerrorMessage("conflict sub menu not found\n");
6023 return SCIP_PLUGINNOTFOUND;
6024 }
6025
6026 nconflicthdlrs = SCIPgetNConflicthdlrs(scip);
6027 conflicthdlrs = SCIPgetConflicthdlrs(scip);
6028
6029 for( i = 0; i < nconflicthdlrs; ++i )
6030 {
6031 if( !SCIPdialogHasEntry(submenu, SCIPconflicthdlrGetName(conflicthdlrs[i])) )
6032 {
6034 NULL,
6036 SCIPconflicthdlrGetName(conflicthdlrs[i]), SCIPconflicthdlrGetDesc(conflicthdlrs[i]), TRUE, NULL) );
6039 }
6040 }
6041
6042 /* fix constraints */
6043 if( !SCIPdialogHasEntry(fixmenu, "constraints") )
6044 {
6046 NULL,
6048 "constraints", "fix parameters for constraint handlers", TRUE, NULL) );
6051 }
6052 if( SCIPdialogFindEntry(fixmenu, "constraints", &submenu) != 1 )
6053 {
6054 SCIPerrorMessage("constraints sub menu not found\n");
6055 return SCIP_PLUGINNOTFOUND;
6056 }
6057
6058 nconshdlrs = SCIPgetNConshdlrs(scip);
6059 conshdlrs = SCIPgetConshdlrs(scip);
6060
6061 for( i = 0; i < nconshdlrs; ++i )
6062 {
6063 if( !SCIPdialogHasEntry(submenu, SCIPconshdlrGetName(conshdlrs[i])) )
6064 {
6066 NULL,
6068 SCIPconshdlrGetName(conshdlrs[i]), SCIPconshdlrGetDesc(conshdlrs[i]), TRUE, NULL) );
6071 }
6072 }
6073
6074 /* fix cutselection */
6075 if( !SCIPdialogHasEntry(fixmenu, "cutselection") )
6076 {
6078 NULL,
6080 "cutselection", "fix parameters for cut selectors", TRUE, NULL) );
6083 }
6084 if( SCIPdialogFindEntry(fixmenu, "cutselection", &submenu) != 1 )
6085 {
6086 SCIPerrorMessage("cutselection sub menu not found\n");
6087 return SCIP_PLUGINNOTFOUND;
6088 }
6089
6090 ncutsels = SCIPgetNCutsels(scip);
6091 cutsels = SCIPgetCutsels(scip);
6092
6093 for( i = 0; i < ncutsels; ++i )
6094 {
6096 {
6098 NULL,
6100 SCIPcutselGetName(cutsels[i]), SCIPcutselGetDesc(cutsels[i]), TRUE, NULL) );
6103 }
6104 }
6105
6106 /* fix display */
6107 if( !SCIPdialogHasEntry(fixmenu, "display") )
6108 {
6110 NULL,
6112 "display", "fix parameters for display columns", TRUE, NULL) );
6115 }
6116 if( SCIPdialogFindEntry(fixmenu, "display", &submenu) != 1 )
6117 {
6118 SCIPerrorMessage("display sub menu not found\n");
6119 return SCIP_PLUGINNOTFOUND;
6120 }
6121
6122 ndisps = SCIPgetNDisps(scip);
6123 disps = SCIPgetDisps(scip);
6124
6125 for( i = 0; i < ndisps; ++i )
6126 {
6128 {
6130 NULL,
6132 SCIPdispGetName(disps[i]), SCIPdispGetDesc(disps[i]), TRUE, NULL) );
6135 }
6136 }
6137
6138 /* fix heuristics */
6139 if( !SCIPdialogHasEntry(fixmenu, "heuristics") )
6140 {
6142 NULL,
6144 "heuristics", "fix parameters for primal heuristics", TRUE, NULL) );
6147 }
6148 if( SCIPdialogFindEntry(fixmenu, "heuristics", &submenu) != 1 )
6149 {
6150 SCIPerrorMessage("heuristics sub menu not found\n");
6151 return SCIP_PLUGINNOTFOUND;
6152 }
6153
6154 nheurs = SCIPgetNHeurs(scip);
6155 heurs = SCIPgetHeurs(scip);
6156
6157 for( i = 0; i < nheurs; ++i )
6158 {
6160 {
6162 NULL,
6164 SCIPheurGetName(heurs[i]), SCIPheurGetDesc(heurs[i]), TRUE, NULL) );
6167 }
6168 }
6169
6170 /* fix limits */
6171 if( !SCIPdialogHasEntry(fixmenu, "limits") )
6172 {
6174 NULL,
6176 "limits", "fix parameters for time, memory, objective value, and other limits", TRUE, NULL) );
6178
6180 }
6181
6182 /* fix LP */
6183 if( !SCIPdialogHasEntry(fixmenu, "lp") )
6184 {
6186 NULL,
6188 "lp", "fix parameters for linear programming relaxations", TRUE, NULL) );
6191 }
6192
6193 /* fix NLP */
6194 if( !SCIPdialogHasEntry(fixmenu, "nlp") )
6195 {
6197 NULL,
6199 "nlp", "fix parameters for nonlinear programming relaxations", TRUE, NULL) );
6202 }
6203
6204 /* fix memory */
6205 if( !SCIPdialogHasEntry(fixmenu, "memory") )
6206 {
6208 NULL,
6210 "memory", "fix parameters for memory management", TRUE, NULL) );
6213 }
6214
6215 /* fix misc */
6216 if( !SCIPdialogHasEntry(fixmenu, "misc") )
6217 {
6219 NULL,
6221 "misc", "fix parameters for miscellaneous stuff", TRUE, NULL) );
6224 }
6225
6226 /* fix nlpi */
6227 if( !SCIPdialogHasEntry(fixmenu, "nlpi") )
6228 {
6230 NULL,
6232 "nlpi", "fix parameters for NLP solver interfaces", TRUE, NULL) );
6235 }
6236 if( SCIPdialogFindEntry(fixmenu, "nlpi", &submenu) != 1 )
6237 {
6238 SCIPerrorMessage("nlpi sub menu not found\n");
6239 return SCIP_PLUGINNOTFOUND;
6240 }
6241
6242 nnlpis = SCIPgetNNlpis(scip);
6243 nlpis = SCIPgetNlpis(scip);
6244
6245 for( i = 0; i < nnlpis; ++i )
6246 {
6248 {
6250 NULL,
6252 SCIPnlpiGetName(nlpis[i]), SCIPnlpiGetDesc(nlpis[i]), TRUE, NULL) );
6255 }
6256 }
6257
6258 /* fix nodeselection */
6259 if( !SCIPdialogHasEntry(fixmenu, "nodeselection") )
6260 {
6262 NULL,
6264 "nodeselection", "fix parameters for node selectors", TRUE, NULL) );
6267 }
6268 if( SCIPdialogFindEntry(fixmenu, "nodeselection", &submenu) != 1 )
6269 {
6270 SCIPerrorMessage("nodeselection sub menu not found\n");
6271 return SCIP_PLUGINNOTFOUND;
6272 }
6273
6274 nnodesels = SCIPgetNNodesels(scip);
6275 nodesels = SCIPgetNodesels(scip);
6276
6277 for( i = 0; i < nnodesels; ++i )
6278 {
6280 {
6282 NULL,
6284 SCIPnodeselGetName(nodesels[i]), SCIPnodeselGetDesc(nodesels[i]), TRUE, NULL) );
6287 }
6288 }
6289
6290 /* fix numerics */
6291 if( !SCIPdialogHasEntry(fixmenu, "numerics") )
6292 {
6294 NULL,
6296 "numerics", "fix parameters for numerical values", TRUE, NULL) );
6299 }
6300
6301 /* fix presolving */
6302 if( !SCIPdialogHasEntry(fixmenu, "presolving") )
6303 {
6305 NULL,
6307 "presolving", "fix parameters for presolving", TRUE, NULL) );
6310 }
6311 if( SCIPdialogFindEntry(fixmenu, "presolving", &submenu) != 1 )
6312 {
6313 SCIPerrorMessage("presolving sub menu not found\n");
6314 return SCIP_PLUGINNOTFOUND;
6315 }
6316
6317 npresols = SCIPgetNPresols(scip);
6318 presols = SCIPgetPresols(scip);
6319
6320 for( i = 0; i < npresols; ++i )
6321 {
6323 {
6326 SCIPpresolGetName(presols[i]), SCIPpresolGetDesc(presols[i]), TRUE, NULL) );
6329 }
6330 }
6331
6332 /* fix pricing */
6333 if( !SCIPdialogHasEntry(fixmenu, "pricing") )
6334 {
6336 NULL,
6338 "pricing", "fix parameters for pricing variables", TRUE, NULL) );
6341 }
6342 if( SCIPdialogFindEntry(fixmenu, "pricing", &submenu) != 1 )
6343 {
6344 SCIPerrorMessage("pricing sub menu not found\n");
6345 return SCIP_PLUGINNOTFOUND;
6346 }
6347
6348 npricers = SCIPgetNPricers(scip);
6349 pricers = SCIPgetPricers(scip);
6350
6351 for( i = 0; i < npricers; ++i )
6352 {
6354 {
6356 NULL,
6358 SCIPpricerGetName(pricers[i]), SCIPpricerGetDesc(pricers[i]), TRUE, NULL) );
6361 }
6362 }
6363
6364 /* fix propagation */
6365 if( !SCIPdialogHasEntry(fixmenu, "propagating") )
6366 {
6368 NULL,
6370 "propagating", "fix parameters for constraint propagation", TRUE, NULL) );
6373 }
6374
6375 /* fix reading */
6376 if( !SCIPdialogHasEntry(fixmenu, "reading") )
6377 {
6379 NULL,
6381 "reading", "fix parameters for problem file readers", TRUE, NULL) );
6384 }
6385 if( SCIPdialogFindEntry(fixmenu, "reading", &submenu) != 1 )
6386 {
6387 SCIPerrorMessage("reading sub menu not found\n");
6388 return SCIP_PLUGINNOTFOUND;
6389 }
6390
6391 nreaders = SCIPgetNReaders(scip);
6392 readers = SCIPgetReaders(scip);
6393
6394 for( i = 0; i < nreaders; ++i )
6395 {
6397 {
6399 NULL,
6401 SCIPreaderGetName(readers[i]), SCIPreaderGetDesc(readers[i]), TRUE, NULL) );
6404 }
6405 }
6406
6407 /* fix separating */
6408 if( !SCIPdialogHasEntry(fixmenu, "separating") )
6409 {
6412 "separating", "fix parameters for cut separators", TRUE, NULL) );
6415 }
6416 if( SCIPdialogFindEntry(fixmenu, "separating", &submenu) != 1 )
6417 {
6418 SCIPerrorMessage("separating sub menu not found\n");
6419 return SCIP_PLUGINNOTFOUND;
6420 }
6421
6422 nsepas = SCIPgetNSepas(scip);
6423 sepas = SCIPgetSepas(scip);
6424
6425 for( i = 0; i < nsepas; ++i )
6426 {
6428 {
6431 SCIPsepaGetName(sepas[i]), SCIPsepaGetDesc(sepas[i]), TRUE, NULL) );
6434 }
6435 }
6436
6437 /* fix timing */
6438 if( !SCIPdialogHasEntry(fixmenu, "timing") )
6439 {
6442 "timing", "fix parameters for timing issues", TRUE, NULL) );
6445 }
6446
6447 /* get SCIP's parameters */
6448 params = SCIPgetParams(scip);
6449 nparams = SCIPgetNParams(scip);
6450
6451 /* insert each parameter into the fix menu */
6452 for( i = 0; i < nparams; ++i )
6453 {
6454 const char* pname;
6455
6456 pname = SCIPparamGetName(params[i]);
6460 }
6461
6462 return SCIP_OKAY;
6463}
static long bound
Constraint handler for linear constraints in their most general form, .
#define NULL
Definition def.h:267
#define SCIP_MAXSTRLEN
Definition def.h:288
#define SCIP_INVALID
Definition def.h:193
#define SCIP_ALLOC(x)
Definition def.h:385
#define SCIP_UNKNOWN
Definition def.h:194
#define TRUE
Definition def.h:93
#define FALSE
Definition def.h:94
#define SCIP_LONGINT_FORMAT
Definition def.h:165
#define SCIP_REAL_FORMAT
Definition def.h:176
#define SCIP_CALL(x)
Definition def.h:374
#define SCIP_CALL_FINALLY(x, y)
Definition def.h:416
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)
default user interface dialog
SCIP_RETCODE SCIPclassifyConstraintTypesLinear(SCIP *scip, SCIP_LINCONSSTATS *linconsstats)
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:11079
SCIP_Bool SCIPisTransformed(SCIP *scip)
SCIP_RETCODE SCIPprintStatus(SCIP *scip, FILE *file)
SCIP_STAGE SCIPgetStage(SCIP *scip)
SCIP_RETCODE SCIPwriteOrigProblem(SCIP *scip, const char *filename, const char *extension, SCIP_Bool genericnames)
Definition scip_prob.c:601
SCIP_RETCODE SCIPsetObjlimit(SCIP *scip, SCIP_Real objlimit)
Definition scip_prob.c:1422
SCIP_Real SCIPgetObjlimit(SCIP *scip)
Definition scip_prob.c:1492
SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)
Definition scip_prob.c:2770
SCIP_RETCODE SCIPfreeProb(SCIP *scip)
Definition scip_prob.c:694
SCIP_RETCODE SCIPsetObjsense(SCIP *scip, SCIP_OBJSENSE objsense)
Definition scip_prob.c:1242
SCIP_RETCODE SCIPwriteTransProblem(SCIP *scip, const char *filename, const char *extension, SCIP_Bool genericnames)
Definition scip_prob.c:648
int SCIPgetNFixedVars(SCIP *scip)
Definition scip_prob.c:2309
SCIP_VAR ** SCIPgetFixedVars(SCIP *scip)
Definition scip_prob.c:2266
SCIP_VAR * SCIPfindVar(SCIP *scip, const char *name)
Definition scip_prob.c:2685
SCIP_RETCODE SCIPreadProb(SCIP *scip, const char *filename, const char *extension)
Definition scip_prob.c:339
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
SCIP_MESSAGEHDLR * SCIPgetMessagehdlr(SCIP *scip)
void SCIPdialogMessage(SCIP *scip, FILE *file, const char *formatstr,...)
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)
SCIP_RETCODE SCIPsetHeuristics(SCIP *scip, SCIP_PARAMSETTING paramsetting, SCIP_Bool quiet)
Definition scip_param.c:927
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:953
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:999
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:979
SCIP_Bool SCIPisBoolParamValid(SCIP *scip, SCIP_PARAM *param, SCIP_Bool value)
Definition scip_param.c:444
int SCIPgetNActiveBenders(SCIP *scip)
SCIP_BENDERS ** SCIPgetBenders(SCIP *scip)
int SCIPgetNBenders(SCIP *scip)
int SCIPbendersGetPriority(SCIP_BENDERS *benders)
Definition benders.c:5944
const char * SCIPbendersGetDesc(SCIP_BENDERS *benders)
Definition benders.c:5934
SCIP_BENDERSSUBTYPE SCIPbendersGetSubproblemType(SCIP_BENDERS *benders, int probnumber)
Definition benders.c:6321
SCIP_RETCODE SCIPfreeBendersSubproblem(SCIP *scip, SCIP_BENDERS *benders, int probnumber)
SCIP_RETCODE SCIPsetupBendersSubproblem(SCIP *scip, SCIP_BENDERS *benders, SCIP_SOL *sol, int probnumber, SCIP_BENDERSENFOTYPE type)
SCIP_RETCODE SCIPsolveBendersSubproblem(SCIP *scip, SCIP_BENDERS *benders, SCIP_SOL *sol, int probnumber, SCIP_Bool *infeasible, SCIP_Bool solvecip, SCIP_Real *objective)
SCIP_Bool SCIPbendersIsActive(SCIP_BENDERS *benders)
Definition benders.c:2675
const char * SCIPbendersGetName(SCIP_BENDERS *benders)
Definition benders.c:5924
int SCIPbendersGetNSubproblems(SCIP_BENDERS *benders)
Definition benders.c:5968
SCIP * SCIPbendersSubproblem(SCIP_BENDERS *benders, int probnumber)
Definition benders.c:5978
int SCIPbranchruleGetMaxdepth(SCIP_BRANCHRULE *branchrule)
Definition branch.c:2015
SCIP_BRANCHRULE ** SCIPgetBranchrules(SCIP *scip)
const char * SCIPbranchruleGetName(SCIP_BRANCHRULE *branchrule)
Definition branch.c:1971
int SCIPbranchruleGetPriority(SCIP_BRANCHRULE *branchrule)
Definition branch.c:1991
SCIP_Real SCIPbranchruleGetMaxbounddist(SCIP_BRANCHRULE *branchrule)
Definition branch.c:2037
const char * SCIPbranchruleGetDesc(SCIP_BRANCHRULE *branchrule)
Definition branch.c:1981
int SCIPgetNBranchrules(SCIP *scip)
int SCIPcomprGetPriority(SCIP_COMPR *compr)
Definition compr.c:476
int SCIPgetNCompr(SCIP *scip)
Definition scip_compr.c:263
SCIP_COMPR ** SCIPgetComprs(SCIP *scip)
Definition scip_compr.c:250
const char * SCIPcomprGetDesc(SCIP_COMPR *compr)
Definition compr.c:466
const char * SCIPcomprGetName(SCIP_COMPR *compr)
Definition compr.c:456
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:5150
SCIP_PRESOLTIMING SCIPconshdlrGetPresolTiming(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5272
int SCIPgetNConshdlrs(SCIP *scip)
Definition scip_cons.c:965
int SCIPconshdlrGetSepaPriority(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5100
int SCIPconshdlrGetPropFreq(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5140
const char * SCIPconshdlrGetName(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4197
const char * SCIPconshdlrGetDesc(SCIP_CONSHDLR *conshdlr)
Definition cons.c:4207
int SCIPconshdlrGetCheckPriority(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5120
int SCIPconshdlrGetSepaFreq(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5130
SCIP_CONSHDLR ** SCIPgetConshdlrs(SCIP *scip)
Definition scip_cons.c:954
int SCIPconshdlrGetEnfoPriority(SCIP_CONSHDLR *conshdlr)
Definition cons.c:5110
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:1082
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
Definition scip_cons.c:1174
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)
int SCIPgetNCutsels(SCIP *scip)
void SCIPdialoghdlrClearBuffer(SCIP_DIALOGHDLR *dialoghdlr)
Definition dialog.c:446
SCIP_RETCODE SCIPreleaseDialog(SCIP *scip, SCIP_DIALOG **dialog)
SCIP_DIALOG * SCIPdialoghdlrGetRoot(SCIP_DIALOGHDLR *dialoghdlr)
Definition dialog.c:436
SCIP_Bool SCIPdialogHasEntry(SCIP_DIALOG *dialog, const char *entryname)
Definition dialog.c:995
SCIP_RETCODE SCIPdialoghdlrAddHistory(SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG *dialog, const char *command, SCIP_Bool escapecommand)
Definition dialog.c:726
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)
SCIP_RETCODE SCIPdialoghdlrGetWord(SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG *dialog, const char *prompt, char **inputword, SCIP_Bool *endoffile)
Definition dialog.c:546
SCIP_DIALOGDATA * SCIPdialogGetData(SCIP_DIALOG *dialog)
Definition dialog.c:1253
SCIP_RETCODE SCIPdialogDisplayCompletions(SCIP_DIALOG *dialog, SCIP *scip, const char *entryname)
Definition dialog.c:1140
SCIP_RETCODE SCIPsetRootDialog(SCIP *scip, SCIP_DIALOG *dialog)
SCIP_DIALOG * SCIPgetRootDialog(SCIP *scip)
SCIP_RETCODE SCIPdialogWriteHistory(const char *filename)
Definition dialog.c:1274
int SCIPdialogFindEntry(SCIP_DIALOG *dialog, const char *entryname, SCIP_DIALOG **subdialog)
Definition dialog.c:1028
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:1223
SCIP_RETCODE SCIPdialogDisplayMenu(SCIP_DIALOG *dialog, SCIP *scip)
Definition dialog.c:1072
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
const char * SCIPexprhdlrGetName(SCIP_EXPRHDLR *exprhdlr)
Definition expr.c:545
int SCIPgetNExprhdlrs(SCIP *scip)
Definition scip_expr.c:857
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:846
char SCIPheurGetDispchar(SCIP_HEUR *heur)
Definition heur.c:1473
SCIP_HEUR ** SCIPgetHeurs(SCIP *scip)
Definition scip_heur.c:271
const char * SCIPheurGetDesc(SCIP_HEUR *heur)
Definition heur.c:1463
int SCIPheurGetPriority(SCIP_HEUR *heur)
Definition heur.c:1514
int SCIPgetNHeurs(SCIP *scip)
Definition scip_heur.c:282
int SCIPheurGetFreqofs(SCIP_HEUR *heur)
Definition heur.c:1559
int SCIPheurGetFreq(SCIP_HEUR *heur)
Definition heur.c:1538
const char * SCIPheurGetName(SCIP_HEUR *heur)
Definition heur.c:1453
SCIP_RETCODE SCIPprintLPSolutionQuality(SCIP *scip, FILE *file)
Definition scip_lp.c:1021
SCIP_RETCODE SCIPwriteMIP(SCIP *scip, const char *filename, SCIP_Bool genericnames, SCIP_Bool origobj, SCIP_Bool lazyconss)
Definition scip_lp.c:935
SCIP_RETCODE SCIPwriteLP(SCIP *scip, const char *filename)
Definition scip_lp.c:901
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:200
SCIP_NLPI ** SCIPgetNlpis(SCIP *scip)
Definition scip_nlpi.c:187
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)
const char * SCIPnodeselGetDesc(SCIP_NODESEL *nodesel)
Definition nodesel.c:1062
int SCIPnodeselGetMemsavePriority(SCIP_NODESEL *nodesel)
Definition nodesel.c:1096
int SCIPnodeselGetStdPriority(SCIP_NODESEL *nodesel)
Definition nodesel.c:1072
int SCIPgetNNodesels(SCIP *scip)
const char * SCIPnodeselGetName(SCIP_NODESEL *nodesel)
Definition nodesel.c:1052
int SCIPpresolGetPriority(SCIP_PRESOL *presol)
Definition presol.c:619
SCIP_PRESOL ** SCIPgetPresols(SCIP *scip)
const char * SCIPpresolGetDesc(SCIP_PRESOL *presol)
Definition presol.c:609
int SCIPgetNPresols(SCIP *scip)
int SCIPpresolGetMaxrounds(SCIP_PRESOL *presol)
Definition presol.c:629
SCIP_PRESOLTIMING SCIPpresolGetTiming(SCIP_PRESOL *presol)
Definition presol.c:653
const char * SCIPpresolGetName(SCIP_PRESOL *presol)
Definition presol.c:599
const char * SCIPpricerGetDesc(SCIP_PRICER *pricer)
Definition pricer.c:610
SCIP_Bool SCIPpricerIsDelayed(SCIP_PRICER *pricer)
Definition pricer.c:706
int SCIPpricerGetPriority(SCIP_PRICER *pricer)
Definition pricer.c:620
int SCIPgetNPricers(SCIP *scip)
SCIP_PRICER ** SCIPgetPricers(SCIP *scip)
const char * SCIPpricerGetName(SCIP_PRICER *pricer)
Definition pricer.c:600
void SCIPlinConsStatsFree(SCIP *scip, SCIP_LINCONSSTATS **linconsstats)
Definition cons.c:8064
void SCIPprintLinConsStats(SCIP *scip, FILE *file, SCIP_LINCONSSTATS *linconsstats)
Definition cons.c:8124
SCIP_RETCODE SCIPlinConsStatsCreate(SCIP *scip, SCIP_LINCONSSTATS **linconsstats)
Definition cons.c:8051
SCIP_Bool SCIPpropIsDelayed(SCIP_PROP *prop)
Definition prop.c:1136
int SCIPpropGetFreq(SCIP_PROP *prop)
Definition prop.c:1009
int SCIPgetNProps(SCIP *scip)
Definition scip_prop.c:355
const char * SCIPpropGetDesc(SCIP_PROP *prop)
Definition prop.c:951
int SCIPpropGetPresolPriority(SCIP_PROP *prop)
Definition prop.c:971
const char * SCIPpropGetName(SCIP_PROP *prop)
Definition prop.c:941
int SCIPpropGetPriority(SCIP_PROP *prop)
Definition prop.c:961
SCIP_PROP ** SCIPgetProps(SCIP *scip)
Definition scip_prop.c:342
SCIP_PRESOLTIMING SCIPpropGetPresolTiming(SCIP_PROP *prop)
Definition prop.c:1296
const char * SCIPreaderGetExtension(SCIP_READER *reader)
Definition reader.c:577
int SCIPgetNReaders(SCIP *scip)
const char * SCIPreaderGetName(SCIP_READER *reader)
Definition reader.c:557
SCIP_Bool SCIPreaderCanRead(SCIP_READER *reader)
Definition reader.c:587
SCIP_READER ** SCIPgetReaders(SCIP *scip)
SCIP_Bool SCIPreaderCanWrite(SCIP_READER *reader)
Definition reader.c:597
const char * SCIPreaderGetDesc(SCIP_READER *reader)
Definition reader.c:567
SCIP_RELAX ** SCIPgetRelaxs(SCIP *scip)
Definition scip_relax.c:247
int SCIPgetNRelaxs(SCIP *scip)
Definition scip_relax.c:260
int SCIPrelaxGetFreq(SCIP_RELAX *relax)
Definition relax.c:586
const char * SCIPrelaxGetName(SCIP_RELAX *relax)
Definition relax.c:542
const char * SCIPrelaxGetDesc(SCIP_RELAX *relax)
Definition relax.c:552
int SCIPrelaxGetPriority(SCIP_RELAX *relax)
Definition relax.c:562
int SCIPgetNSepas(SCIP *scip)
Definition scip_sepa.c:273
int SCIPsepaGetPriority(SCIP_SEPA *sepa)
Definition sepa.c:763
SCIP_Real SCIPsepaGetMaxbounddist(SCIP_SEPA *sepa)
Definition sepa.c:808
int SCIPsepaGetFreq(SCIP_SEPA *sepa)
Definition sepa.c:787
const char * SCIPsepaGetName(SCIP_SEPA *sepa)
Definition sepa.c:743
const char * SCIPsepaGetDesc(SCIP_SEPA *sepa)
Definition sepa.c:753
SCIP_Bool SCIPsepaIsDelayed(SCIP_SEPA *sepa)
Definition sepa.c:1089
SCIP_SEPA ** SCIPgetSepas(SCIP *scip)
Definition scip_sepa.c:260
SCIP_RETCODE SCIPcheckSolOrig(SCIP *scip, SCIP_SOL *sol, SCIP_Bool *feasible, SCIP_Bool printreason, SCIP_Bool completely)
Definition scip_sol.c:3309
SCIP_SOL * SCIPgetBestSol(SCIP *scip)
Definition scip_sol.c:2169
SCIP_RETCODE SCIPprintBestSol(SCIP *scip, FILE *file, SCIP_Bool printzeros)
Definition scip_sol.c:2235
SCIP_Real SCIPsolGetRelBoundViolation(SCIP_SOL *sol)
Definition sol.c:2623
SCIP_RETCODE SCIPprintSol(SCIP *scip, SCIP_SOL *sol, FILE *file, SCIP_Bool printzeros)
Definition scip_sol.c:1631
SCIP_Real SCIPsolGetAbsConsViolation(SCIP_SOL *sol)
Definition sol.c:2663
SCIP_Real SCIPsolGetAbsBoundViolation(SCIP_SOL *sol)
Definition sol.c:2613
SCIP_RETCODE SCIPcreateNLPSol(SCIP *scip, SCIP_SOL **sol, SCIP_HEUR *heur)
Definition scip_sol.c:254
SCIP_Real SCIPsolGetAbsIntegralityViolation(SCIP_SOL *sol)
Definition sol.c:2633
SCIP_Real SCIPtransformObj(SCIP *scip, SCIP_Real obj)
Definition scip_sol.c:1407
int SCIPgetNSols(SCIP *scip)
Definition scip_sol.c:2070
SCIP_Real SCIPsolGetAbsLPRowViolation(SCIP_SOL *sol)
Definition sol.c:2643
SCIP_RETCODE SCIPcreateFiniteSolCopy(SCIP *scip, SCIP_SOL **sol, SCIP_SOL *sourcesol, SCIP_Bool *success)
Definition scip_sol.c:705
SCIP_RETCODE SCIPprintBestTransSol(SCIP *scip, FILE *file, SCIP_Bool printzeros)
Definition scip_sol.c:2275
SCIP_Bool SCIPsolIsOriginal(SCIP_SOL *sol)
Definition sol.c:2721
SCIP_RETCODE SCIPprintMIPStart(SCIP *scip, SCIP_SOL *sol, FILE *file)
Definition scip_sol.c:1770
SCIP_Real SCIPsolGetRelLPRowViolation(SCIP_SOL *sol)
Definition sol.c:2653
SCIP_SOL ** SCIPgetSols(SCIP *scip)
Definition scip_sol.c:2119
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
Definition scip_sol.c:1217
SCIP_Real SCIPsolGetRelConsViolation(SCIP_SOL *sol)
Definition sol.c:2673
SCIP_RETCODE SCIPprintDualSol(SCIP *scip, FILE *file, SCIP_Bool printzeros)
Definition scip_sol.c:2001
SCIP_RETCODE SCIPtransformProb(SCIP *scip)
Definition scip_solve.c:222
SCIP_RETCODE SCIPsolveParallel(SCIP *scip)
SCIP_RETCODE SCIPpresolve(SCIP *scip)
SCIP_RETCODE SCIPfreeTransform(SCIP *scip)
SCIP_RETCODE SCIPfreeSolve(SCIP *scip, SCIP_Bool restart)
SCIP_RETCODE SCIPsolve(SCIP *scip)
SCIP_RETCODE SCIPprintStatistics(SCIP *scip, FILE *file)
SCIP_RETCODE SCIPprintBranchingStatistics(SCIP *scip, FILE *file)
SCIP_RETCODE SCIPprintTransProblem(SCIP *scip, FILE *file, const char *extension, SCIP_Bool genericnames)
SCIP_RETCODE SCIPprintReoptStatistics(SCIP *scip, FILE *file)
SCIP_RETCODE SCIPprintOrigProblem(SCIP *scip, FILE *file, const char *extension, SCIP_Bool genericnames)
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 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:17538
SCIP_RETCODE SCIPwriteCliqueGraph(SCIP *scip, const char *fname, SCIP_Bool writenodeweights)
Definition scip_var.c:7712
SCIP_Real SCIPvarGetObj(SCIP_VAR *var)
Definition var.c:17926
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
Definition var.c:18088
SCIP_RETCODE SCIPchgVarBranchDirection(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR branchdirection)
Definition scip_var.c:8087
SCIP_RETCODE SCIPchgVarBranchPriority(SCIP *scip, SCIP_VAR *var, int branchpriority)
Definition scip_var.c:7982
const char * SCIPvarGetName(SCIP_VAR *var)
Definition var.c:17419
SCIP_RETCODE SCIPchgVarLbGlobal(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
Definition scip_var.c:4945
SCIP_BRANCHDIR SCIPvarGetBranchDirection(SCIP_VAR *var)
Definition var.c:18260
SCIP_RETCODE SCIPchgVarUbGlobal(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
Definition scip_var.c:5034
int SCIPvarGetBranchPriority(SCIP_VAR *var)
Definition var.c:18250
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
Definition var.c:18078
void SCIPsortPtr(void **ptrarray, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), int len)
SCIP_Bool SCIPstrToIntValue(const char *str, int *value, char **endptr)
Definition misc.c:10946
int SCIPsnprintf(char *t, int len, const char *s,...)
Definition misc.c:10877
void SCIPescapeString(char *t, int bufsize, const char *s)
Definition misc.c:10832
void SCIPprintSysError(const char *message)
Definition misc.c:10769
int SCIPstrncpy(char *t, const char *s, int size)
Definition misc.c:10919
return SCIP_OKAY
SCIPfreeSol(scip, &heurdata->sol))
static SCIP_SOL * sol
int r
assert(minobj< SCIPgetCutoffbound(scip))
SCIP_VAR * var
static const char * paramname[]
Definition lpi_msk.c:5096
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:659
SCIP_Real SCIPparamGetRealMin(SCIP_PARAM *param)
Definition paramset.c:842
char * SCIPparamGetCharAllowedValues(SCIP_PARAM *param)
Definition paramset.c:889
SCIP_Bool SCIPparamIsAdvanced(SCIP_PARAM *param)
Definition paramset.c:689
SCIP_PARAMTYPE SCIPparamGetType(SCIP_PARAM *param)
Definition paramset.c:649
char * SCIPparamGetString(SCIP_PARAM *param)
Definition paramset.c:911
int SCIPparamGetIntMin(SCIP_PARAM *param)
Definition paramset.c:748
void SCIPparamSetFixed(SCIP_PARAM *param, SCIP_Bool fixed)
Definition paramset.c:4432
SCIP_Longint SCIPparamGetLongintMin(SCIP_PARAM *param)
Definition paramset.c:795
SCIP_Bool SCIPparamGetBool(SCIP_PARAM *param)
Definition paramset.c:709
const char * SCIPparamGetDesc(SCIP_PARAM *param)
Definition paramset.c:669
int SCIPparamGetInt(SCIP_PARAM *param)
Definition paramset.c:734
int SCIPparamGetIntMax(SCIP_PARAM *param)
Definition paramset.c:759
SCIP_Real SCIPparamGetReal(SCIP_PARAM *param)
Definition paramset.c:828
char SCIPparamGetChar(SCIP_PARAM *param)
Definition paramset.c:875
SCIP_Longint SCIPparamGetLongint(SCIP_PARAM *param)
Definition paramset.c:781
SCIP_Longint SCIPparamGetLongintMax(SCIP_PARAM *param)
Definition paramset.c:806
SCIP_Real SCIPparamGetRealMax(SCIP_PARAM *param)
Definition paramset.c:853
SCIP_Bool SCIPparamIsFixed(SCIP_PARAM *param)
Definition paramset.c:699
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 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
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 functions to work with algebraic expressions
general public methods
public methods for primal heuristic plugins and divesets
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
@ SCIP_BENDERSSUBTYPE_CONVEXCONT
#define SCIP_DECL_DIALOGCOPY(x)
Definition type_dialog.h:62
#define SCIP_DECL_DIALOGEXEC(x)
Definition type_dialog.h:96
struct SCIP_DialogData SCIP_DIALOGDATA
Definition type_dialog.h:51
#define SCIP_DECL_DIALOGDESC(x)
Definition type_dialog.h:82
@ 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
@ SCIP_BRANCHDIR_FIXED
@ SCIP_BRANCHDIR_AUTO
@ SCIP_BRANCHDIR_UPWARDS
@ SCIP_PARAMSETTING_OFF
@ SCIP_PARAMSETTING_AGGRESSIVE
@ SCIP_PARAMSETTING_DEFAULT
@ SCIP_PARAMSETTING_FAST
@ SCIP_PARAMEMPHASIS_NUMERICS
@ SCIP_PARAMEMPHASIS_CPSOLVER
@ SCIP_PARAMEMPHASIS_HARDLP
@ SCIP_PARAMEMPHASIS_FEASIBILITY
@ SCIP_PARAMEMPHASIS_BENCHMARK
@ SCIP_PARAMEMPHASIS_EASYCIP
@ SCIP_PARAMEMPHASIS_COUNTER
@ SCIP_PARAMEMPHASIS_OPTIMALITY
@ SCIP_PARAMTYPE_CHAR
@ SCIP_PARAMTYPE_STRING
@ SCIP_PARAMTYPE_BOOL
@ SCIP_PARAMTYPE_INT
@ SCIP_PARAMTYPE_LONGINT
@ SCIP_PARAMTYPE_REAL
@ SCIP_OBJSENSE_MAXIMIZE
Definition type_prob.h:47
@ SCIP_OBJSENSE_MINIMIZE
Definition type_prob.h:48
@ SCIP_FILECREATEERROR
@ SCIP_NOFILE
@ SCIP_READERROR
@ SCIP_INVALIDDATA
@ SCIP_PLUGINNOTFOUND
@ SCIP_WRITEERROR
@ SCIP_PARAMETERWRONGVAL
@ SCIP_INVALIDCALL
enum SCIP_Retcode SCIP_RETCODE
@ 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
#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:52