Struct clingo::Model
[−]
[src]
pub struct Model(_);
Represents a model.
Methods
impl Model
[src]
pub fn model_type(&self) -> Option<ModelType>
[src]
Get the type of the model.
pub fn number(&self) -> Option<u64>
[src]
Get the running number of the model.
pub fn symbols(&self, show: &ShowType) -> Result<Vec<Symbol>, ClingoError>
[src]
Get the symbols of the selected types in the model.
Note: CSP assignments are represented using functions with name "$" where the first argument is the name of the CSP variable and the second one its value.
Arguments
show
- which symbols to select
Errors
ErrorType::BadAlloc
ErrorType::Runtime
if the size is too small
pub fn contains(&self, Symbol: Symbol) -> Option<bool>
[src]
pub fn is_true(&self, literal: Literal) -> Option<bool>
[src]
pub fn cost(&self) -> Result<Vec<i64>, ClingoError>
[src]
Get the cost vector of a model.
Errors
ErrorType::BadAlloc
ErrorType::Runtime
if the size is too small
pub fn optimality_proven(&self) -> Option<bool>
[src]
Whether the optimality of a model has been proven.
See: Model::cost()
pub fn thread_id(&self) -> Option<Id>
[src]
Get the id of the solver thread that found the model.
pub fn context(&mut self) -> Option<&mut SolveControl>
[src]
Get the associated solve control object of a model.
This object allows for adding clauses during model enumeration.
Trait Implementations
impl Debug for Model
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more