1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
|
//genesis
/**********************************************************************
** This program is part of kinetikit and is
** copyright (C) 1995-1997 Upinder S. Bhalla.
** It is made available under the terms of the GNU General Public License.
** See the file COPYRIGHT for the full notice.
**********************************************************************/
/* This is the kinetic simulation builder */
if (!{exists /kinetics})
include PARMS.g
include ksim.g
/* load in the user preferences or the automatically saved ones */
if (DO_X)
include xaboutkkit.g
make_xabout
xshow /about
xflushevents
include xinterface.g
/*
if (DO_PSEARCH)
include psearch/psearch.g
end
*/
include xaxis.g
include xgraphs.g
include xsave.g
else
include batch_interface.g
end
/* These files must be organized as functions only, which handle
** the DO_X option correctly */
include xgroup.g
include xpool.g
include xreac.g
include xenz.g
include xstim.g
include xtab.g
include xchan.g
function make_sim
str name
ce /
setclock {FASTCLOCK} {FASTDT}
setclock {SIMCLOCK} {SIMDT}
setclock {CONTROLCLOCK} {CONTROLDT}
setclock {PLOTCLOCK} {PLOTDT}
// setclock {TABLECLOCK} {TABLEDT} Not used any more
/* calling the assorted builder functions */
kbegin
if (DO_X)
xbegin
/* Graph specific creation funcs */
make_xgraphs
else
make_batch_interface
end
// initializing the interface components
init_xgroup
init_xpool
init_xreac
init_xenz
init_xstim
init_xtab
init_xchan
if (DO_X)
/* parameter search stuff */
/*
if (DO_PSEARCH)
pbegin
end
*/
xend
end
// swap out the current simulation context for dumps so
// that loading in a model will not overwrite it.
swapdump
reset
end
make_sim
maxerrors 100
end
|