[idmclib commit] r181 - wiki

0 views
Skip to first unread message

codesite...@google.com

unread,
Jul 6, 2007, 5:06:39 PM7/6/07
to idmc-di...@googlegroups.com
Author: antonio.fabio
Date: Fri Jul 6 14:06:37 2007
New Revision: 181

Modified:
wiki/RiDMC_demo.wiki

Log:
Edited wiki page through web user interface.


Modified: wiki/RiDMC_demo.wiki
==============================================================================
--- wiki/RiDMC_demo.wiki (original)
+++ wiki/RiDMC_demo.wiki Fri Jul 6 14:06:37 2007
@@ -5,9 +5,9 @@
the `RiDMC` package.

= Load the library =
-Load `RiDMC` by:
{{{
-library(RiDMC)
+>library(RiDMC)
+loaded idmclib version 0.7.0
}}}

= Example model files =
@@ -20,16 +20,29 @@
for the list of available models. On my pc, I get:
{{{
The following example models are available:
- [1] "cremona" "gingerman" "henon" "ikeda" "logistic"
- [6] "lorenz" "lv" "msmith" "quasi2" "rossler"
-[11] "rotor" "silnikov" "sinecircle" "standard" "tent"
-[16] "tinkerbell"
+ [1] "cremona" "Economic/bh" "Economic/cournotad"
+ [4] "Economic/cournot" "Economic/diamond" "Economic/olg1"
+ [7] "Economic/olgns" "Economic/ramsey" "Economic/solow"
+[10] "gingerman" "henon" "ikeda"
+[13] "logistic" "lorenz" "lv"
+[16] "msmith" "Primer/con2d" "Primer/cona"
+[19] "Primer/conbif" "Primer/conb" "Primer/conlocal"
+[22] "Primer/conlyapa" "Primer/conlyapb" "Primer/conpar"
+[25] "Primer/disa" "Primer/disbif" "Primer/disparlag"
+[28] "Primer/dispar" "Primer/flip" "Primer/hopf"
+[31] "Primer/logistic" "Primer/quasi" "Primer/vanderpol"
+[34] "quasi2" "rossler" "rotor"
+[37] "silnikov" "sinecircle" "standard"
+[40] "tent" "tinkerbell"
}}}

Each model file can be exactly located by `exModelFile('model_name')`. I.e.:
{{{
-> exModelFile('lorenz')
-[1] "/media/hda6/usr/local/lib/R/library/RiDMC/models/lorenz.lua"
+exModelFile('Primer/logistic')
+}}}
+output:
+{{{
+[1] "/usr/local/lib/R/library/RiDMC/models/Primer/logistic.lua"
}}}

= Loading a model =
@@ -40,12 +53,15 @@
With this code, we load the `logistic` example model,
and store it in the object `m`:
{{{
-> m <- Model(exModelFile('logistic'))
+m <- Model(exModelFile('logistic'))
}}}

The stored object can be inspected by direct printing and `summary`:
{{{
-> m
+m
+}}}
+gives:
+{{{
= iDMC model text =
name = "Logistic"
description = "See Model refs in user's guide"
@@ -65,8 +81,12 @@

return mu - 2 * mu * x
end
-
-> summary(m)
+}}}
+{{{
+summary(m)
+}}}
+gives
+{{{
= iDMC model =
Name: Logistic
Description: See Model refs in user's guide
@@ -82,9 +102,11 @@
##Load model:
model <- Model(exModelFile('lorenz'))
##Compute trajectory:
-trajectory <- CTrajectory(model,
- c(10, 28, 2.667), c(1.0, 2.0, 1.0),
- 0.005, 0, nsteps=20000, transient=1000 )
+trajectory <- Trajectory(model,
+ c(10,28,2.667),
+ c(1.0,2.0,1.0),
+ time=200, transient=100,
+ eps=0.005)
##Plot it:
plot(trajectory)
}}}
@@ -95,10 +117,10 @@
m <- Model(exModelFile('logistic'))
bf <- Bifurcation(m, par=1, var=0.3, par.min=2.5, par.max=4.0)

-par(mfrow=c(2,1))
-le <- LyapunovExponents(m, par=1, var=0.3, par.min=2.5, par.max=4.0, time=500)
+par(mfrow=c(2,1), mar=c(2,2,4,1))
plot(le)
abline(h=0, col="gray")
+par(mar=c(4,2,4,1))
plot(bf, cex=0.15)
}}}
http://antonio.fabio.googlepages.com/RiDMC_bifLyap.png
@@ -109,4 +131,5 @@
b <- Basin(m, c(1.42,0.3), c(-2,2), 200, c(-2, 2), 200, 1000, 1000)
plot(b)
}}}
-http://antonio.fabio.googlepages.com/RiDMC_basinHenon.png
\ No newline at end of file
+http://antonio.fabio.googlepages.com/RiDMC_basinHenon.png
+

Reply all
Reply to author
Forward
0 new messages