29 #include "pips_config.h"
37 #include "janusvalue.h"
47 bool special_constraint_p =
false;
51 int vi0,targ,pr,nblevel,mtlevel,tas;
52 int i,j,choix,vision,methode;
53 int par1,par2,par3,par4,par5,par6,par7;
58 par1 = 0; par2 = 0; par3 = 0;
60 par5 = 0; par6 = 1; par7 = 1;
64 fdebug=fopen(
"jtrace.tex",
"w") ;
74 methode = par3; Z->
met8 = methode/10000000;
75 methode -= 10000000*Z->
met8;Z->
met7 = methode/1000000;
76 methode -= 1000000*Z->
met7; Z->
met6 = methode/100000;
77 methode -= 100000*Z->
met6; Z->
met5 = methode/10000;
78 methode -= 10000*Z->
met5; Z->
met4 = methode/1000;
79 methode -= 1000*Z->
met4; Z->
met3 = methode/100;
80 methode -= 100*Z->
met3; Z->
met2 = methode/10;
81 methode -= 10*Z->
met2; Z->
meth = methode;
82 vision = par4; Z->
dyn = vision/1000;
83 vision -= 1000*Z->
dyn; Z->
ntrac3 = vision/100;
87 targ = par6; Z->
forcer= targ/10;
96 {
fprintf(Z->
ftrace,
"\\documentstyle[fullpage,epic,eepic,fancybox]{article} \n");
136 printf(
"\n[sc_to_iproblem]: Janus has a number of variables < 0 ");
160 printf(
"\n[sc_to_iproblem]: %3d variables positives, greater than %3d\n",Z->
nvpos,Z->
nvar);
184 for ( i=1 ; i <= Z->
mcontr ; i++)
187 if (i<=sc->nb_eq) I->
e[i]= 0;
214 special_constraint_p =
true;
218 if (special_constraint_p) {
231 FILE *fopen(), *fdebug;
274 if (fdebug) fclose(fdebug);
#define value_uminus(val)
unary operators on values
#define value_assign(ref, val)
assigments
#define value_zero_p(val)
#define value_addto(ref, val)
#define CONTRAINTE_UNDEFINED_P(c)
#define MAXCOLONNES
(-) choix du pivot (simplexe primal)
#define VRFIN
.....................
int isolve(Pinitpb II, Pproblem XX, int suite)
int dynam(Pproblem XX, int nd)
=======================================================================
void tableau_janus(Pinitpb II, Pproblem XX)
bool sc_janus_feasibility(Psysteme sc)
Compute feasibility, using custom Janus function if set, fallback function otherwise.
static bool sc_to_iproblem(Psysteme sc, Pinitpb I, Pproblem Z, FILE *fdebug)
This file provides functions to convert a system of constraints into format of Janus.
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
struct Scontrainte * succ
le type des coefficients dans les vecteurs: Value est defini dans le package arithmetique
Value d[MAXLIGNES+1]
matrix coefficients
Value a[MAXLIGNES+1][MAXCOLONNES+1]
=========================================================================
int remove
in any case non negative variables
int nvpos
nombre de fonctions et contraintes originales
int dyn
numero "file system" pour "trace"
int ntrac2
niveau "trace" (execution accompagnee de commentaires) 0: aucune impression >= 1: volume d'informatio...
int meth
redundant inequalities are removed
int choixprim
(0-1) choix du pivot (simplexe dual) 0 plus petit pivot 1 plus grand pivot
int varc
(3) elimination FOURIER-MOTZKIN 0: elimination non appliquee 1: cas triviaux ( >= 2: lorsque le nombr...
int nvar
column in case of infinite vale of function
FILE * ftrace
nombre de variables originales contraintes (rangees en tete).
int mcontr
nombre de variables originales
int forcer
(0-1) introduction variables contraintes 0 "strategie simplexe" 1 pivot unitaire sinon "strategie sim...
int negal
nature contraintes 0 egalite 1 inequation <= -1 inequation >= 2 fonction a minimiser -2 fonction a ma...
int met2
(0-1) methode finale de resolution
#define TCST
VARIABLE REPRESENTANT LE TERME CONSTANT.
Value vect_coeff(Variable var, Pvecteur vect)
Variable vect_coeff(Variable var, Pvecteur vect): coefficient de coordonnee var du vecteur vect —> So...