Skip to content
This repository has been archived by the owner on Aug 28, 2021. It is now read-only.

Commit

Permalink
Merge pull request #1 from bioasp/port2newclasp
Browse files Browse the repository at this point in the history
use pyasp-1.3
  • Loading branch information
sthiele committed Mar 4, 2014
2 parents 1b26aef + 3fe56ba commit a83c263
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
1.5
----------------
use pyasp-1.3

1.0 (unreleased)
----------------
Initial release
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def run(self):

setup(cmdclass={'install': install},
name='ingranalyze',
version='1.4',
version='1.5',
url='http://pypi.python.org/pypi/ingranalyze/',
license='GPLv3+',
description='Influence graph analysis, consistency check, diagnosis, repair and prediction ',
Expand All @@ -45,6 +45,6 @@ def run(self):
package_data = {'__ingranalyze__' : ['encodings/*.lp','encodings/*.gringo']},
scripts = ['ingranalyze.py'],
install_requires=[
"pyasp >= 1.2"
"pyasp == 1.3"
]
)
10 changes: 5 additions & 5 deletions src/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def get_minimal_inconsistent_cores(instance,nmodels=0,exclude=[]):
inputs = get_reductions(instance)
prg = [ dyn_mic_prg, inputs.to_file(), instance.to_file(), exclude_sol(exclude) ]
options='--heuristic=Vmtf'
solver = GringoClaspD(clasp_options=options)
solver = GringoClasp(clasp_options=options)
models = solver.run(prg,nmodels=0,collapseTerms=True, collapseAtoms=False)
os.unlink(prg[1])
os.unlink(prg[2])
Expand Down Expand Up @@ -169,8 +169,8 @@ def get_minimum_of_repairs(instance,repair_options,exclude=[]):
instance2 = instance.union(inputs)
prg = [ instance2.to_file(),repair_options.to_file(), exclude_sol(exclude), repair_core_prg, repair_cardinality_prg ]

solver = GringoClaspOpt()
optimum = solver.run(prg)
solver = GringoClasp()
optimum = solver.run(prg,nmodels=0)
os.unlink(prg[0])
os.unlink(prg[1])
os.unlink(prg[2])
Expand All @@ -182,7 +182,7 @@ def get_minimal_repair_sets(instance, repair_options ,optimum,nmodels=0,exclude=
instance2 = instance.union(inputs)
prg = [ instance2.to_file(), repair_options.to_file(), exclude_sol(exclude), repair_core_prg, repair_cardinality_prg ]

options='--project --opt-all='+str(optimum)
options='--project --opt-mode=optN'
solver = GringoClasp(clasp_options=options)
models = solver.run(prg,nmodels=0, collapseTerms=True, collapseAtoms=False)
os.unlink(prg[0])
Expand All @@ -202,7 +202,7 @@ def get_predictions_under_minimal_repair(instance, repair_options, optimum):

prg = [ instance2.to_file(), repair_options.to_file(), prediction_core_prg, repair_cardinality_prg ]

options='--project --enum-mode cautious --opt-all='+str(optimum)
options='--project --enum-mode cautious --opt-mode=optN'
solver = GringoClasp(clasp_options=options)
models = solver.run(prg,nmodels=0,collapseTerms=True, collapseAtoms=False)
os.unlink(prg[0])
Expand Down

0 comments on commit a83c263

Please sign in to comment.