Skip to content

Commit

Permalink
use pyasp-1.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
sthiele committed Mar 6, 2014
1 parent 9243b49 commit 59b3c56
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
8 changes: 6 additions & 2 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
1.4
v1.4.1
----------------
use pyasp-1.3.1

v1.4
----------------
use pyasp-1.3

1.0 (unreleased)
v1.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='shogen',
version='1.4',
version='1.4.1',
url='http://pypi.python.org/pypi/shogen/',
license='GPLv3+',
description='Finding shortest genome segments that regulate metabolic pathways',
Expand All @@ -45,6 +45,6 @@ def run(self):
package_data = {'__shogen__' : ['encodings/*.lp']},
scripts = ['shogen.py'],
install_requires=[
"pyasp == 1.3"
"pyasp == 1.3.1"
]
)
14 changes: 7 additions & 7 deletions src/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def write(self,count, termset):
def filter_couples(couple_facts, instance):
prg = [filter_prg, instance, couple_facts.to_file()]
solver = GringoClasp()
models = solver.run(prg,nmodels=0,collapseTerms=True, collapseAtoms=False)
models = solver.run(prg,collapseTerms=True, collapseAtoms=False)
os.unlink(prg[2])
return models[0]

Expand All @@ -76,7 +76,7 @@ def get_ksip_instance(instance, pmax):
prg = [convert_prg , instance, inst ]

solver = GringoClasp()
solution = solver.run(prg,1,collapseTerms=False, collapseAtoms=False)
solution = solver.run(prg,collapseTerms=False, collapseAtoms=False)
os.unlink(inst)
return solution[0]

Expand All @@ -89,7 +89,7 @@ def get_sgs_instance(instance, pmax):
prg = [convert_sds_prg , instance, inst ]

solver = GringoClasp()
solution = solver.run(prg,1,collapseTerms=False, collapseAtoms=False)
solution = solver.run(prg,collapseTerms=False, collapseAtoms=False)
os.unlink(inst)
return solution[0]

Expand All @@ -100,7 +100,7 @@ def preprocess(instance, start, goal, pmax):
pmaxfact = String2TermSet('pmax('+str(pmax)+')')
details = startfact.union(goalfact).union(pmaxfact)
details_f = details.to_file()
prg = [prepro_prg , instance, details_f ]
prg = [prepro_prg, instance, details_f ]

solver = GringoClasp()
solution = solver.run(prg,1)
Expand All @@ -126,12 +126,12 @@ def get_k_sgs(instance, start, end, pmax, k, dictg, revdictr):
while count < k :
prg = [length_prg , instance, details_f ]
goptions=' --const pmin='+str(min)
coptions='--opt-heu --opt-strategy=1 --heu=vsids'
coptions='--opt-heu --opt-strategy=1 --heu=vsids '
#coptions='--opt-heu --heu=vsids'
solver = GringoClasp(gringo_options=goptions,clasp_options=coptions)
#solver = GringoUnClasp(gringo_options=goptions,clasp_options=coptions)
#print "search1 ...",
optima = solver.run(prg,nmodels=0,collapseTerms=True,collapseAtoms=False)
optima = solver.run(prg,collapseTerms=True,collapseAtoms=False)


if len(optima) :
Expand All @@ -144,7 +144,7 @@ def get_k_sgs(instance, start, end, pmax, k, dictg, revdictr):

prg = [length_prg , instance, details_f, exclude_sol([optima[0]]) ]
goptions='--const pmin='+str(min)
coptions='--opt-heu --opt-strategy=1 --opt-mode=optN'
coptions='--opt-heu --opt-strategy=1 --opt-mode=optN --opt-bound='+str(min)
solver = GringoClasp(gringo_options=goptions,clasp_options=coptions)
#print "search2 ...",
sols = solver.run(prg,collapseTerms=True,collapseAtoms=False)
Expand Down

0 comments on commit 59b3c56

Please sign in to comment.