#include <stdio.h>
#include <stdlib.h>
#include "boolean.h"
#include "linear_assert.h"
#include "arithmetique.h"
#include "vecteur.h"
#include "contrainte.h"
#include "sc.h"
Go to the source code of this file.
◆ main()
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Programme de test de faisabilite' d'un ensemble d'equations et d'inequations.
compte les systemes, chacun dans un fichier
lecture et test de la faisabilite' de systemes sur fichiers
Definition at line 72 of file feasability.c.
88 if((f1 = fopen(argv[i],
"r")) == NULL) {
89 fprintf(stdout,
"Ouverture fichier %s impossible\n", argv[i]);
static void test_file(FILE *f, char *name)
char * variable_default_name(Variable v)
char * variable_default_name(Variable v): returns the name of variable v
void initialize_sc(char *(*var_to_string)(Variable))
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
References exit, fprintf(), initialize_sc(), test_file(), and variable_default_name().
◆ test_file()
static void test_file |
( |
FILE * |
f, |
|
|
char * |
name |
|
) |
| |
|
static |
Definition at line 52 of file feasability.c.
55 printf(
"systeme initial \n");
58 printf(
"syntaxe correcte dans %s\n",name);
60 printf(
"Nb_eq %d , Nb_ineq %d, dimension %d\n",
66 fprintf(stderr,
"erreur syntaxe dans %s\n",name);
static void test_system(Psysteme sc)
int f(int off1, int off2, int n, float r[n], float a[n], float b[n])
Psysteme sc_new(void)
Psysteme sc_new(): alloue un systeme vide, initialise tous les champs avec des valeurs nulles,...
void sc_fprint(FILE *fp, Psysteme ps, get_variable_name_t nom_var)
void sc_fprint(FILE * f, Psysteme ps, char * (*nom_var)()): cette fonction imprime dans le fichier po...
bool sc_fscan(FILE *f, Psysteme *ps)
bool sc_fscan(FILE * f, Psysteme * ps): construit un systeme d'inegalites et d'egalites lineaires a p...
References Ssysteme::dimension, exit, f(), fprintf(), Ssysteme::nb_eq, Ssysteme::nb_ineq, printf(), sc_fprint(), sc_fscan(), sc_new(), test_system(), and variable_default_name().
Referenced by main().
◆ test_system()
Definition at line 40 of file feasability.c.
43 fprintf(stdout,
"*** Arithmetic error occured in simplex\n");
46 printf(
"Systeme faisable (soluble) en rationnels\n") ;
48 printf(
"Systeme insoluble\n");
bool sc_feasibility_ofl_ctrl(Psysteme sc, bool integer_p, volatile int ofl_ctrl, volatile bool ofl_res)
return true is the system is feasible
#define OFL_CTRL
I do thing that overflows are managed in a very poor manner.
References CATCH, fprintf(), OFL_CTRL, overflow_error, printf(), sc_feasibility_ofl_ctrl(), and TRY.
Referenced by test_file().