(************** Content-type: application/mathematica **************
                     CreatedBy='Mathematica 5.0'

                    Mathematica-Compatible Notebook

This notebook can be used with any Mathematica-compatible
application, such as Mathematica, MathReader or Publicon. The data
for the notebook starts with the line containing stars above.

To get the notebook into a Mathematica-compatible application, do
one of the following:

* Save the data starting with the line of stars above into a file
  with a name ending in .nb, then open the file inside the
  application;

* Copy the data starting with the line of stars above to the
  clipboard, then use the Paste menu command inside the application.

Data for notebooks contains only printable 7-bit ASCII and can be
sent directly in email or through ftp in text mode.  Newlines can be
CR, LF or CRLF (Unix, Macintosh or MS-DOS style).

NOTE: If you modify the data for this notebook not in a Mathematica-
compatible application, you must delete the line below containing
the word CacheID, otherwise Mathematica-compatible applications may
try to use invalid cache data.

For more information on notebooks and Mathematica-compatible 
applications, contact Wolfram Research:
  web: http://www.wolfram.com
  email: info@wolfram.com
  phone: +1-217-398-0700 (U.S.)

Notebook reader applications are available free of charge from 
Wolfram Research.
*******************************************************************)

(*CacheID: 232*)


(*NotebookFileLineBreakTest
NotebookFileLineBreakTest*)
(*NotebookOptionsPosition[     23582,        551]*)
(*NotebookOutlinePosition[     29078,        682]*)
(*  CellTagsIndexPosition[     28969,        675]*)
(*WindowFrame->Normal*)



