Ignore:
Timestamp:
Dec 24, 2018 11:07:36 AM (4 months ago)
Author:
forrest
Message:

Allow a strategy for initial solve where code analyzes problem and guesses at parameters

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Clp/src/CbcOrClpParam.cpp

    r2374 r2384  
    12411241extern int CbcOrClpRead_mode;
    12421242int CbcOrClpEnvironmentIndex = -1;
     1243// Alternative to environment
     1244char * alternativeEnvironment = NULL;
    12431245static size_t fillEnv()
    12441246{
     
    12471249#else
    12481250     // Don't think it will work on Windows
    1249      char * environ = getenv("CBC_CLP_ENVIRONMENT");
     1251     char * environ;
     1252     if (!alternativeEnvironment)
     1253       environ = getenv("CBC_CLP_ENVIRONMENT");
     1254     else
     1255       environ = alternativeEnvironment;
    12501256     size_t length = 0;
    12511257     if (environ) {
     
    12751281          }
    12761282     }
    1277      if (!length)
     1283     if (!length) {
    12781284          CbcOrClpEnvironmentIndex = -1;
     1285          if (alternativeEnvironment) {
     1286            delete [] alternativeEnvironment;
     1287            alternativeEnvironment = NULL;
     1288          }
     1289     }
    12791290     return length;
    12801291#endif
     
    24782489 is initialized to 'stdout' (this defaults to ordinary solution if stdout). \
    24792490If problem created from gmpl model - will do any reports."
     2491     );
     2492     parameters[numberParameters++] =
     2493          CbcOrClpParam("guess", "Guesses at good parameters",
     2494                        CLP_PARAM_ACTION_GUESS, 7);
     2495     parameters[numberParameters-1].setLonghelp
     2496     (
     2497          "This looks at model statistics and does an initial solve \
     2498setting some parameters which may help you to think of possibilities."
    24802499     );
    24812500#ifdef COIN_HAS_CBC
Note: See TracChangeset for help on using the changeset viewer.