Skip to content

Commit

Permalink
update random problem generation
Browse files Browse the repository at this point in the history
  • Loading branch information
bodono committed Jun 27, 2024
1 parent 4308d53 commit 3b61892
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion test/gen_random_cone_prob.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def pos(x):


def get_scs_cone_dims(K):
l = K["z"] + K["l"]
l = K.get("z", 0) + K.get("l", 0)
for i in range(0, len(K["q"])):
l = l + K["q"][i]

Expand Down
7 changes: 3 additions & 4 deletions test/solve_random_cone_prob.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from __future__ import print_function, division
import scs
import numpy as np
from scipy import sparse, randn
import gen_random_cone_prob as tools

#############################################
Expand All @@ -28,7 +27,7 @@ def main():
def solve_feasible(use_indirect, gpu):
# cone:
K = {
"f": 10,
"z": 10,
"l": 15,
"q": [5, 10, 0, 1],
"s": [3, 4, 0, 0, 1],
Expand All @@ -50,7 +49,7 @@ def solve_feasible(use_indirect, gpu):

def solve_infeasible(use_indirect, gpu):
K = {
"f": 10,
"z": 10,
"l": 15,
"q": [5, 10, 0, 1],
"s": [3, 4, 0, 0, 1],
Expand All @@ -66,7 +65,7 @@ def solve_infeasible(use_indirect, gpu):

def solve_unbounded(use_indirect, gpu):
K = {
"f": 10,
"z": 10,
"l": 15,
"q": [5, 10, 0, 1],
"s": [3, 4, 0, 0, 1],
Expand Down

0 comments on commit 3b61892

Please sign in to comment.