/[ascend]/trunk/base/generic/solver/rel.h
ViewVC logotype

Contents of /trunk/base/generic/solver/rel.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1240 - (show annotations) (download) (as text)
Fri Jan 26 11:12:20 2007 UTC (15 years, 5 months ago) by johnpye
File MIME type: text/x-chdr
File size: 23280 byte(s)
@!@#$#$%! working at last
1 /* ASCEND modelling environment
2 Copyright (C) 1990 Karl Michael Westerberg
3 Copyright (C) 1993 Joseph Zaher
4 Copyright (C) 1994 Joseph Zaher, Benjamin Andrew Allan
5 Copyright (C) 2006 Carnegie Mellon University
6
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License
9 as published by the Free Software Foundation; either version 2
10 of the License, or (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 *//** @file
21 Relation module for the SLV solver.
22
23 This module provides a SLV solver (the "client") with access to
24 relations present in the ASCEND compiler (the "server").
25
26 Access to ASCEND relations is abstracted so that SLV solvers
27 can theoretically be used to solve other kinds of systems as
28 well. @see analyze.h
29
30 @TODO Question: shouldn't the 'ExtRel' stuff be in the compiler side of
31 things? Even if it is being cached, it seems that the request for
32 evaluation is coming from the RelationCalcResidualPostfix call in
33 relation_util.c, so we're going back and forth...
34
35 04/94 - added rel_apply_filter() which uses the new
36 rel_filter_t data structure for perfoming all
37 relation filtering needs (eliminating the
38 filter module)
39 *//*
40 by Karl Michael Westerberg and Joseph Zaher, 2/6/90
41 Last CVS version: $Revision: 1.41 $ $Date: 1998/02/05 15:59:24 $ $Author: ballan $
42 */
43
44 #ifndef ASC_REL_H
45 #define ASC_REL_H
46
47 #include <utilities/ascConfig.h>
48 #include "slv_types.h"
49 #include "var.h"
50
51 /** @addtogroup system System
52 @{
53 */
54
55 /*------------------------------------------------------------------------------
56 forward decls and typedefs
57 */
58
59 /*
60 * rel_relation data type and basic type operators.
61 */
62
63 #define rel_TOK_less 0x1
64 #define rel_TOK_equal 0x2
65 #define rel_TOK_greater 0x4
66
67 struct rel_extnode {
68 int32 whichvar;
69 struct ExtRelCache *cache; /**< pointer to private structure */
70 };
71
72 /** The exact operator of a relation. */
73 enum rel_enum {
74 e_rel_minimize,
75 e_rel_maximize,
76 e_rel_equal,
77 e_rel_not_equal,
78 e_rel_less,
79 e_rel_greater,
80 e_rel_lesseq,
81 e_rel_greatereq
82 };
83
84 /** Backend relation types. */
85 enum backend_enum {
86 e_rel_token,
87 e_rel_glassbox,
88 e_rel_blackbox
89 };
90
91 /**
92 Relation data structure (solver-side).
93
94 @NOTE
95 If you mess with this struct, change the defaults for it in .c file.
96 */
97 struct rel_relation {
98 SlvBackendToken instance;
99 /**< Normally, this is a pointer to an Instance struct */
100 struct rel_extnode *nodeinfo;
101 /**< For use by blackbox relations, NULL in other cases */
102 struct var_variable **incidence;
103 /**< array of atomic vars and nonvars in rel */
104 enum backend_enum type; /**< tokens, glassbox or blackbox */
105 int32 n_incidences; /**< length of incidence. */
106 int32 mindex; /**< index in the slv_system_t master list */
107 int32 sindex; /**< index in the slv_system_t solver list */
108 int32 model; /**< index of a hypothetical MODEL rel is from */
109 uint32 flags; /**< flags */
110 /*
111 * For future use:
112 *
113 * struct var_variable **incidentals; array of nonvars,
114 * once solveratoms arrive.
115 *
116 * int32 n_incidentals;
117 */
118 };
119
120 /**
121 Cache for external relations. This is a place to stash away information
122 relating to the evaluation of external relations, with the intention of
123 making them work efficiently.
124
125 It is apparently intended to prevent repeated calls to external relations
126 when different outputs values are required for the same set of input
127 values. Not sure how complete etc it is -- JP.
128
129 @TODO what do those ':1' mean eg for evaluation_required?
130
131 Originally present in a separate file 'extrel.h', but now merged into
132 'rel.h' in the solver directory.
133 */
134 struct ExtRelCache{
135 int32 nodestamp;
136 struct ExternalFunc *efunc; /**< pre_slv, eval and deriv funcs */
137 SlvBackendToken data; /**< only passed on pre_slv */
138 struct gl_list_t *arglist; /**< only passed on pre_slv */
139 struct gl_list_t *inputlist;
140 struct var_variable **invars; /**< pointers to var_variables, in input argument order */
141 struct var_variable **outvars; /**< pointers to var_variables, in output argument order */
142 void *user_data; /**< user data */
143 int32 ninputs, noutputs;
144 double *inputs;
145 double *outputs;
146 double *jacobian;
147 unsigned evaluation_required :1; /**< bits needed to control */
148 unsigned first_func_eval :1; /**< recalculation. until we can */
149 unsigned first_deriv_eval :1; /**< do proper block coding */
150 };
151
152 /*------------------------------------------------------------------------------
153 CREATION / MANIPULATION OF REL_RELATION OBJECTS
154 */
155
156 extern struct rel_relation *rel_create(SlvBackendToken instance,
157 struct rel_relation *rel);
158 /**<
159 Creates a relation given the relation instance.
160 If the rel supplied is NULL, we allocate the memory for the
161 rel we return, else we just init the memory you hand us and
162 return it to you.
163
164 We set the fields instance, nodeinfo, type following
165 the instance. Setting the rest of the information is the job
166 of the bridge building function between the ascend instance
167 tree (or other relation back end) and the slv_system_t.
168 In particular, the incidence list and indexing info is not
169 handled here.
170 */
171
172 extern void rel_destroy(struct rel_relation *rel);
173 /**<
174 Destroys a relation.
175 */
176
177 ASC_DLLSPEC void rel_write_name(slv_system_t sys, struct rel_relation *rel, FILE *file);
178 /**<
179 Writes a name to the file given. Handles NULL inputs gracefully.
180 Does not print any whitespace, including carriage returns.
181 Is faster than slv_print_var_name.
182 If sys is NULL, writes full ascend name. If file or rel is NULL
183 does not write.
184 */
185
186 /** Relation filter structure */
187 typedef struct rel_filter_structure {
188 uint32 matchbits; /**< Bits to match. */
189 uint32 matchvalue; /**< Value to match. */
190 } rel_filter_t;
191 /**< Relation filter type */
192
193 ASC_DLLSPEC SlvBackendToken rel_instance(struct rel_relation *rel);
194 /**<
195 Returns the instance pointer from a rel.
196 */
197
198 extern void rel_set_extnodeinfo(struct rel_relation *rel,
199 struct rel_extnode *nodeinfo);
200 /**< Sets the external node information structure for a relation. */
201 extern struct rel_extnode *rel_extnodeinfo(struct rel_relation *rel);
202 /**<
203 Fetches the pointer to the external node information structure for
204 a relation. If this is NULL, which will be the case for most
205 relations, then there are no external call nodes present.
206 */
207
208 extern void rel_set_extwhichvar(struct rel_relation *rel, int whichvar);
209 /**< Sets the argument list index for a relation having external nodes. */
210
211 unsigned long rel_extwhichvar(struct rel_relation *rel);
212 /**<
213 Returns the index into the argument list from which rel was
214 constructed. This applies ONLY to rels that have external nodes!
215 Relations that have external nodes have associated with them an
216 index into the argument list from which the relation was constructed.
217 rel_whichvar returns that index. e.g. if when this relation was
218 constructed from an external procedure call, the number of output
219 variables was 4, and the number of inputs was 6, valid results from
220 this rel_whichvar would be 7, 8, 9, 10.
221
222 @return index into argument list, or a value <= 0 on error.
223 */
224
225 extern boolean rel_less(struct rel_relation *rel);
226 /**<
227 Returns true if the given relation is satisfied if "less than"
228 is among those that make up the comparator of the relation
229 (i.e. <>, <, or <=).<br><br>
230 le==TRUE implies rel would be satisfied if lhs < rhs
231 */
232
233 extern boolean rel_equal(struct rel_relation *rel);
234 /**<
235 Returns true if the given relation is satisfied if "equals"
236 is among those that make up the comparator of the relation
237 (i.e. =, >=, or <=).<br><br>
238 eq==TRUE implies rel would be satisfied if lhs ~ rhs
239 */
240 extern boolean rel_greater(struct rel_relation *rel);
241 /**<
242 Returns true if the given relation is satisfied if "greater than"
243 is among those that make up the comparator of the relation
244 (i.e. <>, >, or >=).<br><br>
245 gr==TRUE implies rel would be satisfied if lhs > rhs
246 */
247
248 extern enum rel_enum rel_relop(struct rel_relation *rel);
249 /**<
250 Returns the type of the relational operator of a given relation.
251 */
252
253 ASC_DLLSPEC char *rel_make_name(slv_system_t sys, struct rel_relation *rel);
254 /**<
255 Copies of the relation instance name can be made and returned.
256 The string returned should be freed when no longer in use.
257 */
258
259 extern int32 rel_mindex(struct rel_relation *rel);
260 /**<
261 Retrieves the index number of the given relation as it
262 appears in a slv_system_t master relation list.
263 */
264 extern void rel_set_mindex(struct rel_relation *rel, int32 mindex);
265 /**<
266 Sets the index number of the given relation as it
267 appears in a slv_system_t master relation list.
268 */
269
270 ASC_DLLSPEC int32 rel_sindex(const struct rel_relation *rel);
271 /**<
272 Retrieves the index number of the given relation as it
273 appears in a solvers relation list. The index is most often used
274 to assign the relation to a specific original row of a matrix.
275 */
276
277 extern void rel_set_sindex(struct rel_relation *rel, int32 sindex);
278 /**<
279 Sets the index number of the given relation as it
280 appears in a solvers relation list. The index is most often used
281 to assign the relation to a specific original row of a matrix.
282 */
283
284 extern int32 rel_model(const struct rel_relation *rel);
285 /**<
286 Retrieves the model number of the given relation.
287 In a hierarchy, relations come in groups associated with
288 models. Models are numbered from 1 to some upper limit.
289 */
290 extern void rel_set_model(struct rel_relation *rel, int32 mindex);
291 /**<
292 Sets the model number of the given relation.
293 In a hierarchy, relations come in groups associated with
294 models. Models are numbered from 1 to some upper limit.
295 */
296
297 ASC_DLLSPEC real64 rel_residual(struct rel_relation *rel);
298 /**<
299 Retrieves the residual field of the given relation.
300 Note that the residual is not actually computed by rel_residual:
301 there is no guarantee (from this function) that the residual is
302 actually correct.
303 */
304
305 ASC_DLLSPEC void rel_set_residual(struct rel_relation *rel, real64 residual);
306 /**<
307 Sets the residual field of the given relation.
308 */
309
310 ASC_DLLSPEC real64 rel_nominal(struct rel_relation *rel);
311 /**<
312 Retrieves the nominal field of the given relation.
313 No slv client has any business being able to set the nominal,
314 so no such operator is provided.
315 */
316
317 extern void rel_set_nominal(struct rel_relation *rel, real64 nominal);
318 /**<
319 Breaking the 'rule' of rel_nominal() for the time being.
320 @todo Remove rel_set_nominal() or change "rule" stated by rel_nominal().
321 */
322
323
324 #ifdef NDEBUG
325 # define rel_n_incidences(rel) ((rel)->n_incidences)
326 #else
327 ASC_DLLSPEC int32 rel_n_incidencesF(struct rel_relation *rel);
328 # define rel_n_incidences(rel) rel_n_incidencesF(rel)
329 #endif
330 /**<
331 * Returns the length of the incidence_list for a relation.
332 * Not everything in the incidence list is necessarily a
333 * variable for your particular solver -- check the flags.
334 * @param rel struct rel_relation *, the relation to query.
335 * @return Returns the length as an int32.
336 * @see rel_n_incidencesF()
337 */
338
339 #ifdef NDEBUG
340 # define rel_set_incidences(rel,n,ilist) \
341 (rel)->n_incidences=(n); (rel)->incidence = (ilist)
342 #else
343 # define rel_set_incidences(rel,n,ilist) rel_set_incidencesF((rel),(n),(ilist))
344 #endif
345 /**<
346 * Sets the length and incidence_list for a relation.
347 * Not everything in the incidence list is necessarily a
348 * variable for your particular solver -- check the flags.
349 * Solver clients should not call rel_set_incidences,
350 * it is only for use by constructors of bridges to relation
351 * back ends.
352 * @param rel struct rel_relation *, the relation to modify.
353 * @param n int32
354 * @param ilist struct var_variable **, the incidence list
355 * @return No return value.
356 * @see rel_set_incidencesF()
357 */
358 extern void rel_set_incidencesF(struct rel_relation *rel,
359 int32 n, struct var_variable **ilist);
360 /**<
361 * Implementation function for rel_set_incidences(). Do not call
362 * this function directly - use rel_set_incidences() instead.
363 */
364
365
366 ASC_DLLSPEC struct var_variable **
367 rel_incidence_list_to_modify(struct rel_relation *rel);
368 /**<
369 Returns a non-const pointer to an array rel_n_incidences(rel)
370 long of vars.
371 @see rel_incidence_list().
372 */
373 ASC_DLLSPEC const struct var_variable**rel_incidence_list(struct rel_relation *rel);
374 /**<
375 Returns a pointer to an array rel_n_incidences(rel) long of vars.
376 Each element of the array is a struct var_variable *.
377 Check the var sindex to see where each might go in a jacobian.
378 If there is no incidence, NULL is returned.
379
380 Pointers in this array will be unique.
381 The list belongs to the relation. Do not destroy it. Do not change it.
382
383 The returned array is *not* null-terminated.
384 */
385
386 /*-----------------------------------------------------------------------------
387 RELATION FILTERING FUNCTIONS AND FLAG GET/SET FUNCTIONS
388
389 We have a lot (32) of binary (one bit) flags a client may want to query
390 in arbitrary combinations and paying attention to only certain of
391 the bits. We will provide a set of macros and functions for each of
392 these bits and for operations on the whole set.
393 */
394
395 ASC_DLLSPEC int32 rel_apply_filter(const struct rel_relation *rel,
396 const rel_filter_t *filter);
397 /**<
398 * Returns 1 only if all of the positions specified in
399 * filter->matchbits have the same values in
400 * filter->matchvalue and the relation's flags value.
401 * Bits set to 0 in filter->matchbits are ignored for the test.<br><br>
402 *
403 * EXAMPLE:
404 * To find out if a relation is an unsatisfied equality:
405 * We don't care about anything except satisfaction and equality,
406 * so set filter->matchbits = (REL_SATISFIED | REL_EQUALITY);
407 * We want relation NOT satisfied, so leave REL_SATISFIED = 0
408 * in filter->matchvalue, i.e. filter->matchvalue = REL_EQUALITY;
409 * Usually it is most convenient to just declare a rel_filter_t filt;
410 * locally in a function and then take the address of it (&filt) after
411 * setting filt.matchbits = (| of all your interesting bits) and
412 * setting filt.matchvalue = (| of the bits you want to be TRUE).
413 */
414
415 extern uint32 rel_flags(struct rel_relation *rel);
416 /**<
417 * Returns the flags field of the relation.
418 */
419 extern void rel_set_flags(struct rel_relation *rel, uint32 flags);
420 /**<
421 * Sets the entire flag field to the value of flags given.
422 */
423
424 ASC_DLLSPEC uint32 rel_flagbit(struct rel_relation *rel, uint32 name);
425 /**<
426 * Returns the value of the bit specified from the relation flags.
427 * name should be a REL_xx flag defined above)
428 */
429
430 ASC_DLLSPEC void rel_set_flagbit(struct rel_relation *rel,
431 uint32 NAME, uint32 oneorzero);
432 /**<
433 * Sets the bit, which should be referred to by its macro name,
434 * on if oneorzero is >0 and off is oneorzero is 0.
435 * The macro names are the defined up at the top of this file.
436 * <pre>
437 * Example:
438 * rel_set_flags(rel,REL_PARTITION,1) turns on the REL_PARTITION bit.
439 *
440 * What it really does is:
441 * if (oneorzero) {
442 * rel->flags |= field;
443 * } else {
444 * rel->flags &= ~field;
445 * }
446 * </pre>
447 * In unix, see also man 3f bit or man not.
448 */
449
450 /*
451 * the bit flags. explained afterward. several are for use of
452 * transient clients and should be ignored by solver engines
453 */
454 #define REL_PARTITION 0x1
455 /**< Is it in the interesting region? Reordering clients. */
456 #define REL_TORN 0x2
457 /**< Is it a tear? Reordering clients output. */
458 #define REL_INTERFACE 0x4
459 /**< User suggests it's a tear eqn. Solvers, ui clients. */
460 #define REL_INCLUDED 0x8
461 /**<
462 * User wants eqn in problem. Solvers, ui clients.
463 * Use rel_set_* to change.
464 * INCLUDED is as yet a funny one. Treat it as readonly because
465 * you can only change it using a real function and not the
466 * bit manipulation functions. It is here in the bits because
467 * it is useful in filters sometimes.
468 */
469 #define REL_OBJNEGATE 0x10
470 /**< Read_only for clients. Rel module. */
471 #define REL_BLACKBOX 0x20
472 /**< Read_only for clients. Rel module. */
473 #define REL_SATISFIED 0x40
474 /**<
475 * Has rel been pronounced satisfied by someone?
476 * Bit should be treated as readonly. use rel_set_* to change.
477 */
478 #define REL_EQUALITY 0x80
479 /**< Is relation an equality? Readonly for clients. */
480 #define REL_INBLOCK 0x100
481 /**< Is the relation in the current block of registered client? For clients. */
482 /* Conditional Modeling */
483 #define REL_INWHEN 0x200
484 /**< Is relation in a when? Readonly for clients. */
485 #define REL_ACTIVE 0x400
486 /**< Is this relation currently a part of my problem? */
487 #define REL_INVARIANT 0x800
488 /**< Is this relation an invariant in the conditional modeling analysis? */
489 /* Conditional Relations (Boundaries) */
490 #define REL_CONDITIONAL 0x1000
491 /**< Is relation conditional? Readonly for clients. */
492 #define REL_IN_CUR_SUBREGION 0x2000
493 /**< Is the relation in the subregion currently analyzed? */
494 #define REL_GENERATED 0x10000
495 /**<
496 * Temporary relation that doesn't exist independently in the backend,
497 * but is made by some process of the backend or the solver client.
498 * Is rel fake and cooked up for this system only? */
499
500 /*
501 * the bit flag lookups
502 */
503 #ifdef NDEBUG
504 #define rel_partition(rel) ((rel)->flags & REL_PARTITION)
505 #define rel_torn(rel) ((rel)->flags & REL_TORN)
506 #define rel_interface(rel) ((rel)->flags & REL_INTERFACE)
507 #define rel_obj_negate(rel) ((rel)->flags & REL_OBJNEGATE)
508 /**<
509 * Returns TRUE if relation is of type e_maximize.
510 * Returns FALSE if relation is of type e_minimize.
511 * Note: should only be used on objectives. other relations
512 * will give a meaningless result (probably FALSE).
513 */
514 #define rel_blackbox(rel) ((rel)->flags & REL_BLACKBOX)
515 #define rel_satisfied(rel) ((rel)->flags & REL_SATISFIED)
516 /**< Retrieves the satisfied field of the given relation.
517 * See rel_residual() for disclaimer. */
518 #define rel_equality(rel) ((rel)->flags & REL_EQUALITY)
519 /**< TRUE if relation is of form lhs = rhs. */
520 #define rel_in_block(rel) ((rel)->flags & REL_INBLOCK)
521 /**< Retrieves the INBLOCK member of the given relation flags
522 * which determines if the relation is within the current block. */
523 #define rel_in_when(rel) ((rel)->flags & REL_INWHEN)
524 #define rel_active(rel) ((rel)->flags & REL_ACTIVE)
525 #define rel_invariant(rel) ((rel)->flags & REL_INVARIANT)
526 #define rel_conditional(rel) ((rel)->flags & REL_CONDITIONAL)
527 #define rel_in_cur_subregion(rel) ((rel)->flags & REL_IN_CUR_SUBREGION)
528 #define rel_generated(rel) ((rel)->flags & REL_GENERATED)
529 #else
530 #define rel_partition(rel) rel_flagbit((rel),REL_PARTITION)
531 #define rel_torn(rel) rel_flagbit((rel),REL_TORN)
532 #define rel_interface(rel) rel_flagbit((rel),REL_INTERFACE)
533 #define rel_obj_negate(rel) rel_flagbit((rel),REL_OBJNEGATE)
534 /**<
535 * Returns TRUE if relation is of type e_maximize.
536 * Returns FALSE if relation is of type e_minimize.
537 * Note: should only be used on objectives. other relations
538 * will give a meaningless result (probably FALSE).
539 */
540 #define rel_blackbox(rel) rel_flagbit((rel),REL_BLACKBOX)
541 #define rel_satisfied(rel) rel_flagbit((rel),REL_SATISFIED)
542 /**< Retrieves the satisfied field of the given relation.
543 * See rel_residual() for disclaimer. */
544 #define rel_equality(rel) rel_flagbit((rel),REL_EQUALITY)
545 /**< TRUE if relation is of form lhs = rhs. */
546 #define rel_in_block(rel) rel_flagbit((rel),REL_INBLOCK)
547 /**< Retrieves the INBLOCK member of the given relation flags
548 * which determines if the relation is within the current block. */
549 #define rel_in_when(rel) rel_flagbit((rel),REL_INWHEN)
550 #define rel_active(rel) rel_flagbit((rel),REL_ACTIVE)
551 #define rel_invariant(rel) rel_flagbit((rel),REL_INVARIANT)
552 #define rel_conditional(rel) rel_flagbit((rel),REL_CONDITIONAL)
553 #define rel_in_cur_subregion(rel) rel_flagbit((rel),REL_IN_CUR_SUBREGION)
554 #define rel_generated(rel) rel_flagbit((rel),REL_GENERATED)
555 #endif /* NDEBUG */
556
557 /*
558 * bit flag assignments. any value other than 0 for bv turns the
559 * named flag to 1. 0 sets it to 0.
560 * Many of these bits have read-only semantics for clients.
561 * Take care when setting them.
562 */
563 #define rel_set_partition(rel,bitval) rel_set_flagbit((rel),REL_PARTITION,(bitval))
564 #define rel_set_torn(rel,bitval) rel_set_flagbit((rel),REL_TORN,(bitval))
565 #define rel_set_interface(rel,bitval) rel_set_flagbit((rel),REL_INTERFACE,(bitval))
566 #define rel_set_obj_negate(rel,bitval) rel_set_flagbit((rel),REL_OBJNEGATE,(bitval))
567 #define rel_set_blackbox(rel,bitval) rel_set_flagbit((rel),REL_BLACKBOX,(bitval))
568 #define rel_set_satisfied(rel,bitval) rel_set_flagbit((rel),REL_SATISFIED,(bitval))
569 #define rel_set_equality(rel,bitval) rel_set_flagbit((rel),REL_EQUALITY,(bitval))
570 #define rel_set_in_block(rel,bitval) rel_set_flagbit((rel),REL_INBLOCK,(bitval))
571 #define rel_set_in_when(rel,bitval) rel_set_flagbit((rel),REL_INWHEN,(bitval))
572 #define rel_set_active(rel,bitval) rel_set_flagbit((rel),REL_ACTIVE,(bitval))
573 #define rel_set_invariant(rel,bitval) rel_set_flagbit((rel),REL_INVARIANT,(bitval))
574 #define rel_set_conditional(rel,bitval) \
575 rel_set_flagbit((rel),REL_CONDITIONAL,(bitval))
576 #define rel_set_in_cur_subregion(rel,bitval) \
577 rel_set_flagbit((rel),REL_IN_CUR_SUBREGION,(bitval))
578 #define rel_set_generated(rel,bitval) rel_set_flagbit((rel),REL_GENERATED,(bitval))
579
580 ASC_DLLSPEC uint32 rel_included(struct rel_relation *rel);
581 /**<
582 * Retrieves the included field of the given relation.
583 * @todo This has side effects on the ascend instance, so it isn't
584 * implemented with the rest of the macros above. This needs to
585 * change.
586 */
587 extern void rel_set_included(struct rel_relation *rel, uint32 included);
588 /**<
589 * Sets the included field of the given relation.
590 * <!-- This has side effect on the ascend instance, so it isn't -->
591 * <!-- implemented with the rest of the macros above. This needs to -->
592 * <!-- change. -->
593 */
594
595 extern real64 rel_multiplier(struct rel_relation *rel);
596 /**<
597 * Retrieves the multiplier field of the given relation.
598 * This is expected to be computed as a lagrange multiplier which will
599 * relate the gradient of the relation rel with that of some objective
600 * function.
601 */
602 extern void rel_set_multiplier(struct rel_relation *rel, real64 multiplier);
603 /**<
604 * (<!-- won a temporary reprieve. this should be a system property, not rel.) -->
605 * Sets the multiplier field of the given relation.
606 * This is expected to be computed as a lagrange multiplier which will
607 * relate the gradient of the relation rel with that of some objective
608 * function.
609 */
610
611 /* @} */
612
613 #endif /* ASC_REL_H */

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