Skip to content

Commit

Permalink
Merge pull request #773 from scipopt/fix_outdated_gcp
Browse files Browse the repository at this point in the history
Fix outdated time.clock() call
  • Loading branch information
mmghannam authored Jan 11, 2024
2 parents a9d4693 + 7d857bb commit 99aa49d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
### Added
- Added methods for getting the names of the current stage and of an event
### Fixed
- Fixed outdated time.clock call in gcp.py
### Changed
### Removed

Expand Down
4 changes: 2 additions & 2 deletions examples/finished/gcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,14 @@ def make_data(n,prob):
if not (name,size-1,prob) in cpu or cpu[name,size-1,prob] < 100: #cpu.has_key((name,size-1,prob))
cpu[name,size,prob] = 0.
for t in range(N):
tinit = time.clock()
tinit = time.time()
random.seed(t)
V,E = make_data(size,prob)
model = m(V,E,K)
model.hideOutput() # silent mode
model.optimize()
assert model.getObjVal() >= 0 and model.getObjVal() <= K
tend = time.clock()
tend = time.time()
cpu[name,size,prob] += tend - tinit
cpu[name,size,prob] /= N
else:
Expand Down

0 comments on commit 99aa49d

Please sign in to comment.