protocol
minizinc_protocol
Protocol for process-backed MiniZinc solving, source generation, and result inspection.
logtalk_load(minizinc(loader))staticPublic predicates
solve/2
Solves a source with default options using the external MiniZinc CLI and returns a collected result after cleanup. Valid sources are object(Object), terms(Statements), codes(Codes), and file(Path).
staticsolve(Source,Result)solve(+compound,-compound) - one_or_errorSource is not a ground term:instantiation_errorSource is ground but not a supported source, or is object(Object) where Object does not implement minizinc_problem_protocol:domain_error(minizinc_source,Source)Statements is ground but not a list:type_error(list,Statements)domain_error(minizinc_statement,Statement)domain_error(minizinc_origins,Origins)Codes is ground but not a list of character codes:type_error(codes,Codes)Code of the list Codes is ground but not an integer:type_error(integer,Code)Code of the list Codes is an integer but not a valid character code:domain_error(character_code,Code)Path is ground but not an atom:type_error(atom,Path)domain_error(minizinc_shell_argument,Argument)minizinc executable or a shell dependency does not exist:existence_error(command,Command)existence_error(directory,Directory)permission_error(delete,source_sink,Path)representation_error(utf_8)minizinc_transport(Stage,Status,Details)minizinc_solver_error(Formal,Status,Diagnostics,SourceMap)solve/3
Solves a source using solver selection, executable, enumeration, data, and resource options. Repeated options use the first occurrence. Valid sources are object(Object), terms(Statements), codes(Codes), and file(Path).
staticsolve(Source,Result,Options)solve(+compound,-compound,+list(compound)) - one_or_errorSource is not a ground term:instantiation_errorSource is ground but not a supported source, or is object(Object) where Object does not implement minizinc_problem_protocol:domain_error(minizinc_source,Source)Statements is ground but not a list:type_error(list,Statements)domain_error(minizinc_statement,Statement)Codes is ground but not a list of character codes:type_error(codes,Codes)Code of the list Codes is ground but not an integer:type_error(integer,Code)Code of the list Codes is an integer but not a valid character code:domain_error(character_code,Code)Path is ground but not an atom:type_error(atom,Path)Path does not exist:existence_error(source_sink,Path)Path cannot be opened for reading:permission_error(open,source_sink,Path)Options is a variable:instantiation_errorOptions is neither a variable nor a list:type_error(list,Options)Option of the list Options is a variable:instantiation_errorOption of the list Options is neither a variable nor a compound term:type_error(compound,Option)Option of the list Options is a compound term but not a valid option:domain_error(option,Option)domain_error(minizinc_origins,Origins)domain_error(minizinc_shell_argument,Argument)minizinc executable or a shell dependency does not exist:existence_error(command,Command)existence_error(directory,Directory)permission_error(delete,source_sink,Path)representation_error(utf_8)minizinc_transport(Stage,Status,Details)minizinc_solver_error(Formal,Status,Diagnostics,SourceMap)program/1
Generates and prints MiniZinc source to the current output, equivalent to program/2 followed by print_program/1, without invoking MiniZinc.
staticprogram(Source)program(+compound) - one_or_errorSource is not a ground term:instantiation_errorSource is ground but not a supported source, or is object(Object) where Object does not implement minizinc_problem_protocol:domain_error(minizinc_source,Source)Statements is ground but not a list:type_error(list,Statements)domain_error(minizinc_statement,Statement)domain_error(minizinc_origins,Origins)Codes is ground but not a list of character codes:type_error(codes,Codes)Code of the list Codes is ground but not an integer:type_error(integer,Code)Code of the list Codes is an integer but not a valid character code:domain_error(character_code,Code)Path is ground but not an atom:type_error(atom,Path)Path does not exist:existence_error(source_sink,Path)Path cannot be opened for reading:permission_error(open,source_sink,Path)permission_error(output,stream,Stream)program/2
Returns MiniZinc source codes from object(Object), terms(Statements), codes(Codes), or file(Path) without invoking MiniZinc.
staticprogram(Source,Codes)program(+compound,-list(integer)) - one_or_errorSource is not a ground term:instantiation_errorSource is ground but not a supported source, or is object(Object) where Object does not implement minizinc_problem_protocol:domain_error(minizinc_source,Source)Statements is ground but not a list:type_error(list,Statements)domain_error(minizinc_statement,Statement)domain_error(minizinc_origins,Origins)Codes is ground but not a list of character codes:type_error(codes,Codes)Code of the list Codes is ground but not an integer:type_error(integer,Code)Code of the list Codes is an integer but not a valid character code:domain_error(character_code,Code)Path is ground but not an atom:type_error(atom,Path)Path does not exist:existence_error(source_sink,Path)Path cannot be opened for reading:permission_error(open,source_sink,Path)print_program/1
Prints MiniZinc character codes to the current output without adding a newline or invoking MiniZinc.
staticprint_program(Codes)print_program(+list(integer)) - one_or_errorCodes is not a ground term:instantiation_errorCodes is ground but not a list of character codes:type_error(codes,Codes)Code of the list Codes is ground but not an integer:type_error(integer,Code)Code of the list Codes is an integer but not a valid character code:domain_error(character_code,Code)permission_error(output,stream,Stream)model/2
Enumerates, by backtracking, collected solution(Values, Objective, Time) records without starting a process.
staticmodel(Result,Solution)model(+compound,-compound) - zero_or_moreResult is not a ground term:instantiation_errorResult is not a valid collected MiniZinc result:domain_error(minizinc_result,Result)result_property/2
Enumerates, by backtracking, status(Status) and the stored result properties.
staticresult_property(Result,Property)result_property(+compound,?compound) - zero_or_moreResult is not a ground term:instantiation_errorResult is not a valid collected MiniZinc result:domain_error(minizinc_result,Result)print_result/1
Prints collected solutions, objective values, and solver status to the current output using MiniZinc-style markers, without invoking the solver.
staticprint_result(Result)print_result(+compound) - one_or_errorResult is not a ground term:instantiation_errorResult is not a valid collected MiniZinc result:domain_error(minizinc_result,Result)permission_error(output,stream,Stream)Protected predicates
(none)
Private predicates
(none)
Operators
(none)