PIPS
sc_simplex_feasibility.c File Reference

This file provides a function to test whether a constraint system is feasible, using simplex method. More...

#include <stdlib.h>
#include "boolean.h"
#include "linear_assert.h"
#include "vecteur.h"
#include "contrainte.h"
#include "sc.h"
+ Include dependency graph for sc_simplex_feasibility.c:

Go to the source code of this file.

Macros

#define WNOGMP   (fprintf(stderr, "[" __FILE__ "] linear was compiled without GMP support\n"))
 

Functions

static bool usegmp ()
 
bool sc_simplex_feasibility_ofl_ctrl (Psysteme sys, int ofl_ctrl)
 Main Function. More...
 

Detailed Description

This file provides a function to test whether a constraint system is feasible, using simplex method.

Definition in file sc_simplex_feasibility.c.

Macro Definition Documentation

◆ WNOGMP

#define WNOGMP   (fprintf(stderr, "[" __FILE__ "] linear was compiled without GMP support\n"))

Definition at line 43 of file sc_simplex_feasibility.c.

Function Documentation

◆ sc_simplex_feasibility_ofl_ctrl()

bool sc_simplex_feasibility_ofl_ctrl ( Psysteme  sys,
int  ofl_ctrl 
)

Main Function.

Determine whether a system sys of equations and inequations is feasible. Parameter ofl_ctrl indicates whether an overflow control is performed (possible values: NO_OFL_CTRL, FWD_OFL_CTRL).

Definition at line 61 of file sc_simplex_feasibility.c.

62 {
63  if (usegmp()) {
64 #ifdef HAVE_GMP_H
65  return sc_simplex_feasibility_ofl_ctrl_mulprec(sys, ofl_ctrl);
66 #else
67  WNOGMP;
68  return sc_simplex_feasibility_ofl_ctrl_fixprec(sys, ofl_ctrl);
69 #endif
70  }
71  else {
72  return sc_simplex_feasibility_ofl_ctrl_fixprec(sys, ofl_ctrl);
73  }
74 }
#define WNOGMP
static bool usegmp()
bool sc_simplex_feasibility_ofl_ctrl_fixprec(Psysteme sc, int ofl_ctrl)
fonction de calcul de la faisabilite' d'un systeme d'equations et d'inequations Auteur : Robert Mahl,...

References sc_simplex_feasibility_ofl_ctrl_fixprec(), usegmp(), and WNOGMP.

Referenced by sc_simplexe_feasibility_ofl_ctrl_timeout_ctrl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ usegmp()

static bool usegmp ( )
static

Definition at line 45 of file sc_simplex_feasibility.c.

46 {
47  char* env = getenv("LINEAR_USE_GMP");
48  return env && atoi(env) != 0;
49 }
static jmp_buf env
Definition: genClib.c:2473

References env.

Referenced by sc_simplex_feasibility_ofl_ctrl().

+ Here is the caller graph for this function: