SuperSCS  1.3.2
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Structures | Macros | Functions
scs.h File Reference
#include "glbopts.h"
#include <string.h>
#include "cones.h"
#include "linAlg.h"
#include "linSys.h"
#include "util.h"
#include "ctrlc.h"
#include "constants.h"
#include <math.h>
#include <stdio.h>
#include "scs_blas.h"

Go to the source code of this file.

Data Structures

struct  scs_direction_cache
 Memory for the computation of directions (Broyden and Anderson's methods). More...
 
struct  scs_work
 Workspace for SCS. More...
 
struct  scs_data
 struct containing problem data More...
 
struct  scs_settings
 Settings structure. More...
 
struct  scs_solution
 Primal-dual solution arrays. More...
 
struct  scs_info
 Terminating information. More...
 
struct  scs_scaling
 Normalization variables. More...
 

Macros

#define SCS_INFO_STATUS_MSG_LENGTH   32
 

Functions

ScsSolutionscs_init_sol (void)
 
ScsInfoscs_init_info (void)
 
ScsDatascs_init_data (void)
 
scs_int scs (const ScsData *RESTRICT d, const ScsCone *RESTRICT k, ScsSolution *RESTRICT sol, ScsInfo *RESTRICT info)
 
const char * scs_version (void)
 
void scs_millis_to_time (scs_float time, scs_int *hours, scs_int *minutes, scs_int *secs, scs_float *sec_rest)
 Converts milliseconds to a 00:00:00.0 time format. More...
 

Macro Definition Documentation

#define SCS_INFO_STATUS_MSG_LENGTH   32

Function Documentation

scs_int scs ( const ScsData *RESTRICT  d,
const ScsCone *RESTRICT  k,
ScsSolution *RESTRICT  sol,
ScsInfo *RESTRICT  info 
)

scs calls scs_init, scs_solve, and scs_finish

Parameters
d
k
sol
info
Returns
status code
Remarks
It is very important that info is created using scs_init_info.
ScsData* scs_init_data ( void  )

Creates a new ScsData structure without allocating memory for \(A\), \(b\) and \(c\) and its sets all settings to their default values, that is

  1. alpha = 0.5
  2. c0 = 0.999
  3. c1 = ...
Returns
ScsData object
See Also
scs_set_default_settings
ScsInfo* scs_init_info ( void  )

Creates a new empty ScsInfo structure which is then provided to scs to get information about the status of the algorithm (e.g., the duality gap, the solution status, etc).

Returns
Initialized ScsInfo structure.
ScsSolution* scs_init_sol ( void  )

Creates a new empty solution structure which is to be used to retrieve the solution \((x^\star, y^\star, s^\star)\).

This function does not initialize of allocate memory for x, s or y (but it sets the respective pointers to SCS_NULL).

Returns
Initialized ScsSolution structure.
void scs_millis_to_time ( scs_float  time,
scs_int hours,
scs_int minutes,
scs_int secs,
scs_float sec_rest 
)

Converts milliseconds to a 00:00:00.0 time format.

Parameters
timegiven elapsed time in milliseconds
hourshours
minutesminutes
secsseconds
sec_restremaining time in seconds (positive and smaller than 1)
const char* scs_version ( void  )

Returns the version of SCS

Returns