/[ascend]/trunk/base/generic/solver/var.c
ViewVC logotype

Diff of /trunk/base/generic/solver/var.c

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

revision 943 by johnpye, Thu Oct 26 10:18:53 2006 UTC revision 944 by johnpye, Sat Nov 25 10:46:13 2006 UTC
# Line 71  Line 71 
71  #define RELAXED_V g_strings[3]  #define RELAXED_V g_strings[3]
72  #define NOMINAL_V g_strings[4]  #define NOMINAL_V g_strings[4]
73  #define INTERFACE_V g_strings[5]  #define INTERFACE_V g_strings[5]
74    #define ODEATOL_V g_strings[6]
75    
76  /*  /*
77   * array of those symbol table entries we need.   * array of those symbol table entries we need.
78   */   */
79  static symchar * g_strings[6];  static symchar * g_strings[7];
80    
81  SlvBackendToken var_instanceF(const struct var_variable *var)  SlvBackendToken var_instanceF(const struct var_variable *var)
82  { if (var==NULL || var->ratom==NULL) {  { if (var==NULL || var->ratom==NULL) {
# Line 132  void var_destroy(struct var_variable *va Line 133  void var_destroy(struct var_variable *va
133  int32 var_mindexF(const struct var_variable *var)  int32 var_mindexF(const struct var_variable *var)
134  {  {
135    if (var==NULL || var->ratom==NULL) {    if (var==NULL || var->ratom==NULL) {
136      FPRINTF(stderr,"var_set_mindex called on bad var\n");      ERROR_REPORTER_HERE(ASC_PROG_ERR,"bad var");
137      return -1;      return -1;
138    }    }
139    return var->mindex;    return var->mindex;
# Line 141  int32 var_mindexF(const struct var_varia Line 142  int32 var_mindexF(const struct var_varia
142  void var_set_mindexF(struct var_variable *var, int32 mindex)  void var_set_mindexF(struct var_variable *var, int32 mindex)
143  {  {
144    if (var==NULL || var->ratom==NULL) {    if (var==NULL || var->ratom==NULL) {
145      FPRINTF(stderr,"var_set_mindex called on bad var\n");      ERROR_REPORTER_HERE(ASC_PROG_ERR,"bad var");
146      return;      return;
147    }    }
148    var->mindex = mindex;    var->mindex = mindex;
# Line 150  void var_set_mindexF(struct var_variable Line 151  void var_set_mindexF(struct var_variable
151  int32 var_sindexF(const struct var_variable *var)  int32 var_sindexF(const struct var_variable *var)
152  {  {
153    if (var==NULL || var->ratom==NULL) {    if (var==NULL || var->ratom==NULL) {
154      FPRINTF(stderr,"var_set_sindex called on bad var\n");      ERROR_REPORTER_HERE(ASC_PROG_ERR,"bad var");
155      return -1;      return -1;
156    }    }
157    return var->sindex;    return var->sindex;
# Line 159  int32 var_sindexF(const struct var_varia Line 160  int32 var_sindexF(const struct var_varia
160  void var_set_sindexF(struct var_variable *var, int32 sindex)  void var_set_sindexF(struct var_variable *var, int32 sindex)
161  {  {
162    if (var==NULL || var->ratom==NULL) {    if (var==NULL || var->ratom==NULL) {
163      FPRINTF(stderr,"var_set_sindex called on bad var\n");      ERROR_REPORTER_HERE(ASC_PROG_ERR,"bad var");
164      return;      return;
165    }    }
166    var->sindex = sindex;    var->sindex = sindex;
# Line 168  void var_set_sindexF(struct var_variable Line 169  void var_set_sindexF(struct var_variable
169  real64 var_value(const struct var_variable *var)  real64 var_value(const struct var_variable *var)
170  {  {
171    if (var==NULL || var->ratom==NULL) {    if (var==NULL || var->ratom==NULL) {
172      FPRINTF(stderr,"var_value called on bad var\n");      ERROR_REPORTER_HERE(ASC_PROG_ERR,"bad var");
173      return 0.0;      return 0.0;
174    }    }
175    return( RealAtomValue(var->ratom) );    return( RealAtomValue(var->ratom) );
# Line 177  real64 var_value(const struct var_variab Line 178  real64 var_value(const struct var_variab
178  void var_set_value(struct var_variable *var, real64 value)  void var_set_value(struct var_variable *var, real64 value)
179  {  {
180    if (var==NULL || var->ratom==NULL) {    if (var==NULL || var->ratom==NULL) {
181      FPRINTF(stderr,"var_set_value called on bad var\n");      ERROR_REPORTER_HERE(ASC_PROG_ERR,"bad var");
182      return;      return;
183    }    }
184    SetRealAtomValue(var->ratom,value,(unsigned)0);    SetRealAtomValue(var->ratom,value,(unsigned)0);
# Line 187  real64 var_nominal(struct var_variable * Line 188  real64 var_nominal(struct var_variable *
188  {  {
189    struct Instance *c;    struct Instance *c;
190    if (var==NULL || var->ratom==NULL) {    if (var==NULL || var->ratom==NULL) {
191      FPRINTF(stderr,"var_nominal called on bad var\n");      ERROR_REPORTER_HERE(ASC_PROG_ERR,"bad var");
192      return 1.0;      return 1.0;
193    }    }
194    c = ChildByChar(var->ratom,NOMINAL_V);    c = ChildByChar(var->ratom,NOMINAL_V);
195    if( c == NULL ) {    if( c == NULL ) {
196      FPRINTF(stderr,"ERROR:  (var) var_nominal\n");      FPRINTF(ASCERR,"no 'nominal' field in variable");
197      FPRINTF(stderr,"        No 'nominal' field in variable.\n");      /* WriteInstance(stderr,IPTR(var->ratom)); */
     WriteInstance(stderr,IPTR(var->ratom));  
198      return 1.0;      return 1.0;
199    }    }
200    return( RealAtomValue(c) );    return( RealAtomValue(c) );
# Line 204  void var_set_nominal(struct var_variable Line 204  void var_set_nominal(struct var_variable
204  {  {
205    struct Instance *c;    struct Instance *c;
206    if (var==NULL || var->ratom==NULL) {    if (var==NULL || var->ratom==NULL) {
207      FPRINTF(stderr,"var_set_nominal called on bad var\n");      ERROR_REPORTER_HERE(ASC_PROG_ERR,"bad var");
208      return;      return;
209    }    }
210    c = ChildByChar(IPTR(var->ratom),NOMINAL_V);    c = ChildByChar(IPTR(var->ratom),NOMINAL_V);
211    if( c == NULL ) {    if( c == NULL ) {
212      FPRINTF(stderr,"ERROR:  (var) var_set_nominal\n");      ERROR_REPORTER_HERE(ASC_PROG_ERR,"no 'nominal' field in var");
213      FPRINTF(stderr,"        No 'nominal' field in variable.\n");      /* WriteInstance(stderr,IPTR(var->ratom)); */
     WriteInstance(stderr,IPTR(var->ratom));  
214      return;      return;
215    }    }
216    SetRealAtomValue(c,nominal,(unsigned)0);    SetRealAtomValue(c,nominal,(unsigned)0);
# Line 222  real64 var_lower_bound(struct var_variab Line 221  real64 var_lower_bound(struct var_variab
221  {  {
222    struct Instance *c;    struct Instance *c;
223    if (var==NULL || var->ratom==NULL) {    if (var==NULL || var->ratom==NULL) {
224      FPRINTF(stderr,"var_lower_bound called on bad var\n");      ERROR_REPORTER_HERE(ASC_PROG_ERR,"bad var");
225      return 0.0;      return 0.0;
226    }    }
227    c = ChildByChar(IPTR(var->ratom),LOWER_V);    c = ChildByChar(IPTR(var->ratom),LOWER_V);
228    if( c == NULL ) {    if( c == NULL ) {
229      FPRINTF(stderr,"ERROR:  (var) var_lower_bound\n");      ERROR_REPORTER_HERE(ASC_PROG_ERR,"no 'lower_bound' field");
     FPRINTF(stderr,"        No 'lower_bound' field in variable.\n");  
230      WriteInstance(stderr,IPTR(var->ratom));      WriteInstance(stderr,IPTR(var->ratom));
231      return 0.0;      return 0.0;
232    }    }
# Line 239  void var_set_lower_bound(struct var_vari Line 237  void var_set_lower_bound(struct var_vari
237  {  {
238    struct Instance *c;    struct Instance *c;
239    if (var==NULL || var->ratom==NULL) {    if (var==NULL || var->ratom==NULL) {
240      FPRINTF(stderr,"var_set_lower_bound called on bad var\n");      ERROR_REPORTER_HERE(ASC_PROG_ERR,"bad var");
241      return;      return;
242    }    }
243    c = ChildByChar(IPTR(var->ratom),LOWER_V);    c = ChildByChar(IPTR(var->ratom),LOWER_V);
244    if( c == NULL ) {    if( c == NULL ) {
245      FPRINTF(stderr,"ERROR:  (var) var_set_lower_bound\n");      ERROR_REPORTER_HERE(ASC_PROG_ERR,"no 'lower_bound' field");
246      FPRINTF(stderr,"        No 'lower_bound' field in variable.\n");      /* WriteInstance(stderr,IPTR(var->ratom)); */
     WriteInstance(stderr,IPTR(var->ratom));  
247      return;      return;
248    }    }
249    SetRealAtomValue(c,lower_bound,(unsigned)0);    SetRealAtomValue(c,lower_bound,(unsigned)0);
# Line 257  real64 var_upper_bound(struct var_variab Line 254  real64 var_upper_bound(struct var_variab
254  {  {
255    struct Instance *c;    struct Instance *c;
256    if (var==NULL || var->ratom==NULL) {    if (var==NULL || var->ratom==NULL) {
257      FPRINTF(stderr,"var_upper_bound called on bad var\n");      ERROR_REPORTER_HERE(ASC_PROG_ERR,"bad var");
258      return 0.0;      return 0.0;
259    }    }
260    c = ChildByChar(IPTR(var->ratom),UPPER_V);    c = ChildByChar(IPTR(var->ratom),UPPER_V);
261    if( c == NULL ) {    if( c == NULL ) {
262      FPRINTF(stderr,"ERROR:  (var) var_upper_bound\n");      ERROR_REPORTER_HERE(ASC_PROG_ERR,"no 'upper_bound' field");
263      FPRINTF(stderr,"        No 'upper_bound' field in variable.\n");      /* WriteInstance(stderr,IPTR(var->ratom)); */
     WriteInstance(stderr,IPTR(var->ratom));  
264      return 0.0;      return 0.0;
265    }    }
266    return( RealAtomValue(c) );    return( RealAtomValue(c) );
# Line 274  void var_set_upper_bound(struct var_vari Line 270  void var_set_upper_bound(struct var_vari
270  {  {
271    struct Instance *c;    struct Instance *c;
272    if (var==NULL || var->ratom==NULL) {    if (var==NULL || var->ratom==NULL) {
273      FPRINTF(stderr,"var_set_upper_bound called on bad var\n");      ERROR_REPORTER_HERE(ASC_PROG_ERR,"bad var");
274      return;      return;
275    }    }
276    c = ChildByChar(IPTR(var->ratom),UPPER_V);    c = ChildByChar(IPTR(var->ratom),UPPER_V);
277    if( c == NULL ) {    if( c == NULL ) {
278      FPRINTF(stderr,"ERROR:  (var) var_set_upper_bound\n");      ERROR_REPORTER_HERE(ASC_PROG_ERR,"no 'upper_bound' field");
279      FPRINTF(stderr,"        No 'upper_bound' field in variable.\n");      /* WriteInstance(stderr,IPTR(var->ratom)); */
     WriteInstance(stderr,IPTR(var->ratom));  
280      return;      return;
281    }    }
282    SetRealAtomValue(c,upper_bound,(unsigned)0);    SetRealAtomValue(c,upper_bound,(unsigned)0);
283  }  }
284    
285    double var_odeatol(struct var_variable *var){
286        struct Instance *c;
287        if(var==NULL||var->ratom==NULL){
288            ERROR_REPORTER_HERE(ASC_PROG_ERR,"bad var");
289            return -1;
290        }
291        c = ChildByChar(IPTR(var->ratom),ODEATOL_V);
292        if(c==NULL){
293            ERROR_REPORTER_HERE(ASC_PROG_ERR,"no '%s' field",SCP(ODEATOL_V));
294            return -1;
295        }
296        return RealAtomValue(c);
297    }
298        
299    
300  uint32 var_flagsF(const struct var_variable *var)  uint32 var_flagsF(const struct var_variable *var)
301  {  {
302    return var->flags;    return var->flags;
# Line 301  uint32 var_fixed(struct var_variable *va Line 311  uint32 var_fixed(struct var_variable *va
311  {  {
312    struct Instance *c;    struct Instance *c;
313    if (var==NULL || var->ratom==NULL) {    if (var==NULL || var->ratom==NULL) {
314      FPRINTF(stderr,"var_fixed called on bad var\n");      ERROR_REPORTER_HERE(ASC_PROG_ERR,"bad var");
315      return FALSE;      return FALSE;
316    }    }
317    c = ChildByChar(IPTR(var->ratom),FIXED_V);    c = ChildByChar(IPTR(var->ratom),FIXED_V);
318    if( c == NULL ) {    if( c == NULL ) {
319      FPRINTF(stderr,"ERROR:  (var) var_fixed\n");      ERROR_REPORTER_HERE(ASC_PROG_ERR,"no 'fixed' field");
320      FPRINTF(stderr,"        No 'fixed' field in variable.\n");      /* WriteInstance(stderr,IPTR(var->ratom)); */
     WriteInstance(stderr,IPTR(var->ratom));  
321      return FALSE;      return FALSE;
322    }    }
323    var_set_flagbit(var,VAR_FIXED,GetBooleanAtomValue(c));    var_set_flagbit(var,VAR_FIXED,GetBooleanAtomValue(c));
# Line 319  void var_set_fixed(struct var_variable * Line 328  void var_set_fixed(struct var_variable *
328  {  {
329    struct Instance *c;    struct Instance *c;
330    if (var==NULL || var->ratom==NULL) {    if (var==NULL || var->ratom==NULL) {
331      FPRINTF(stderr,"var_set_fixed called on bad var\n");      ERROR_REPORTER_HERE(ASC_PROG_ERR,"bad var");
332      return;      return;
333    }    }
334    c = ChildByChar(IPTR(var->ratom),FIXED_V);    c = ChildByChar(IPTR(var->ratom),FIXED_V);
335    if( c == NULL ) {    if( c == NULL ) {
336      FPRINTF(stderr,"ERROR:  (var) var_set_fixed\n");      ERROR_REPORTER_HERE(ASC_PROG_ERR,"no 'fixed' field");
337      FPRINTF(stderr,"        No 'fixed' field in variable.\n");      /* WriteInstance(stderr,IPTR(var->ratom)); */
     WriteInstance(stderr,IPTR(var->ratom));  
338      return;      return;
339    }    }
340    SetBooleanAtomValue(c,fixed,(unsigned)0);    SetBooleanAtomValue(c,fixed,(unsigned)0);
# Line 337  uint32 var_relaxed(struct var_variable * Line 345  uint32 var_relaxed(struct var_variable *
345  {  {
346    struct Instance *c;    struct Instance *c;
347    if (var==NULL || var->ratom==NULL) {    if (var==NULL || var->ratom==NULL) {
348      FPRINTF(stderr,"var_relaxed called on bad var\n");      ERROR_REPORTER_HERE(ASC_PROG_ERR,"bad var");
349      return FALSE;      return FALSE;
350    }    }
351    c = ChildByChar((var->ratom),RELAXED_V);    c = ChildByChar((var->ratom),RELAXED_V);
352    if( c == NULL ) {    if( c == NULL ) {
353      FPRINTF(stderr,"ERROR:  (var) var_relaxed\n");      ERROR_REPORTER_HERE(ASC_PROG_ERR,"no 'relaxed' field");
354      FPRINTF(stderr,"        No 'relaxed' field in variable.\n");      /* WriteInstance(stderr,(var->ratom)); */
     WriteInstance(stderr,(var->ratom));  
355      return FALSE;      return FALSE;
356    }    }
357    var_set_flagbit(var,VAR_RELAXED,GetBooleanAtomValue(c));    var_set_flagbit(var,VAR_RELAXED,GetBooleanAtomValue(c));
# Line 355  void var_set_relaxed(struct var_variable Line 362  void var_set_relaxed(struct var_variable
362  {  {
363    struct Instance *c;    struct Instance *c;
364    if (var==NULL || var->ratom==NULL) {    if (var==NULL || var->ratom==NULL) {
365      FPRINTF(stderr,"var_set_relaxed called on bad var\n");      ERROR_REPORTER_HERE(ASC_PROG_ERR,"bad var");
366      return;      return;
367    }    }
368    c = ChildByChar(IPTR(var->ratom),RELAXED_V);    c = ChildByChar(IPTR(var->ratom),RELAXED_V);
369    if( c == NULL ) {    if( c == NULL ) {
370      FPRINTF(stderr,"ERROR:  (var) var_set_relaxed\n");      ERROR_REPORTER_HERE(ASC_PROG_ERR,"no 'relaxed' field");
371      FPRINTF(stderr,"        No 'relaxed' field in variable.\n");      /* WriteInstance(stderr,IPTR(var->ratom)); */
     WriteInstance(stderr,IPTR(var->ratom));  
372      return;      return;
373    }    }
374    SetBooleanAtomValue(c,fixed,(unsigned)0);    SetBooleanAtomValue(c,fixed,(unsigned)0);
# Line 373  uint32 var_interface(struct var_variable Line 379  uint32 var_interface(struct var_variable
379  {  {
380    struct Instance *c;    struct Instance *c;
381    if (var==NULL || var->ratom==NULL) {    if (var==NULL || var->ratom==NULL) {
382      FPRINTF(stderr,"var_interface called on bad var\n");      ERROR_REPORTER_HERE(ASC_PROG_ERR,"bad var");
383      return FALSE;      return FALSE;
384    }    }
385    c = ChildByChar(IPTR(var->ratom),INTERFACE_V);    c = ChildByChar(IPTR(var->ratom),INTERFACE_V);
386    if( c == NULL ) {    if( c == NULL ) {
387      FPRINTF(stderr,"ERROR:  (var) var_interface\n");      ERROR_REPORTER_HERE(ASC_PROG_ERR,"no 'interface' field");
388      FPRINTF(stderr,"        No 'interface' field in variable.\n");      /* WriteInstance(stderr,IPTR(var->ratom)); */
     WriteInstance(stderr,IPTR(var->ratom));  
389      return 0;      return 0;
390    }    }
391    var_set_flagbit(var,VAR_INTERFACE,GetBooleanAtomValue(c));    var_set_flagbit(var,VAR_INTERFACE,GetBooleanAtomValue(c));
# Line 390  uint32 var_interface(struct var_variable Line 395  uint32 var_interface(struct var_variable
395  extern uint32 var_flagbit(const struct var_variable *var,const uint32 one)  extern uint32 var_flagbit(const struct var_variable *var,const uint32 one)
396  {  {
397    if (var==NULL || var->ratom == NULL) {    if (var==NULL || var->ratom == NULL) {
398      FPRINTF(stderr,"ERROR: var_flagbit called with bad var.\n");      ERROR_REPORTER_HERE(ASC_PROG_ERR,"bad var");
399      return 0;      return 0;
400    }    }
401    return (var->flags & one);    return (var->flags & one);
# Line 399  extern uint32 var_flagbit(const struct v Line 404  extern uint32 var_flagbit(const struct v
404  void var_set_flagbit(struct var_variable *var, uint32 field,uint32 one)  void var_set_flagbit(struct var_variable *var, uint32 field,uint32 one)
405  {  {
406    if (var==NULL || var->ratom == NULL) {    if (var==NULL || var->ratom == NULL) {
407      FPRINTF(stderr,"ERROR: var_set_flagbit called with bad var.\n");      ERROR_REPORTER_HERE(ASC_PROG_ERR,"bad var");
408      return;      return;
409    }    }
410    if (one) {    if (one) {
# Line 427  int32 var_apply_filter(const struct var_ Line 432  int32 var_apply_filter(const struct var_
432  int32 var_n_incidencesF(struct var_variable *var)  int32 var_n_incidencesF(struct var_variable *var)
433  {  {
434    if (var!=NULL) return var->n_incidences;    if (var!=NULL) return var->n_incidences;
435    FPRINTF(stderr,"var_n_incidences miscalled with NULL\n");    ERROR_REPORTER_HERE(ASC_PROG_ERR,"NULL var");
436    return 0;    return 0;
437  }  }
438    
# Line 436  void var_set_incidencesF(struct var_vari Line 441  void var_set_incidencesF(struct var_vari
441  {  {
442    if(var!=NULL && n >=0) {    if(var!=NULL && n >=0) {
443      if (n && i==NULL) {      if (n && i==NULL) {
444        FPRINTF(stderr,"var_set_incidence miscalled with NULL ilist\n");        ERROR_REPORTER_HERE(ASC_PROG_ERR,"NULL i");
445      }      }
446      var->n_incidences = n;      var->n_incidences = n;
447      var->incidence = i;      var->incidence = i;
448      return;      return;
449    }    }
450    FPRINTF(stderr,"var_set_incidence miscalled with NULL or n < 0\n");    ERROR_REPORTER_HERE(ASC_PROG_ERR,"NULL var, or n < 0");
451  }  }
452  const struct rel_relation **var_incidence_list( struct var_variable *var)  const struct rel_relation **var_incidence_list( struct var_variable *var)
453  {  {
# Line 506  struct var_variable **var_BackendTokens_ Line 511  struct var_variable **var_BackendTokens_
511        /* the odds of g_var_tag being a legal pointer are vanishingly        /* the odds of g_var_tag being a legal pointer are vanishingly
512      small, so if we find an ATOM without g_var_tag we assume it      small, so if we find an ATOM without g_var_tag we assume it
513      is outside the tree and shouldn't have been in the list. */      is outside the tree and shouldn't have been in the list. */
514        FPRINTF(stderr,"var_BackendTokens_to_vars called with bad token.\n");        ERROR_REPORTER_HERE(ASC_PROG_ERR,"bad token");
515      }      }
516    }    }
517    /* run through the master lists and put the vars with their atoms */    /* run through the master lists and put the vars with their atoms */
# Line 538  struct var_variable **var_BackendTokens_ Line 543  struct var_variable **var_BackendTokens_
543      }      }
544    }    }
545    if (count < len) {    if (count < len) {
546      FPRINTF(stderr,      ERROR_REPORTER_HERE(ASC_PROG_ERR,"found less than expected vars (len = %d, found = %d)",len,count);
            "var_BackendTokens_to_vars found less than expected vars\n");  
     FPRINTF(stderr,"len = %d, vars found = %d\n",len,count);  
547    } else {    } else {
548      FPRINTF(stderr,      ERROR_REPORTER_HERE(ASC_PROG_ERR,"found more than expected vars (len = %d, found = %d)",len,count);
            "var_BackendTokens_to_vars found more than expected vars\n");  
     FPRINTF(stderr,"len = %d, vars found = %d\n",len,count);  
549    }    }
550    PopInterfacePtrs(oldips,NULL,NULL);    PopInterfacePtrs(oldips,NULL,NULL);
551    return result;    return result;
# Line 558  static struct TypeDescription *g_solver_ Line 559  static struct TypeDescription *g_solver_
559  boolean set_solver_types(void) {  boolean set_solver_types(void) {
560    boolean nerr = 0;    boolean nerr = 0;
561    if( (g_solver_var_type = FindType(AddSymbol(SOLVER_VAR_STR))) == NULL ) {    if( (g_solver_var_type = FindType(AddSymbol(SOLVER_VAR_STR))) == NULL ) {
562      FPRINTF(stderr,"ERROR:  (var.c) set_solver_types\n");      ERROR_REPORTER_HERE(ASC_PROG_FATAL,"'solver_var' not defined");
     FPRINTF(stderr,"        Type solver_var not defined.\n");  
     FPRINTF(stderr,"        Solvers will not work.\n");  
563      nerr++;      nerr++;
564    }    }
565    if( (g_solver_int_type = FindType(AddSymbol(SOLVER_INT_STR))) == NULL ) {    if( (g_solver_int_type = FindType(AddSymbol(SOLVER_INT_STR))) == NULL ) {
566      FPRINTF(stderr,"ERROR:  (var.c) set_solver_types\n");      ERROR_REPORTER_HERE(ASC_PROG_ERROR,"'solver_int' not defined: MPS will not work");
     FPRINTF(stderr,"        Type solver_int not defined.\n");  
     FPRINTF(stderr,"        MPS will not work.\n");  
567      nerr++;      nerr++;
568    }    }
569    g_solver_binary_type = FindType(AddSymbol(SOLVER_BINARY_STR));    g_solver_binary_type = FindType(AddSymbol(SOLVER_BINARY_STR));
570    if( g_solver_binary_type == NULL) {    if( g_solver_binary_type == NULL) {
571      FPRINTF(stderr,"ERROR:  (var.c) set_solver_types\n");      ERROR_REPORTER_HERE(ASC_PROG_FATAL,"'solver_binary' not defined: MPS will not work");
     FPRINTF(stderr,"        Type solver_binary not defined.\n");  
     FPRINTF(stderr,"        MPS will not work.\n");  
572      nerr++;      nerr++;
573    }    }
574    if( (g_solver_semi_type = FindType(AddSymbol(SOLVER_SEMI_STR))) == NULL ) {    if( (g_solver_semi_type = FindType(AddSymbol(SOLVER_SEMI_STR))) == NULL ) {
575      FPRINTF(stderr,"ERROR:  (var.c) set_solver_types\n");      ERROR_REPORTER_HERE(ASC_PROG_FATAL,"'solver_semi' not defined: MPS will not work");
     FPRINTF(stderr,"        Type solver_semi not defined.\n");  
     FPRINTF(stderr,"        MPS will not work.\n");  
576      nerr++;      nerr++;
577    }    }
578    
# Line 589  boolean set_solver_types(void) { Line 582  boolean set_solver_types(void) {
582    NOMINAL_V = AddSymbolL("nominal",7);    NOMINAL_V = AddSymbolL("nominal",7);
583    FIXED_V = AddSymbolL("fixed",5);    FIXED_V = AddSymbolL("fixed",5);
584    INTERFACE_V = AddSymbolL("interface",9);    INTERFACE_V = AddSymbolL("interface",9);
585      ODEATOL_V = AddSymbol("ode_atol");
586    return nerr;    return nerr;
587  }  }
588    

Legend:
Removed from v.943  
changed lines
  Added in v.944

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