Commit e68d4206 authored by FAGES Francois's avatar FAGES Francois
Browse files

back to numbers with no dimension which will be corrected when units will be introduced

parent 38ac48f9
......@@ -29,16 +29,21 @@
% A dimension is encoded by a couple (time exponent, volume exponent)
% No dimension is encoded by the couple (0, 0)
% Any dimension is encoded by a variable
% Numbers have any dimension
% Numbers have no dimension
:- doc('
Dimensional analysis infers dimensions for model parameters and checks their consistency.
In Biocham, only time and volume dimensions are considered, without units.
The dimension of a molecular concentration is volume$^{-1}$.
The dimension of a kinetic expression (i.e. reaction rate or influence force) is time$^{-1}$.
Warning: numbers have no dimension so kinetic parameters should be used in kinetic expressions instead of directly numbers.
').
list_dimensions :-
biocham_command,
doc('
Performs a dimensional analysis of the current model. Infers the time and volume dimensions of all parameters.
The dimension of a molecular concentration is volume^-1.
The dimension of a reaction rate or influence force is time^-1.
The dimensions are considered without units.
Infers the time and volume dimensions of all parameters.
\\begin{example}
\\trace{
biocham: MM(v, k) for A => B.
......@@ -222,16 +227,11 @@ find_parameter_dim(cos(X), (DimT, DimV), L) :-
DimV #= 0,
find_parameter_dim(X, (DimT, DimV), L).
%find_parameter_dim(N, (DimT, DimV), _) :-
% number(N),
% !,
% DimT #= 0,
% DimV #= 0.
%
%FF Numbers may take any dimension
find_parameter_dim(N, _Dim, _) :-
find_parameter_dim(N, (DimT, DimV), _) :-
number(N),
!.
!,
DimT #= 0,
DimV #= 0.
find_parameter_dim('Time', (DimT, DimV), _) :-
!,
......@@ -274,11 +274,9 @@ find_parameter_dim(M, (DimT, DimV), _) :-
DimV #= -1.
find_parameter_dim(P, (DimT, DimV), L) :-
parameter_value(P, _), %FF should check the expression
(
(
parameter_value(P, _), %FF should check the expression
member(((DT, DV) - P), L)
)
member(((DT, DV) - P), L)
->
DimT #= DT,
DimV #= DV
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment