|
@@ -172,28 +172,31 @@ Element function get_possible_bindings(host_model : Element, schedule_model : El
|
|
|
if (bool_not(set_in(bound, option))):
|
|
|
// Option is already present with another label, so skip this!
|
|
|
|
|
|
- // Check if it conforms to the desired type
|
|
|
- if (bool_not(guaranteed_instance)):
|
|
|
- if (bool_not(is_nominal_instance(host_model, option, original_typename))):
|
|
|
- // Not an actual instance, so skip!
|
|
|
- continue!
|
|
|
-
|
|
|
- // Check for local (matching) constraints of element
|
|
|
- if (element_eq(read_attribute(schedule_model, current_element, "constraint"), read_root())):
|
|
|
- // No local constraints, so all is well
|
|
|
- set_add(filtered_options, option)
|
|
|
- else:
|
|
|
- // Check local constraints and add only if positive
|
|
|
- Element constraint_function
|
|
|
- Boolean result
|
|
|
- Element func
|
|
|
-
|
|
|
- constraint_function = read_attribute(schedule_model, current_element, "constraint")
|
|
|
- func = get_func_AL_model(import_node(constraint_function))
|
|
|
- result = func(host_model, option)
|
|
|
+ if (dict_in(host_model["model"], option)):
|
|
|
+ // Check if it conforms to the desired type
|
|
|
+ if (bool_not(guaranteed_instance)):
|
|
|
+ if (bool_not(is_nominal_instance(host_model, option, original_typename))):
|
|
|
+ // Not an actual instance, so skip!
|
|
|
+ continue!
|
|
|
|
|
|
- if (result):
|
|
|
+ // Check for local (matching) constraints of element
|
|
|
+ if (element_eq(read_attribute(schedule_model, current_element, "constraint"), read_root())):
|
|
|
+ // No local constraints, so all is well
|
|
|
set_add(filtered_options, option)
|
|
|
+ else:
|
|
|
+ // Check local constraints and add only if positive
|
|
|
+ Element constraint_function
|
|
|
+ Boolean result
|
|
|
+ Element func
|
|
|
+
|
|
|
+ constraint_function = read_attribute(schedule_model, current_element, "constraint")
|
|
|
+ func = get_func_AL_model(import_node(constraint_function))
|
|
|
+ result = func(host_model, option)
|
|
|
+
|
|
|
+ if (result):
|
|
|
+ set_add(filtered_options, option)
|
|
|
+ else:
|
|
|
+ log("ERROR in found option: not in model")
|
|
|
|
|
|
Element attributes
|
|
|
String attribute
|