// Assume by the time this constructor is called, the number of parameters and constraints has been finalized
InteriorPointOptimizer::InteriorPointOptimizer( const OptimizerSystem& sys )
        : OptimizerRep( sys ) {

        int n = sys.getNumParameters();
        int m = sys.getNumConstraints();

        if( n < 1 ) {
            const char* where = " InteriorPointOptimizer Initialization";
            const char* szName = "dimension";
            SimTK_THROW5(SimTK::Exception::ValueOutOfRange, szName, 1, n, INT_MAX, where); 
        }

        // Initialize arrays to store multipliers -- will be used for warm starts
        mult_x_L = new Number[n];
        mult_x_U = new Number[n];
        mult_g = new Number[m];
        for(int i=0;i<n;i++) mult_x_L[i] = mult_x_U[i] = 0;
        for(int i=0;i<m;i++) mult_g[i] = 0;

        g_L = new Number[m];
        g_U = new Number[m];
        /* set the bounds on the equality constraint functions */
        for(int i=0;i<sys.getNumEqualityConstraints();i++){
            g_U[i] = g_L[i] = 0.0;
        }
        /* set the bounds on the inequality constraint functions */
        for(int i=sys.getNumEqualityConstraints();i<m;i++){
            g_U[i] = SimTK::Real(POSITIVE_INF);
            g_L[i] = 0.0;
        }

        firstOptimization = true;
    }