Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

# APPSPACK_Solver.hpp

Go to the documentation of this file.

    00001 // $Id: APPSPACK_Solver.hpp,v 1.14 2004/11/24 19:26:39 tgkolda Exp $
    00002 // $Source: /space/CVS-Acro/acro/packages/appspack/appspack/src/APPSPACK_Solver.hpp,v $
    00003
    00004 //@HEADER
    00005 // ************************************************************************
    00006 //
    00007 //          APPSPACK: Asynchronous Parallel Pattern Search
    00008 //                 Copyright (2003) Sandia Corporation
    00009 //
    00010 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
    00011 // license for use of this work by or on behalf of the U.S. Government.
    00012 //
    00013 // This library is free software; you can redistribute it and/or modify
    00014 // it under the terms of the GNU Lesser General Public License as
    00015 // published by the Free Software Foundation; either version 2.1 of the
    00016 // License, or (at your option) any later version.
    00017 //
    00018 // This library is distributed in the hope that it will be useful, but
    00019 // WITHOUT ANY WARRANTY; without even the implied warranty of
    00020 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00021 // Lesser General Public License for more details.
    00022 //
    00023 // You should have received a copy of the GNU Lesser General Public
    00024 // License along with this library; if not, write to the Free Software
    00025 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
    00026 // USA.                                                                           .
    00027 //
    00028 // Questions? Contact Tammy Kolda (tgkolda@sandia.gov)
    00029 //
    00030 // ************************************************************************
    00031 //@HEADER
    00032
    00038 #ifndef APPSPACK_SOLVER_HPP
    00039 #define APPSPACK_SOLVER_HPP
    00040
    00041 #include "APPSPACK_Point.hpp"
    00042 #include "APPSPACK_Constraints_Interface.hpp"
    00043 #include "APPSPACK_Conveyor.hpp"
    00044 #include "APPSPACK_Directions.hpp"
    00045 #include "APPSPACK_List.hpp"
    00046 #include "APPSPACK_Parameter_List.hpp"
    00047 #include "APPSPACK_Print.hpp"
    00048
    00049 namespace APPSPACK
    00050 {
    00051
    00053
    00054 class Solver
    00055 {
    00056
    00057 public:
    00058
    00060   enum State {
    00061     Continue,
    00062     StepConverged,
    00063     FunctionConverged,
    00064     EvaluationsExhausted
    00065   };
    00066
    00068   Solver(const Parameter::List& params_in,
    00069          Executor::Interface& executor_in,
    00070          const Constraints::Interface& constraints_in);
    00071
    00074   static Point* initializeBestPointPtr(Parameter::List& params,
    00075                                        const Constraints::Interface& constraints);
    00076
    00077
    00079   ~Solver();
    00080
    00081
    00082   // --------------------------------------------------------------------------------
    00083
    00085
    00087   const Vector& getBestX() const;
    00088
    00090   bool isBestF() const;
    00091
    00093   double getBestF() const;
    00094
    00096
    00097   // --------------------------------------------------------------------------------
    00098
    00100
    00102   APPSPACK::Solver::State solve();
    00103
    00105   APPSPACK::Solver::State iterate();
    00106
    00108
    00109 private:
    00110
    00130   void processNewBestPoint(Point* newBestPointPtr = NULL);
    00131
    00141   void generateTrialPoints();
    00142
    00143
    00169   void createTrialPoint(int idx);
    00170
    00186   void processEvaluatedTrialPoints();
    00187
    00189
    00190   void printInitializationInformation() const;
    00191   void printBestPoint(const string label = "") const;
    00192
    00194
    00195 private:
    00196
    00198   const Constraints::Interface& constraints;
    00199
    00201   Parameter::List params;
    00202
    00204   Print print;
    00205
    00207   Point* bestPointPtr;
    00208
    00210   Directions directions;
    00211
    00213   Conveyor conveyor;
    00214
    00216   List exchangeList;
    00217
    00219   State state;
    00220
    00222
    00224   bool isFunctionTolerance;
    00225
    00227   Value functionTolerance;
    00228
    00230   bool isMaxEvaluations;
    00231
    00233   int maxEvaluations;
    00234
    00236
    00238   double boundsTolerance;
    00239
    00241   Vector tmpVector;
    00242
    00244   double epsMach;
    00245
    00246 };
    00247
    00248 }
    00249
    00251 ostream& operator<<(ostream& stream, APPSPACK::Solver::State state);
    00252
    00253 #endif

© Sandia Corporation | Site Contact | Privacy and Security

Generated on Wed Dec 14 18:41:05 2005 for APPSPACK 4.0.2 by 1.3.8 written by Dimitri van Heesch, © 1997-2002