Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

rdOptimizationTarget.h

00001 // rdOptimizationTarget.cpp
00002 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00003 // Copyright 2000 Realistic Dynamics, Inc.
00004 // All rights reserved.
00005 //
00006 // Please do not read, copy, distribute, or use without permission.
00007 // Contact: Frank C. Anderson, fca@RealisticDynamics.com
00008 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00009 #ifndef __rdOptimizationTarget_h__
00010 #define __rdOptimizationTarget_h__
00011 
00012 
00013 //=============================================================================
00014 // INCLUDES
00015 //=============================================================================
00016 #include "rdSQPDLL.h"
00017 
00018 //=============================================================================
00019 //=============================================================================
00026 class RDSQP_API rdOptimizationTarget  
00027 {
00028 //=============================================================================
00029 // DATA
00030 //=============================================================================
00031 public:
00033    static const double SMALLDX;
00034 protected:
00036    int _nEval;
00038    int _nx;
00040    int _np;
00042    int _nineqn;
00044    int _nineq;
00046    int _neqn;
00048    int _neq;
00050    double *_dx;
00051 
00052 //=============================================================================
00053 // METHODS
00054 //=============================================================================
00055 public:
00056    virtual ~rdOptimizationTarget();
00057    rdOptimizationTarget(int aNX=0);
00058 private:
00059    void setNull();
00060 
00061    // PERFORMANCE AND CONSTRAINTS
00062 public:
00063    virtual int
00064       compute(double *x,double *p,double *c) = 0;
00065    virtual int
00066       computeGradients(double *dx,double *x,double *dpdx,double *dcdx) = 0;
00067 
00068    // PERFORMANCE
00069    virtual int
00070       computePerformance(double *x,double *p) = 0;
00071    virtual int
00072       computePerformanceGradient(double *x,double *dpdx) = 0;
00073 
00074    // CONSTRAINT
00075    virtual int
00076       computeConstraint(double *x,int i,double *c) = 0;
00077    virtual int
00078       computeConstraintGradient(double *x,int i,double *dcdx) = 0;
00079 
00080    // SET AND GET
00081    virtual void setNX(int aNX);
00082    int getNX();
00083    void setDX(double aVal);
00084    void setDX(int aIndex,double aVal);
00085    double getDX(int aIndex);
00086    double* getDXArray();
00087    void setNEvaluations(int aN=0);
00088    int getNEvaluations();
00089    int getNP();
00090    int getNC();
00091    int getNCInequality();
00092    int getNCInequalityNonlinear();
00093    int getNCInequalityLinear();
00094    int getNCEquality();
00095    int getNCEqualityNonlinear();
00096    int getNCEqualityLinear();
00097 
00098    // UTILITY
00099    bool isControlIndexValid(int aIndex);
00100    void validatePerturbationSize(double &aSize);
00101 };
00102 
00103 #endif // __rdSQP_h__

Generated on Wed Aug 20 02:17:06 2003 for Simulation Software by doxygen1.3