File numerics/src/tools/PATHVI_helpers.h

Go to the source code of this file

helpers for using the PATHVI solver

Functions

int pathvi_get_col_name(struct vi_desc *desc, int j, char *name, int len)

Get the name associate with a column (currently “c12” the for 12th column)

Return

if ok 0, otherwise an error code

Parameters
  • desc: vi description

  • j: the column index

  • [out] name: the name on output

  • len: the maximum length to be written in name

int pathvi_get_F(struct vi_desc *desc, double *F)

Get the function value.

Return

if ok 0, otherwise an error code

Parameters
  • desc: vi description

  • F: the function value for PATHVI

int pathvi_get_lambda(struct vi_desc *desc, double *lambda)

Get the multipliers value.

Return

if ok 0, otherwise an error code

Parameters
  • desc: vi description

  • lambda: the multipliers value for PATHVI

int pathvi_get_row_name(struct vi_desc *desc, int i, char *name, int len)

Get the name associate with a row (currently “r12” the for 12th row)

Return

if ok 0, otherwise an error code

Parameters
  • desc: vi description

  • i: the row index

  • [out] name: the name on output

  • len: the maximum length to be written in name

int pathvi_get_z(struct vi_desc *desc, double *z)

Get the variable value.

Return

if ok 0, otherwise an error code

Parameters
  • desc: vi description

  • z: the variable for PATHVI

void pathvi_print(unsigned mode, const char *buf)

print wrapper

Return

if ok 0, otherwise an error code

Parameters
  • mode: the log mode

  • buf: the string to print

int pathvi_set_F(struct vi_desc *desc, double *F)

Set the function value.

Return

if ok 0, otherwise an error code

Parameters
  • desc: vi description

  • F: the function value for PATHVI

int pathvi_set_lambda(struct vi_desc *desc, double *lambda)

Set the multipliers value.

Return

if ok 0, otherwise an error code

Parameters
  • desc: vi description

  • lambda: the multipliers value for PATHVI

int pathvi_set_z(struct vi_desc *desc, double *z)

Set the variable value.

Return

if ok 0, otherwise an error code

Parameters
  • desc: vi description

  • z: the variable for PATHVI

struct SN_generic_pathvi_env
#include <PATHVI_helpers.h>

Generic structure for the PATHVI solver.

Public Members

double *F

function value

double *lambda

multipliers for the constraints

size_t m

number of polyhedral constraints

size_t n

number of variables

void *problem

problem

double *z

variable