Changeset 2385 for trunk/Clp/src/ClpMessage.cpp
 Timestamp:
 Jan 6, 2019 2:43:06 PM (3 months ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/Clp/src/ClpMessage.cpp
r2274 r2385 8 8 /// Structure for use by ClpMessage.cpp 9 9 typedef struct { 10 11 12 13 const char *message;10 CLP_Message internalNumber; 11 int externalNumber; // or continuation 12 char detail; 13 const char *message; 14 14 } Clp_message; 15 15 static Clp_message clp_us_english[] = { 16 {CLP_SIMPLEX_FINISHED, 0, 1, "Optimal  objective value %g"},17 {CLP_SIMPLEX_INFEASIBLE, 1, 1, "Primal infeasible  objective value %g"},18 {CLP_SIMPLEX_UNBOUNDED, 2, 1, "Dual infeasible  objective value %g"},19 {CLP_SIMPLEX_STOPPED, 3, 1, "Stopped  objective value %g"},20 {CLP_SIMPLEX_ERROR, 4, 1, "Stopped due to errors  objective value %g"},21 {CLP_SIMPLEX_INTERRUPT, 5, 1, "Stopped by event handler  objective value %g"},22 {CLP_SIMPLEX_STATUS, 6, 1, "%d Obj %g%? Primal inf %g (%d)%? Dual inf %g (%d)%? w.o. free dual inf (%d)"},23 {CLP_DUAL_BOUNDS, 25, 3, "Looking optimal checking bounds with %g"},24 #if ABC_NORMAL_DEBUG >125 {CLP_SIMPLEX_ACCURACY, 60, 1, "Primal error %g, dual error %g"},16 { CLP_SIMPLEX_FINISHED, 0, 1, "Optimal  objective value %g" }, 17 { CLP_SIMPLEX_INFEASIBLE, 1, 1, "Primal infeasible  objective value %g" }, 18 { CLP_SIMPLEX_UNBOUNDED, 2, 1, "Dual infeasible  objective value %g" }, 19 { CLP_SIMPLEX_STOPPED, 3, 1, "Stopped  objective value %g" }, 20 { CLP_SIMPLEX_ERROR, 4, 1, "Stopped due to errors  objective value %g" }, 21 { CLP_SIMPLEX_INTERRUPT, 5, 1, "Stopped by event handler  objective value %g" }, 22 { CLP_SIMPLEX_STATUS, 6, 1, "%d Obj %g%? Primal inf %g (%d)%? Dual inf %g (%d)%? w.o. free dual inf (%d)" }, 23 { CLP_DUAL_BOUNDS, 25, 3, "Looking optimal checking bounds with %g" }, 24 #if ABC_NORMAL_DEBUG > 1 25 { CLP_SIMPLEX_ACCURACY, 60, 1, "Primal error %g, dual error %g" }, 26 26 #else 27 {CLP_SIMPLEX_ACCURACY, 60, 3, "Primal error %g, dual error %g"},27 { CLP_SIMPLEX_ACCURACY, 60, 3, "Primal error %g, dual error %g" }, 28 28 #endif 29 {CLP_SIMPLEX_BADFACTOR, 7, 2, "Singular factorization of basis  status %d"},30 {CLP_SIMPLEX_BOUNDTIGHTEN, 8, 3, "Bounds were tightened %d times"},31 {CLP_SIMPLEX_INFEASIBILITIES, 9, 1, "%d infeasibilities"},32 {CLP_SIMPLEX_FLAG, 10, 3, "Flagging variable %c%d"},33 {CLP_SIMPLEX_GIVINGUP, 11, 2, "Stopping as close enough"},34 {CLP_DUAL_CHECKB, 12, 2, "New dual bound of %g"},35 {CLP_DUAL_ORIGINAL, 13, 3, "Going back to original objective"},36 {CLP_SIMPLEX_PERTURB, 14, 1, "Perturbing problem by %g%% of %g  largest nonzero change %g ( %g%%)  largest zero change %g"},37 {CLP_PRIMAL_ORIGINAL, 15, 2, "Going back to original tolerance"},38 {CLP_PRIMAL_WEIGHT, 16, 2, "New infeasibility weight of %g"},39 {CLP_PRIMAL_OPTIMAL, 17, 2, "Looking optimal with tolerance of %g"},40 {CLP_SINGULARITIES, 18, 2, "%d total structurals rejected in initial factorization"},41 {CLP_MODIFIEDBOUNDS, 19, 1, "%d variables/rows fixed as scaled bounds too close"},42 {CLP_RIMSTATISTICS1, 20, 2, "Absolute values of scaled objective range from %g to %g"},43 {CLP_RIMSTATISTICS2, 21, 2, "Absolute values of scaled bounds range from %g to %g, minimum gap %g"},44 {CLP_RIMSTATISTICS3, 22, 2, "Absolute values of scaled rhs range from %g to %g, minimum gap %g"},45 {CLP_POSSIBLELOOP, 23, 2, "Possible loop  %d matches (%x) after %d checks"},46 {CLP_SMALLELEMENTS, 24, 1, "Matrix will be packed to eliminate %d small elements"},47 {CLP_DUPLICATEELEMENTS, 26, 1, "Matrix will be packed to eliminate %d duplicate elements"},48 {CLP_SIMPLEX_HOUSE1, 101, 32, "dirOut %d, dirIn %d, theta %g, out %g, dj %g, alpha %g"},49 {CLP_SIMPLEX_HOUSE2, 102, 4, "%d %g In: %c%d Out: %c%d%? dj ratio %g distance %g%? dj %g distance %g"},50 {CLP_SIMPLEX_NONLINEAR, 103, 4, "Primal nonlinear change %g (%d)"},51 {CLP_SIMPLEX_FREEIN, 104, 32, "Free column in %d"},52 {CLP_SIMPLEX_PIVOTROW, 105, 32, "Pivot row %d"},53 {CLP_DUAL_CHECK, 106, 4, "Btran alpha %g, ftran alpha %g"},54 {CLP_PRIMAL_DJ, 107, 4, "For %c%d btran dj %g, ftran dj %g"},55 {CLP_PACKEDSCALE_INITIAL, 1001, 2, "Initial range of elements is %g to %g"},56 {CLP_PACKEDSCALE_WHILE, 1002, 3, "Range of elements is %g to %g"},57 {CLP_PACKEDSCALE_FINAL, 1003, 2, "Final range of elements is %g to %g"},58 {CLP_PACKEDSCALE_FORGET, 1004, 2, "Not bothering to scale as good enough"},59 {CLP_INITIALIZE_STEEP, 1005, 3, "Initializing steepest edge weights  old %g, new %g"},60 {CLP_UNABLE_OPEN, 6001, 0, "Unable to open file %s for reading"},61 {CLP_BAD_BOUNDS, 6002, 1, "%d bad bound pairs or bad objectives were found  first at %c%d"},62 {CLP_BAD_MATRIX, 6003, 1, "Matrix has %d large values, first at column %d, row %d is %g"},63 {CLP_LOOP, 6004, 1, "Can't get out of loop  stopping"},64 {CLP_IMPORT_RESULT, 27, 1, "Model was imported from %s in %g seconds"},65 {CLP_IMPORT_ERRORS, 3001, 1, " There were %d errors when importing model from %s"},66 {CLP_EMPTY_PROBLEM, 3002, 1, "Empty problem  %d rows, %d columns and %d elements"},67 {CLP_CRASH, 28, 1, "Crash put %d variables in basis, %d dual infeasibilities"},68 {CLP_END_VALUES_PASS, 29, 1, "End of values pass after %d iterations"},69 {CLP_QUADRATIC_BOTH, 108, 32, "%s %d (%g) and %d (%g) both basic"},70 {CLP_QUADRATIC_PRIMAL_DETAILS, 109, 32, "coeff %g, %g, %g  dj %g  deriv zero at %g, sj at %g"},71 {CLP_IDIOT_ITERATION, 30, 1, "%d infeas %g, obj %g  mu %g, its %d, %d interior"},72 {CLP_INFEASIBLE, 3003, 1, "Analysis indicates model infeasible or unbounded"},73 {CLP_MATRIX_CHANGE, 31, 2, "Matrix can not be converted into %s"},74 {CLP_TIMING, 32, 1, "%s objective %.10g  %d iterations time %.2f2%?, Presolve %.2f%?, Idiot %.2f%?"},75 {CLP_INTERVAL_TIMING, 33, 2, "%s took %.2f seconds (total %.2f)"},76 {CLP_SPRINT, 34, 1, "Pass %d took %d iterations, objective %g, dual infeasibilities %g( %d)"},77 {CLP_BARRIER_ITERATION, 35, 1, "%d Primal %g Dual %g Complementarity %g  %d fixed, rank %d"},78 {CLP_BARRIER_OBJECTIVE_GAP, 36, 3, "Feasible  objective gap %g"},79 {CLP_BARRIER_GONE_INFEASIBLE, 37, 2, "Infeasible"},80 {CLP_BARRIER_CLOSE_TO_OPTIMAL, 38, 2, "Close to optimal after %d iterations with complementarity %g"},81 {CLP_BARRIER_COMPLEMENTARITY, 39, 2, "Complementarity %g  %s"},82 {CLP_BARRIER_EXIT2, 40, 1, "Exiting  using solution from iteration %d"},83 {CLP_BARRIER_STOPPING, 41, 1, "Exiting on iterations"},84 {CLP_BARRIER_EXIT, 42, 1, "Optimal %s"},85 {CLP_BARRIER_SCALING, 43, 3, "Scaling %s by %g"},86 {CLP_BARRIER_MU, 44, 3, "Changing mu from %g to %g"},87 {CLP_BARRIER_INFO, 45, 3, "Detail  %s"},88 {CLP_BARRIER_END, 46, 1, "At end primal/dual infeasibilities %g/%g, complementarity gap %g, objective %g"},89 {CLP_BARRIER_ACCURACY, 47, 2, "Relative error in phase %d, %d passes %g => %g"},90 {CLP_BARRIER_SAFE, 48, 2, "Initial safe primal value %g, objective norm %g"},91 {CLP_BARRIER_NEGATIVE_GAPS, 49, 3, "%d negative gaps summing to %g"},92 {CLP_BARRIER_REDUCING, 50, 2, "Reducing %s step from %g to %g"},93 {CLP_BARRIER_DIAGONAL, 51, 3, "Range of diagonal values is %g to %g"},94 {CLP_BARRIER_SLACKS, 52, 3, "%d slacks increased, %d decreased this iteration"},95 {CLP_BARRIER_DUALINF, 53, 3, "Maximum dual infeasibility on fixed is %g"},96 {CLP_BARRIER_KILLED, 54, 3, "%d variables killed this iteration"},97 {CLP_BARRIER_ABS_DROPPED, 55, 2, "Absolute error on dropped rows is %g"},98 {CLP_BARRIER_ABS_ERROR, 56, 2, "Primal error is %g and dual error is %g"},99 {CLP_BARRIER_FEASIBLE, 57, 2, "Infeasibilities  bound %g , primal %g ,dual %g"},100 {CLP_BARRIER_STEP, 58, 2, "Steps  primal %g ,dual %g , mu %g"},101 {CLP_BARRIER_KKT, 6005, 0, "Quadratic barrier needs a KKT factorization"},102 {CLP_RIM_SCALE, 59, 1, "Automatic rim scaling gives objective scale of %g and rhs/bounds scale of %g"},103 {CLP_SLP_ITER, 58, 1, "Pass %d objective %g  drop %g, largest delta %g"},104 {CLP_COMPLICATED_MODEL, 3004, 1, "Can not use addRows or addColumns on CoinModel as mixed, %d rows, %d columns"},105 {CLP_BAD_STRING_VALUES, 3005, 1, "%d string elements had no values associated with them"},106 {CLP_CRUNCH_STATS, 61, 2, "Crunch %d (%d) rows, %d (%d) columns and %d (%d) elements"},107 {CLP_PARAMETRICS_STATS, 62, 1, "Theta %g  objective %g"},108 {CLP_PARAMETRICS_STATS2, 63, 2, "Theta %g  objective %g, %s in, %s out"},29 { CLP_SIMPLEX_BADFACTOR, 7, 2, "Singular factorization of basis  status %d" }, 30 { CLP_SIMPLEX_BOUNDTIGHTEN, 8, 3, "Bounds were tightened %d times" }, 31 { CLP_SIMPLEX_INFEASIBILITIES, 9, 1, "%d infeasibilities" }, 32 { CLP_SIMPLEX_FLAG, 10, 3, "Flagging variable %c%d" }, 33 { CLP_SIMPLEX_GIVINGUP, 11, 2, "Stopping as close enough" }, 34 { CLP_DUAL_CHECKB, 12, 2, "New dual bound of %g" }, 35 { CLP_DUAL_ORIGINAL, 13, 3, "Going back to original objective" }, 36 { CLP_SIMPLEX_PERTURB, 14, 1, "Perturbing problem by %g%% of %g  largest nonzero change %g ( %g%%)  largest zero change %g" }, 37 { CLP_PRIMAL_ORIGINAL, 15, 2, "Going back to original tolerance" }, 38 { CLP_PRIMAL_WEIGHT, 16, 2, "New infeasibility weight of %g" }, 39 { CLP_PRIMAL_OPTIMAL, 17, 2, "Looking optimal with tolerance of %g" }, 40 { CLP_SINGULARITIES, 18, 2, "%d total structurals rejected in initial factorization" }, 41 { CLP_MODIFIEDBOUNDS, 19, 1, "%d variables/rows fixed as scaled bounds too close" }, 42 { CLP_RIMSTATISTICS1, 20, 2, "Absolute values of scaled objective range from %g to %g" }, 43 { CLP_RIMSTATISTICS2, 21, 2, "Absolute values of scaled bounds range from %g to %g, minimum gap %g" }, 44 { CLP_RIMSTATISTICS3, 22, 2, "Absolute values of scaled rhs range from %g to %g, minimum gap %g" }, 45 { CLP_POSSIBLELOOP, 23, 2, "Possible loop  %d matches (%x) after %d checks" }, 46 { CLP_SMALLELEMENTS, 24, 1, "Matrix will be packed to eliminate %d small elements" }, 47 { CLP_DUPLICATEELEMENTS, 26, 1, "Matrix will be packed to eliminate %d duplicate elements" }, 48 { CLP_SIMPLEX_HOUSE1, 101, 32, "dirOut %d, dirIn %d, theta %g, out %g, dj %g, alpha %g" }, 49 { CLP_SIMPLEX_HOUSE2, 102, 4, "%d %g In: %c%d Out: %c%d%? dj ratio %g distance %g%? dj %g distance %g" }, 50 { CLP_SIMPLEX_NONLINEAR, 103, 4, "Primal nonlinear change %g (%d)" }, 51 { CLP_SIMPLEX_FREEIN, 104, 32, "Free column in %d" }, 52 { CLP_SIMPLEX_PIVOTROW, 105, 32, "Pivot row %d" }, 53 { CLP_DUAL_CHECK, 106, 4, "Btran alpha %g, ftran alpha %g" }, 54 { CLP_PRIMAL_DJ, 107, 4, "For %c%d btran dj %g, ftran dj %g" }, 55 { CLP_PACKEDSCALE_INITIAL, 1001, 2, "Initial range of elements is %g to %g" }, 56 { CLP_PACKEDSCALE_WHILE, 1002, 3, "Range of elements is %g to %g" }, 57 { CLP_PACKEDSCALE_FINAL, 1003, 2, "Final range of elements is %g to %g" }, 58 { CLP_PACKEDSCALE_FORGET, 1004, 2, "Not bothering to scale as good enough" }, 59 { CLP_INITIALIZE_STEEP, 1005, 3, "Initializing steepest edge weights  old %g, new %g" }, 60 { CLP_UNABLE_OPEN, 6001, 0, "Unable to open file %s for reading" }, 61 { CLP_BAD_BOUNDS, 6002, 1, "%d bad bound pairs or bad objectives were found  first at %c%d" }, 62 { CLP_BAD_MATRIX, 6003, 1, "Matrix has %d large values, first at column %d, row %d is %g" }, 63 { CLP_LOOP, 6004, 1, "Can't get out of loop  stopping" }, 64 { CLP_IMPORT_RESULT, 27, 1, "Model was imported from %s in %g seconds" }, 65 { CLP_IMPORT_ERRORS, 3001, 1, " There were %d errors when importing model from %s" }, 66 { CLP_EMPTY_PROBLEM, 3002, 1, "Empty problem  %d rows, %d columns and %d elements" }, 67 { CLP_CRASH, 28, 1, "Crash put %d variables in basis, %d dual infeasibilities" }, 68 { CLP_END_VALUES_PASS, 29, 1, "End of values pass after %d iterations" }, 69 { CLP_QUADRATIC_BOTH, 108, 32, "%s %d (%g) and %d (%g) both basic" }, 70 { CLP_QUADRATIC_PRIMAL_DETAILS, 109, 32, "coeff %g, %g, %g  dj %g  deriv zero at %g, sj at %g" }, 71 { CLP_IDIOT_ITERATION, 30, 1, "%d infeas %g, obj %g  mu %g, its %d, %d interior" }, 72 { CLP_INFEASIBLE, 3003, 1, "Analysis indicates model infeasible or unbounded" }, 73 { CLP_MATRIX_CHANGE, 31, 2, "Matrix can not be converted into %s" }, 74 { CLP_TIMING, 32, 1, "%s objective %.10g  %d iterations time %.2f2%?, Presolve %.2f%?, Idiot %.2f%?" }, 75 { CLP_INTERVAL_TIMING, 33, 2, "%s took %.2f seconds (total %.2f)" }, 76 { CLP_SPRINT, 34, 1, "Pass %d took %d iterations, objective %g, dual infeasibilities %g( %d)" }, 77 { CLP_BARRIER_ITERATION, 35, 1, "%d Primal %g Dual %g Complementarity %g  %d fixed, rank %d" }, 78 { CLP_BARRIER_OBJECTIVE_GAP, 36, 3, "Feasible  objective gap %g" }, 79 { CLP_BARRIER_GONE_INFEASIBLE, 37, 2, "Infeasible" }, 80 { CLP_BARRIER_CLOSE_TO_OPTIMAL, 38, 2, "Close to optimal after %d iterations with complementarity %g" }, 81 { CLP_BARRIER_COMPLEMENTARITY, 39, 2, "Complementarity %g  %s" }, 82 { CLP_BARRIER_EXIT2, 40, 1, "Exiting  using solution from iteration %d" }, 83 { CLP_BARRIER_STOPPING, 41, 1, "Exiting on iterations" }, 84 { CLP_BARRIER_EXIT, 42, 1, "Optimal %s" }, 85 { CLP_BARRIER_SCALING, 43, 3, "Scaling %s by %g" }, 86 { CLP_BARRIER_MU, 44, 3, "Changing mu from %g to %g" }, 87 { CLP_BARRIER_INFO, 45, 3, "Detail  %s" }, 88 { CLP_BARRIER_END, 46, 1, "At end primal/dual infeasibilities %g/%g, complementarity gap %g, objective %g" }, 89 { CLP_BARRIER_ACCURACY, 47, 2, "Relative error in phase %d, %d passes %g => %g" }, 90 { CLP_BARRIER_SAFE, 48, 2, "Initial safe primal value %g, objective norm %g" }, 91 { CLP_BARRIER_NEGATIVE_GAPS, 49, 3, "%d negative gaps summing to %g" }, 92 { CLP_BARRIER_REDUCING, 50, 2, "Reducing %s step from %g to %g" }, 93 { CLP_BARRIER_DIAGONAL, 51, 3, "Range of diagonal values is %g to %g" }, 94 { CLP_BARRIER_SLACKS, 52, 3, "%d slacks increased, %d decreased this iteration" }, 95 { CLP_BARRIER_DUALINF, 53, 3, "Maximum dual infeasibility on fixed is %g" }, 96 { CLP_BARRIER_KILLED, 54, 3, "%d variables killed this iteration" }, 97 { CLP_BARRIER_ABS_DROPPED, 55, 2, "Absolute error on dropped rows is %g" }, 98 { CLP_BARRIER_ABS_ERROR, 56, 2, "Primal error is %g and dual error is %g" }, 99 { CLP_BARRIER_FEASIBLE, 57, 2, "Infeasibilities  bound %g , primal %g ,dual %g" }, 100 { CLP_BARRIER_STEP, 58, 2, "Steps  primal %g ,dual %g , mu %g" }, 101 { CLP_BARRIER_KKT, 6005, 0, "Quadratic barrier needs a KKT factorization" }, 102 { CLP_RIM_SCALE, 59, 1, "Automatic rim scaling gives objective scale of %g and rhs/bounds scale of %g" }, 103 { CLP_SLP_ITER, 58, 1, "Pass %d objective %g  drop %g, largest delta %g" }, 104 { CLP_COMPLICATED_MODEL, 3004, 1, "Can not use addRows or addColumns on CoinModel as mixed, %d rows, %d columns" }, 105 { CLP_BAD_STRING_VALUES, 3005, 1, "%d string elements had no values associated with them" }, 106 { CLP_CRUNCH_STATS, 61, 2, "Crunch %d (%d) rows, %d (%d) columns and %d (%d) elements" }, 107 { CLP_PARAMETRICS_STATS, 62, 1, "Theta %g  objective %g" }, 108 { CLP_PARAMETRICS_STATS2, 63, 2, "Theta %g  objective %g, %s in, %s out" }, 109 109 #ifndef NO_FATHOM_PRINT 110 {CLP_FATHOM_STATUS, 63, 2, "Fathoming node %d  %d nodes (%d iterations)  current depth %d"},111 {CLP_FATHOM_SOLUTION, 64, 1, "Fathoming node %d  solution of %g after %d nodes at depth %d"},112 {CLP_FATHOM_FINISH, 65, 1, "Fathoming node %d (depth %d) took %d nodes (%d iterations)  maximum depth %d"},110 { CLP_FATHOM_STATUS, 63, 2, "Fathoming node %d  %d nodes (%d iterations)  current depth %d" }, 111 { CLP_FATHOM_SOLUTION, 64, 1, "Fathoming node %d  solution of %g after %d nodes at depth %d" }, 112 { CLP_FATHOM_FINISH, 65, 1, "Fathoming node %d (depth %d) took %d nodes (%d iterations)  maximum depth %d" }, 113 113 #endif 114 {CLP_GENERAL, 1000, 1, "%s"},115 {CLP_GENERAL2, 1001, 2, "%s"},116 {CLP_GENERAL_WARNING, 3006, 1, "%s"},117 {CLP_DUMMY_END, 999999, 0, ""}114 { CLP_GENERAL, 1000, 1, "%s" }, 115 { CLP_GENERAL2, 1001, 2, "%s" }, 116 { CLP_GENERAL_WARNING, 3006, 1, "%s" }, 117 { CLP_DUMMY_END, 999999, 0, "" } 118 118 }; 119 119 static Clp_message uk_english[] = { 120 { 121 CLP_SIMPLEX_FINISHED, 0, 1, "Optimal  objective value %g,\ 122 okay CLP can solve some LPs but you really need Xpress from Dash Associates :)" 123 }, 124 {CLP_DUMMY_END, 999999, 0, ""} 120 { CLP_SIMPLEX_FINISHED, 0, 1, "Optimal  objective value %g,\ 121 okay CLP can solve some LPs but you really need Xpress from Dash Associates :)" }, 122 { CLP_DUMMY_END, 999999, 0, "" } 125 123 }; 126 124 /* Constructor */ 127 ClpMessage::ClpMessage(Language language) :128 125 ClpMessage::ClpMessage(Language language) 126 : CoinMessages(sizeof(clp_us_english) / sizeof(Clp_message)) 129 127 { 130 131 132 133 Clp_message *message = clp_us_english;128 language_ = language; 129 strcpy(source_, "Clp"); 130 class_ = 1; //solver 131 Clp_message *message = clp_us_english; 134 132 135 136 137 138 139 message++;140 141 142 133 while (message>internalNumber != CLP_DUMMY_END) { 134 CoinOneMessage oneMessage(message>externalNumber, message>detail, 135 message>message); 136 addMessage(message>internalNumber, oneMessage); 137 message++; 138 } 139 // Put into compact form 140 toCompact(); 143 141 144 142 // now override any language ones 145 143 146 147 148 149 144 switch (language) { 145 case uk_en: 146 message = uk_english; 147 break; 150 148 151 152 153 154 149 default: 150 message = NULL; 151 break; 152 } 155 153 156 157 158 159 160 message++;161 162 154 // replace if any found 155 if (message) { 156 while (message>internalNumber != CLP_DUMMY_END) { 157 replaceMessage(message>internalNumber, message>message); 158 message++; 159 } 160 } 163 161 } 162 163 /* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2 164 */
Note: See TracChangeset
for help on using the changeset viewer.