Notebook[{

Cell[CellGroupData[{
Cell["DeleteModel", "ObjectName",
  CellTags->{"b:4", "LocalInteractions:11"}],

Cell[TextData[{
  "\[FilledSmallSquare] ",
  StyleBox["DeleteModel[", "Input",
    FontWeight->"Plain"],
  StyleBox["model ",
    FontSlant->"Italic"],
  "]",
  StyleBox[" ", "Input",
    FontWeight->"Plain"],
  "deletes the ",
  StyleBox["model",
    FontSlant->"Italic"],
  ", closes the Java frame displaying the model (if it is open) and releases \
as many Java resources as it can. \n\[FilledSmallSquare] ",
  StyleBox["DeleteModel[", "Input",
    FontWeight->"Plain"],
  StyleBox["model1, model2,... ",
    FontSlant->"Italic"],
  "]",
  StyleBox[" ", "Input",
    FontWeight->"Plain"],
  "deletes all of the specified models."
}], "Usage",
  CellTags->{"b:4", "LocalInteractions:11"}],

Cell[TextData[{
  "\[FilledSmallSquare] Even after the model is deleted, sometimes Java \
resources will continue to be used because objects associated with the model \
are being held by the ",
  StyleBox["Mathematica",
    FontSlant->"Italic"],
  " front end."
}], "Notes",
  CellTags->{"b:4", "LocalInteractions:11"}],

Cell[TextData[{
  "\[FilledSmallSquare] See also ",
  ButtonBox["ReleaseJavaObject",
    ButtonData:>"J/Link 1.2.3.2",
    ButtonStyle->"AddOnsLink"],
  "."
}], "Notes",
  CellTags->{"b:4", "LocalInteractions:11"}],

Cell[CellGroupData[{

Cell["Example", "ExampleSection",
  CellTags->{"b:4", "LocalInteractions:11"}],

Cell["\<\
Here is a simple local interaction model for a pure coordination \
game.\
\>", "Text",
  CellTags->{"b:4", "LocalInteractions:11"}],

Cell[BoxData[
    RowBox[{
      RowBox[{"pc", "=", 
        RowBox[{"LocalInteractionModel", "[", "\[IndentingNewLine]", 
          
          RowBox[{\(InteractionNeighborhood \[Rule] Cycle[10]\), ",", 
            "\[IndentingNewLine]", 
            RowBox[{"PayoffMatrix", "\[Rule]", 
              RowBox[{"(", GridBox[{
                    {\({1, 1}\), \({0, 0}\)},
                    {\({0, 0}\), \({1, 1}\)}
                    }], ")"}]}], ",", 
            "\[IndentingNewLine]", \(StrategyColors \[Rule] {Red, Green}\)}], 
          "\[IndentingNewLine]", "]"}]}], ";"}]], "Input",
  CellLabel->"In[2]:=",
  CellTags->{"b:4", "LocalInteractions:11"}],

Cell[CellGroupData[{

Cell[BoxData[
    \(\(ShowGraph[pc];\)\)], "Input",
  CellLabel->"In[4]:=",
  CellTags->{"b:4", "LocalInteractions:11"}],

Cell[GraphicsData["PostScript", "\<\
%!
%%Creator: Mathematica
%%AspectRatio: 1 
MathPictureStart
/Mabs {
Mgmatrix idtransform
Mtmatrix dtransform
} bind def
/Mabsadd { Mabs
3 -1 roll add
3 1 roll add
exch } bind def
%% Graphics
%%IncludeResource: font Courier
%%IncludeFont: Courier
/Courier findfont 10  scalefont  setfont
% Scaling calculations
0.0454545 0.909091 0.012654 0.95143 [
[ 0 0 0 0 ]
[ 1 1 0 0 ]
] MathScale
% Start of Graphics
1 setlinecap
1 setlinejoin
newpath
0 0 m
1 0 L
1 1 L
0 1 L
closepath
clip
newpath
0 0 0 r
.005 w
[ ] 0 setdash
.86773 .7796 m
.64045 .95243 L
s
.86773 .7796 m
.95455 .50002 L
s
.64045 .95243 m
.3595 .95243 L
s
.3595 .95243 m
.13223 .7796 L
s
.13223 .7796 m
.04545 .50002 L
s
.04545 .50002 m
.13223 .2204 L
s
.13223 .2204 m
.3595 .04757 L
s
.3595 .04757 m
.64045 .04757 L
s
.64045 .04757 m
.86773 .2204 L
s
.86773 .2204 m
.95455 .50002 L
s
1 0 0 r
.025 w
.86773 .7796 Mdot
.64045 .95243 Mdot
.3595 .95243 Mdot
0 1 0 r
.13223 .7796 Mdot
1 0 0 r
.04545 .50002 Mdot
.13223 .2204 Mdot
0 1 0 r
.3595 .04757 Mdot
.64045 .04757 Mdot
.86773 .2204 Mdot
1 0 0 r
.95455 .50002 Mdot
% End of Graphics
MathPictureEnd
\
\>"], "Graphics",
  CellLabel->"From In[4]:=",
  ImageSize->{225, 225},
  ImageMargins->{{0, 0}, {0, 0}},
  ImageRegion->{{0, 1}, {0, 1}},
  ImageCache->GraphicsData["Bitmap", "\<\
CF5dJ6E]HGAYHf4PAg9QL6QYHg<PAVmbKF5d0`40003Q0000hB000`400?l00000o`00003ohOooool0
0>7ooooo003Qooooo`00hOooool00>7ooooo003Qooooo`00hOooool00>7ooooo003Qooooo`00Cooo
ool3o`3o03cooooo0ol0o`1@ooooo`00C_ooool5o`3o03[ooooo1Ol0o`1?ooooo`00C_ooool5o`3o
03[o00001Ol0o`1?ooooo`00C_ooool5o`3o03[ooooo1Ol0o`1?ooooo`00COooool00ol0003ooooo
o`3o0002o`3o03cooooo0ol0o`000ooooooo0000ooooo`1=ooooo`00Boooool2o`0004Kooooo0_l0
001<ooooo`00B_ooool00ol0003oooooooooo`18ooooo`03o`000?oooooooooo04Wooooo0019oooo
o`03o`000?oooooooooo04[ooooo00?o0000ooooooooool0B?ooool004Oooooo0_l0001>ooooo`;o
0000B?ooool004Kooooo00?o0000ooooooooool0D?ooool00ol0003oooooooooo`15ooooo`00AOoo
ool00ol0003oooooooooo`1Booooo`03o`000?oooooooooo04Cooooo0014ooooo`03o`000?oooooo
oooo05Cooooo00?o0000ooooooooool0@oooool004;ooooo0_l0001Hooooo`;o0000@oooool0047o
oooo00?o0000ooooooooool0F_ooool00ol0003oooooooooo`10ooooo`00@?ooool00ol0003ooooo
ooooo`1Looooo`03o`000?oooooooooo03oooooo000nooooo`;o0000H?ooool2o`0003oooooo000m
ooooo`03o`000?oooooooooo06;ooooo00?o0000ooooooooool0??ooool003cooooo00?o0000oooo
ooooool0I?ooool00ol0003oooooooooo`0kooooo`00>_ooool2o`0006Sooooo0_l0000kooooo`00
>Oooool00ol0003oooooooooo`1Zooooo`03o`000?oooooooooo03Sooooo000hooooo`03o`000?oo
oooooooo06cooooo00?o0000ooooooooool0=oooool003Kooooo0_l0001`ooooo`;o0000=oooool0
03Gooooo00?o0000ooooooooool0L_ooool00ol0003oooooooooo`0dooooo`00=?ooool00ol0003o
ooooooooo`1dooooo`03o`000?oooooooooo03?ooooo000cooooo`03o`000?oooooooooo07Kooooo
00?o0000ooooooooool0<_ooool0037ooooo0_l0001jooooo`;o0000<_ooool0033ooooo00?o0000
ooooooooool0O?ooool00ol0003oooooooooo`0_ooooo`00;oooool00ol0003oooooooooo`1noooo
o`03o`000?oooooooooo02kooooo000]ooooo`;o0000P_ooool2o`0002kooooo000/ooooo`03o`00
0?oooooooooo08Cooooo00?o0000ooooooooool0:oooool002_ooooo00?o0000ooooooooool0Q_oo
ool00ol0003oooooooooo`0Zooooo`00:Oooool2o`0008[ooooo0_l0000Zooooo`00:?ooool00ol0
003oooooooooo`2<ooooo`03o`000?oooooooooo02Oooooo000Wooooo`03o`000?oooooooooo08ko
oooo00?o0000ooooooooool09_ooool002Gooooo0_l0002Booooo`;o00009_ooool002Cooooo00?o
0000ooooooooool0U?ooool00ol0003oooooooooo`0Sooooo`008oooool00ol0003oooooooooo`2F
ooooo`03o`000?oooooooooo02;ooooo000Rooooo`03o`000?oooooooooo09Sooooo00?o0000oooo
ooooool08Oooool0023ooooo0_l0002Looooo`;o00008Oooool001cooooo0ooo00000ol0003ooooo
ooooo`2Nooooo`04o`000?l0o`3o0?l0o`3o01gooooo000Kooooo`Goo`00X?ooool5o`3o01cooooo
000Kooooo`Goo`00X?ooool5o`3o01cooooo000Kooooo`Goo`00X?ooool5o`3o01cooooo000Loooo
o`?oo`00X_ooool3o`3o01gooooo000Looooo`03o`000?oooooooooo0:Cooooo00?o0000oooooooo
ool06oooool001cooooo00?o0000ooooooooool0Y?ooool00ol0003oooooooooo`0Kooooo`007?oo
ool00ol0003oooooooooo`2Tooooo`03o`000?oooooooooo01_ooooo000Kooooo`03o`000?oooooo
oooo0:Kooooo00?o0000ooooooooool06_ooool001_ooooo00?o0000ooooooooool0Y_ooool00ol0
003oooooooooo`0Jooooo`006oooool00ol0003oooooooooo`2Vooooo`03o`000?oooooooooo01[o
oooo000Jooooo`03o`000?oooooooooo0:Sooooo00?o0000ooooooooool06Oooool001[ooooo00?o
0000ooooooooool0Z?ooool00ol0003oooooooooo`0Iooooo`006_ooool00ol0003oooooooooo`2X
ooooo`03o`000?oooooooooo01Wooooo000Jooooo`03o`000?oooooooooo0:Sooooo00?o0000oooo
ooooool06Oooool001Wooooo00?o0000ooooooooool0Z_ooool00ol0003oooooooooo`0Hooooo`00
6Oooool00ol0003oooooooooo`2Zooooo`03o`000?oooooooooo01Sooooo000Iooooo`03o`000?oo
oooooooo0:[ooooo00?o0000ooooooooool06?ooool001Sooooo00?o0000ooooooooool0[?ooool0
0ol0003oooooooooo`0Gooooo`006?ooool00ol0003oooooooooo`2/ooooo`03o`000?oooooooooo
01Oooooo000Hooooo`03o`000?oooooooooo0:cooooo00?o0000ooooooooool05oooool001Oooooo
00?o0000ooooooooool0[_ooool00ol0003oooooooooo`0Fooooo`005oooool00ol0003ooooooooo
o`2^ooooo`03o`000?oooooooooo01Kooooo000Gooooo`03o`000?oooooooooo0:kooooo00?o0000
ooooooooool05_ooool001Oooooo00?o0000ooooooooool0[_ooool00ol0003oooooooooo`0Foooo
o`005_ooool00ol0003oooooooooo`2`ooooo`03o`000?oooooooooo01Gooooo000Fooooo`03o`00
0?oooooooooo0;3ooooo00?o0000ooooooooool05Oooool001Kooooo00?o0000ooooooooool0/?oo
ool00ol0003oooooooooo`0Eooooo`005Oooool00ol0003oooooooooo`2booooo`03o`000?oooooo
oooo01Cooooo000Eooooo`03o`000?oooooooooo0;;ooooo00?o0000ooooooooool05?ooool001Go
oooo00?o0000ooooooooool0/_ooool00ol0003oooooooooo`0Dooooo`005?ooool00ol0003ooooo
ooooo`2dooooo`03o`000?oooooooooo01?ooooo000Dooooo`03o`000?oooooooooo0;Cooooo00?o
0000ooooooooool04oooool001Cooooo00?o0000ooooooooool0]?ooool00ol0003oooooooooo`0C
ooooo`004oooool00ol0003oooooooooo`2fooooo`03o`000?oooooooooo01;ooooo000Cooooo`03
o`000?oooooooooo0;Kooooo00?o0000ooooooooool04_ooool001?ooooo00?o0000ooooooooool0
]_ooool00ol0003oooooooooo`0Booooo`004oooool00ol0003oooooooooo`2fooooo`03o`000?oo
oooooooo01;ooooo000Booooo`03o`000?oooooooooo0;Sooooo00?o0000ooooooooool04Oooool0
01;ooooo00?o0000ooooooooool0^?ooool00ol0003oooooooooo`0Aooooo`004_ooool00ol0003o
ooooooooo`2hooooo`03o`000?oooooooooo017ooooo000Aooooo`03o`000?oooooooooo0;[ooooo
00?o0000ooooooooool04?ooool0017ooooo00?o0000ooooooooool0^_ooool00ol0003ooooooooo
o`0@ooooo`004Oooool00ol0003oooooooooo`2jooooo`03o`000?oooooooooo013ooooo000@oooo
o`03o`000?oooooooooo0;cooooo00?o0000ooooooooool03oooool0013ooooo00?o0000oooooooo
ool0_?ooool00ol0003oooooooooo`0?ooooo`004?ooool00ol0003oooooooooo`2looooo`03o`00
0?oooooooooo00oooooo000@ooooo`03o`000?oooooooooo0;cooooo00?o0000ooooooooool03ooo
ool000oooooo00?o0000ooooooooool0__ooool00ol0003oooooooooo`0>ooooo`003oooool00ol0
003oooooooooo`2nooooo`03o`000?oooooooooo00kooooo000?ooooo`03o`000?oooooooooo0;ko
oooo00?o0000ooooooooool03_ooool000kooooo00?o0000ooooooooool0`?ooool00ol0003ooooo
ooooo`0=ooooo`003_ooool00ol0003oooooooooo`30ooooo`03o`000?oooooooooo00gooooo000>
ooooo`03o`000?oooooooooo0<3ooooo00?o0000ooooooooool03Oooool000gooooo00?o0000oooo
ooooool0`_ooool00ol0003oooooooooo`0<ooooo`003Oooool00ol0003oooooooooo`32ooooo`03
o`000?oooooooooo00cooooo000=ooooo`03o`000?oooooooooo0<;ooooo00?o0000ooooooooool0
3?ooool000gooooo00?o0000ooooooooool0`_ooool00ol0003oooooooooo`0<ooooo`003?ooool0
0ol0003oooooooooo`34ooooo`03o`000?oooooooooo00_ooooo000<ooooo`03o`000?oooooooooo
0<Cooooo00?o0000ooooooooool02oooool000cooooo00?o0000ooooooooool0a?ooool00ol0003o
ooooooooo`0;ooooo`002oooool00ol0003oooooooooo`36ooooo`03o`000?oooooooooo00[ooooo
000;ooooo`03o`000?oooooooooo0<Kooooo00?o0000ooooooooool02_ooool000Sooooo0ooo0000
0ol0003oooooooooo`36ooooo`?oo`002_ooool000Oooooo1Ooo0037ooooo`Goo`002Oooool000Oo
oooo1Ooo0037ooooo`Goo`002Oooool000Oooooo1Ooo0037ooooo`Goo`002Oooool000Sooooo0ooo
0039ooooo`?oo`002_ooool000_ooooo00?o0000ooooooooool0a_ooool00ol0003oooooooooo`0:
ooooo`002oooool00ol0003oooooooooo`36ooooo`03o`000?oooooooooo00[ooooo000;ooooo`03
o`000?oooooooooo0<Kooooo00?o0000ooooooooool02_ooool000cooooo00?o0000ooooooooool0
a?ooool00ol0003oooooooooo`0;ooooo`003?ooool00ol0003oooooooooo`34ooooo`03o`000?oo
oooooooo00_ooooo000<ooooo`03o`000?oooooooooo0<Cooooo00?o0000ooooooooool02oooool0
00gooooo00?o0000ooooooooool0`_ooool00ol0003oooooooooo`0<ooooo`003Oooool00ol0003o
ooooooooo`32ooooo`03o`000?oooooooooo00cooooo000=ooooo`03o`000?oooooooooo0<;ooooo
00?o0000ooooooooool03?ooool000kooooo00?o0000ooooooooool0`?ooool00ol0003ooooooooo
o`0=ooooo`003_ooool00ol0003oooooooooo`30ooooo`03o`000?oooooooooo00gooooo000>oooo
o`03o`000?oooooooooo0<3ooooo00?o0000ooooooooool03Oooool000kooooo00?o0000oooooooo
ool0`?ooool00ol0003oooooooooo`0=ooooo`003oooool00ol0003oooooooooo`2nooooo`03o`00
0?oooooooooo00kooooo000?ooooo`03o`000?oooooooooo0;kooooo00?o0000ooooooooool03_oo
ool000oooooo00?o0000ooooooooool0__ooool00ol0003oooooooooo`0>ooooo`004?ooool00ol0
003oooooooooo`2looooo`03o`000?oooooooooo00oooooo000@ooooo`03o`000?oooooooooo0;co
oooo00?o0000ooooooooool03oooool0013ooooo00?o0000ooooooooool0_?ooool00ol0003ooooo
ooooo`0?ooooo`004Oooool00ol0003oooooooooo`2jooooo`03o`000?oooooooooo013ooooo000A
ooooo`03o`000?oooooooooo0;[ooooo00?o0000ooooooooool04?ooool0017ooooo00?o0000oooo
ooooool0^_ooool00ol0003oooooooooo`0@ooooo`004_ooool00ol0003oooooooooo`2hooooo`03
o`000?oooooooooo017ooooo000Booooo`03o`000?oooooooooo0;Sooooo00?o0000ooooooooool0
4Oooool001;ooooo00?o0000ooooooooool0^?ooool00ol0003oooooooooo`0Aooooo`004_ooool0
0ol0003oooooooooo`2hooooo`03o`000?oooooooooo017ooooo000Cooooo`03o`000?oooooooooo
0;Kooooo00?o0000ooooooooool04_ooool001?ooooo00?o0000ooooooooool0]_ooool00ol0003o
ooooooooo`0Booooo`004oooool00ol0003oooooooooo`2fooooo`03o`000?oooooooooo01;ooooo
000Dooooo`03o`000?oooooooooo0;Cooooo00?o0000ooooooooool04oooool001Cooooo00?o0000
ooooooooool0]?ooool00ol0003oooooooooo`0Cooooo`005?ooool00ol0003oooooooooo`2doooo
o`03o`000?oooooooooo01?ooooo000Eooooo`03o`000?oooooooooo0;;ooooo00?o0000oooooooo
ool05?ooool001Gooooo00?o0000ooooooooool0/_ooool00ol0003oooooooooo`0Dooooo`005Ooo
ool00ol0003oooooooooo`2booooo`03o`000?oooooooooo01Cooooo000Eooooo`03o`000?oooooo
oooo0;;ooooo00?o0000ooooooooool05?ooool001Kooooo00?o0000ooooooooool0/?ooool00ol0
003oooooooooo`0Eooooo`005_ooool00ol0003oooooooooo`2`ooooo`03o`000?oooooooooo01Go
oooo000Fooooo`03o`000?oooooooooo0;3ooooo00?o0000ooooooooool05Oooool001Oooooo00?o
0000ooooooooool0[_ooool00ol0003oooooooooo`0Fooooo`005oooool00ol0003oooooooooo`2^
ooooo`03o`000?oooooooooo01Kooooo000Gooooo`03o`000?oooooooooo0:kooooo00?o0000oooo
ooooool05_ooool001Sooooo00?o0000ooooooooool0[?ooool00ol0003oooooooooo`0Gooooo`00
6?ooool00ol0003oooooooooo`2/ooooo`03o`000?oooooooooo01Oooooo000Hooooo`03o`000?oo
oooooooo0:cooooo00?o0000ooooooooool05oooool001Wooooo00?o0000ooooooooool0Z_ooool0
0ol0003oooooooooo`0Hooooo`006Oooool00ol0003oooooooooo`2Zooooo`03o`000?oooooooooo
01Sooooo000Iooooo`03o`000?oooooooooo0:[ooooo00?o0000ooooooooool06?ooool001Wooooo
00?o0000ooooooooool0Z_ooool00ol0003oooooooooo`0Hooooo`006_ooool00ol0003ooooooooo
o`2Xooooo`03o`000?oooooooooo01Wooooo000Jooooo`03o`000?oooooooooo0:Sooooo00?o0000
ooooooooool06Oooool001[ooooo00?o0000ooooooooool0Z?ooool00ol0003oooooooooo`0Ioooo
o`006oooool00ol0003oooooooooo`2Vooooo`03o`000?oooooooooo01[ooooo000Kooooo`03o`00
0?oooooooooo0:Kooooo00?o0000ooooooooool06_ooool001_ooooo00?o0000ooooooooool0Y_oo
ool00ol0003oooooooooo`0Jooooo`007?ooool00ol0003oooooooooo`2Tooooo`03o`000?oooooo
oooo01_ooooo000Looooo`03o`000?oooooooooo0:Cooooo00?o0000ooooooooool06oooool001co
oooo0ol0o`2Rooooo`?oo`007Oooool001_ooooo1Ol0o`2Pooooo`Goo`007?ooool001_ooooo1Ol0
o`2Pooooo`Goo`007?ooool001_ooooo1Ol0o`2Pooooo`Goo`007?ooool001cooooo0ol0o`000ooo
oooo0000ooooo`2Mooooo`03o`000?ooooooo`0000;oo`007Oooool0027ooooo0_l0002Jooooo`;o
00008_ooool002?ooooo00?o0000ooooooooool0U_ooool00ol0003oooooooooo`0Rooooo`009?oo
ool00ol0003oooooooooo`2Dooooo`03o`000?oooooooooo02?ooooo000Uooooo`;o0000T_ooool2
o`0002Kooooo000Wooooo`03o`000?oooooooooo08kooooo00?o0000ooooooooool09_ooool002So
oooo00?o0000ooooooooool0S?ooool00ol0003oooooooooo`0Wooooo`00:Oooool00ol0003ooooo
ooooo`2:ooooo`03o`000?oooooooooo02Sooooo000Zooooo`;o0000R?ooool2o`0002_ooooo000/
ooooo`03o`000?oooooooooo08Cooooo00?o0000ooooooooool0:oooool002gooooo00?o0000oooo
ooooool0P_ooool00ol0003oooooooooo`0/ooooo`00;_ooool2o`00083ooooo0_l0000_ooooo`00
<?ooool00ol0003oooooooooo`1looooo`03o`000?oooooooooo02oooooo000aooooo`03o`000?oo
oooooooo07[ooooo00?o0000ooooooooool0<?ooool003;ooooo0_l0001hooooo`;o0000<oooool0
03Cooooo00?o0000ooooooooool0M?ooool00ol0003oooooooooo`0cooooo`00=Oooool00ol0003o
ooooooooo`1booooo`03o`000?oooooooooo03Cooooo000fooooo`;o0000L?ooool2o`0003Oooooo
000hooooo`03o`000?oooooooooo06cooooo00?o0000ooooooooool0=oooool003Wooooo00?o0000
ooooooooool0J_ooool00ol0003oooooooooo`0hooooo`00>_ooool00ol0003oooooooooo`1Xoooo
o`03o`000?oooooooooo03Wooooo000kooooo`;o0000I_ooool2o`0003cooooo000mooooo`03o`00
0?oooooooooo06;ooooo00?o0000ooooooooool0??ooool003kooooo00?o0000ooooooooool0H?oo
ool00ol0003oooooooooo`0mooooo`00?oooool2o`0005kooooo0_l00010ooooo`00@Oooool00ol0
003oooooooooo`1Jooooo`03o`000?oooooooooo043ooooo0012ooooo`03o`000?oooooooooo05So
oooo00?o0000ooooooooool0@Oooool004?ooooo0_l0001Fooooo`;o0000A?ooool004Gooooo00?o
0000ooooooooool0D_ooool00ol0003oooooooooo`14ooooo`00A_ooool00ol0003oooooooooo`1@
ooooo`03o`000?oooooooooo04Gooooo0017ooooo`;o0000C_ooool2o`0004Sooooo0019ooooo`03
o`000?oooooooooo04[ooooo00?o0000ooooooooool0B?ooool004[ooooo00?o0000ooooooooool0
B?ooool00ol0003oooooooooo`19ooooo`00Boooool00ol0003oooooooooo`16ooooo`03o`000?oo
oooooooo04[ooooo001<ooooo`;o0000A?ooool2o`0004gooooo001>ooooo`04o`000?oo003oo`00
ool003cooooo0ooo00000ol0003oooooooooo`1=ooooo`00C_ooool5ool003[ooooo1Ooo001?oooo
o`00C_ooool5ool003[o00001Ooo001?ooooo`00C_ooool5ool003[ooooo1Ooo001?ooooo`00Cooo
ool3ool003cooooo0ooo001@ooooo`00hOooool00>7ooooo003Qooooo`00hOooool00>7ooooo003Q
ooooo`00hOooool00>7ooooo0000\
\>"],
  ImageRangeCache->{{{0, 224}, {224, 0}} -> {-0.0500054, -0.0133052, \
0.00491076, 0.00469223}},
  CellTags->{"b:4", "LocalInteractions:11"}]
}, Open  ]],

Cell[TextData[{
  "The following returns a list of all agents in the model to ",
  StyleBox["Mathematica",
    FontSlant->"Italic"],
  "."
}], "Text",
  CellTags->{"b:4", "LocalInteractions:11"}],

Cell[CellGroupData[{

Cell[BoxData[
    \(Agents[pc]\)], "Input",
  CellLabel->"In[5]:=",
  CellTags->{"b:4", "LocalInteractions:11"}],

Cell[BoxData[
    RowBox[{"{", 
      RowBox[{
        InterpretationBox[\(\[LeftGuillemet]JavaObject[
              "Agent"] \[RightGuillemet]\),
          JLink`Objects`JavaObject39521131429889], ",", 
        InterpretationBox[\(\[LeftGuillemet]JavaObject[
              "Agent"] \[RightGuillemet]\),
          JLink`Objects`JavaObject232247856726017], ",", 
        InterpretationBox[\(\[LeftGuillemet]JavaObject[
              "Agent"] \[RightGuillemet]\),
          JLink`Objects`JavaObject176498711461889], ",", 
        InterpretationBox[\(\[LeftGuillemet]JavaObject[
              "Agent"] \[RightGuillemet]\),
          JLink`Objects`JavaObject230769448452097], ",", 
        InterpretationBox[\(\[LeftGuillemet]JavaObject[
              "Agent"] \[RightGuillemet]\),
          JLink`Objects`JavaObject98422245818369], ",", 
        InterpretationBox[\(\[LeftGuillemet]JavaObject[
              "Agent"] \[RightGuillemet]\),
          JLink`Objects`JavaObject235795768147969], ",", 
        InterpretationBox[\(\[LeftGuillemet]JavaObject[
              "Agent"] \[RightGuillemet]\),
          JLink`Objects`JavaObject133550951104513], ",", 
        InterpretationBox[\(\[LeftGuillemet]JavaObject[
              "Agent"] \[RightGuillemet]\),
          JLink`Objects`JavaObject109504133857281], ",", 
        InterpretationBox[\(\[LeftGuillemet]JavaObject[
              "Agent"] \[RightGuillemet]\),
          JLink`Objects`JavaObject152743868104705], ",", 
        InterpretationBox[\(\[LeftGuillemet]JavaObject[
              "Agent"] \[RightGuillemet]\),
          JLink`Objects`JavaObject114581053636609]}], "}"}]], "Output",
  CellLabel->"Out[5]=",
  CellTags->{"b:4", "LocalInteractions:11"}]
}, Open  ]],

Cell["\<\
Deleting the model frees up some of the Java resources, but not \
all.\
\>", "Text",
  CellTags->{"b:4", "LocalInteractions:11"}],

Cell[BoxData[
    \(DeleteModel[pc]\)], "Input",
  CellLabel->"In[6]:=",
  CellTags->{"b:4", "LocalInteractions:11"}],

Cell["\<\
Calling the Java garbage collector tells us how many bytes were \
freed.\
\>", "Text",
  CellTags->{"b:4", "LocalInteractions:11"}],

Cell[CellGroupData[{

Cell[BoxData[
    \(JavaGC[]\)], "Input",
  CellLabel->"In[7]:=",
  CellTags->{"b:4", "LocalInteractions:11"}],

Cell[BoxData[
    \(211712\)], "Output",
  CellLabel->"Out[7]=",
  CellTags->{"b:4", "LocalInteractions:11"}]
}, Open  ]],

Cell[TextData[{
  "The ",
  StyleBox["Mathematica",
    FontSlant->"Italic"],
  " kernel still holds on to the 8 Agent objects that were returned to the \
front end, preventing them from being released."
}], "Text",
  CellTags->{"b:4", "LocalInteractions:11"}],

Cell[CellGroupData[{

Cell[BoxData[
    \(PeekObjects[]\)], "Input",
  CellLabel->"In[8]:=",
  CellTags->{"b:4", "LocalInteractions:11"}],

Cell[BoxData[
    RowBox[{"{", 
      RowBox[{
        InterpretationBox[\(\[LeftGuillemet]JavaObject[
              "Agent"] \[RightGuillemet]\),
          JLink`Objects`JavaObject133550951104513], ",", 
        InterpretationBox[\(\[LeftGuillemet]JavaObject[
              "Agent"] \[RightGuillemet]\),
          JLink`Objects`JavaObject114581053636609], ",", 
        InterpretationBox[\(\[LeftGuillemet]JavaObject[
              "Agent"] \[RightGuillemet]\),
          JLink`Objects`JavaObject232247856726017], ",", 
        InterpretationBox[\(\[LeftGuillemet]JavaObject[
              "Agent"] \[RightGuillemet]\),
          JLink`Objects`JavaObject235795768147969], ",", 
        InterpretationBox[\(\[LeftGuillemet]JavaObject[
              "Agent"] \[RightGuillemet]\),
          JLink`Objects`JavaObject176498711461889], ",", 
        InterpretationBox[\(\[LeftGuillemet]JavaObject[
              "Agent"] \[RightGuillemet]\),
          JLink`Objects`JavaObject98422245818369], ",", 
        InterpretationBox[\(\[LeftGuillemet]JavaObject[
              "Agent"] \[RightGuillemet]\),
          JLink`Objects`JavaObject109504133857281], ",", 
        InterpretationBox[\(\[LeftGuillemet]JavaObject[
              "Agent"] \[RightGuillemet]\),
          JLink`Objects`JavaObject152743868104705], ",", 
        InterpretationBox[\(\[LeftGuillemet]JavaObject[
              "Agent"] \[RightGuillemet]\),
          JLink`Objects`JavaObject39521131429889], ",", 
        InterpretationBox[\(\[LeftGuillemet]JavaObject[
              "Agent"] \[RightGuillemet]\),
          JLink`Objects`JavaObject230769448452097]}], "}"}]], "Output",
  CellLabel->"Out[8]=",
  CellTags->{"b:4", "LocalInteractions:11"}]
}, Open  ]],

Cell[TextData[{
  "We can release them by explicitly calling ",
  StyleBox["ReleaseJavaObject", "Input",
    FontWeight->"Plain"],
  " on them."
}], "Text",
  CellTags->{"b:4", "LocalInteractions:11"}],

Cell[BoxData[
    \(Scan[ReleaseJavaObject, PeekObjects[]]\)], "Input",
  CellLabel->"In[9]:=",
  CellTags->{"b:4", "LocalInteractions:11"}],

Cell["Now those 8 Agent objects are marked for garbage collection.", "Text",
  CellTags->{"b:4", "LocalInteractions:11"}],

Cell[CellGroupData[{

Cell[BoxData[
    \(JavaGC[]\)], "Input",
  CellLabel->"In[10]:=",
  CellTags->{"b:4", "LocalInteractions:11"}],

Cell[BoxData[
    \(20096\)], "Output",
  CellLabel->"Out[10]=",
  CellTags->{"b:4", "LocalInteractions:11"}]
}, Open  ]]
}, Closed]]
}, Open  ]]
},
FrontEndVersion->"5.0 for Macintosh",
ScreenRectangle->{{0, 1152}, {0, 701}},
WindowSize->{520, 578},
WindowMargins->{{Automatic, 202}, {49, Automatic}},
StyleDefinitions -> "HelpBrowser.nb"
]

(*******************************************************************
Cached data follows.  If you edit this Notebook file directly, not
using Mathematica, you must remove the line containing CacheID at
the top of  the file.  The cache data will then be recreated when
you save this file from within Mathematica.
*******************************************************************)

(*CellTagsOutline
CellTagsIndex->{
  "b:4"->{
    Cell[1776, 53, 78, 1, 38, "ObjectName",
      CellTags->{"b:4", "LocalInteractions:11"}],
    Cell[1857, 56, 691, 23, 72, "Usage",
      CellTags->{"b:4", "LocalInteractions:11"}],
    Cell[2551, 81, 319, 8, 40, "Notes",
      CellTags->{"b:4", "LocalInteractions:11"}],
    Cell[2873, 91, 214, 7, 24, "Notes",
      CellTags->{"b:4", "LocalInteractions:11"}],
    Cell[3112, 102, 78, 1, 38, "ExampleSection",
      CellTags->{"b:4", "LocalInteractions:11"}],
    Cell[3193, 105, 141, 4, 24, "Text",
      CellTags->{"b:4", "LocalInteractions:11"}],
    Cell[3337, 111, 662, 15, 112, "Input",
      CellTags->{"b:4", "LocalInteractions:11"}],
    Cell[4024, 130, 120, 3, 26, "Input",
      CellTags->{"b:4", "LocalInteractions:11"}],
    Cell[4147, 135, 13817, 247, 231, 1164, 85, "GraphicsData", 
    "PostScript", "Graphics",
      CellTags->{"b:4", "LocalInteractions:11"}],
    Cell[17979, 385, 195, 6, 24, "Text",
      CellTags->{"b:4", "LocalInteractions:11"}],
    Cell[18199, 395, 112, 3, 26, "Input",
      CellTags->{"b:4", "LocalInteractions:11"}],
    Cell[18314, 400, 1707, 34, 89, "Output",
      CellTags->{"b:4", "LocalInteractions:11"}],
    Cell[20036, 437, 139, 4, 24, "Text",
      CellTags->{"b:4", "LocalInteractions:11"}],
    Cell[20178, 443, 117, 3, 26, "Input",
      CellTags->{"b:4", "LocalInteractions:11"}],
    Cell[20298, 448, 141, 4, 24, "Text",
      CellTags->{"b:4", "LocalInteractions:11"}],
    Cell[20464, 456, 110, 3, 26, "Input",
      CellTags->{"b:4", "LocalInteractions:11"}],
    Cell[20577, 461, 109, 3, 25, "Output",
      CellTags->{"b:4", "LocalInteractions:11"}],
    Cell[20701, 467, 260, 7, 40, "Text",
      CellTags->{"b:4", "LocalInteractions:11"}],
    Cell[20986, 478, 115, 3, 26, "Input",
      CellTags->{"b:4", "LocalInteractions:11"}],
    Cell[21104, 483, 1707, 34, 89, "Output",
      CellTags->{"b:4", "LocalInteractions:11"}],
    Cell[22826, 520, 201, 6, 25, "Text",
      CellTags->{"b:4", "LocalInteractions:11"}],
    Cell[23030, 528, 140, 3, 26, "Input",
      CellTags->{"b:4", "LocalInteractions:11"}],
    Cell[23173, 533, 121, 1, 24, "Text",
      CellTags->{"b:4", "LocalInteractions:11"}],
    Cell[23319, 538, 111, 3, 26, "Input",
      CellTags->{"b:4", "LocalInteractions:11"}],
    Cell[23433, 543, 109, 3, 25, "Output",
      CellTags->{"b:4", "LocalInteractions:11"}]},
  "LocalInteractions:11"->{
    Cell[1776, 53, 78, 1, 38, "ObjectName",
      CellTags->{"b:4", "LocalInteractions:11"}],
    Cell[1857, 56, 691, 23, 72, "Usage",
      CellTags->{"b:4", "LocalInteractions:11"}],
    Cell[2551, 81, 319, 8, 40, "Notes",
      CellTags->{"b:4", "LocalInteractions:11"}],
    Cell[2873, 91, 214, 7, 24, "Notes",
      CellTags->{"b:4", "LocalInteractions:11"}],
    Cell[3112, 102, 78, 1, 38, "ExampleSection",
      CellTags->{"b:4", "LocalInteractions:11"}],
    Cell[3193, 105, 141, 4, 24, "Text",
      CellTags->{"b:4", "LocalInteractions:11"}],
    Cell[3337, 111, 662, 15, 112, "Input",
      CellTags->{"b:4", "LocalInteractions:11"}],
    Cell[4024, 130, 120, 3, 26, "Input",
      CellTags->{"b:4", "LocalInteractions:11"}],
    Cell[4147, 135, 13817, 247, 231, 1164, 85, "GraphicsData", 
    "PostScript", "Graphics",
      CellTags->{"b:4", "LocalInteractions:11"}],
    Cell[17979, 385, 195, 6, 24, "Text",
      CellTags->{"b:4", "LocalInteractions:11"}],
    Cell[18199, 395, 112, 3, 26, "Input",
      CellTags->{"b:4", "LocalInteractions:11"}],
    Cell[18314, 400, 1707, 34, 89, "Output",
      CellTags->{"b:4", "LocalInteractions:11"}],
    Cell[20036, 437, 139, 4, 24, "Text",
      CellTags->{"b:4", "LocalInteractions:11"}],
    Cell[20178, 443, 117, 3, 26, "Input",
      CellTags->{"b:4", "LocalInteractions:11"}],
    Cell[20298, 448, 141, 4, 24, "Text",
      CellTags->{"b:4", "LocalInteractions:11"}],
    Cell[20464, 456, 110, 3, 26, "Input",
      CellTags->{"b:4", "LocalInteractions:11"}],
    Cell[20577, 461, 109, 3, 25, "Output",
      CellTags->{"b:4", "LocalInteractions:11"}],
    Cell[20701, 467, 260, 7, 40, "Text",
      CellTags->{"b:4", "LocalInteractions:11"}],
    Cell[20986, 478, 115, 3, 26, "Input",
      CellTags->{"b:4", "LocalInteractions:11"}],
    Cell[21104, 483, 1707, 34, 89, "Output",
      CellTags->{"b:4", "LocalInteractions:11"}],
    Cell[22826, 520, 201, 6, 25, "Text",
      CellTags->{"b:4", "LocalInteractions:11"}],
    Cell[23030, 528, 140, 3, 26, "Input",
      CellTags->{"b:4", "LocalInteractions:11"}],
    Cell[23173, 533, 121, 1, 24, "Text",
      CellTags->{"b:4", "LocalInteractions:11"}],
    Cell[23319, 538, 111, 3, 26, "Input",
      CellTags->{"b:4", "LocalInteractions:11"}],
    Cell[23433, 543, 109, 3, 25, "Output",
      CellTags->{"b:4", "LocalInteractions:11"}]}
  }
*)

(*CellTagsIndex
CellTagsIndex->{
  {"b:4", 24202, 567},
  {"LocalInteractions:11", 26587, 619}
  }
*)

(*NotebookFileOutline
Notebook[{

Cell[CellGroupData[{
Cell[1776, 53, 78, 1, 38, "ObjectName",
  CellTags->{"b:4", "LocalInteractions:11"}],
Cell[1857, 56, 691, 23, 72, "Usage",
  CellTags->{"b:4", "LocalInteractions:11"}],
Cell[2551, 81, 319, 8, 40, "Notes",
  CellTags->{"b:4", "LocalInteractions:11"}],
Cell[2873, 91, 214, 7, 24, "Notes",
  CellTags->{"b:4", "LocalInteractions:11"}],

Cell[CellGroupData[{
Cell[3112, 102, 78, 1, 38, "ExampleSection",
  CellTags->{"b:4", "LocalInteractions:11"}],
Cell[3193, 105, 141, 4, 24, "Text",
  CellTags->{"b:4", "LocalInteractions:11"}],
Cell[3337, 111, 662, 15, 112, "Input",
  CellTags->{"b:4", "LocalInteractions:11"}],

Cell[CellGroupData[{
Cell[4024, 130, 120, 3, 26, "Input",
  CellTags->{"b:4", "LocalInteractions:11"}],
Cell[4147, 135, 13817, 247, 231, 1164, 85, "GraphicsData", "PostScript", \
"Graphics",
  CellTags->{"b:4", "LocalInteractions:11"}]
}, Open  ]],
Cell[17979, 385, 195, 6, 24, "Text",
  CellTags->{"b:4", "LocalInteractions:11"}],

Cell[CellGroupData[{
Cell[18199, 395, 112, 3, 26, "Input",
  CellTags->{"b:4", "LocalInteractions:11"}],
Cell[18314, 400, 1707, 34, 89, "Output",
  CellTags->{"b:4", "LocalInteractions:11"}]
}, Open  ]],
Cell[20036, 437, 139, 4, 24, "Text",
  CellTags->{"b:4", "LocalInteractions:11"}],
Cell[20178, 443, 117, 3, 26, "Input",
  CellTags->{"b:4", "LocalInteractions:11"}],
Cell[20298, 448, 141, 4, 24, "Text",
  CellTags->{"b:4", "LocalInteractions:11"}],

Cell[CellGroupData[{
Cell[20464, 456, 110, 3, 26, "Input",
  CellTags->{"b:4", "LocalInteractions:11"}],
Cell[20577, 461, 109, 3, 25, "Output",
  CellTags->{"b:4", "LocalInteractions:11"}]
}, Open  ]],
Cell[20701, 467, 260, 7, 40, "Text",
  CellTags->{"b:4", "LocalInteractions:11"}],

Cell[CellGroupData[{
Cell[20986, 478, 115, 3, 26, "Input",
  CellTags->{"b:4", "LocalInteractions:11"}],
Cell[21104, 483, 1707, 34, 89, "Output",
  CellTags->{"b:4", "LocalInteractions:11"}]
}, Open  ]],
Cell[22826, 520, 201, 6, 25, "Text",
  CellTags->{"b:4", "LocalInteractions:11"}],
Cell[23030, 528, 140, 3, 26, "Input",
  CellTags->{"b:4", "LocalInteractions:11"}],
Cell[23173, 533, 121, 1, 24, "Text",
  CellTags->{"b:4", "LocalInteractions:11"}],

Cell[CellGroupData[{
Cell[23319, 538, 111, 3, 26, "Input",
  CellTags->{"b:4", "LocalInteractions:11"}],
Cell[23433, 543, 109, 3, 25, "Output",
  CellTags->{"b:4", "LocalInteractions:11"}]
}, Open  ]]
}, Closed]]
}, Open  ]]
}
]
*)



(*******************************************************************
End of Mathematica Notebook file.
*******************************************************************)

