You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Motivated from a conversation with Lisa: on top of model counting with .wmc(), it would be moderately useful to list out all valid models that satisfy a logical formula, and (optionally) the associated weights with each model.
Since this is computationally hard, we should do this on-demand only from the user. We can probably use the existing PartialModel struct; we could then return a tuple for each model, which contains both the assignments for each variable, and the associated weight.
I'm thinking something that looks like this:
let weights = WmcParams::new(/* ... */);let formula:DDNNFPtr = builder.compile_cnf();// can be whatever approach we'd preferlet valid_models:ValidModels = formula.enumerate_models(&order,&weights);for model in valid_models {println!("weight: {}, assignments: {}", model.weight(), model.assignments())}
The text was updated successfully, but these errors were encountered:
Motivated from a conversation with Lisa: on top of model counting with
.wmc()
, it would be moderately useful to list out all valid models that satisfy a logical formula, and (optionally) the associated weights with each model.Since this is computationally hard, we should do this on-demand only from the user. We can probably use the existing
PartialModel
struct; we could then return a tuple for each model, which contains both the assignments for each variable, and the associated weight.I'm thinking something that looks like this:
The text was updated successfully, but these errors were encountered: