Class VariableBindingBasedCostFunction
java.lang.Object
tools.refinery.interpreter.localsearch.planner.cost.impl.VariableBindingBasedCostFunction
- All Implemented Interfaces:
ICostFunction
This class can be used to calculate cost of application of a constraint with a given adornment.
For now the logic is based on the following principles:
The transitive closures, NACs and count finds are the most expensive operations
The number of free variables increase the cost
If all the variables of a constraint are free, then its cost equals to twice the number of its parameter
variables. This solves the problem of unnecessary iteration over instances at the beginning of a plan (thus causing
very long run times when executing the plan) by applying constraints based on structural features as soon as
possible.
- Since:
- 1.4
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
VariableBindingBasedCostFunction
public VariableBindingBasedCostFunction()
-
-
Method Details
-
apply
- Specified by:
apply
in interfaceICostFunction
-