示例#1
0
/** main method starting SCIP */
int main(
   int                        argc,          /**< number of arguments from the shell */
   char**                     argv           /**< array of shell arguments */
   )
{
   SCIP_RETCODE retcode;
   SCIP_Bool interactive;
   const char* setfile;
   int i;

   assert(argc >= 1);
   if( argc == 1 )
   {
      SCIP* scip;

      SCIP_CALL_ABORT( SCIPcreate(&scip) );
      SCIPprintVersion(scip, NULL);
      printf("\n");
      SCIP_CALL_ABORT( SCIPfree(&scip) );

      printf("Usage: %s <nl-file> { [-AMPL] | [<settings-file>] | -i }\n", argv[0]);
      printf("\n");
      printf("       -i starts the SCIP shell after reading settings and .nl file, instead of starting the SCIP solve\n");

      return 0;
   }

   /* check command line arguments after .nl file */
   interactive = FALSE;
   setfile = NULL;
   for( i = 2; i < argc; ++i )
   {
      if( strcmp(argv[i], "-AMPL") == 0 )
         continue;

      if( strcmp(argv[i], "-i") == 0 )
      {
         interactive = TRUE;
         continue;
      }

      setfile = argv[i];
   }

   if( setfile == NULL && SCIPfileExists("scip.set") )
      setfile = "scip.set";

   retcode = run(argv[1], setfile, interactive);

   /* evaluate retrun code of the SCIP process */
   if( retcode != SCIP_OKAY )
   {
      /* write error back trace */
      SCIPprintError(retcode);
      return -1;
   }

   return 0;
}
示例#2
0
/** main method starting SCIP */
int main(
   int                        argc,          /**< number of arguments from the shell */
   char**                     argv           /**< array of shell arguments */
   )
{
   SCIP_RETCODE retcode;

   retcode = runSCIP(argc, argv);
   if( retcode != SCIP_OKAY )
   {
      SCIPprintError(retcode, stderr);
      return -1;
   }

   return 0;
}
示例#3
0
int
main(
   int                        argc,
   char**                     argv
   )
{
   SCIP_RETCODE retcode;

   retcode = runShell(argc, argv, "scip.set");
   if( retcode != SCIP_OKAY )
   {
      SCIPprintError(retcode);
      return -1;
   }

   return 0;
}
示例#4
0
/** main method */
int main(
   int                   argc,          /**< number of arguments */
   char**                argv           /**< string array with arguments */
   )
{
  SCIP_RETCODE retcode;

  retcode = runShell(argc, argv, "scip.set");

  if( retcode != SCIP_OKAY )
  {
     SCIPprintError(retcode);
     return -1;
  }

  return 0;
}
示例#5
0
文件: main.c 项目: aimanqais/gerardus
/** main function called first */
int
main(
   int                   argc,               /**< number of arguments */
   char**                argv                /**< array of arguments */
   )
{
  SCIP_RETCODE retcode;

  retcode = SCIPrunGCGShell(argc, argv, "gcg.set");

  if( retcode != SCIP_OKAY )
  {
     SCIPprintError(retcode);
     return -1;
  }

  return 0;
}
示例#6
0
/** main method starting SCIP */
int main(
   int                        argc,          /**< number of arguments from the shell */
   char**                     argv           /**< array of shell arguments */
   )
{
   SCIP_RETCODE retcode;

   /* run interactive shell */
   retcode = SCIPrunShell(argc, argv, "scip.set");

   /* evaluate retrun code of the SCIP process */
   if( retcode != SCIP_OKAY )
   {
      /* write error back trace */
      SCIPprintError(retcode);
      return -1;
   }

   return 0;
}