SLIDE 18 Constraint Template – Cost Constraints
Template: cost_constraint(T) :- cost(T,V), value_constraint(V) cost((T1,T2),V) :- cost(T1,V1), cost(T2,V2), op|(V1,V2,V) cost(⊗(T1,T2),V) :- cost(T1,V1), cost(T2,V2), op⊗(V1,V2,V) cost(resource_asg(T,Agents),V):- cost_of(resource_asg(T,Agents),V) User-defined terms and predicates: resource_asg(T, A) := rsrc(T,A) cost_of(rsrc(T,A),V) :- duration(T,A,V) value_constraint(V) :- V <c
- p|(V1,V2,V) :- V = max(V1,V2 )
- p⊗(V1,V2,V) :- V = V1+V2
- Logic rules that mimic the definition of the cost part of a constraint system
Ensures that duration is within constraints