Skip to content

Commit

Permalink
Merge 34faa05 into 8652ae1
Browse files Browse the repository at this point in the history
  • Loading branch information
gbanjac committed Nov 27, 2018
2 parents 8652ae1 + 34faa05 commit e4dc169
Show file tree
Hide file tree
Showing 7 changed files with 162 additions and 37 deletions.
9 changes: 6 additions & 3 deletions docs/interfaces/julia.rst
Expand Up @@ -77,18 +77,21 @@ The output :code:`results` contains the primal solution :code:`x`, the dual solu
+-----------------------+------------------------------------------------+
| :code:`solve_time` | Solve time |
+-----------------------+------------------------------------------------+
| :code:`update_time` | Update time |
+-----------------------+------------------------------------------------+
| :code:`polish_time` | Polish time |
+-----------------------+------------------------------------------------+
| :code:`run_time` | Total run time: setup + solve + polish |
| :code:`run_time` | Total run time: setup/update + solve + polish |
+-----------------------+------------------------------------------------+
| :code:`rho_estimate` | Optimal rho estimate |
+-----------------------+------------------------------------------------+
| :code:`rho_updates` | Number of rho updates |
+-----------------------+------------------------------------------------+


Note that if multiple solves are executed from single setup, then after the
first one :code:`run_time` includes only :code:`solve_time` + :code:`polish_time`.
first one :code:`run_time` includes :code:`update_time` + :code:`solve_time`
+ :code:`polish_time`.


Update
------
Expand Down
8 changes: 6 additions & 2 deletions docs/interfaces/matlab.rst
Expand Up @@ -78,17 +78,21 @@ The :code:`results` structure contains the primal solution :code:`x`, the dual s
+-----------------------+------------------------------------------------+
| :code:`solve_time` | Solve time |
+-----------------------+------------------------------------------------+
| :code:`update_time` | Update time |
+-----------------------+------------------------------------------------+
| :code:`polish_time` | Polish time |
+-----------------------+------------------------------------------------+
| :code:`run_time` | Total run time: setup + solve + polish |
| :code:`run_time` | Total run time: setup/update + solve + polish |
+-----------------------+------------------------------------------------+
| :code:`rho_estimate` | Optimal rho estimate |
+-----------------------+------------------------------------------------+
| :code:`rho_updates` | Number of rho updates |
+-----------------------+------------------------------------------------+

Note that if multiple solves are executed from single setup, then after the
first one :code:`run_time` includes only :code:`solve_time` + :code:`polish_time`.
first one :code:`run_time` includes :code:`update_time` + :code:`solve_time`
+ :code:`polish_time`.


Update
------
Expand Down
9 changes: 6 additions & 3 deletions docs/interfaces/python.rst
Expand Up @@ -74,18 +74,21 @@ The :code:`results` object contains the primal solution :code:`x`, the dual solu
+-----------------------+------------------------------------------------+
| :code:`solve_time` | Solve time |
+-----------------------+------------------------------------------------+
| :code:`update_time` | Update time |
+-----------------------+------------------------------------------------+
| :code:`polish_time` | Polish time |
+-----------------------+------------------------------------------------+
| :code:`run_time` | Total run time: setup + solve + polish |
| :code:`run_time` | Total run time: setup/update + solve + polish |
+-----------------------+------------------------------------------------+
| :code:`rho_estimate` | Optimal rho estimate |
+-----------------------+------------------------------------------------+
| :code:`rho_updates` | Number of rho updates |
+-----------------------+------------------------------------------------+


Note that if multiple solves are executed from single setup, then after the
first one :code:`run_time` includes only :code:`solve_time` + :code:`polish_time`.
first one :code:`run_time` includes :code:`update_time` + :code:`solve_time`
+ :code:`polish_time`.


Update
------
Expand Down
15 changes: 10 additions & 5 deletions include/types.h
Expand Up @@ -61,7 +61,7 @@ typedef struct {


/**
* Solver return nformation
* Solver return information
*/
typedef struct {
c_int iter; ///< number of iterations taken
Expand All @@ -80,6 +80,7 @@ typedef struct {
# ifdef PROFILING
c_float setup_time; ///< time taken for setup phase (seconds)
c_float solve_time; ///< time taken for solve phase (seconds)
c_float update_time; ///< time taken for update phase (seconds)
c_float polish_time; ///< time taken for polish phase (seconds)
c_float run_time; ///< total time (seconds)
# endif // ifdef PROFILING
Expand Down Expand Up @@ -287,16 +288,20 @@ typedef struct {
OSQPSolution *solution; ///< Problem solution
OSQPInfo *info; ///< Solver information

# ifdef PROFILING
# ifdef PROFILING
OSQPTimer *timer; ///< Timer object

/// flag indicating whether the solve function has been run before
c_int first_run;
# endif // ifdef PROFILING

# ifdef PRINTING
/// flag indicating whether the update_time should be cleared
c_int clear_update_time;
# endif // ifdef PROFILING

# ifdef PRINTING
c_int summary_printed; ///< Has last summary been printed? (true/false)
# endif // ifdef PRINTING
# endif // ifdef PRINTING

} OSQPWorkspace;


Expand Down
2 changes: 1 addition & 1 deletion src/kkt.c
Expand Up @@ -189,7 +189,7 @@ void update_KKT_P(csc *KKT,

// Update diagonal elements of KKT by adding sigma
for (i = 0; i < Pdiag_n; i++) {
j = Pdiag_idx[i]; // Extract ondex of the element on the
j = Pdiag_idx[i]; // Extract index of the element on the
// diagonal
KKT->x[PtoKKT[j]] += param1;
}
Expand Down

0 comments on commit e4dc169

Please sign in to comment.