Platforms to show: All Mac Windows Linux Cross-Platform
Back to LGLMBS class.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SATSolver | MBS Tools Plugin | 20.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SATSolver | MBS Tools Plugin | 20.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
LGLMBS.CAssume(lit as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SATSolver | MBS Tools Plugin | 20.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SATSolver | MBS Tools Plugin | 20.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Both 'Cloning' and 'Forking' can be used to implement 'Push & Pop', but the asymmetric forking is more similar to the classical way of implementing it, needs less resources since for instance eliminated variables do not occupy any memory in the children, but requires lifting back satisfying assignments explicitly (through the whole parent chain). If these full satisfying assignments are really needed actually cloning could be more space efficient too. Assume you want to split the solver into two instances, one with a literal set to false, the other one to true. Then cloning allows you to produce two independent branches, while for forking you need three, since the root / top solver still has to be kept for lifting back a potential assignment.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SATSolver | MBS Tools Plugin | 20.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Creates new empty object.
LGLMBS.DefaultOption(Name as String) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SATSolver | MBS Tools Plugin | 20.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
LGLMBS.Deref(lit as Integer) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SATSolver | MBS Tools Plugin | 20.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
neg=false, pos=true
Returns -1 if lit is bigger then MaxVar.
LGLMBS.Failed(lit as Integer) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SATSolver | MBS Tools Plugin | 20.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
neg=false, pos=true
for assumptions.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SATSolver | MBS Tools Plugin | 20.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
LGLMBS.Fixed(lit as Integer) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SATSolver | MBS Tools Plugin | 20.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
neg=false, pos=true
Toplevel
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SATSolver | MBS Tools Plugin | 20.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SATSolver | MBS Tools Plugin | 20.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SATSolver | MBS Tools Plugin | 20.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
'Forking' copies only irredundant clauses and also uses internal variable indices of the parent as external variable indices. Thus 'parent' and the forked off 'child' do neither exactly work the same way, nor do they use from the API point of view the same set of variables. They are satisfiability equivalent. If the child becomes unsatisfiable the parent can be assumed to be unsatisfiable too and thus 'join' would just add the empty clause to the parent. If the child produces a satisfying assignment, this assignment is turned into an assignment of the parent by 'join'. Parents can be forked multiple times. A child has exactly one parent. Parents and children can be released independently. Between 'Fork' and 'Join' no other operations but further 'Fork' are allowed. The effect ot multiple 'Join' with the same parent is unclear at this point. The same memory manager is use for the child and the parent. Options, prefix, output file and the callbacks for 'getime' and 'Abort' are copied too (if set).
Both 'Cloning' and 'Forking' can be used to implement 'Push & Pop', but the asymmetric forking is more similar to the classical way of implementing it, needs less resources since for instance eliminated variables do not occupy any memory in the children, but requires lifting back satisfying assignments explicitly (through the whole parent chain). If these full satisfying assignments are really needed actually cloning could be more space efficient too. Assume you want to split the solver into two instances, one with a literal set to false, the other one to true. Then cloning allows you to produce two independent branches, while for forking you need three, since the root / top solver still has to be kept for lifting back a potential assignment.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SATSolver | MBS Tools Plugin | 20.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
LGLMBS.Frozen(lit as Integer) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SATSolver | MBS Tools Plugin | 20.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
LGLMBS.GetOptionMinMax(Name as String, byref min as Integer, byref max as Integer) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SATSolver | MBS Tools Plugin | 20.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
LGLMBS.HasOption(Name as String) as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SATSolver | MBS Tools Plugin | 20.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SATSolver | MBS Tools Plugin | 20.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
LGLMBS.Join(Child as LGLMBS) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SATSolver | MBS Tools Plugin | 20.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SATSolver | MBS Tools Plugin | 20.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Zero is also returned if the formula is already inconsistent. The lookahead literal is made usable again, for instance if it was not frozen during a previous SAT call and thus implicitly became melted. Therefore it can be added in a unit clause.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SATSolver | MBS Tools Plugin | 20.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SATSolver | MBS Tools Plugin | 20.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
LGLMBS.Option(Name as String) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | SATSolver | MBS Tools Plugin | 20.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
(Read and Write computed property)
LGLMBS.ParseFile(File as FolderItem, force as boolean = false) as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SATSolver | MBS Tools Plugin | 20.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Returns empty text on success or error message from parser.
See also:
LGLMBS.ParseFile(File as FolderItem, force as boolean, byref LineNo as Integer, byref Max as Integer) as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SATSolver | MBS Tools Plugin | 20.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Returns empty text on success or error message from parser.
See also:
LGLMBS.ParseFileMT(File as FolderItem, force as boolean = false) as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SATSolver | MBS Tools Plugin | 21.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Returns empty text on success or error message from parser.
The work is performed on a preemptive thread, so this function does not block the application and can yield time to other Xojo threads. Must be called in a Xojo thread to enjoy benefits. If called in main thread will block, but keep other background threads running.
See also:
LGLMBS.ParseFileMT(File as FolderItem, force as boolean, byref LineNo as Integer, byref Max as Integer) as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SATSolver | MBS Tools Plugin | 21.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Returns empty text on success or error message from parser.
The work is performed on a preemptive thread, so this function does not block the application and can yield time to other Xojo threads. Must be called in a Xojo thread to enjoy benefits. If called in main thread will block, but keep other background threads running.
See also:
LGLMBS.ParsePath(Path as String, force as boolean = false) as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SATSolver | MBS Tools Plugin | 20.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Returns empty text on success or error message from parser.
On MacOS and Linux, if file has the following extensions, the file will be decompressed with command line tool and then parsed:
.gz | gzip |
.xz | xz |
.bz2 | bzip2 |
.zip | unzip |
.7z | 7x |
See also:
LGLMBS.ParsePath(Path as String, force as boolean, byref LineNo as Integer, byref Max as Integer) as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SATSolver | MBS Tools Plugin | 20.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Returns empty text on success or error message from parser.
On MacOS and Linux, if file has the following extensions, the file will be decompressed with command line tool and then parsed:
.gz | gzip |
.xz | xz |
.bz2 | bzip2 |
.zip | unzip |
.7z | 7x |
See also:
LGLMBS.ParsePathMT(Path as String, force as boolean = false) as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SATSolver | MBS Tools Plugin | 21.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Returns empty text on success or error message from parser.
On MacOS and Linux, if file has the following extensions, the file will be decompressed with command line tool and then parsed:
.gz | gzip |
.xz | xz |
.bz2 | bzip2 |
.zip | unzip |
.7z | 7x |
The work is performed on a preemptive thread, so this function does not block the application and can yield time to other Xojo threads. Must be called in a Xojo thread to enjoy benefits. If called in main thread will block, but keep other background threads running.
See also:
LGLMBS.ParsePathMT(Path as String, force as boolean, byref LineNo as Integer, byref Max as Integer) as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SATSolver | MBS Tools Plugin | 21.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Returns empty text on success or error message from parser.
On MacOS and Linux, if file has the following extensions, the file will be decompressed with command line tool and then parsed:
.gz | gzip |
.xz | xz |
.bz2 | bzip2 |
.zip | unzip |
.7z | 7x |
The work is performed on a preemptive thread, so this function does not block the application and can yield time to other Xojo threads. Must be called in a Xojo thread to enjoy benefits. If called in main thread will block, but keep other background threads running.
See also:
LGLMBS.ParseString(Data as String, force as boolean = false) as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SATSolver | MBS Tools Plugin | 20.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Returns empty text on success or error message from parser.
Please pass text with data separated with unix line endings (endofline.unix), so you may need to use ReplaceLineEndings function.
See also:
LGLMBS.ParseString(Data as String, force as boolean, byref LineNo as Integer, byref Max as Integer) as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SATSolver | MBS Tools Plugin | 20.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Returns empty text on success or error message from parser.
Please pass text with data separated with unix line endings (endofline.unix), so you may need to use ReplaceLineEndings function.
See also:
LGLMBS.ParseStringMT(Data as String, force as boolean = false) as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SATSolver | MBS Tools Plugin | 21.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Returns empty text on success or error message from parser.
Please pass text with data separated with unix line endings (endofline.unix), so you may need to use ReplaceLineEndings function.
The work is performed on a preemptive thread, so this function does not block the application and can yield time to other Xojo threads. Must be called in a Xojo thread to enjoy benefits. If called in main thread will block, but keep other background threads running.
See also:
LGLMBS.ParseStringMT(Data as String, force as boolean, byref LineNo as Integer, byref Max as Integer) as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SATSolver | MBS Tools Plugin | 21.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Returns empty text on success or error message from parser.
Please pass text with data separated with unix line endings (endofline.unix), so you may need to use ReplaceLineEndings function.
The work is performed on a preemptive thread, so this function does not block the application and can yield time to other Xojo threads. Must be called in a Xojo thread to enjoy benefits. If called in main thread will block, but keep other background threads running.
See also:
LGLMBS.Print(File as FolderItem = nil)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SATSolver | MBS Tools Plugin | 20.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Pass nil to use stdout.
Remaining in DIMACS format
LGLMBS.PrintAll(File as FolderItem = nil)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SATSolver | MBS Tools Plugin | 20.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Including units & equivs.
Pass nil to use stdout.
Some examples using this method:
LGLMBS.PrintOptions(prefix as string, IgnoreSome as boolean)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SATSolver | MBS Tools Plugin | 20.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
LGLMBS.PrintPCS(mixed as boolean)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SATSolver | MBS Tools Plugin | 20.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SATSolver | MBS Tools Plugin | 20.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SATSolver | MBS Tools Plugin | 20.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SATSolver | MBS Tools Plugin | 20.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SATSolver | MBS Tools Plugin | 20.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
LGLMBS.ReadOptionFile(File as FolderItem) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SATSolver | MBS Tools Plugin | 20.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
LGLMBS.Reconstk(byref Start as Ptr, byref Top as Ptr)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SATSolver | MBS Tools Plugin | 20.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
These pointers are only valid until the next Sat or Simp call.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SATSolver | MBS Tools Plugin | 20.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
LGLMBS.Representative(lit as Integer) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SATSolver | MBS Tools Plugin | 20.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
LGLMBS.ResetPhase(lit as integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SATSolver | MBS Tools Plugin | 20.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Stop forcing phase in decisions.
LGLMBS.Reusable(lit as Integer) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | SATSolver | MBS Tools Plugin | 20.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
If a literal was not frozen at the last call to Sat (or Simp) it becomes 'unusable' after the next call even though it might not have been used as blocking literal etc.
The items on this page are in the following plugins: MBS Tools Plugin.