linqs / psl

The PSL software from the University of Maryland and the University of California Santa Cruz
http://psl.linqs.org
Apache License 2.0
298 stars 100 forks source link

Streaming application constraints #324

Closed dickensc closed 2 years ago

dickensc commented 3 years ago

Streaming inference applications do not support hard constraints and they are not included in the rule data structure in streaming term stores.

Hard constraints are typically relaxed in situations like this to get a nearly feasible solution. However, the inference application creates term stores before relaxing the constraints so a streaming term store does not consider the constraints even if a user expects them to be relaxed.

This change modifies the order of inference application initialization so that streaming applications consider hard constraints. A test is also added to check that all inference applications will nearly find a feasible solution for a model with a simplex constraint.

eriq-augustine commented 2 years ago

lgtm