File: README.md

package info (click to toggle)
gringo 5.8.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 32,128 kB
  • sloc: cpp: 210,867; ansic: 37,507; python: 11,271; yacc: 825; javascript: 627; sh: 368; xml: 364; makefile: 102
file content (46 lines) | stat: -rw-r--r-- 1,439 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
Example Calls
=============

The encodings here have been developed within the [metasp] project allowing for
handling complex optimization criteria, e.g., inclusion-based minimization or
Pareto efficiency.

Non-reified + Cardinality Minimization
--------------------------------------

    $ clingo --opt-mode=optN -q1 0 example1.lp

Reified + Cardinality Minimization
----------------------------------

    $ clingo --rewrite-minimize --output=reify --reify-sccs example1.lp |\
      clingo -Wno-atom-undefined - encoding.lp \
      <(echo "optimize(0,1,card).") 0

Reified + Subset Minimization
-----------------------------

    $ clingo --rewrite-minimize --output=reify --reify-sccs example1.lp |\
      clingo -Wno-atom-undefined - encoding.lp \
      <(echo "optimize(0,1,incl).") 0

Reified + Subset Minimization + Query to Solve the Conformant Planning Problem
------------------------------------------------------------------------------

    $ clingo example2.lp --output=reify |\
      clingo -Wno-atom-undefined - encoding.lp --project 0


Improving Performance
=====================

The above calls use clingo's reification backend. Better performance can be
obtained by first preprocessing the program and then reifying a potentially
much smaller program:

    $ clingo --pre --rewrite-minimize ... |\
      reify --sccs |\
      clingo -Wno-atom-undefined - encoding.lp ...


[metasp]: https://potassco.org/labs/metasp/