Changeset 436


Ignore:
Timestamp:
Aug 12, 2005 11:17:31 AM (14 years ago)
Author:
andreasw
Message:

correct return code types (so that it compiles on Windows)

Location:
branches/dev/Interfaces
Files:
3 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/dev/Interfaces/IpIpoptApplication.hpp

    r433 r436  
    1818{
    1919  /* Return codes for the Optimize call for an application */
    20 #include "IpReturnCodes.h"
     20#include "IpReturnCodes_inc.h"
    2121
    2222  DeclareOptionsRegistrar(IpoptApplication);
  • branches/dev/Interfaces/IpReturnCodes.h

    r434 r436  
    1212#define __IPRETURNCODES_H__
    1313
    14 /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
    15 /* !!!!!!!!!!!!!!!! REMEMBER TO UPDATE IpReturnCodes.inc !!!!!!!!!!!!!!!! */
    16 /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
     14/* include from a common include file */
    1715
    18 /** Return codes for the Optimize call for an application */
    19 enum ApplicationReturnStatus
    20   {
    21     Solve_Succeeded=0,
    22     Solved_To_Best_Possible_Precision=1,
    23     Solved_To_Acceptable_Level=2,
    24     Infeasible_Problem_Detected=3,
    25 
    26     Maximum_Iterations_Exceeded=-1,
    27     Restoration_Failed=-2,
    28     Not_Enough_Degrees_Of_Freedom=-10,
    29     Invalid_Problem_Definition=-11,
    30     Invalid_Option=-12,
    31 
    32     Unrecoverable_Exception=-100,
    33     NonIpopt_Exception_Thrown=-101,
    34     Insufficient_Memory=-102,
    35     Internal_Error=-199
    36   };
     16#include "IpReturnCodes_inc.h"
    3717
    3818#endif
  • branches/dev/Interfaces/IpReturnCodes_inc.h

    r435 r436  
    88// Authors:  Carl Laird, Andreas Waechter     IBM    2004-08-13
    99************************************************************************/
    10 
    11 #ifndef __IPRETURNCODES_H__
    12 #define __IPRETURNCODES_H__
    1310
    1411/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
     
    3532    Internal_Error=-199
    3633  };
    37 
    38 #endif
  • branches/dev/Interfaces/IpStdCInterface.cpp

    r435 r436  
    183183  }
    184184
    185   ApplicationReturnStatus status;
     185  Ipopt::ApplicationReturnStatus status;
    186186  if (!skip_optimize) {
    187187    status = ipopt_problem->app->OptimizeTNLP(tnlp);
    188188  }
    189189  else {
    190     status = Invalid_Problem_Definition;
     190    status = Ipopt::Invalid_Problem_Definition;
    191191  }
    192192
    193193  delete [] start_x;
    194194
    195   return status;
     195  return (::ApplicationReturnStatus) status;
    196196}
    197197
Note: See TracChangeset for help on using the changeset viewer.