Commit 8594410a authored by FAGES Francois's avatar FAGES Francois
Browse files

TD1 et TD2, doc de plot et odefunction

parent e923d6f7
......@@ -112,7 +112,7 @@ unit_tests: biocham_debug
# slow tests too
test: biocham_debug
echo "flag(slow_test, _, true), run_tests_and_halt." | ./biocham_debug
echo "flag(slow_test, _, false), run_tests_and_halt." | ./biocham_debug
$(MAKE) jupyter_tests
jupyter_tests: install_kernel
......@@ -120,7 +120,7 @@ jupyter_tests: install_kernel
# runs test unit %
test_%: biocham_debug
echo "flag(slow_test, _, true), run_tests_and_halt('$*')." | ./biocham_debug
echo "flag(slow_test, _, false), run_tests_and_halt('$*')." | ./biocham_debug
install_kernel: biocham $(KERNEL_DIR)/commands.js $(KERNEL_DIR)/commands.py $(WORKFLOWS_DIR)/workflows.js
- pip3 install --user $(JUPYTER_DIR)/kernel || pip install --user $(JUPYTER_DIR)/kernel
......
......@@ -407,30 +407,11 @@ add_function(FunctionList) :-
import_reactions_from_ode_system(OdeSystem),
delete_item(OdeSystem).
%% compile_program_file(+InputFile:input_file) is det
%
% Compile the high-level language program from file.
% Transform the terms in a file into internal list format of 'add_function'.
compile_program_file( InputFile ) :-
biocham_command,
type( InputFile, input_file ),
option( 'simplify_variable_init', yesno, _,
'set if the variable initialization in program need to be simplified to \\emph{present} command' ),
option( 'zero_ultra_mm', yesno, _,
'set the kinetics of zero-order ultrasensitivity to Michaelis-Menten kinetics' ),
devdoc( "Transform the terms in a file into internal list format of 'add_function'." ),
doc( "Compile the high-level language program from file." ),
access_file( InputFile, read ),
!,
open( InputFile, read, File ),
compile( File ),
close( File ).
%% compile_program(+InputFile:atom) is det
%
% Compile the high-level language program from atom.
% Transform the terms in an atom into internal list format of 'add_function'.
% Compiles a high-level imperative program from a string.
% Transform the terms in the string into an internal list format for 'add_function'.
compile_program( Program ) :-
biocham_command,
type( Program, atom ),
......@@ -450,9 +431,9 @@ compile_program( Program ) :-
biocham( numerical_simulation( time: 20 ) ),
biocham( plot( show:{ x_p, x_n, y_p, y_n, z_p, z_n } ) ),
doc( "Here is an example shows the compilation result of euclid division: "),
biocham_silent( clear_model ),
biocham( compile_program( 'a := 7, b := 3. while( a >= b ). t1 := a - b, t2 := q + 1. a := t1, q := t2. endwhile. r := a.', simplify_variable_init: yes, zero_ultra_mm: yes ) ),
% doc( "Here is an example shows the compilation result of euclid division: "),
% biocham_silent( clear_model ),
% biocham( compile_program( 'a := 7, b := 3. while( a >= b ). t1 := a - b, t2 := q + 1. a := t1, q := t2. endwhile. r := a.', simplify_variable_init: yes, zero_ultra_mm: yes ) ),
% FIXME tooooooo slow
% biocham( numerical_simulation( time: 200 ) ),
% biocham( plot( show:{ a_p, a_n, b_p, b_n, q_p, q_n, r_p, r_n } ) ),
......@@ -464,6 +445,27 @@ compile_program( Program ) :-
compile( Stream ),
close( Stream ).
%% compile_program_file(+InputFile:input_file) is det
%
% Compiles a high-level imperative program file.
% Transforms the terms in the file into an internal list format for 'add_function'.
compile_program_file( InputFile ) :-
biocham_command,
type( InputFile, input_file ),
option( 'simplify_variable_init', yesno, _,
'set if the variable initialization in program need to be simplified to \\emph{present} command' ),
option( 'zero_ultra_mm', yesno, _,
'set the kinetics of zero-order ultrasensitivity to Michaelis-Menten kinetics' ),
devdoc( "Transform the terms in a file into internal list format of 'add_function'." ),
doc( "Compile the high-level language program from file." ),
access_file( InputFile, read ),
!,
open( InputFile, read, File ),
compile( File ),
close( File ).
%% create_ode(+FunctionList:list, +OdeSystem:'ode system') is det
%
% Compile the _FunctionList_ into PIVP.
......
......@@ -40,7 +40,7 @@ plot :-
),
option(
show, {object}, Show,
'Restricts the plot to the given set of objects; everything will be
'Restricts the plot to the given set of objects and functions; everything will be
plotted if the set is empty'
),
option(
......@@ -48,7 +48,7 @@ plot :-
'Selects the X axis for the plot, defaulting to Time.'
),
doc('
plots the current trace.
plots the current trace. After a simulation, the trace is composed of molecular concentrations and user-defined functions over time.
\\begin{example}'
),
handle_show(Show),
......
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