clingo_msl#

g2clingo_msl#

gunfolds.solvers.clingo_msl.g2clingo_msl(g)[source]#
Parameters:

g (dictionary (gunfolds graphs)) – gunfolds graph

Returns:

Return type:

msl#

gunfolds.solvers.clingo_msl.msl(g, capsize, exact=True, configuration='tweety', urate=2, timeout=0, pnum=None)[source]#
Parameters:
  • g (dictionary (gunfolds graphs)) – gunfolds graph

  • capsize (integer) – maximum number of candidates to return

  • exact (boolean) – If true, run clingo in exact mode. If false, run clingo in optimization mode

  • urate (integer) – maximum undersampling rate to consider

  • timeout (integer) – timeout in seconds after which to interrupt computation (0 - no limit)

  • configuration (string) –

    Select configuration based on problem type

    • frumpy : Use conservative defaults

    • jumpy : Use aggressive defaults

    • tweety : Use defaults geared towards asp problems

    • handy : Use defaults geared towards large problems

    • crafty : Use defaults geared towards crafted problems

    • trendy : Use defaults geared towards industrial problems

  • pnum (integer) – number of parallel threads to run clingo on

Returns:

Return type:

msl_command#

gunfolds.solvers.clingo_msl.msl_command(g, urate=2, exact=True)[source]#
Parameters:
  • g (dictionary (gunfolds graphs)) – gunfolds graph

  • urate (integer) – maximum undersampling rate to consider

  • exact (boolean) – If true, run clingo in exact mode. If false, run clingo in optimization mode

Returns:

Return type:

rasl_msl#

gunfolds.solvers.clingo_msl.rasl_msl(g, capsize, urate=2, timeout=0, pnum=None)[source]#
Parameters:
  • g (dictionary (gunfolds graphs)) – gunfolds graph

  • capsize (integer) – maximum number of candidates to return

  • urate (integer) – maximum undersampling rate to consider

  • timeout (integer) – timeout in seconds after which to interrupt computation (0 - no limit)

  • pnum (integer) – number of parallel threads to run clingo on

Returns:

Return type:

rate#

gunfolds.solvers.clingo_msl.rate(u)[source]#
Parameters:

u (integer) – maximum under sampling rate

Returns:

predicate for under sampling rate

Return type:

string