Skip to content

Commit

Permalink
tweak cone printing
Browse files Browse the repository at this point in the history
  • Loading branch information
bodono committed Oct 5, 2021
1 parent 8ba7c01 commit 3aaa93c
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/cones.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ void SCS(finish_cone)(ScsConeWork *c) {

char *SCS(get_cone_header)(const ScsCone *k) {
char *tmp = (char *)scs_malloc(sizeof(char) * 512);
scs_int i, soc_vars, soc_blks, sd_vars, sd_blks;
scs_int i, soc_vars, sd_vars;
sprintf(tmp, "cones: ");
if (k->z) {
sprintf(tmp + strlen(tmp), "\t z: primal zero / dual free vars: %li\n",
Expand All @@ -245,24 +245,20 @@ char *SCS(get_cone_header)(const ScsCone *k) {
sprintf(tmp + strlen(tmp), "\t b: box cone vars: %li\n", (long)(k->bsize));
}
soc_vars = 0;
soc_blks = 0;
if (k->qsize && k->q) {
soc_blks = k->qsize;
for (i = 0; i < k->qsize; i++) {
soc_vars += k->q[i];
}
sprintf(tmp + strlen(tmp), "\t q: soc vars: %li, soc blks: %li\n",
(long)soc_vars, (long)soc_blks);
sprintf(tmp + strlen(tmp), "\t q: soc vars: %li, qsize: %li\n",
(long)soc_vars, (long)k->qsize);
}
sd_vars = 0;
sd_blks = 0;
if (k->ssize && k->s) {
sd_blks = k->ssize;
for (i = 0; i < k->ssize; i++) {
sd_vars += get_sd_cone_size(k->s[i]);
}
sprintf(tmp + strlen(tmp), "\t s: sd vars: %li, sd blks: %li\n",
(long)sd_vars, (long)sd_blks);
sprintf(tmp + strlen(tmp), "\t s: psd vars: %li, ssize: %li\n",
(long)sd_vars, (long)k->ssize);
}
if (k->ep || k->ed) {
sprintf(tmp + strlen(tmp), "\t e: exp vars: %li, dual exp vars: %li\n",
Expand Down

0 comments on commit 3aaa93c

Please sign in to comment.