variable_loader
Load grounded variable declarations and values for the propagator.
get_bool_evaluate
¶
get_bool_evaluate(ctl: PropagateInit, manager: VariableManager, add_watch: Callable[[int], None]) -> None
Load evaluate atoms into EvaluateVariable instances.
Also load "bool_evaluate" atoms and create the corresponding variables.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ctl
|
PropagateInit
|
Clingo PropagateInit object. |
required |
manager
|
VariableManager
|
Manager receiving loaded variables. |
required |
evaluate_variables
|
Collection receiving explicit evaluations. |
required | |
add_watch
|
Callable[[int], None]
|
Register a watch while respecting check-only mode. |
required |
get_engine_variables
¶
get_engine_variables(ctl: PropagateInit, manager: VariableManager, errors: propagator_warning_t, add_watch: Callable[[int], None]) -> None
Load atoms that represent the values of variables from the input program.
This reads _se_value, _set_contains, and Multimap_value atoms and updates the
corresponding variables with the assigned values.
This is used for variables whose values are defined by other engines
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ctl
|
PropagateInit
|
Clingo PropagateInit object. |
required |
manager
|
VariableManager
|
Manager receiving loaded variables. |
required |
errors
|
propagator_warning_t
|
Collection receiving input warnings. |
required |
add_watch
|
Callable[[int], None]
|
Register a watch while respecting check-only mode. |
required |
get_evaluate
¶
get_evaluate(ctl: PropagateInit, manager: VariableManager, evaluate_variables: list[EvaluateVariable], add_watch: Callable[[int], None]) -> None
Load evaluate atoms into EvaluateVariable instances.
Also load "bool_evaluate" atoms and create the corresponding variables.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ctl
|
PropagateInit
|
Clingo PropagateInit object. |
required |
manager
|
VariableManager
|
Manager receiving loaded variables. |
required |
evaluate_variables
|
list[EvaluateVariable]
|
Collection receiving explicit evaluations. |
required |
add_watch
|
Callable[[int], None]
|
Register a watch while respecting check-only mode. |
required |
get_multimap_declarations
¶
get_multimap_declarations(ctl: PropagateInit, manager: VariableManager, add_watch: Callable[[int], None]) -> None
Load multimap (dict) declarations and assignments from ASP facts.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ctl
|
PropagateInit
|
Clingo PropagateInit object. |
required |
manager
|
VariableManager
|
Manager receiving loaded variables. |
required |
add_watch
|
Callable[[int], None]
|
Register a watch while respecting check-only mode. |
required |
get_set_declarations
¶
get_set_declarations(ctl: PropagateInit, manager: VariableManager, add_watch: Callable[[int], None]) -> None
Load set declarations and assignments from ASP facts.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ctl
|
PropagateInit
|
Clingo propagation initializer. |
required |
manager
|
VariableManager
|
Manager receiving loaded variables. |
required |
add_watch
|
Callable[[int], None]
|
Register a watch while respecting check-only mode. |
required |
get_shared_values
¶
get_shared_values(ctl: PropagateInit, shared_values: list[SharedValue]) -> None
Load shared value declarations from ASP facts and create SharedValueVariable instances.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ctl
|
PropagateInit
|
Clingo PropagateInit object. |
required |
shared_values
|
list[SharedValue]
|
Collection receiving shared-value declarations. |
required |
get_variables
¶
get_variables(ctl: PropagateInit, manager: VariableManager, errors: propagator_warning_t, add_watch: Callable[[int], None]) -> None
Load base variable declarations/definitions/domains from ASP facts.
Reads variable-related atoms and creates/extends Variable instances.
Note that nogoods are added to prevent True assignments to values that are parts of domains that are assigned False.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ctl
|
PropagateInit
|
Clingo PropagateInit object. |
required |
manager
|
VariableManager
|
Manager receiving loaded variables. |
required |
errors
|
propagator_warning_t
|
Collection receiving input warnings. |
required |
add_watch
|
Callable[[int], None]
|
Register a watch while respecting check-only mode. |
required |
load_evaluations
¶
load_evaluations(init: PropagateInit, manager: VariableManager, evaluate_variables: list[EvaluateVariable], shared_values: list[SharedValue], add_watch: Callable[[int], None]) -> None
Load explicit evaluations after objective expressions are registered.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
init
|
PropagateInit
|
Clingo propagation initialization object. |
required |
manager
|
VariableManager
|
Manager receiving loaded variables. |
required |
evaluate_variables
|
list[EvaluateVariable]
|
Collection receiving explicit evaluations. |
required |
shared_values
|
list[SharedValue]
|
Collection receiving shared-value declarations. |
required |
add_watch
|
Callable[[int], None]
|
Register a watch while respecting check-only mode. |
required |
load_variables
¶
load_variables(init: PropagateInit, manager: VariableManager, errors: propagator_warning_t, add_watch: Callable[[int], None]) -> None
Load declarations and cross-engine values in dependency order.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
init
|
PropagateInit
|
Clingo propagation initialization object. |
required |
manager
|
VariableManager
|
Manager receiving loaded variables. |
required |
errors
|
propagator_warning_t
|
Collection receiving input warnings. |
required |
add_watch
|
Callable[[int], None]
|
Register a watch while respecting check-only mode. |
required |