ITERMD	Auteur	Michel Delorme	Logiciel Libre	Free software
____________________
First exec the demos to have an idea of the soft.
And then learn from the demos. (Modification or creation)

rendezvous: Simple example: rendezvous.c source (with more comments)
fermsucre: sugar fermentation kinetics
chute: parachute drop
nageur/swimmer: crossing a river
pansolaire: simulation cycle of a water tank heated by solar panels.
  (See example data read from a file)
newton: Example of use of the application for mathematical calculations per iteration.
poursuite: curve of chase (curve of the dog)

Note: All simulations are made with fancy data or calculations.

__________________________howto create a simulation.
create a directory under 'itermd'.
1.
copy one demo's makefile
-change the first line (TARGET) by entering the name of your executable, which is also the name of your source.
-register.
2
copy one source simulation already done, rename it.
change by search/replace.
eg change DATA_RDV by DATA_MASIM (masimul),
 ini_rdv by  Masim
define your data and windows.
3
program your simulation and its graph in function calcul().

In the terminal open on your directory type 'make'.
_____________________________________

_________________________________________________
Templete of the source of a simulation are:
________________
Setting all the data required for the simulation necessarily in a structure.
example:
typedef struct {
gfloat tps / / Time counter
....
gfloat disv2 / / km traveled by car 2
gfloat vitesv2 / / 2 car speed in km / h
char state [16];
gfloat disv1v2 / / distance separating the two cars
etc.
DATA_RDV};

________________
Declaration and initialization (for the first display or calculation)
example:
DATA_RDV ini_rdv = {
0, // ​​gfloat tps // Time counter
...
0, // ​​gfloat disv2 // km traveled by car 2
45 // gfloat vitesv2 // car 2 speed in km / h
"inactive", // char state [15];
0, // ​​gfloat disv1v2 // distance separating the two cars
};
______
If you need the values ​​calculated in the previous iteration, we declare a data backup.
DATA_RDV sv_rdv;

__________________________
Definition of the window display and data entry
a line for each data
DEF_L_F2C ini_f1 [] = {
{NULL, NULL, NULL,DEPS(vitesv2), SAISNUM, 5, &fonc_control, "% 0.0f", "car 2 speed in km / h"},
{NULL, NULL, NULL,DEPS(disv2),LIBNUM, 20, NULL, "% 0.2f", "km traveled by V2"}
_____
window
address table with its contents (ini_f1)
F2C f1 = {  etc
________________________
Definition of the graphics window (if needed)
FENGRA fg = { etc
______________________________________
Program entry point (main)
with call modevmenu() and inifen();

_______________modevmenu ()
Menu standart simulation
Button 'Pas a pas' (Step by step) ': performs a single iteration and stop (function call' action ')
Button 'Demarre' (GO) ': loop on the' action 'as it returns TRUE
Button 'Stop': stop  the loop 
Button Re_init "function call fraz () programmed by the user.

_______________inifen ()
Creating and viewing windows defined

cre_fen2c_sais( (F2C *) &f1, (DATA_RDV*) &ini_rdv); // creation
aff_fen2c_sais( (F2C *) &f1, (DATA_RDV*) &ini_rdv); // display data
gtk_widget_show_all (f1.win) // display by gtk

/ ________fen graphique______________________
crefengra ((FENGRA *) &fg.wingrap); / / creation
gtk_widget_show_all (fg.wingrap); / / display by gtk

the variable 'tousles' defined periodicity of call iteration in 1000th of second.
Do in inifen() all necessary initialization processing at startup of the application.

_____________fonction action () (name reserved)
activated by the buttons 'Demarre' and 'Pas a Pas'.
Typically the user must call the function 'calcul()' that returns TRUE or FALSE to loop or to stop.

_____________fonction calcul()
It is here that the user programs his  simulation.

____________fonction fraz () (name reserved)
The user resets data to restart the simulation.
and / or specific initialization process (reading data from a file for example)
