Skip to content

Commit 1addaf8

Browse files
committed
Update linopy beenchmark
1 parent 9f05e67 commit 1addaf8

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

bench/bench_linopy_cvxpy.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def bench(N, solver_name):
6565

6666
t0 = time.time()
6767
model = create_linopy_model(N)
68-
model.solve(solver_name=solver_name, io_api="lp")
68+
model.solve(solver_name=solver_name, io_api="direct")
6969
t1 = time.time()
7070
results["linopy"] = t1 - t0
7171

@@ -94,4 +94,4 @@ def main(solver_name="gurobi"):
9494

9595
if __name__ == "__main__":
9696
# solver_name can be "copt", "gurobi", "highs"
97-
main("highs")
97+
main("gurobi")

docs/source/benchmark.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ This is the result of benchmark, where the performance of PyOptInterface exceeds
5050

5151
| N | Variables | PyOptInterface | linopy | cvxpy |
5252
| --- | --------- | -------------- | -------- | --------- |
53-
| 100 | 20000 | 0.112849 | 0.422408 | 0.373407 |
54-
| 200 | 80000 | 0.294830 | 1.118702 | 1.575949 |
55-
| 300 | 180000 | 0.710237 | 2.462809 | 4.038862 |
56-
| 400 | 320000 | 1.256276 | 4.535225 | 8.687895 |
57-
| 500 | 500000 | 2.189127 | 8.243707 | 18.941519 |
53+
| 100 | 20000 | 0.076867 | 0.433379 | 0.224613 |
54+
| 200 | 80000 | 0.356767 | 0.959883 | 0.927248 |
55+
| 300 | 180000 | 0.796876 | 2.080950 | 2.681649 |
56+
| 400 | 320000 | 1.375459 | 3.715881 | 6.174171 |
57+
| 500 | 500000 | 2.222600 | 6.297467 | 12.153747 |
5858

5959
:::
6060

0 commit comments

Comments
 (0)