Data Structures | |
| struct | SymbolValues |
Defines | |
| #define | INCLUDED_A g_strings[0] |
| #define | FIXED_A g_strings[1] |
| #define | BASIS_A g_strings[2] |
| #define | DERIV_A g_strings[3] |
| #define | ODEID_A g_strings[4] |
| #define | OBSID_A g_strings[5] |
| #define | AVG_PARENTS 2 |
| #define | AVG_CHILDREN 4 |
| #define | AVG_RELATIONS 15 |
| #define | AVG_GROWTH 2 |
| #define | PART_THRESHOLD 1000 |
Typedefs | |
| typedef SolverDiffVarCollectionStruct | SolverDiffVarCollection |
Functions | |
| int | GetIntFromSymbol (CONST char *symval, struct gl_list_t *symbol_list) |
| void | DestroySymbolValuesList (struct gl_list_t *symbol_list) |
| int | dis_var_in_a_when (struct Instance *var, struct w_when *when) |
| int | varinst_found_in_whenlist (slv_system_t sys, struct Instance *inst) |
| int | analyze_make_problem (slv_system_t sys, struct Instance *inst) |
| void | analyze_free_reused_mem (void) |
| void | set_rels_status_in_when (struct w_when *when, uint32 value) |
| void | analyze_when (struct w_when *when) |
| void | set_active_rels_in_list (struct rel_relation **rlist) |
| void | set_active_rels_as_invariant (struct rel_relation **rlist) |
| void | set_active_logrels_in_list (struct logrel_relation **lrlist) |
| void | set_inactive_vars_in_list (struct var_variable **vlist) |
| void | set_invariant_in_rels_list (struct rel_relation **rlist, uint32 value) |
| void | set_in_cur_subregion_in_rels_list (struct rel_relation **rlist, uint32 value) |
| void | set_inactive_disvars_in_list (struct dis_discrete **dvlist) |
| void | set_active_vars_in_active_rels (struct rel_relation **solverrl) |
| void | set_active_disvars_in_active_logrels (struct logrel_relation **solverlr) |
| ASC_DLLSPEC void | set_active_vars_at_bnd (slv_system_t sys, struct gl_list_t *disvars) |
| ASC_DLLSPEC void | identify_invariant_rels_at_bnd (slv_system_t sys, struct gl_list_t *disvars) |
| ASC_DLLSPEC void | set_active_rels_in_subregion (slv_system_t sys, int32 *cases, int32 ncases, struct gl_list_t *disvars) |
| ASC_DLLSPEC void | identify_variant_rels_in_subregion (slv_system_t sys) |
| ASC_DLLSPEC void | set_active_vars_in_subregion (slv_system_t sys) |
| void | enumerate_cases_in_when (struct w_when *when) |
| ASC_DLLSPEC int * | cases_matching (struct gl_list_t *disvars, int *ncases) |
| void | configure_conditional_problem (int numwhens, struct w_when **whenlist, struct rel_relation **solverrl, struct logrel_relation **solverll, struct var_variable **mastervl) |
| ASC_DLLSPEC void | reanalyze_solver_lists (slv_system_t sys) |
| ASC_DLLSPEC int32 | system_reanalyze (slv_system_t sys) |
| int | build_rel_solver_from_master (struct rel_relation **masterrl, struct rel_relation **solverrl) |
| int32 | build_logrel_solver_from_master (struct logrel_relation **masterll, struct logrel_relation **solverll) |
| int32 | build_var_solver_from_master (struct var_variable **mastervl, struct var_variable **solvervl) |
| int32 | build_disvar_solver_from_master (struct dis_discrete **masterdl, struct dis_discrete **solverdl) |
| ASC_DLLSPEC SolverDiffVarCollection * | system_get_diffvars (slv_system_t sys) |
| int | system_diffvars_build (slv_system_t sys, struct problem_t *prob) |
| void | system_diffvars_destroy (slv_system_t sys) |
| ASC_DLLSPEC int | system_diffvars_debug (slv_system_t sys, FILE *fp) |
| int | system_diffvars_sort (slv_system_t sys) |
Variables | |
| gl_list_t * | g_symbol_values_list = NULL |
| typedef struct SolverDiffVarCollectionStruct SolverDiffVarCollection |
This is the structure that contains the 'derivative chains'. It's opaque when viewed at this level (implementation is in system_impl.h)
| void analyze_free_reused_mem | ( | void | ) |
Resets all internal memory recycles.
| int analyze_make_problem | ( | slv_system_t | sys, | |
| struct Instance * | inst | |||
| ) |
Takes a system and populates the guts of it from the instance. Called by system_build -- you don't need to call it yourself.
this routine should be part of the 'problem provider' API?
| void analyze_when | ( | struct w_when * | when | ) |
Analyzes the when list to see which case is active in each of the whens. For all the relations in the matched cases, set the ACTIVE flag to TRUE
| int32 build_disvar_solver_from_master | ( | struct dis_discrete ** | masterdl, | |
| struct dis_discrete ** | solverdl | |||
| ) |
Build the discrete var solver list from the master list in the case of our problem contains WHENs. This function is not currently in use. It could be use to build a solver discrete var list of ACTIVE discrete variables (Discrete Vars incident in ACTIVE logrelations). It returns the number of discrete variables in the list.
| int32 build_logrel_solver_from_master | ( | struct logrel_relation ** | masterll, | |
| struct logrel_relation ** | solverll | |||
| ) |
Build the logrel solver list from the master list in the case of our problem contains WHENs. This function is not currently in use. It could be use to build a solver logrel list of ACTIVE logrelations, by using a master logrel list with all of the logrelations in it. These ACTIVE logrelations could be INCLUDED or UNINCLUDED. It returns the number of logrelation in the list.
| int build_rel_solver_from_master | ( | struct rel_relation ** | masterrl, | |
| struct rel_relation ** | solverrl | |||
| ) |
Build the rel solver list from the master list in the case of our problem contains WHENs. This function is not currently in use.
OK, so what function *is* in for this purpose? -- JP
It could be use to build a solver rel list of ACTIVE relations, by using a master rel list with all of the relations in it. These ACTIVE relations could be INCLUDED or UNINCLUDED. It returns the number of relation in the list.
| int32 build_var_solver_from_master | ( | struct var_variable ** | mastervl, | |
| struct var_variable ** | solvervl | |||
| ) |
Build the var solver list from the master list in the case of our problem contains WHENs. This function is not currently in use. It could be use to build a solver var list of ACTIVE variables (Vars incident in ACTIVE relations). It returns the number of variables in the list.
| ASC_DLLSPEC int* cases_matching | ( | struct gl_list_t * | disvars, | |
| int * | ncases | |||
| ) |
Given a list of discrete variables, it finds which cases apply in the whens depending on those variables. The caller funtion should modify the values of these discrete variables so that we can make combinatorial search. Also, the list should contain discrete variables INWHEN. This functions assumes that the cases in the whens have been previously enumerated. Need to check performance regarding the visiting of cases when some of the whens are nested. It returns an array containing the (ID number of) cases which applies for the current values of the discrete varaibles.
| void configure_conditional_problem | ( | int | numwhens, | |
| struct w_when ** | whenlist, | |||
| struct rel_relation ** | solverrl, | |||
| struct logrel_relation ** | solverll, | |||
| struct var_variable ** | mastervl | |||
| ) |
Analyze the when statements included in our problem so that, we determine which rels, vars, disvars, and logrels are currently active. It is called by analyze.c at the time of the system building. For reconfiguration of the system call reanalyze_solver_lists
| void DestroySymbolValuesList | ( | struct gl_list_t * | symbol_list | ) |
Destroy the gl_list of SymbolValues struct created to asign an integer value to symbol value
we want to get rid of this in order to clean up the solver interface (divorce it from dependencies on compiler) -- JP
Is this (discrete) variable inside a WHEN?
| void enumerate_cases_in_when | ( | struct w_when * | when | ) |
Finds the number of cases in a when. This number will include nested cases (in nested when statements). It also assigns a identifier number to each case in the when statement. If this number is equal to -1 for some case, it implies that the case contains nested whens and it is necessary to perform a recursive analysis to find the number of the cases embedded in the current case. In general, the number assigned to each of the cases is only for identification purposes, so, 1,2,3, whatever, does not matter, we only want to distinguish among them. The identification number depends on the order of the whens in the master when list, which is not expected to change unless we destroy the system.
This function uses the global variable g_case_number. Any caller function has to reinitialize that global variable if it is required.
| int GetIntFromSymbol | ( | CONST char * | symval, | |
| struct gl_list_t * | symbol_list | |||
| ) |
Obtain an integer value from a symbol value Used for a WHEN statement. Each symbol value is storaged in a symbol list. It checks if the symval is already in the solver symbol list, if it is, returns the integer corresponding to the position of symval if it is not, appends the symval to the list and then returns the int
| ASC_DLLSPEC void identify_invariant_rels_at_bnd | ( | slv_system_t | sys, | |
| struct gl_list_t * | disvars | |||
| ) |
Set the INVARIANT flag to TRUE for all the relations invariant with respect to the current boundary(ies)
| ASC_DLLSPEC void identify_variant_rels_in_subregion | ( | slv_system_t | sys | ) |
For each relation active and not invariant, set the flag in_cur_subregion as TRUE. First, the same flag is initialized to FALSE for all of the relations
| ASC_DLLSPEC void reanalyze_solver_lists | ( | slv_system_t | sys | ) |
For conditional modeling. This functions analyzes the WHENs of the solver when list and set the current value of the flag ACTIVE for variables and relations in the solvers lists.
| void set_active_disvars_in_active_logrels | ( | struct logrel_relation ** | solverlr | ) |
Set the ACTIVE bit to TRUE for all the discrete variables included in ACTIVE logrelations.
| void set_active_logrels_in_list | ( | struct logrel_relation ** | lrlist | ) |
Sets the ACTIVE bit to TRUE for all the logrels included in the logrel list.
| void set_active_rels_as_invariant | ( | struct rel_relation ** | rlist | ) |
Sets the INVARIANT bit to TRUE for all the rels in the rel list which are ACTIVE. Sets it to FALSE for all the INACTIVE rels.
| void set_active_rels_in_list | ( | struct rel_relation ** | rlist | ) |
Set the ACTIVE bit to TRUE for all the rels included in the rel list.
| ASC_DLLSPEC void set_active_rels_in_subregion | ( | slv_system_t | sys, | |
| int32 * | cases, | |||
| int32 | ncases, | |||
| struct gl_list_t * | disvars | |||
| ) |
Get the list of whens for each discrete variable in disvars, set all the relation in those whens as inactive, and then set as active the relations corresponding to the cases passed as argument in cases.
| ASC_DLLSPEC void set_active_vars_at_bnd | ( | slv_system_t | sys, | |
| struct gl_list_t * | disvars | |||
| ) |
Set the ACTIVE bit to TRUE for all the variables incident in all the relations of all the subregions neighboring a boundary(ies)
| void set_active_vars_in_active_rels | ( | struct rel_relation ** | solverrl | ) |
Set the ACTIVE bit to TRUE for all the variables included in ACTIVE relations.
| ASC_DLLSPEC void set_active_vars_in_subregion | ( | slv_system_t | sys | ) |
Set the ACTIVE bit flag as TRUE, for all of the variables incident in the currently active relations. Used for analysis at a boundary.
| void set_in_cur_subregion_in_rels_list | ( | struct rel_relation ** | rlist, | |
| uint32 | value | |||
| ) |
Set the IN_CUR_SUBREGION bit to value for all the rels included in the rel list.
| void set_inactive_disvars_in_list | ( | struct dis_discrete ** | dvlist | ) |
Set the ACTIVE bit to FALSE for all the discrete vars included in the discrete var list
| void set_inactive_vars_in_list | ( | struct var_variable ** | vlist | ) |
Sets the ACTIVE bit to FALSE for all the vars included in the var list
| void set_invariant_in_rels_list | ( | struct rel_relation ** | rlist, | |
| uint32 | value | |||
| ) |
Set the INVARIAT bit to value for all the rels included in the rel list.
| void set_rels_status_in_when | ( | struct w_when * | when, | |
| uint32 | value | |||
| ) |
Set the ACTIVE bit to FALSE/TRUE for all the relations and logrelations included in the list of when
| ASC_DLLSPEC int system_diffvars_debug | ( | slv_system_t | sys, | |
| FILE * | fp | |||
| ) |
Write contents of diffvars struct to stream fp
| int system_diffvars_sort | ( | slv_system_t | sys | ) |
Reorder the diffvars list to match the var_sindex values of the first var in each chain.
| ASC_DLLSPEC SolverDiffVarCollection* system_get_diffvars | ( | slv_system_t | sys | ) |
Return the SolverDiffVarCollection for the system. You *don't* own the returned list -- it belongs to the slv_system_t.
| ASC_DLLSPEC int32 system_reanalyze | ( | slv_system_t | sys | ) |
For conditional modeling. If a whenvarlist has been changed or a method has been run, this function calls reanlyze_solver_lists.
| int varinst_found_in_whenlist | ( | slv_system_t | sys, | |
| struct Instance * | inst | |||
| ) |
Determine if the conditional variable inst is part of the variable list of some when in the when list.
we want to get rid of this in order to clean up the solver interface (divorce it from dependencies on compiler)
1.5.1