Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
k2shah committed Apr 14, 2020
2 parents 2b64d73 + d4f062d commit ae56e45
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions main-sat.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# solver
import z3
z3.set_param('parallel.enable', True)
z3.set_param('verbose', 1)
# z3.set_param('verbose', 1)


class SAT(object):
Expand Down Expand Up @@ -73,16 +73,13 @@ def findBlackList(self):
# pRate = .11 # percent per second
# scale = 40 # 40m per unit
# speed = 4. # m/s
# # endPercent = startPercent-self.config.maxTime*scale/speed*pRate
# # calculate the percent need to get to the base point
# endPercent = startPercent-self.config.maxTime*scale/speed*pRate
# calculate the percent need to get to the base point
# p2b = worldDistL2 * scale/speed * pRate
# # cacluate extreme step t*
# tStar = int((startPercent-endPercent-p2b)/pRate*speed/scale)
# print(worldDist, tStar, maxT-worldDist)




for boolVar in self.blackList:
self.problem.add(z3.Not(boolVar))

Expand Down Expand Up @@ -164,13 +161,13 @@ def main(outDir):
# agent parameters
agentParameters = {}
agentParameters["base"] = 0
agentParameters["maxTime"] = 47
agentParameters["maxTime"] = 48
agentParameters["initPos"] = [0, 83]
nAgent = len(agentParameters["initPos"])

# gen parameters
step = 37
ver = "safe_1"
ver = "0"
# input files

# croz west
Expand All @@ -195,9 +192,9 @@ def main(outDir):

sat = SAT(config)
# # SOLVE THE PROBLEM
return 0
print("Solving Problem")
sat.solve()
return 0
agents = sat.readSolution()
try:
config.writeInfo(outDir)
Expand Down

0 comments on commit ae56e45

Please sign in to comment.