/[ascend]/trunk/tcltk98/generic/interface/SlvProc.h
ViewVC logotype

Diff of /trunk/tcltk98/generic/interface/SlvProc.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/ascend4/interface/SlvProc.h revision 1 by aw0a, Fri Oct 29 20:54:12 2004 UTC trunk/tcltk98/generic/interface/SlvProc.h revision 54 by jds, Tue Aug 2 11:20:09 2005 UTC
# Line 30  Line 30 
30   *  first created by Abbott, 1994.   *  first created by Abbott, 1994.
31   */   */
32    
33  #ifndef SlvProc_module_loaded  /** @file
34  #define SlvProc_module_loaded   *  Solver analysis and monitoring procedures.
35     *  <pre>
 /*  
36   *  To include this header, you must include the following:   *  To include this header, you must include the following:
37   *      #include "tcl.h"   *      #include "tcl.h"
38     *      #include "utilities/ascConfig.h"
39   *      #include "interface/HelpProc.h"   *      #include "interface/HelpProc.h"
40   *      #include "interface/SlvProc.h" (which is sort of obvious)   *      #include "interface/SlvProc.h" (which is sort of obvious)
41     *  </pre>
42   */   */
43    
44    #ifndef SlvProc_module_loaded
45    #define SlvProc_module_loaded
46    
47  #define SLVMONITORPREFIX "slvmon"  #define SLVMONITORPREFIX "slvmon"
48    
49  extern int Asc_VarAnalyzeCmd(ClientData cdata, Tcl_Interp *interp,  extern int Asc_VarAnalyzeCmd(ClientData cdata, Tcl_Interp *interp,
50                               int argc, CONST84 char *argv[]);                               int argc, CONST84 char *argv[]);
51  extern int Asc_RelAnalyzeCmd(ClientData cdata, Tcl_Interp *interp,  /**<
52                               int argc, CONST84 char *argv[]);   *  <!--  int Asc_VarAnalyzeCmd;                                       -->
53  /*   *  This function will analyze the elements in the current slv_system to see
  *  int Asc_VarAnalyzeCmd;  
  *  Registered as \"__var_analyze low high  
  *                  scaling?lower?upper?other  
  *  rel?abs tolerance <othervalue>.  
  *  int Asc_RelAnalyzeCmd;  
  *  Registered as \"__rel_analyze low high  
  *                  residual?other  
  *  rel?abs tolerance <othervalue>.  
  *  Comments :  
  *  
  *  This function will analyze the elements in the current slv_systemto see  
54   *  whether they satisfy the proximity queries. The variable type supported is   *  whether they satisfy the proximity queries. The variable type supported is
55   *  the "solver_var". It can be used to analyse variables or relations for   *  the "solver_var". It can be used to analyse variables or relations for
56   *  proximity to a "othervalue". rel?abs will determine whether   *  proximity to a "othervalue". rel?abs will determine whether
# Line 67  extern int Asc_RelAnalyzeCmd(ClientData Line 60  extern int Asc_RelAnalyzeCmd(ClientData
60   *  respect to the value of the solver_var. "residual" pertains to the residual   *  respect to the value of the solver_var. "residual" pertains to the residual
61   *  of a relation as compared to 0.0. If for any of the queries,   *  of a relation as compared to 0.0. If for any of the queries,
62   *  the values are too close to zero, then "absolute" queries are made.   *  the values are too close to zero, then "absolute" queries are made.
63   *  Internal units are used for all queries.   *  Internal units are used for all queries.<br><br>
64   *   *
65   *  Examples:   *  Examples:
66   *  1) __var_analyze 20 46 lower rel 0.2;   *   -# __var_analyze 20 46 lower rel 0.2;
67   *     will analyse (indexes 20 through 46 inclusive) all solver_vars   *      will analyse (indexes 20 through 46 inclusive) all solver_vars
68   *     that have values which are within 20% of their lower_bounds.   *      that have values which are within 20% of their lower_bounds.
69   *  2) __var_analyze 20 46 lower abs 0.2;   *   -# __var_analyze 20 46 lower abs 0.2;
70   *     will analyse (indexes 20 through 46 inclusive) all solver_vars   *      will analyse (indexes 20 through 46 inclusive) all solver_vars
71   *     that have values which are within 0.2 of their lower_bounds.   *      that have values which are within 0.2 of their lower_bounds.
72   *  3) __var_analyze 20 46 other rel 0.2 15.0;   *   -# __var_analyze 20 46 other rel 0.2 15.0;
73   *     will analyse (indexes 20 through 46 inclusive) all solver_vars   *      will analyse (indexes 20 through 46 inclusive) all solver_vars
74   *     that have values which are within 20% of 15.0.   *      that have values which are within 20% of 15.0.
75   *   *
76   *  Will be return a formatted string with of the form:   *  Will be return a formatted string with of the form:
77   *  {index b_close} {index b_far} where index is the original probe list index.   *  {index b_close} {index b_far} where index is the original probe list index.
78   *  See the source for more details.   *  See the source for more details.<br><br>
79     *
80     *  Registered as \"__var_analyze low high scaling?lower?upper?other rel?abs tolerance <othervalue>.
81     */
82    extern int Asc_RelAnalyzeCmd(ClientData cdata, Tcl_Interp *interp,
83                                 int argc, CONST84 char *argv[]);
84    /**<
85     *  <!--  int Asc_RelAnalyzeCmd;                                       -->
86     *  See Asc_VarAnalyzeCmd().
87     *
88     *  Registered as \"__rel_analyze low high residual?other rel?abs tolerance <othervalue>.
89   */   */
90    
91  STDHLF_H(Asc_SolveMonitorCmd);  STDHLF_H(Asc_SolveMonitorCmd);
92    
93  extern int Asc_SolveMonitorCmd(ClientData, Tcl_Interp *, int, CONST84 char **);  extern int Asc_SolveMonitorCmd(ClientData, Tcl_Interp *, int, CONST84 char **);
94  /*  /**< status = Asc_SolveMonitorCmd((cdata,interp,argc,argv); */
95   * status = Asc_SolveMonitorCmd((cdata,interp,argc,argv);  /**  Registered as */
96   * Registered as: */  #define Asc_SolveMonitorCmdHN "slv_monitor"
 #define Asc_SolveMonitorCmdHN "slv_monitor"  
97  /* which should eventually be __something, when we clean up the slv_ mess */  /* which should eventually be __something, when we clean up the slv_ mess */
98  /* Usage: */  /**  Usage: */
99  #define Asc_SolveMonitorCmdHU \  #define Asc_SolveMonitorCmdHU \
100    "slv_monitor takes no arguments yet"    "slv_monitor takes no arguments yet"
101    /**  Short help text */
102  #define Asc_SolveMonitorCmdHS \  #define Asc_SolveMonitorCmdHS \
103   "Returns the name of a monitor command to watch var/rel changes"   "Returns the name of a monitor command to watch var/rel changes"
104    /**  Long help text part 1 */
105  #define Asc_SolveMonitorCmdHL1 "Eventually this should take an argument "  #define Asc_SolveMonitorCmdHL1 "Eventually this should take an argument "
106    /**  Long help text part 2 */
107  #define Asc_SolveMonitorCmdHL2 "that is the id of a tcl solver token.\n"  #define Asc_SolveMonitorCmdHL2 "that is the id of a tcl solver token.\n"
108    /**  Long help text part 3 */
109  #define Asc_SolveMonitorCmdHL3 "\  #define Asc_SolveMonitorCmdHL3 "\
110   * This creates a monitor and returns its symbolic handle.\n\   * This creates a monitor and returns its symbolic handle.\n\
111   * Multiple monitors can exist and are manipulated by their\n\   * Multiple monitors can exist and are manipulated by their\n\
# Line 109  extern int Asc_SolveMonitorCmd(ClientDat Line 115  extern int Asc_SolveMonitorCmd(ClientDat
115   * but it should be changed to take a slvsys interface id when\n\   * but it should be changed to take a slvsys interface id when\n\
116   * the solver interface is changed to work by name.\n\   * the solver interface is changed to work by name.\n\
117  "  "
118  /*  /*
119   * because they need to be defined in a visible place, the info strings   * because they need to be defined in a visible place, the info strings
120   * for the monitors created follow:   * for the monitors created follow:
121   */   */
122    /**  Short help text */
123  #define SolveMonitorHS \  #define SolveMonitorHS \
124   "Returns the list of changes in residuals, variables, or steps in variables"   "Returns the list of changes in residuals, variables, or steps in variables"
125    /**  Usage */
126  #define SolveMonitorHU \  #define SolveMonitorHU \
127   "slvmonN destroy OR slvmonN slvsysname change <var,rel> OR\n\   "slvmonN destroy OR slvmonN slvsysname change <var,rel> OR\n\
128  slvmonN slvsysname geometry w h x y rmin rmax vmax OR \n\  slvmonN slvsysname geometry w h x y rmin rmax vmax OR \n\
129  slvmonN slvsysname plotdata <value,speed,residual>\n\  slvmonN slvsysname plotdata <value,speed,residual>\n\
130  "  "
131    /**  Long help text part 1 */
132  #define SolveMonitorHL1 \  #define SolveMonitorHL1 \
133  "\  "\
134   * s change var         return scaled values that changed\n\   * s change var         return scaled values that changed\n\
# Line 130  slvmonN slvsysname plotdata <value,speed Line 139  slvmonN slvsysname plotdata <value,speed
139   * Scaled values > vmax (or rmax) will be returned as having the\n\   * Scaled values > vmax (or rmax) will be returned as having the\n\
140   * value of the max, rather than their TRUE value.\n\   * value of the max, rather than their TRUE value.\n\
141  "  "
142    /**  Long help text part 2 */
143  #define SolveMonitorHL2 \  #define SolveMonitorHL2 \
144  "\n\  "\n\
145   * s geometry w h x y rmin rmax vmax\n\   * s geometry w h x y rmin rmax vmax\n\
# Line 141  slvmonN slvsysname plotdata <value,speed Line 151  slvmonN slvsysname plotdata <value,speed
151   * The 0 line of the area is y + h/2 for values. The values will be\n\   * The 0 line of the area is y + h/2 for values. The values will be\n\
152   * spread evenly over the width in order of increasing solver master index.\n\   * spread evenly over the width in order of increasing solver master index.\n\
153  "  "
154    /**  Long help text part 3 */
155  #define SolveMonitorHL3 \  #define SolveMonitorHL3 \
156  "\n\  "\n\
157   * s plotdata value     return plot info for scaled values that changed\n\   * s plotdata value     return plot info for scaled values that changed\n\
# Line 148  slvmonN slvsysname plotdata <value,speed Line 159  slvmonN slvsysname plotdata <value,speed
159   * s plotdata residual  return plot info for scaled residuals that changed\n\   * s plotdata residual  return plot info for scaled residuals that changed\n\
160   *\n\   *\n\
161  "  "
162    /**  Long help text part 4 */
163  #define SolveMonitorHL4 \  #define SolveMonitorHL4 \
164  "\  "\
165   * Each option returns a list of {x y index} for changed values of the\n\   * Each option returns a list of {x y index} for changed values of the\n\
# Line 155  slvmonN slvsysname plotdata <value,speed Line 167  slvmonN slvsysname plotdata <value,speed
167   * should be plotted based on a transformation derived from whxy info\n\   * should be plotted based on a transformation derived from whxy info\n\
168   * last obtained by the geometry command of the monitor.\n\   * last obtained by the geometry command of the monitor.\n\
169  "  "
170    /**  Long help text part 5 */
171  #define SolveMonitorHL5 \  #define SolveMonitorHL5 \
172  "\  "\
173   * The transformation may specify the same coordinate for more than\n\   * The transformation may specify the same coordinate for more than\n\
# Line 162  slvmonN slvsysname plotdata <value,speed Line 175  slvmonN slvsysname plotdata <value,speed
175   * If this function raises a floating point exception, it will\n\   * If this function raises a floating point exception, it will\n\
176   * not return data, but an error.\n\   * not return data, but an error.\n\
177  "  "
178    /**  Long help text part 6 */
179  #define SolveMonitorHL6 \  #define SolveMonitorHL6 \
180  "\  "\
181  *   value:  The variable values v are scaled by nominal.\n\  *   value:  The variable values v are scaled by nominal.\n\
# Line 170  slvmonN slvsysname plotdata <value,speed Line 184  slvmonN slvsysname plotdata <value,speed
184  *       returned value is {plotx ploty mastervarindex} for\n\  *       returned value is {plotx ploty mastervarindex} for\n\
185  *       all variables that changed since the last call or geometry.\n\  *       all variables that changed since the last call or geometry.\n\
186  "  "
187    /**  Long help text part 7 */
188  #define SolveMonitorHL7 \  #define SolveMonitorHL7 \
189  "\  "\
190  *   speed:  The variable values v are scaled by nominal.\n\  *   speed:  The variable values v are scaled by nominal.\n\
# Line 180  slvmonN slvsysname plotdata <value,speed Line 195  slvmonN slvsysname plotdata <value,speed
195  *       {plotx ploty mastervarindex} for\n\  *       {plotx ploty mastervarindex} for\n\
196  *       all variables that had a step size change.\n\  *       all variables that had a step size change.\n\
197  "  "
198    /**  Long help text part 8 */
199  #define SolveMonitorHL8 \  #define SolveMonitorHL8 \
200  "\  "\
201  *  residual:    The relation residuals, as scaled by nominals and reduced\n\  * residual: The relation residuals, as scaled by nominals and reduced\n\
202  *       to rmax if necessary, which have changed since the last call\n\  *       to rmax if necessary, which have changed since the last call\n\
203  *       are transformed to a dual log scale in the plot region.\n\  *       are transformed to a dual log scale in the plot region.\n\
204  *       Residuals < rmin considered as rmin. Residuals < 0 plotted\n\  *       Residuals < rmin considered as rmin. Residuals < 0 plotted\n\
# Line 190  slvmonN slvsysname plotdata <value,speed Line 206  slvmonN slvsysname plotdata <value,speed
206  *       vertical center of the canvas indicates the residual magnitude"  *       vertical center of the canvas indicates the residual magnitude"
207  /* end o spew */  /* end o spew */
208    
209  #endif /* SlvProc_module_loaded*/  #endif  /* SlvProc_module_loaded*/
210    

Legend:
Removed from v.1  
changed lines
  Added in v.54

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22