PIPS
|
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "linear.h"
#include "janusvalue.h"
Go to the source code of this file.
Functions | |
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. More... | |
bool | sc_janus_feasibility (Psysteme sc) |
ttention with dimension=0
N janus should not be used here.
the third parameter means test only one time only I is initialized. Z is still empty
#define VRFIN 0 solution finie
#define VRVID 1 polyedre vide
#define VRINF 2 solution infinie
#define VRINS 3 nombre de pivotages insuffisant, bouclage possible
#define VRDEB 4 debordement de tableaux
#define VRCAL 5 appel errone
#define VRBUG 6 bug
#define VROVF 7 overflow
DN: In Solaris, we can fclose(NULL), but in LINUX, we cannot.
in case of failure then return r >=3 donnot want to use exception here, nor one more parameter, while wanting to keep return bool for compatibility. To be changed.
Definition at line 228 of file sc_janus_feasibility.c.
References fprintf(), problem::ftrace, isolve(), problem::ntrac2, problem::ntrace, ok, sc_to_iproblem(), VRFIN, VRINF, and VRVID.
This file provides functions to convert a system of constraints into format of Janus.
c must be consistant
anus int p6,p5,p4,p3,p2,p1;
int tfois = 1; for time measurement only. other initiation removed.
prefixed parameter for Janus - to be changed in futur
no debug mode
ave to remove this debug in the futur for exact time measument
file for trace
technique for hierarchical computation - 0 if simplex
number of levels - 0 if simplex
dynamic visualization
amount of information
amount of information
amount of information
Fourier_Motzkin
ow to introduce constrained variables
riterion max iterations
Choice pivot primal
Choice of the pivot for dual simplex
ODO: If these parameters are already initialized before used in the code (which is not easy to see now), then it's not necessary to reinitialize them here. If not, then we might have a bug.
removed reading from file. replace by direct assign
we can chosse probleme janus ou simplexe entier classique or other in this section
scanf(fh,"%d",&Z->nvar); nombre total de variables
to be verified
c given is not correct (normally tested before)
Janus cannot handle this system of constraints
Janus cannot handle this system of constraints
scanf(fh,"%d",&Z->mcontr); nombre de contraintes
sc's parameters must be true
Janus cannot handle this system of constraints
scanf(fh,"%d",&Z->nvpos); nombre de variables >=0 donc: Z->nvpos<= Z->nvar
to be verified
?? can we put nvpos = 0 here
scanf(fh,"%d",&vi0); unused parameter
need exact DIMENSION, similar to sc_to_matrix
for ( i=1 ; i <= Z->mcontr ; i++) { fscanf(fh,"%d",&ventier) ; I->e[i]=ventier ; for ( j=1 ; j <= Z->nvar ; j++) { fscanf(fh,"%d",&ventier) ; I->a[i][j]=ventier ; } fscanf(fh,"%d",&ventier) ; I->d[i]=ventier ; }
TTENTION, first elements in array in struct initpb are not used.
his array is not initiated. In use : rows 1 -> Z->mcontr, columns 1-> Z->nvar
N: need to check the special inequality here: 0 < 1, mean a vector of one element.
differentiation eq and ineq, running by constraints
f egalite then 0, inegalite then -1. Put in egalites first
ncluded constant (or rhs) here, which is the last element in the vector, donot change the sign of constant DN 6/11/02. use Marcos of Value. Needed Value in struct problem.
galites coeffs, i for columns, j for rows
negalites
c_default_dump(sc); TODO: what to do with this special constraint? if 0<1 ok, if 1 < 0 then not ok, return false
Definition at line 42 of file sc_janus_feasibility.c.
References initpb::a, Ssysteme::base, problem::choixpiv, problem::choixprim, CONTRAINTE_UNDEFINED_P, problem::critermax, initpb::d, Ssysteme::dimension, problem::dyn, dynam(), initpb::e, Ssysteme::egalites, problem::forcer, problem::fourier, fprintf(), problem::ftrace, problem::ic1, problem::icout, Ssysteme::inegalites, problem::itdirect, problem::lastfree, MAXCOLONNES, MAXLIGNES, problem::mcontr, problem::met2, problem::met3, problem::met4, problem::met5, problem::met6, problem::met7, problem::met8, problem::meth, problem::minimum, problem::mx, Ssysteme::nb_eq, Ssysteme::nb_ineq, problem::negal, problem::niter, problem::nredun, problem::ntp, problem::ntrac2, problem::ntrac3, problem::ntrace, problem::nturb, problem::nub, problem::numax, problem::numero, problem::nvar, problem::nvpos, problem::nx, printf(), problem::remove, Scontrainte::succ, Svecteur::succ, tableau_janus(), TCST, problem::tmax, problem::turbo, value_abs, value_addto, value_assign, value_uminus, VALUE_ZERO, value_zero_p, problem::varc, problem::vdum, vect_coeff(), Scontrainte::vecteur, VECTEUR_NUL_P, and vecteur_var.
Referenced by sc_janus_feasibility().