ProblemWithPenalty.h

00001 
00015 #ifndef _ProblemWithPenalty_h
00016 #define _ProblemWithPenalty_h
00017 
00018 
00019 // SYSTEM INCLUDES
00020 //
00021 //#include <memory>
00022 
00023 // PROJECT INCLUDES
00024 //
00025 
00026 // LOCAL INCLUDES
00027 //
00028 #include "CountedPtr.h"
00029 #include "PenaltyFunction.h"
00030 #include "UnconstrainedProblem.h"
00031 
00032 // FORWARD REFERENCES
00033 //
00034 
00035 
00036 class ProblemWithPenalty
00037     : public UnconstrainedProblem
00038 {
00039 public:
00040 
00041     friend class    ProblemWithPenaltyPanel;
00042     friend class    ProblemWithPenaltyValidator;
00043     friend class    PwpAdvancedDialog;
00044 
00045 // LIFECYCLE
00046 
00049     ~ProblemWithPenalty(void);
00050 
00051 
00052 // OPERATORS
00053 
00054 // OPERATIONS
00057     std::auto_ptr<ProblemBase>          Clone() const;
00058 
00059 // ACCESS
00060 
00063     //TODO: Usunąć
00064     PenaltyFunction*&           rpPenalty();
00065 
00068     const PenaltyFunction&      Penalty() const;
00069 
00077     virtual const FunctionBase& BaseFunction() const;
00078 
00081     virtual wxString            Name() const;
00082 
00085     static ProblemIdType        ClassId();
00086 
00089     virtual ProblemIdType       Id() const;
00090 
00091     virtual void            SetFunction(
00092                                 auto_ptr<FunctionBase>  cpFunction,
00093                                 auto_ptr<VariableNames> cpVariables);
00094 // INQUIRY
00095 
00096     bool                        ReuseStartingPoint() const;
00097 
00098 protected:
00099 
00104     ProblemWithPenalty(bool doRegister = false);
00105 
00106 
00111     ProblemWithPenalty(const ProblemWithPenalty& from);
00112 
00113 private:
00114 
00117     virtual std::auto_ptr<Result> Solve() const throw(OptimizationError);
00118 
00121     void                        SetPenaltyFunction();
00122 
00123     static const wxString       mName;                  
00124     static ProblemWithPenalty   mProblemWithPenalty;    
00125 
00126     DoubleParameter             mEpsilon;   
00127     bool                        mReuseStartingPoint;
00128 
00129     mutable PenaltyFunction*    mpPenaltyFunction; 
00130 
00131 };
00132 
00133 // INLINE METHODS
00134 //
00135 
00136 // EXTERNAL REFERENCES
00137 //
00138 
00139 #endif  // _ProblemWithPenalty_h_

Wygenerowano Fri Sep 29 21:04:48 2006 dla EduOptim2 programem  doxygen 1.4.6