SlideShare a Scribd company logo
Agent based Spatial Simulation with NetLogo Volume 2
Arnaud Banos Christophe Lang Nicolas Marilleau
download pdf
https://ebookmass.com/product/agent-based-spatial-simulation-with-
netlogo-volume-2-arnaud-banos-christophe-lang-nicolas-marilleau/
Visit ebookmass.com today to download the complete set of
ebook or textbook!
Here are some recommended products for you. Click the link to
download, or explore more at ebookmass.com
Spatial Gems: Volume 2 John Krumm
https://ebookmass.com/product/spatial-gems-volume-2-john-krumm/
Spatial Economics, Volume II: Applications Stefano Colombo
https://ebookmass.com/product/spatial-economics-volume-ii-
applications-stefano-colombo/
Spatial Economics, Volume I: Theory Stefano Colombo
https://ebookmass.com/product/spatial-economics-volume-i-theory-
stefano-colombo/
eTextbook 978-0470057476 Developing Multi-Agent Systems
with JADE (Wiley Series in Agent Technology)
https://ebookmass.com/product/etextbook-978-0470057476-developing-
multi-agent-systems-with-jade-wiley-series-in-agent-technology/
Everyday Applied Geophysics 2: Magnetics and
Electromagnetism Nicolas Florsch
https://ebookmass.com/product/everyday-applied-geophysics-2-magnetics-
and-electromagnetism-nicolas-florsch/
Chipless RFID Based on RF Encoding Particle. Realization,
Coding and Reading System 1st Edition Arnaud Vena
https://ebookmass.com/product/chipless-rfid-based-on-rf-encoding-
particle-realization-coding-and-reading-system-1st-edition-arnaud-
vena/
Embedded Mechatronic Systems, Volume 2: Analysis of
Failures, Modeling, Simulation and Optimization 2nd
Edition Abdelkhalak El Hami
https://ebookmass.com/product/embedded-mechatronic-systems-
volume-2-analysis-of-failures-modeling-simulation-and-
optimization-2nd-edition-abdelkhalak-el-hami/
Undercover Agent Slade
https://ebookmass.com/product/undercover-agent-slade/
Biostatistics and Computer-based Analysis of Health Data
using R 1st Edition Christophe Lalanne
https://ebookmass.com/product/biostatistics-and-computer-based-
analysis-of-health-data-using-r-1st-edition-christophe-lalanne/
Agent based Spatial Simulation with NetLogo Volume 2 Arnaud Banos Christophe Lang Nicolas Marilleau
Agent-based Spatial Simulation with NetLogo 2
Agent-based Spatial
Simulation with NetLogo 2
Advanced Concepts
Edited by
Arnaud Banos
Christophe Lang
Nicolas Marilleau
Introduction
The NetLogo platform is perfect for rapidly and effectively prototyping
simple models. Volume 1, Agent-based Spatial Simulation with NetLogo 1,
specifically focused on this remarkable quality [BAN 15a]. NetLogo also
houses a number of commonly unexpected and underestimated resources that
fully justify its status as a platform for agent-based modeling and simulation.
These resources take two different forms. External resources allow
specialized extensions to be directly constructed and/or exploited from within
NetLogo, and allow NetLogo to be dynamically coupled with other libraries,
software programs or platforms. The second form, more typically consisting
of internal resources, arises from the suitability of NetLogo, its language and
its architecture for developing models that are intrinsically more advanced.
The objective of this second book is to give an educational presentation of
these two important dimensions of agent-based spatial simulation with
NetLogo. Readers will be offered a slightly atypical and unconventional
presentation of NetLogo that emphasizes the aspect of being an open
simulation environment (Chapter 1). Chapters 2–5 explore in depth the
opportunities for extending and coupling NetLogo presented in the first
chapter, situating them within a number of fundamental perspectives.
Chapter written by Arnaud BANOS, Christophe LANG and Nicolas MARILLEAU.
The scientific material this book relies on was developed within various research
and pedagogic projects, which benefited from the financial or logistic support of
several institutions: Mission pour l’interdisciplinarité du CNRS/PEPS HUMAIN CNRS
(http://www.cnrs.fr/mi/spip.php?article193), LabeX DynamiTe (http://labex-dynamite.com/
en/the-labex/), ISC-PIF (https://iscpif.fr/), RNSC (http://rnsc.csregistry.org/), MAPS Network
(http://maps.hypotheses.org/).
x Agent-based Spatial Simulation with NetLogo 2
Chapter 2 discusses the question of multiscale modeling, with applications in
road traffic management, and Chapter 3 focuses on coupling macro and micro
models based on networks, with applications in spatial epidemiology.
Chapter 4 explores the notion of network in much more depth, considering
fundamental principles of graph theory but also more advanced features like
dynamic graphs. Chapter 5 focuses on solving so-called “swarm” problems.
Finally, Chapter 6 brings the book to a close by presenting a number of
protocols for exploring complex models in NetLogo. In the same spirit as
Volume 1, this second volume includes examples of NetLogo code and
GitHub links for each of the models encountered. To be read and reread
without moderation!
1
NetLogo, an Open Simulation Environment
1.1. Introduction to extensions in NetLogo
NetLogo is a generic simulation environment in the sense that it was not
designed with any specific domain of application in mind. NetLogo offers a
wide range of features and generic operators to its users. Additionally, to make
up for any missing features, NetLogo is compatible with other platforms and
libraries, as we will demonstrate throughout this book.
There is a vast library of extensions available to users, allowing them to
integrate additional functionality that is not present in the native version of
NetLogo, but which might nonetheless be necessary for the development of a
given model. An official library of extensions is available on the official
NetLogo Website. We will explore some of these extensions later in this
chapter. But many modelers have also developed their own extensions to
tackle specific problems that are of interest to them. These extensions are
developed with an open Java API. We will discuss this in more detail in
section 1.2.
Conversely, NetLogo can also be called and controlled by other programs,
such as OpenMole1, Python2 and R3. To do this, NetLogo provides a Java API
Chapter written by Benoit GAUDOU, Christophe LANG, Nicolas MARILLEAU,
Guilhelm SAVIN, Sébastien REY COYREHOURCQ and Jean-Marc NICOD.
1 http://www.openmole.org/.
2 https://www.pythong.org/.
3 https://www.r-project.org/.
2 Agent-based Spatial Simulation with NetLogo 2
that allows models to be loaded, executed and gives access to their variables
and methods. The usage of this API is presented in detail in section 1.3.
1.1.1. Examples of typical NetLogo extensions
There are many different types of extension. The GitHub page of the
NetLogo platform4 gives one possible list of examples. This list distinguishes
between internally developed extensions, which are included with the
platform (e.g. GIS or network), and extensions developed by the community,
which have to be installed manually (section 1.1.2). In Chapter 3 of Volume 1
[BAN 15a], we presented a number of these extensions (GIS and network) to
showcase some of additional functionnalities of NetLogo.
Some of these extensions include language extensions, which allow the
modeler to manipulate more complex object types than those natively present
in NetLogo. Indeed, the language of the platform has relatively few complex
structures (unlike most programming languages) and primitives for
manipulating them. For instance, the array, table and matrix extensions
are now included with NetLogo. However, extensions such as string and
file are external.
More generally, the functionalities of the NetLogo language can be
augmented with a wide range of extensions, for example to achieve better
network management (network and nw), to provide more primitives for
network analysis (additional metrics and indicators) or to integrate
geographical data represented in vector form into NetLogo models (GIS).
This is not an easy task, but this is absolutely necessary, as NetLogo models
are natively based on a grid-based discrete environment. As another example,
the SQL extension allows models to interact with a database by sending
SQL-formatted queries and receiving data in response. Finally, the sound and
MIDI extensions allow sounds to be integrated into NetLogo models.
There are a number of extensions that enable NetLogo to interact with other
tools. This interaction can take various different forms: it might simply involve
reading or writing files that are compatible with a third-party application. For
example, it is possible to process image files (bitmap), tabular data (csv), Java
4 https://github.com/Netlogo/Netlogo/wiki/Extensions.
NetLogo, an Open Simulation Environment 3
system properties (Props), POV rays (RayTracing), VRML (VRML), NetCDF
(NetCDF), etc. This allows modelers with different backgrounds to increase
the realism of their simulations by exploiting real data in useful formats.
Other extensions allow deeper forms of interaction by directly integrating
third-party functionality into NetLogo; for this kind of interaction, NetLogo
must be able to connect with another application to send requests and retrieve
results, such as Matlab (MATLAB), Prolog (NetProLogo), IODA [KUB 11]
(IODA) and Graphstream5 (gs).
For example, the NetLogo language can be extended with primitives
allowing it to benefit from the scientific calculation tool R [THI 10], and in
particular to call R functions from within a NetLogo model. The R extension
for NetLogo can be downloaded on the Netlogo-R-Extension Website6. It
fulfills the task of communicating data between the two tools, and in
particular performs type conversions from one language to the other. A
working installation of R is required. There is also a reverse extension that
allows NetLogo to be called from R, known as RNetlogo7.
Finally, there are several extensions enabling NetLogo to connect with
various types of hardware (sensors, actuators, etc.). Examples include the
extensions Arduino (microcontroller), GoGo (sensors) and wiimote (game
controller with an accelerometer).
1.1.2. Installing and using extensions in models
The extensions used by NetLogo are located in the extensions folder in
the NetLogo root directory. Each extension has its own separate folder.
To use an extension that is not included with NetLogo, it has to first be
downloaded (usually as an archive file), unzipped and installed. Installation is
extremely simple – the folder extracted from the archive has to copied into
the extensions folder. The folder name must be the same as the name of
the extension.
5 http://graphstream-project.org.
6 http://r-ext.sourceforge.net/.
7 http://cran.r-project.org/web/packages/RNetlogo/index.html.
4 Agent-based Spatial Simulation with NetLogo 2
To use the primitives provided by the extension in a NetLogo model, we
have to first declare the extensions used by the model:
1 extensions [extension_name1 extension_name2]
To use a primitive defined in this extension, we simply call it by its name in
the model prefixed by the name of the extension:
extension_name1:primitive_name parameters
For example, to extend NetLogo functionality to include additional time
management functions, we can use the time extension, also known as the
NetLogo Time Extension8. Once unzipped, the archive produces the folder
time-1.3.0 (which corresponds to Version 1.3.0) containing the source files
of the extension, documentation, example models and .jar files (Java
archives). To use it in a NetLogo model, we have to simply rename this folder
as time instead of time-1.3.0, and copy it into the extensions folder9.
In order to use this extension, we declare it in the model:
extensions [time]
We can now use the primitives defined by this extension using the prefix
time:. For example, time allows us to create a date object (with the create
primitive) and to manipulate it, in order to retrieve the day, month or year of
this date (get primitive), to perform operations on dates (plus primitive) or to
compare dates (is-before, is-after and is-equal primitives)10:
8 https://github.com/colinsheppard/time/.
9 In fact, for this extension (and most other extensions), only the .jar files (time.jar and
joda-time-2.2.jar) are required. These contain the definitions of the new primitives.
10 Other examples are included with the extension.
NetLogo, an Open Simulation Environment 5
let my_date time:create "2016-02-28 17:28:07.777"
print time:get "month" my_date
print time:plus my_date 1.0 "year"
4 print time:is-before (time:create "2016-01-01")
(time:create "2018-01-01")
1.2. Designing and developing extensions
A project that allows minimal extensions to be easily compiled in Scala
with SBT or Maven can be found within the GitHub repository Netlogo-
extension-build-example11.
1.2.1. Environment for compiling extensions
1.2.1.1. Maven and Java
Maven is a software build management system developed by the Apache
Foundation. It works by defining and using Project Object Model (POM) files,
which contain a set of instructions for successfully building the program.
The first step is to install Maven on the workstation.
Maven works by relying on repositories (local or online) containing the
dependencies that must be downloaded at compilation. Since March 2016,
NetLogo uses the online repository Bintray12, and it is no longer necessary
to manually add the Netlogo.jar file to your local repository. Development
versions (NetLogo 6.0) are already available from the online repository.
However, in this book, we will use the stable Version 5.3.1.
As a reminder, since only NetLogo versions 5.3 and later are available
online, we will recall how to register a .jar file in the local repository of
your device. Follow the instructions given in the documentation13. Once you
are in the NetLogo /app/ directory that you wish to install (replace X.X by the
version number), you can run the following command from the command line
to install the .jar file in the local Maven repository:
11 https://github.com/Spatial-ABM-with-Netlogo/Chapitre-A.
12 https://bintray.com/netlogo/NetLogo-JVM/netlogo.
13 https://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html.
6 Agent-based Spatial Simulation with NetLogo 2
mvn install:install-file -Dfile=Netlogo.jar -DgroupId=org.nlogo
-DartifactId=Netlogo -Dversion=X.X -Dpackaging=jar

→
For the development of most extensions, the Netlogo.jar file and
the scala-library dependency will be enough. Other extensions that use
specific NetLogo functions may, however, require other dependencies, most of
which will be contained in the .jar files in the NetLogo /app/ directory.
Users who wish to develop extensions in Scala or Java will need to pay
attention to the version of NetLogo. NetLogo 5.3 is only compatible with
Scala versions 2.9.x, and NetLogo 5.3.1 is only compatible with Scala versions
2.10.x. In both cases, the Java version needs to be 7.x. We have to wait for the
next version of NetLogo before we can use Scala 2.10.x with Java 8.x.
The simplest solution for compiling an extension is based on the
modification of the JavaHOME variable used by Maven. In Linux, simply type
the following command in the terminal before calling the mvn command:
export Java_HOME=/path/to/jdk7/
The pom.xml file and the Maven project that can be used
to compile a minimal Java extension may be obtained from the
Java-plugin-Netlogo-maven project on GitHub. This project can be
directly opened in the software workbench (or IDE) Java IntelliJ.
The pom.xml file contains the list of dependencies to be loaded
locally or from the Maven repositories, and also the configuration of two
plugins: maven-compiler-plugin and maven-jar-plugin. The first plugin
allows the Java sources to be compiled by running the Maven command
mvn compile in the project root directory. The second one allows the .jar
to be created in the /target repository by running the Maven command
mvn install.
1.2.1.2. SBT and Scala
Simple Build Tool (SBT) is a build system similar to Maven, but which is
commonly used to compile sources written in Scala. NetLogo is compiled with
SBT, since its most recent versions are written in Scala.
Visit https://ebookmass.com today to explore
a vast collection of ebooks across various
genres, available in popular formats like
PDF, EPUB, and MOBI, fully compatible with
all devices. Enjoy a seamless reading
experience and effortlessly download high-
quality materials in just a few simple steps.
Plus, don’t miss out on exciting offers that
let you access a wealth of knowledge at the
best prices!
NetLogo, an Open Simulation Environment 7
Unlike Maven, which manages dependencies by using pom.xml files,
SBT uses files written in Scala to determine the structure of the project
and its dependencies. One of the most important such files is build.sbt,
which may be found in the project root directory. SBT uses the same
online repositories as Maven to download the right dependencies for
compiling and packaging extensions in development. The primary SBT file,
named build.sbt, uses Netlogo-Extension-Plugin14, which automatically
downloads the right Netlogo.jar file and provides a simplified interface for
packaging extensions.
Since NetLogo version 5.3.1 can only be compiled with Java
7, we must tell SBT where to find this version on your device:
sbt -Java-home /path/to/Java/home.
Even though it may not be immediately useful in our case, note that it is
possible to tell SBT which version of Java it should use to run Java programs
by adding the following lines to build.sbt:
fork in run := true
JavaHome in run := Some(file(/path/to/Java/home/ ))
Finally, the extension is compiled by running the sbt compile command,
and the .jar is built by calling sbt package.
1.2.2. Notes on type conversion between NetLogo and Java/Scala
All numeric variables used in NetLogo extensions must be converted into
the Double type, as this is the only numeric type accepted by NetLogo. There
are tools available to developers for converting from Java/Scala to NetLogo.
But conversion in the other direction is not so easy.
Type conversion from NetLogo to Java or Scala is more tricky, in particular
for LogoList lists. Since NetLogo lists are able to contain different types, it is
impossible to know in advance which types of objects are contained in the list
variable. The only solution is to carefully typecast15 each element in the list
before performing any operations.
14 https://github.com/Netlogo/Netlogo-Extension-Plugin.
15 Also known as type coercion, this means converting a variable from one type to another.
8 Agent-based Spatial Simulation with NetLogo 2
1.2.2.1. Java
From Java to NetLogo: numeric type conversion can be performed with
the command Double.valueOf(valueToConvert). This command wraps
the double variables in a Double class, which is understood by NetLogo.
From NetLogo to Java: handling lists requires generous use of try/catch
blocks to detect and convert the types of objects contained in the list. We
will illustrate this conversion when we present the code of the primitive for
calculating the average of a list of values passed as parameters.
1.2.2.2. Scala
Support for automatic type conversion from Scala to NetLogo
has been added by the developers of NetLogo via the following
import, which can be added to the start of a program:
import org.nlogo.api.ScalaConversions.
Calling the function .toLogoObject on any Scala data type (Boolean,
Float, Character, Short, Int, Float, Long, Double, Byte, Seq) initiates
the conversion process, which automatically returns a type that is compatible
with NetLogo.
With SBT, it is possible to initialize an interactive console, which can
access the set of dependencies included in the project. This interactive mode
allows us to enter commands directly into a terminal without having to compile
or package the extension first.
In the root directory, simply type the command sbt console into a
terminal, followed by the following commands:
import org.nlogo.api.ScalaConversions._
val myIntValue:Int = 5
myIntValue.toLogoObject // return Java.lang.Double
val myFloatValue:Float = 2.2
myDoubleValue.toLogoObject // return Java.lang.Double
val myScalaList = Seq(2,3,8)
myScalaList.toLogoObject // return org.nlogo.api.LogoList
NetLogo, an Open Simulation Environment 9
1.2.3. Commentary of an example extension
The .jar file created by Maven or SBT after executing the
second command includes a valid manifest file, which is usually
named my-extension.jar. This should be copied into the directory
/app/extensions/my-extension in NetLogo 5.3, and then called in the program
with the following code: extensions [my-extension].
The extension named my-extension, which we compiled in the previous
few sections, allows us to do three things:
– return the sequence of characters “hello world” (print-message);
– return the average of the numbers passed as parameters (get-mean);
– construct a list of random numbers with length equal to the variable
passed as an argument to the primitive (build-a-random-list).
Calling the following command in the NetLogo observer returns the
character sequence “hello world”: print my-extension:print-message.
Calling the following command in the NetLogo observer returns
the average of the list of numbers passed as parameters: print
my-extension:get-mean list (10, 12, 15).
Calling the following command in the NetLogo observer returns a list of
five random elements: print my-extension:build-a-random-list 5.
The extension code is given in Java in the below examples. Equivalent code
in Scala is also available from the GitHub repository containing the examples
for compilation with Maven and SBT.
1.2.4. Minimum content of an extension
In order for NetLogo to be capable of loading an extension, the .jar
file should contain two elements: a manifest containing NetLogo-specific
properties, and a class implementing the ClassManager interface of the
org.nlogo.api package. The .jar file must contain all classes associated
with the extension.
If additional software libraries are used, they can be placed in the extension
folder in the NetLogo extensions directory.
10 Agent-based Spatial Simulation with NetLogo 2
1.2.4.1. Manifest
The manifest must contain the following three properties:
– Extension-Name, the name of the extension;
– Class-Manager, the extension class implementing ClassManager;
– Netlogo-Extension-API-version, the version of the NetLogo API
used by the extension.
If an extension named test has ClassManager implemented by the class
MyExtension in the package org.test and uses the NetLogo API 5.1, it
needs to have the following Manifest:
Manifest-Version: 1.0
Extension-Name: test
Class-Manager: org.test.MyExtension
Netlogo-Extension-API-Version: 5.3
1.2.4.2. The ClassManager
To develop the DefaultClassManager of the extension, we can extend
the DefaultClassManager class of org.nlogo.api to reduce the list of
methods that we must implement for load(PrimitiveManager). Passing the
PrimitiveManager object as a parameter allows us to add new primitives
(commands or reporters).
Consider the following minimal example of the extension MyExtension:
1 package org.test;
import org.nlogo.api.DefaultClassManager;
import org.nlogo.api.ExtensionException;
import org.nlogo.api.PrimitiveManager;
6
public class MyExtension extends DefaultClassManager {
@Override
public void load(PrimitiveManager primitiveManager) throws
ExtensionException {
//Declare primitives
11 }
}
NetLogo, an Open Simulation Environment 11
To define the call to the three primitives, we replace the comment in the
load function with the following code:
primitiveManager.addPrimitive(print-message, new MyMessage());
primitiveManager.addPrimitive(get-mean, new ComputeMean());
3 primitiveManager.addPrimitive(build-a-random-list, new BuildRandomList());
1.2.5. Snapshot of a primitive
The three primitives are placed in three separate Java files, each of which
contains the description of a primitive:
2
//BuildRandomList.Java
public class BuildRandomList extends DefaultReporter { ... }
//CountCharacter.Java
7 public class CountCharacter extends DefaultReporter { ... }
//MyMessage.Java
public class MyMessage extends DefaultReporter { ... }
These three classes extend the DefaultReporter interface, and so have to
implement the following functions:
public Syntax getSyntax() {...}
public Object report(Argument args[], Context context) throws
ExtensionException, LogoException {...}
In the next sections, we describe the way that these functions are called,
and the results that they return.
1.2.5.1. Displaying “hello world”
These primitives do not take any input parameter, and simply return a
message. The function Syntax.reporterSyntax() therefore only has one
12 Agent-based Spatial Simulation with NetLogo 2
single argument, which indicates the expected type to be returned. Since “hello
world” has the type of a string, we use the code Syntax.StringType().
public Syntax getSyntax() {
2 return Syntax.reporterSyntax(Syntax.StringType());
}
Other types can be returned, such as Syntax.NumberType(), which
indicates that a numerical value should be returned, Syntax.ListType(),
indicating that a list is expected, or any other NetLogo object that can be
manipulated by an extension, as shown by the list of functions defined in
the Syntax object: BooleanType(), AgentsetType(), TurtleType(),
PatchType(), LinkType()...
1.2.5.2. Return the average value of an array of variable size
We can define the call to this primitive in two different ways, either by
using the syntax Syntax.NumberType() | Syntax.RepeatableType()
to define a repeatable number, or by directly using a variable-size
list Syntax.ListType(). Finally, it should also be noted that we
can specify as many Syntax.typeName values as the number of
arguments that we wish to be returned when we call the primitive.
Thus, new int[]{Syntax.NumberType() | Syntax.NumberType(),
Syntax.StringType()} indicates a primitive that takes three input
arguments, i.e. two numbers and one sequence of characters.
// Way 1 using NumberType and RepeatableType
2 public Syntax getSyntax() {
return Syntax.reporterSyntax(new int[]{Syntax.NumberType() |
Syntax.RepeatableType()},Syntax.NumberType());
}
// or Way 2 using ListType
7 public Syntax getSyntax() {
return Syntax.reporterSyntax(new
int[]{Syntax.ListType()},Syntax.NumberType());
}
NetLogo, an Open Simulation Environment 13
In the first case, the primitive is called with: print
(my-extension:get-mean 0.0 5.0 10.0), and in the second case
with: print my-extension:get-mean list 0.0 5.0 10.0 or print
my-extension:get-mean [0.0 5.0 10.0]. The second syntax, shown
below, has the advantage of being more easily understood by beginners,
but requires developers to check the content of the table before performing
any operations. As discussed in the previous section on type conversion,
the methods for retrieving the content of the LogoList variables return a
collection of Object variables that need to be tested16.
Arguments should always be recovered using the “safe methods” provided
by the developers of NetLogo, which we wrapped into a method below.
1 private LogoList getListOrNull(Argument args[]) throws ExtensionException,
LogoException {
try {
return args[0].getList();
} catch (LogoException e) {
return null;
6 }
}
The operation that converts LogoList logoListNumbers into
ArrayListDouble numbers is defined as follows in our code:
3 public Object report(Argument args[], Context context) throws
ExtensionException, LogoException {
final LogoList logoListNumbers = getListOrNull(args);
// LogoList return an array of Object, so we need to cast to
ArrayList[Double]
8 Double[] logoDouble = null;
try {
Object[] objectArray = logoListNumbers.toArray();
logoDouble = Arrays.copyOf(objectArray, objectArray.length,
Double[].class);
}catch (ClassCastException e){
13 System.out.println(Cast Error, only numbers are supported here);
16 Both versions of the code are available from the GitHub repository online.
14 Agent-based Spatial Simulation with NetLogo 2
}
ArrayListDouble numbers = new
ArrayListDouble(Arrays.asList(logoDouble));
18
return average(numbers);
}
Other conversion methods probably exist, but this topic is currently little
documented on the official website. Note that in this last example wrapping
the variable returned by the function average(numbers) in a Double is not
strictly necessary, as Java can perform “autoboxing” in certain conditions:
http://docs.oracle.com/Javase/tutorial/Java/data/autoboxing.html.
1.2.5.3. Construct and return a table of variable size
The first argument new int[]{Syntax.NumberType()} of the function
Syntax.reporterSyntax() states that the primitive expects an integer input.
The second argument Syntax.ListType() tells NetLogo that a list will be
returned.
public Syntax getSyntax() {
return Syntax.reporterSyntax(new
int[]{Syntax.NumberType()},Syntax.ListType());
}
Lists can be constructed using a “builder” provided by the developers:
LogoListBuilder list = new LogoListBuilder();
Adding a Double (not double) can be achieved with a simple loop as a
function of the value n, assigned by calling the getIntValue() method of the
class Argument on the table args[0]:
for (int i = 0; i  n; i++) {
list.add(Double.valueOf(r.nextDouble()));
}
NetLogo, an Open Simulation Environment 15
1.2.6. Future versions of the NetLogo API
Although the NetLogo API has been relatively stable for several versions,
it is expected to change with version 6.0.
Here are a couple of changes that have already been confirmed for the future
version of the API:
– multiple classes will be renamed or reorganized in future. For example,
a new package org.nlogo.core already uses classes from org.nlogo.api,
org.nlogo.nvm, and org.nlogo.agent;
– DefaultReporter and DefaultCommand will be removed, and
org.nlogo.api.Reporter and org.nlogo.api.Command will become
easier to extend.
Since this version is still in development, more information can be found
on the webpage dedicated to the transition17.
Help will be available on the various channels of communication used by
the developers of Netlogo: gitter18, GitHub19 and the NetLogo wiki, which
details the extensions API20, the discussion group21, and the StackOverflow22
website under the NetLogo tag.
1.2.7. Extending the graphical interface
The NetLogo API does not currently allow the development of dedicated
graphics widgets. However, it is possible to add a new tab to the interface and
directly manipulate its AWT/Swing canvas. We will use the GRAPHSTREAM23
software library, which allows graphs to be dynamically manipulated. The
purpose of the extension is to display a graph showing the set of turtles and
the links between them.
17 https://github.com/Netlogo/Netlogo/wiki/Hexy-Extension-Transition-Guide.
18 https://gitter.im/Netlogo/.
19 https://github.com/Netlogo/Netlogo/issues.
20 https://github.com/Netlogo/Netlogo/wiki/Extensions-API.
21 https://groups.google.com/forum/#!forum/Netlogo-devel.
22 http://stackoverflow.com/questions/tagged/Netlogo.
23 http://graphstream-project.org
16 Agent-based Spatial Simulation with NetLogo 2
The following code provides the basic structure of the extension. We will
later show how to develop one part of the missing content. The code is available
in full on GitHub24.
import org.nlogo.api.*;
import org.graphstream.graph.*;
public class GSExtension extends DefaultClassManager {
protected Graph graph;
protected ExtensionContext ctx;
public Graph getGraph() { return graph; }
public ExtensionContext getContext() { return ctx; }
public void load(PrimitiveManager manager) throws ExtensionException {
manager.addPrimitive(init , new DefaultCommand() {
public void perform(Argument[] arg0, Context arg1) throws
ExtensionException, LogoException {

→
GSExtension.this.init((ExtensionContext) arg1);
}
});
}
public void init(ExtensionContext ctx) {
this.ctx = ctx;
this.graph = new AdjacencyListGraph(netlogo );
this.graph.addSink(new GSNetLogoSink(this));
addTab();
}
protected void addTab() { ... }
}
1.2.7.1. NetLogo/GraphStream connection
In a simulation, the NetLogo model and the graph coexist separately, and
consistency needs to be maintained between them. Modifications affecting
the NetLogo model must therefore update the graph, and vice versa.
The GSNetLogoSink class of the extension is dedicated to managing this
connection.
24 https://github.com/graphstream/gs-netlogo.
Visit https://ebookmass.com today to explore
a vast collection of ebooks across various
genres, available in popular formats like
PDF, EPUB, and MOBI, fully compatible with
all devices. Enjoy a seamless reading
experience and effortlessly download high-
quality materials in just a few simple steps.
Plus, don’t miss out on exciting offers that
let you access a wealth of knowledge at the
best prices!
Exploring the Variety of Random
Documents with Different Content
CHAPTER XX
From Lapstone Hill I again saw the valley of the Grose, with the Nepean
River like a silver thread winding between banks and meadows fair. Emu
plains, with its many farms, nestling amidst the luxuriant autumn foliage,
formed a peaceful panorama. Mr. James kindly rested the horses, allowing
us to feast our eyes until the approach of a train reminded him of
progression, as he immediately remembered that we had some miles to
travel ere we reached Glenmore. However, the distance appeared less to me,
having so much to think of, past and future. We soon crossed the bridge and
drove through part of Penrith; then along the road to our destination, which
was so familiar to my companions and so strange to me. One of the greatest
trials of my life had been the inevitable feeling of utter loneliness when first
entering a family as a stranger, where they were all so familiar, so bound up
together by the ties of home affection. My first impression of Glenmore
was, “This place should be called Florence, as it was, indeed, the home of
flowers.” Hereford House and others had been rich with “earth’s stars,” but
not to compare with the profusion and richness of bloom before me. The
cottage at the gate was covered with roses, honeysuckle, and the purple and
white maurandria. We drove between hawthorn hedges, with arched
entrances to orchard, vineyard, and orangery. The front of the house was
literally a carpet of flowers, as the gravelled sweep was covered with many
coloured portulacas and mignonette, which were allowed to grow and
blossom during the master’s and mistress’s absence. While the parents
greeted their elder children, I stood looking at the view before me. In the
foreground a large bed with trees and flowering shrubs, bordered by
verbenas and petunias of every hue; beyond croquet lawn, paddocks
enclosed for kangaroo and deer; then grassy slopes bounded by distant hills,
clothed from base to summit with foliage. The house was somewhat of the
Italian style, commodious, with large lofty rooms, double halls, and cool
passages; a long verandah covered with climbing plants on one side, into
which my room opened, and immediately in front of my window the
opening into the flower garden, which was always full of blossom, and
showed each season’s calendar written by Nature’s hand. The finest oak tree
I had seen for many a day was here, surrounded by a low hedge of
laurestines. Beyond this was the orangery, with the rich green of the leafy
trees, the snowy buds and blossoms then perfuming the air—a veritable
garden of the Hesperides. Fern Hill and Wimborne, the other estates in “the
valley,” were also in their different styles pleasant country houses. The first
was a modern mansion situated on rising ground, with well-kept
shrubberies, lawns, and vineyard. Wimborne had many acres of cultivated
land, parklike in extent. The house was large, but more in the older colonial
style of architecture. The owners of the estates were related, so the
picturesque church between Fern Hill and Glenmore was like a private
family chapel, as the congregation, with few exceptions, consisted of the
households of the three places. We had service—conducted with great
simplicity—alternately morning and afternoon. It was pleasant to observe
the family greetings in the porch on Sundays. Sometimes we left Glenmore
for walks in the neighbourhood. One was an especial favourite—a deserted
burial-place of an aboriginal tribe on the banks of a creek. It was a very
picturesque spot, thickly wooded, with groups of trees with rude carvings
on their trunks. I was informed that they left their dead above ground,
wrapped in rude hammocks slung between trees, always selecting places
near rivers or creeks. Another object for long walks was the collecting of
gum by the children; at some seasons it literally poured down the trees. On
seeing this, I could understand the large deposits of Kauri gum dug out of
the ground in New Zealand, the accumulation of many years. Some
mornings we would go on a mushrooming expedition, our paddocks
supplying us in great profusion with these delicacies, so that our baskets
were always well filled.
The arrowroot grew plentifully at Glenmore, so Mrs. James had nearly a
hundredweight made one season. It was interesting to watch the process of
grinding the root into pulp, the cleansing of the muddy-looking wash with
many waters, until the sediment was a pure white, which is then spread over
calico and laid on the grass to dry.
For indoor amusements we had music, reading, and work. Mr. James had
an excellent library, and for modern literature a box from Maddock’s (our
Australian Mudie) kept us au fait in the doings of the literary world.
Occasionally we had croquet parties on the lawn at Fern Hill, with
afternoon tea and claret cup. Playing at croquet, or watching the graceful
figures of our girls, and the elegant, genial hostess moving amongst her
guests, made a very pleasant diversion in the quiet home life. Our
household at Glenmore was a very happy one. Mrs. James, one of the
sweetest-tempered women I ever met, ruled her large family by love and
gentleness, and during three years’ residence under her roof I never saw her
angry or in any way ruffled, which, considering there were eight children,
from one to twenty years of age, at home, with three boys at holiday time,
was really wonderful. She had her two elder girls as companions; I, my
children, and one dear girl who rode over from Fern Hill every day to join
in our studies—clever, loving, little Lilly. How we missed her when God
gathered her for His garden of angels, and our “happy valley” knew her
only by the quiet grave which marked her resting-place under the church’s
shadow on the hill!
My long holidays were spent with various friends in Sydney. During
one, Sydney was en fête in honour of the Duke of Edinburgh; this being the
first visit paid by a member of the Royal family to Australian shores. James,
Maria, and I watched the public reception from a stand in Macquarie Street,
and from our friend’s windows in Cumberland Street had an excellent view
of the naval reception and harbour illuminations. Afterwards, when staying
with Mrs. Frederick, I saw our Royal guest driving past to Point Piper, and
later on heard his kindly-natured hostess speak of “the great interest he
evinced in colonial life.” Does His Royal Highness ever think of his first
experiences of life in Australia?—the dances, picnics, shooting-parties at
Nepean Towers and elsewhere? A friend related an anecdote of him which
proved he was really fond of animals. On one occasion he returned to the
dining-room to give his dog water instead of “leaving it to others,” as his
host suggested. I heard he had quite a menagerie on board. A young friend
of mine sent him a parrot, and handsome Mrs. E. K. C. an owl, which he
named after the donor. I am certain he has never received a more heartfelt
welcome than he did in his Royal mother’s “Golden South,” which
welcome was so terribly sullied by the maniac’s attempt on his life.
Australia will never forget the thrill of horror this caused through the length
and breadth of the land. The fair-faced youth to be shot in our midst at a
time when all classes met to greet him as a friend and guest! This was my
last glimpse of royalty, being an invalid when the Prince of Wales’s sons
visited Sydney, and during my year’s residence in England. Still I hope ere
my return to Australia to see Her Majesty and members of the Royal family
again. While at Glenmore I was present at two weddings—Mr. James’s
eldest daughter’s and her cousin’s at Wim: both were very grand affairs. At
ours there was a very large family party; out of seventy guests there were
only about ten not connected by birth or marriage. Unfortunately the sun
refused to shine on our bride, so the grounds were not utilised; but the time
passed quickly, and an enjoyable dance finished the day. Miss Una was
more favoured a fortnight after, as she had a lovely day to bid farewell to
her childhood’s home, the youngest and last to leave. The extensive grounds
at Wim were thoroughly appreciated by cricket and croquet players on this
occasion.
During one of my visits to Sydney, I saw and heard of the man who
afterwards became famous as “the claimant” to the Tichborne estate; he had
just arrived from the country and was staying at the same hotel as my
brother. One afternoon, on calling there, in the hall I met this man face to
face. “Do you know who that is, K——?” “No; who is he?” “Well, he says
he is Sir Roger Tichborne.” That evening after dinner at our friend’s the
subject was alluded to, and on our host asking, “What do you think of him,
L——?” “What do I think? Why, he is no more Sir Roger Tichborne than
you are. No man, however unused for years to the society or manners of
gentlemen, could ever forget certain usages of his youth as this man has,
who cannot even spell the simplest words correctly.” “That is nothing.”
“Well, that may be; but if you saw this man often, you would understand
what I mean.” In after years, when I heard how the impostor was believed
in, I thought of this conversation. Of course at the time I write of, the
infamous scheme had only commenced, and the man was off his guard and
untutored.
My peaceful life at Glenmore had to cease, owing to bad health; a long
rest was imperative, so once more I had to avail myself of my friends’ kind
offer to pay them a long visit at Oviedo Cottage, Petersham, where as usual
I was treated as a sister. One family—James’s oldest friends—had a nice
suburban house and grounds near to us. He had known the owner from
boyhood in England, and had been present at his marriage to a young and
very pretty girl, now the energetic and hospitable mistress of Derry Vale,
with a fine family to brighten their home. This place, greatly enlarged since
my first visit, was our last resting-place in New South Wales. I also paid
several visits to Parramatta, which always interested me. Parramatta or
Rose Hill, as it was first called, is the oldest inland town in the colony, and
the first harvest ever gathered in New South Wales, one hundred years ago,
was reaped there. Old Government House still remains in the Inner Domain,
or Parramatta Park. This place, with its avenue of oaks, is like a scene from
the old country. The orchards are very numerous now, extending over an
area of four thousand acres, varying in size from fifty to a hundred acres
each; the orangeries cluster more thickly around Castle and Pennant Hills.
Here the vine was first planted, and grows luxuriantly—in fact, the district
seems adapted to every kind of fruit. Apples, pears, and plums from the
northern lands; oranges, grapes, peaches, and other fruits from the southern
lands of Europe flourish equally well. Alas! Parramatta has one drawback—
mosquitoes. These pests are found in all the districts on the eastern side of
the mountain range, and to some people make night far from comfortable. I
have known many, after living in the country a quarter of a century, dread
on this account the approach of summer. Besides visiting Parramatta by
steamboat and train, I have been by the well-known road, scarcely altered
since I travelled on it so many years ago. Races were still held on the
Homebush Course, and boating parties on the river, now world renowned as
the scene where our Australian scullers have won their laurels. The trip by
the steamer is very agreeable, passing on the way up the river Five Dock,
Hunter’s Hill, Kissing Point—the latter now called Ryde; others renamed
Greenwich, Mortlake, etc.
I read an article the other day in an English paper on the fondness
Australians have of naming places after celebrated men; Gladstone was one
mentioned. I quite agree with the writer to a certain extent; still is it not
unwise to sneer at colonials, who wish by so doing to honour their country
by such names as Wellington, Gordon, Drake, Nelson, and others? No doubt
they have many absurd as well as commonplace names. But are there none
equally so near home? In my opinion the natives’ names should have been
retained and adopted. What could be more euphonious than those we have
still,—such as Ulladulla, Illawarra, Wollondilly, Nanima, Eurunderie,
Marulan, Moruya, Murrurundi, Merriwa, and hundreds of others?
I had an excellent view from Point Piper of the Flying Squadron that
visited Sydney. It was a fine sight, watching the ships under canvas gliding
on the intensely blue waters, under an equally blue sky, to Middle Harbour.
We had flower shows in the gardens, cricket-matches in the Domain,
bazaars everywhere now. Our church school feasts were held in many spots
open to the public, and on the shores of the harbour, which later on, when
the train was available, were deserted for fresher fields. Australia is
certainly well adapted for outdoor amusements. Cricket and tennis can be
played almost all the year round, and picnics and garden parties are
practicable through about eight months. Holidays are spent in the open air,
as there are few places for day amusements under cover like the Crystal
Palace at Sydenham and others in England. Trains, omnibuses, trams, and
steamers swarm with well-dressed and happy-looking people, all bent on
enjoyment, while the city and suburbs are almost deserted. I have often
watched them, and thought this is really “a land flowing with milk and
honey.” No cruel winter, when men and women, however willing, cannot
find work. There seems to be no real want or poverty. Surely such a land
must become the home of millions!—this sunny land, “a land of promise”
for the overgrown population of cities of the older world.
A sad bereavement made me leave Sydney for a time. Maria’s death
caused a terrible blank in my life, so hearing of an engagement to educate a
girl of sixteen, I left in the autumn for Singleton.
CHAPTER XXI
I left by steamer for Newcastle to meet the train by which I was to travel
as far as Singleton, where a carriage was to meet me. The country we
travelled through struck me as being flat and uninteresting compared with
the scenery of the mountains so well known to me. Singleton was a well-
laid-out town, already possessing several good buildings, a church, large
store, and public school. My destination—a large cattle farm some miles
out—was very unlike anything I had hitherto lived at, low and flat; the
house, however, was very comfortable and nicely furnished. My own
apartments were large, and certainly everything was suitable for our
requirements: bookcase and piano for study or amusement. My pupil, a girl
of sixteen, decidedly above the average in intelligence, promised to be a
pleasant companion. There was originality in her character. Under judicious
and wider training she was likely to develop into a clever woman; but with
present surroundings I used to think, “She will grow hard, and perhaps
sceptical.” Wombo was a large farm and station for breeding from famous
imported cattle. My pupil, the youngest of the family, seemed quite an
anomaly there. Though her mother was of good natural ability, a long
residence in such an isolated place had to a certain extent dried up the early
impressions of a visit to England and life in Sydney. For the first time I saw
there what splendid servants the Chinese can be made. They had a cook
equal to the best European I ever met with; his dishes, bread, and butter the
best of their kind; his kitchen a picture of cleanliness, as he also was in
person. A daughter of his, about fourteen years of age, born on the place,
was being trained as a parlour-maid, and already waited at table quickly and
well. The cook had married a young emigrant girl from Somersetshire, who
had been housemaid at Wombo, and certainly in this union had the best of
it; she being an ignorant, lazy woman. She lived in what might have been
made a pretty, comfortable home; instead of which it was a miserable,
untidy, dirty hole, with numbers of children running about like half-caste
savages, unkempt, uncared for. Poor “Jimmy” occasionally asked for half a
day from the house, and then had a turn-out of his own. Several times I tried
to get his wife to speak of herself, or her early home, but she seemed to
have sunk into a state of apathy. She must have been a fine-looking woman;
indeed, her former mistress told me she was, and could have married a
white man. When she told her she was going to marry the Chinese cook, her
mistress had remonstrated with her, asking, “What would your mother say
to such a thing as your marrying a Chinese heathen?” “I dunno; he’s as
good as she; same God made ’em both.” Mrs. Durham now thought Jimmy
was the more to be pitied.
A most agreeable break in our usually monotonous life occurred soon
after my advent at Wombo in a visit from W. B. Dalley, who was an old and
intimate friend of the family, accompanied by a brother of Mrs. Durham.
They spent several days with us. It was a treat listening to the conversation
of these men at dinner in the evening; and afterwards Mr. Dalley would
come into my sanctum, have a chat, and read to Sophie and me. He was
certainly a man his country should honour; was, I have to write, as lately I
have heard he has joined the “great majority.” A more courteous gentleman
could not be; refined in taste, liberal in views on all subjects, one of
Australia’s most gifted sons. The fire of eloquence had touched his lips, and
his “silver speech” added beauty to the poems he read to us, which would
have given delight to the authors. I had just been reading Longfellow’s
Hyperion, and Bulwer’s Pilgrims of the Rhine to Sophie, from both of
which he quoted long passages; then he read several of Tennyson’s and
Longfellow’s, and with two extracts from the latter, “his especial
favourites” he told us, I will close this poor tribute to his memory—
“Thus, O Nuremberg, a wanderer from a region far away,
As he paced thy streets and courtyards, sang in thought his careless lay:
Gathering from the pavement’s crevice, as a floweret of the soil,
The nobility of labour,—the long pedigree of toil.”
“Honour to those whose words or deeds
Thus help us in our daily needs,
And by their overflow
Raise us from what is low!”
My health being still delicate, I found Wombo too bleak, so after a few
months left for Sydney, where I spent several months visiting friends.
Before returning I paid a visit to Morpeth by train, and found little
alteration there; the same long, quiet, grass-grown streets, the same old
houses. Altogether the northern district struck me as being far behind the
western in every respect, owing no doubt to the absence of gold-fields in
the immediate neighbourhood, as in the western and southern districts.
There were many fine estates, such as Duckenfield and others, in this
district; but East and West Maitland had not altered since my visit to them
nearly ten years before. I heard, after the mining mania later on, when
companies were formed to work old fields and new ones were started,
business brightened here, as elsewhere in the colony.
On arriving in Sydney, diamonds were much talked about, owing to
some fine stones having been found, and it was stated one very large stone
was in Sydney, an Australian koh-i-noor. As the Mudgee district was said to
be the best diamond field, I remembered the crystals given to me at
Pipeclay diggings, some of which I had given to a friend. Staying at
Clarendon House in town, where there were so many visitors, my diamonds
caused quite a sensation, especially as one was as large as a pigeon’s egg.
How earnestly, listening to the opinions for and against their being
diamonds, did the gentle face of Mrs. Woolley brighten at the idea of my
being so fortunate; what books were examined on the subject! At Mrs.
Frederick’s too the same amount of interest was taken in them. One friend
tested a specimen by fire, and several windows suffered by scratching on
them. At last they were submitted to the best authority in Sydney, whose
verdict soon shattered the airy castles of my friends, and my brief reign of
having “great expectations” was over.
The different bands now played in the Botanic Gardens, a great
improvement on the former custom of playing in the Domain, as there were
so many shady seats for rest in the former, and flower-scented paths to stroll
in. The view from the gardens,—embracing as it does Government House,
Farm Cove, where H.M. ships and yachts lie at anchor, a large expanse of
the harbour, with the north shore in the distance—is one that can scarcely
be surpassed anywhere. We do not require glass houses for winter gardens
in “The Golden South.” All the year round tropical plants and evergreens
abound, and the sward is brilliantly green, though it is necessary to state
that the hot winds in summer are most destructive to all kinds of vegetation.
The camellias flower in the winter. What beds of anemones, ranunculus,
and pansies have I seen there during the season we term winter, which is
certainly not so cold as spring in England! At times the long-continued
sunshine tired me, and made me long for grayer skies, especially as the air
of Sydney is very relaxing. The summers are longer there than in the
country, where cooler weather often begins in March and continues until
October. In many parts of the western and southern districts geraniums,
heliotropes, and all tropical shrubs have to be housed in winter; but even
there the weather is only cool, not cold. Our flower shows used to be looked
forward to as important events; now the agricultural shows share the
popularity. Only the principal nurserymen and florists, with a few gardeners
of wealthy residents, exhibit in Sydney, as the suburbs have their local
shows. During this visit to Clarendon House one of my friend’s daughters
was married; later on I saw two others of the same family stand at the altar
of the dear old church so full of memories of the past. After the wedding
was over, I went to my friends at Humberstone, where I remained an ever
welcome guest, until I heard of an engagement in a family living near, the
home of a widowed lady whose two youngest girls were my pupils. I was
very happy, being near many friends, and having the society of an elder
daughter of the house, and her young companions—girls of seventeen or
eighteen. Miss Mossman was very bright and sang charmingly. Since those
merry days she has married well, holds a high position in society, and while
in England was presented at court. “The Grove” was a picturesque house,
only a pleasant walk from Petersham and Marrickville, half an hour’s drive
from Sydney or Burwood, and near two old estates, Annandale and
Dobroyd. I am reminded continually of the first by our avenue of pines
here, as the old trees at Annandale have been a landmark for years, no doubt
to be soon removed by decay or progress. Since the time I am writing
about, one portion of the estate has been built on, and is now a largely
populated suburb, just as many others have sprung up in a decade or two.
The Warren Estate, Hurstville, and Sutherland are instances enough of the
growth of the suburbs of Sydney in a few years.
I was glad to be constantly employed, for Death had been busy with his
scythe this year. My kind friends, Mrs. Frederick and Mrs. du Moulin, left
me sorrowing. Both being in delicate health for years, life was perhaps
wearisome to them, and those who mourned for them knew that they had
through life garnered above the “golden grain” of true charity. Losing three
such friends in two years was a great trial, and certainly the best palliative
for grief is the constant companionship of children. It would be selfish to
cast a shadow from it over their young lives; their innocent hopes and
confidences should never be darkened by the losses time invariably brings.
Wreathe his brow with flowers for them; years will entwine the thorns only
too soon. The dear old home in Cumberland Street, with the kind hearts
there, and the true friends at Humberstone, ever ready to welcome me, with
gentle Marian’s companionship always willing to sympathise and cheer,
were still left to me.
I left the Grove, and after a short visit to Petersham went to Clarendon
House, where I remained until my marriage in September, the kind,
generous friend there treating me as a daughter, and her children taking as
much interest in my future as though I was one of themselves. Again the old
church was visited, and I stood at the altar, where as a girl and woman I had
so often knelt, and left many a burden of care and sorrow. Now if it should
come, I should not have to bear it alone. The day was bright, and our drive
to “Sans Souci” very charming; I had not been in that direction for years,
and never beyond Cook’s River dam. Sans Souci was a favourite spot for
the honeymoon, especially at this season of the year, when visitors were
few. We were the sole visitors, except on one occasion, when the Rev. Mr.
Pendrill (master of one of the principal private schools in Sydney) brought a
party of young men there for the day. We were much amused at their
evident desire to catch a glimpse of the bride, thinking very likely she was
young and fair. The hotel being close to the water, we could wander
amongst the rocks in one direction, and in another stroll through the bush
gathering wildflowers, which at this season were to be found in profusion.
The hotel was well managed, and our stay there a peaceful and propitious
commencement of a new life to us both.
CHAPTER XXII
Our first home, being on the North Shore, gave me an opportunity of
seeing that hitherto to me unknown suburb which from its position made it
difficult to visit. After trying Milsom’s Point and Lavender Bay, we decided
on travelling via Blue’s Point, as being equally near my husband’s office
and the dear old house in Cumberland Street, where I was looked for every
week at least, and often on Sunday. Our home was a very nice cottage near
“Berry’s Bay,” and from the grounds at the back a beautiful view of the
harbour, Parramatta River, and islands, with the Blue Mountains in the
distance. This I painted and sent to our brother in England, it now hangs in
his wife’s morning room. This with another sketch of Sans Souci are the
only two left out of many. The North Shore is most picturesque, but the
ascents are very steep, and the means for locomotion few at this time; we
found it very trying.
The views of the harbour, bays, and city from the heights are exquisite,
and now that there are plenty of vehicles and a tramway, the difficulties of
visiting this district are small. Houses are rising rapidly and soon occupied.
Near the shores of the harbour there are several superior houses, with
grounds extending to the water. The Admiral of the station lives there, and
also several leading men of the colony. A bridge across the harbour has
been promised by one of our politicians; but this was during an
electioneering contest, so it will be understood that such promises by such
men generally prove to be words, idle words. When a bridge connects
Sydney and the North Shore, another city will spring up that will rival
Sydney; but it is to be hoped it will be better laid out, with the roads and
streets of a respectable width, with trees planted to shade the side walks.
The land towards Middle Harbour and in other directions will become
valuable then as suburban sites. The scenery here, as in other portions of the
harbour, is very beautiful. We engaged a boat at Pearl Bay and went some
distance up the harbour; one of the party, who had just returned from a tour
in Europe, remarked that it reminded him of parts of the Rhine, only here
there were no ancient castles immortalised by romantic legends. We did see
one solitary and dilapidated hut and a single figure fishing from a rock. The
scenery on the Hawkesbury River I consider far more like the Rhine.
As the mistress of a house, the domestic problem had to be solved; and
with one or two exceptions, I have not found any difficulty in that respect.
My maids for thirteen years were colonials, from the age of fifteen to
twenty-four. Some required training; all were respectable and well behaved,
and are well married. It is the emigrants, principally Irish, who give the
most trouble to mistresses. They leave their own country perfectly ignorant
of their duties, with the idea of very high wages and little to do, or that they
will get married shortly after landing. They soon grow discontented, and
what they consider independent; change from one place to another, and too
often, poor creatures, drift into the depths of degradation. We had but one
emigrant; she is a Scotch girl of the better class, who left “Bonnie Scotland”
five years ago with her family, and has been with us ever since her arrival in
the colony, leaving all her family in Australia, to be our greatest comfort in
what to me now is almost a foreign land. The working classes in Australia
are exceedingly well off, having high wages, generally plenty of work, short
hours, and plenty of time for pleasure. Seventeen years ago wages were
lower, but so were rents, and provisions were cheaper,—meat at that time
being twopence per pound, and fruit almost given away. I have bought
peaches, nectarines, and apricots at twopence the dozen, while grapes could
be had for a penny the pound. Every year things are becoming dearer as the
population increases, but still there is plenty for all. Discontent and strikes
have increased the proportion of those requiring assistance at our doors.
There is a class who emigrate totally unfitted for a new country, perhaps for
any. To the credit of the colonies, be it said, that whenever distress is made
known assistance is forthcoming.
We have heard a great deal lately of the unemployed in Sydney, and the
Government (I think unwisely) finding work for them at the public expense.
Nearly two years ago, when a portion of the Southern and Northern
Junction Railway was open, I went with a friend to see the country, passing
through Concord, then over the bridge across Parramatta River, until we
came in sight of what we thought must be a volunteer encampment, as
under the trees there were several snowy tents pitched and men clustered
about. Presently we stopped at an impromptu platform, and at once the train
was met by several men, the officials from the trucks throwing out loaves of
bread, and lifting out whole sheep and sides of beef. “What is it?” we
inquired. “The week’s rations for the unemployed who are clearing the bush
at Hornsby and other places.” Out of the crowd there we only noticed two
men who looked really deserving. One poor fellow was quite concerned at
the rough treatment the bread received, and lifted the loaves carefully,
dusting the dirt off with his ragged sleeve; at last he remonstrated, saying,
“Don’t throw good food about like that! Had you known the want of it, as I
have in the old country, you would be more careful of it.”
Up to this time we had not held any intercolonial exhibition; some public
men arranged for the erection of a spacious building in Prince Alfred Park,
Redfern, where exhibits from the adjoining colonies gave a good idea of
their progress as well as our own. It was well attended, and brought
numbers of people from the country and the other colonies. In the grounds
outside the building an agricultural show was held,—implements, horses,
sheep, cattle, poultry, dogs, and produce showing to me the advance made
in thirty years. This exhibition building, the property of the city, has since
been used for various amusements,—concerts, meetings, balls, dinners,
fancy fairs,—and the winter before I left was converted into a skating rink,
open to the public night and day, excepting when engaged for private
parties for skating and afternoon tea.
The new buildings in Sydney are imposing structures, and as the value of
city property is rapidly increasing, the old houses are fast disappearing, and
others more lofty and of better design rise in their places. Great expense has
been gone to in the erection of public offices, the University and its
affiliated colleges, offices of companies, banks, and private firms, mostly of
sandstone of excellent quality from the Pyrmont quarries.
About this time we lost our dear old friend in Cumberland Street, and the
home was broken up. James left for a responsible position in Western
Australia, and by regular correspondence kept us fully informed of all that
was going on there. From his description I gleaned that society there was
exactly as it had been in Sydney over thirty years ago, consisting of
Government officials, wealthy squatters, and a few merchants. But the
advantages of constant and quick communication with the mother country
and the more advanced colonies of Australia, with a railway from
Freemantle to Perth—the seat of Government,—made life more pleasant.
Western Australia will assist in absorbing the surplus of population from
older countries; part of it is well adapted for sheep and cattle. In the
northwestern portion there is the Fitzroy River, falling into King Sound,
which is about sixty miles long from the mouth of the Fitzroy to the islands
at its entrance from the ocean, and about thirty miles wide in the broadest
part; the river is two hundred and forty miles in length, and flows through
large tracts of good pasturage. The timber is good,—the jarrah, pine,
cajeput, cork-bark, acacia, banksia, and eucalyptus—one variety of the
latter peculiar to Western Australia bearing a beautiful scarlet flower. The
wildflowers are somewhat different from New South Wales,—the desert
pea and everlastings of many colours, with others whose names are
unknown to me.
Perth has a fine Government house, town-hall, and other public
buildings, better than Sydney could boast of when I first saw it, but from
James’s letters everything in the way of business was flat compared to
Sydney. I have forgotten to mention the pearl fishing industry. We had some
pearls sent to us which were large and of good colour; and when mounted,
they appear equal to any from other parts. Gold, lead, and coal have been
found there. Though containing the largest area of land of any of the
Australian colonies, and a climate varying from tropical to temperate, there
is much difficulty in exploring, as water is scarce in many parts, and this
retards settlement. Queensland in its northern portion is similar in climate to
the northern part of Western Australia, and the former has for many years
been famous for sheep. I have four young friends settled in Queensland; one
on a station a hundred miles from post or telegraph office, another near a
township; but the heat is so great, she has to spend the summers with her
mother, near Sydney; another has a luxurious home near Rockhampton; but
even there she soon lost her youthful bloom. Yet it appears to be a healthy
climate for men, as these ladies’ husbands are all from home and enjoy
good health. Their wives are of the second generation of Australians;
perhaps this is the reason that they suffer from the climate more. Another
brave girl friend of mine by this time has gone as a bride to the borders of
South Australia, leaving mother, sisters, and large circle of friends, to make
a home for her husband there. She is a true Australian girl, an accomplished
musician, a champion tennis player; and better than all, an excellent
housekeeper. No one knows better than myself how deserving of pity an
English girl is who marries to go into bush life in the northern portions of
these colonies; however willing, her training has unfitted her to rough it or
to make the best of everything.
We were now living in Sydney in quite a new neighbourhood, at the top
of Elizabeth Street, where a Hunter Street tradesman had purchased the
lease of portion of Sir Daniel Cooper’s Waterloo estate, building thereon
rows of neat cottages and terraces of houses. The soil was sandy and rather
swampy in parts, with a thick layer of decayed vegetable soil on the
surface: this, when dug in and mixed with the sand, formed a splendid soil
for flowers. In less than a year we had bushes of fuchsias, begonias, and
pelargoniums, and the dividing fences covered with dolichos, maurandria,
and hoya. The street terminated in sandhills. On the summit of the highest,
“Mount Carmel,” stands the Roman Catholic Church, which is built on the
best sites for the purpose in Sydney. At this church I heard Archbishop
Vaughan preach, whose death was an irreparable loss to his people. The
lower part of the Waterloo estate, towards Botany, was and is the “east end”
of Sydney, chiefly occupied by the lower classes; the vicious, idle, and
worthless congregate there. Of late years the Chinese have flocked to this
neighbourhood, which has not improved its cleanliness or morality.
Sydney at this time was supplied with water from the Lachlan and
Botany Swamps, considering the area, a wonderful watershed. Increased
population has rendered it necessary to construct other works, and the
Prospect dam closes in the waters of an enormous catchment area.
A very great mistake has been made in allowing any portion of the old
watershed to be built upon, or otherwise used till the works at Prospect had
received the severest test. Instead of this precaution (which would strike all
thinking men) being taken, a park has been formed, by filling in the lower
portions with any filth and refuse brought for the purpose, which will
pollute the water percolating through it to the lower levels, and for years to
come, especially during the extreme heat of summer, will give off fever
germs to the surrounding neighbourhood. Certainly the Nepean works have
not been sufficiently tested. Already there are dangerous signs of the dam
being faulty, and patching in such works, I am informed, is of very little
use, sometimes hastening the mischief. There really was no necessity for
this park being formed, as Sydney is rich in parks (perhaps too rich),—
Hyde, Moore, Prince Alfred, Belmore, and Victoria, all of large areas, with
the Domain and Botanical Gardens. These ought to be sufficient, especially
as every suburb is getting a park of its own. Hyde Park, once the bare, ill-
kept racecourse, is now worthy of its name, with its green sward, fine
avenue of trees, and beds filled with flowers. Moore Park is the great
playground of the people, having a recreation ground. The Zoological
Gardens and Rifle butts are close by. It is also on the road to Randwick,
where the principal race meetings of the year are held.
Dr. Cuthill little thought the Asylum for Destitute Children he founded
there would so soon have in its vicinity such attractive residences. Certainly
a more healthy or suitable site could not have been chosen for the little ones
to grow and thrive in. I visited it many times when Mr. May was
superintendent, and the several hundred children there looked well and
happy. The earlier institutions for children were the Orphan School,
Parramatta, and the School of Industry, Sydney. Now we have an Infants’
Home, Ashfield, in which a few charitable ladies take an interest. I went
there once with a friend, one of the committee, and saw forty infants under
two years of age; some in their cots asleep, others toddling about the rooms.
The institution is beautifully kept, so well indeed that I thought, “These
poor little mites are far better off than those reared in many well-to-do
homes.” New South Wales has always been mindful of her sick and
helpless, providing asylums for the aged, blind, deaf, and dumb. There are
hospitals in Sydney and in nearly every country town. Lately a Sydney
merchant left a large sum for a convalescent home, and another more
recently has given a valuable property at Camden for a similar purpose. The
situations of both will to many sick and weary be a foretaste of that rest
“that passeth man’s understanding.”
CHAPTER XXIII
We lived for a time on the heights of Marrickville, our ground opening on
to bush, or what in England would be termed wood or forest-land, leading
to Cooks River, where there were vistas through which we could see houses
“bosomed high in tufted trees;” cleared land, and luxurious foliage of
pittosporum, lily-pilly, and other native trees: ferns too were very plentiful.
We were near old friends, and became intimate with a family residing near
us,—an Englishman, his wife, and five daughters; the parents arrived in the
colony in the early days. The father, a university man, was master of a
private school at Parramatta, and the mother was the true type of an
Englishwoman,—tall, handsome, and clever, so it is needless to say the
daughters of such parents were agreeable, and became intimate friends of
ours. Their mother has gone; but her children live to show another
generation of Australians the results of a brave unselfish life. A little later
we welcomed another family to our home, as the introduction of a young
gentlewoman who brought letters from my husband’s family ended in a
close friendship with her relatives in Sydney, with whom she stayed a year.
Our little world in Australia was anticipating a great event, the opening
of the first International Exhibition. The site chosen for the building was a
“happy thought,” just inside the Domain gates, near the principal streets of
the city, and with a panorama of earth, sea, and sky from every part of it,
which few, if any exhibitions ever had before. The building could not be
said to be original in design: still many said, “It was an exhibition in itself;”
and certainly the site was unique for beauty. When filled with our own and
the products from many lands, our anticipations of pleasure were fulfilled.
The numerous courts were always crowded day after day. The Italian,
Austrian, and German especially, so much so that we and others preferred
visiting it early in the morning, and having a quiet view of the sculpture and
pictures, including “St. Cecilia,” “Non Angli sed Angeli,” Meissonier’s
marvellous works, and other poetry of the brush; the china, glass, furniture,
jewellery, and silver, which it would be difficult to give any idea of from
mere description. Several talented musicians visited us, so every day organ
and pianoforte recitals, with concerts, gave pleasure and instruction to the
ear, as so much that was beautiful did to the eye. The Queensland and island
courts showed us much that was interesting,—pine-apples growing in huge
pots, sugar-cane, native cloth, and many tinted shells; the Chinese and
Japanese courts with their quaint wonders and delicious tea; India with her
rich gems and stuffs,—all not only a pleasure but an educator. Week after
week our people visited this exhibition and the annexes in the grounds,
where machinery and other useful inventions were shown. Sydney was
crowded with visitors, and the first tramway was opened to bring many
from the railway station. From this time many improvements were made in
our shops, as numberless things that had been sent from home for the first
time as exhibits became common. At the end of this year ten years will have
passed since it was opened, and when I left Sydney it was still talked of;
nothing now remains of it except the lovely grounds where it once stood.
Will another ever rise in its place, like a phœnix? It was a pity that it was
destroyed; still, being built of perishable materials, it would have been a
never-ending expense to the country to keep it in repair.
The last time I visited the building was to see “The Old English
Fayre,”—a very pretty sight. The centre was arranged as a street in the
olden time, with shops on either side with quaint old signs; the wares were
sold by ladies in costumes of the time; and certainly our Australian beauties
looked very fair.
When the Exhibition closed, almost every one felt, “What shall we do
with our afternoons?” For me this was soon answered. My husband’s health
failing, the doctor ordered change, and we left for a tour in the Western
district. This was my first journey by train over the Blue Mountains. I did
not enjoy it; in fact, when we wound our devious way over the wonderful
zigzag, I wished we were on the old road I had last travelled, with all its
discomforts attached to it. When near, terribly near the edge of the
precipices, I held my breath, and looking back on the way we had come,
said, “I wish we were safe at home.” My husband, to reassure me,
remarked, “The engineer-in-chief is in the next carriage, so it is all right.”
“What of that! clever as he is, he cannot prevent accidents. Perhaps there is
something wrong.” Just then we stopped, and not at a station. “I am sure
there is.” “No, nothing of importance,” as the panting engine went on again.
The worst was over when we reached Hartley Vale, and by the time we
reached Bathurst I was no longer nervous. After dinner we left our hotel and
walked through the town, so altered and improved that I could scarcely
recognise it. We inspected the new block of public buildings, and after
trying in vain to find the cottage residence where I stayed nearly thirty years
ago, returned to the hotel, which we left next morning and took the train to
Orange, remaining there a week with our old friend Marian. We visited a
young friend, whose husband had the best brewery in the town, and
inspected the shops and numerous buildings erected since I drove through
some years previous. We were present at a cricket match and at the laying
of the foundation stone of a public school. Several speeches were made, the
best (and that is not saying much in praise) from an Australian orator,
whose voice is bad, and who never forgets one letter in the alphabet, though
often another, while speaking. We then left for Wellington, where my
brother met us at the railway station. If I had felt like Rip van Winkle in
Sydney after being absent three years, what did I feel now in Wellington?
Now I saw a busy little town with churches, banks, shops, private
residences, and hotels; a substantial road bridge over the Macquarie, and
another, an iron bridge, nearly finished, for the railway. A few brick
cottages in Montefiores was the only difference there except at Gobolion,
now a large comfortable cottage with gardens and orchard. The children I
had left were married, with children of their own. Since our visit many
other improvements had taken place,—handsome bank buildings, a hall,
where last winter they had a skating rink, had been built, and a volunteer
corps and a band founded. The town is now a municipality, and the
Corporation have an idea of lighting it by electricity. This, for a small town
two hundred miles from Sydney, proves Australian progress. My niece, who
has always taken a great interest in Church affairs, Sunday school, and
choir, and has played the organ in the church for two years, had been
presented with a gold watch and handsome brooch.
CHAPTER XXIV
Our next excitement was the arrival of H.M.S. Bacchante with the young
princes; but this I was too ill to join in. After this, our contingent left for the
Soudan, a matter already sufficiently described.
I had paid several visits to my dearest young friend at Darling Point,
where the child I loved so well was now a wife and mother, and the mistress
of a large household, fulfilling her life’s duties kindly and well. Two visits
with her and her generous husband to their country house in the Southern
district gave me an opportunity of seeing that part of the country which is
more like England; the trees are larger and fuller in foliage, owing to the
cooler climate. All the English trees, fruits, and flowers flourish there.
Bowral, Moss Vale, and Sutton Forest present a cultivated appearance.
There are many country houses belonging to Sydney people, besides those
of the permanent residents in the neighbourhood. Erridge Park is my ideal
of a country home, with its acres of garden, orchard, and meadow land. My
friend had his coursing establishment here, his pretty cattle and dairy. The
interior to the house is in accordance with the exterior,—ornamental
ceilings, dadoes to walls, artistic furniture, and though in the country, water
laid on from a spring, and gas generated in a building in the garden.
While at Erridge Park we called on an old resident in the district, whom
we found busy preparing for a large family party of over seventy; she, being
the head, was looking forward to it with natural pleasure. Children,
grandchildren, and great-grandchildren hoped to meet in a few days in their
early home, a large residence with hundreds of acres around it, once rented
for a governor’s country house. In the earlier days, no doubt, it was the
home of a family corresponding with many I knew in the Western district,
such as the families of White, Windeyer, Throsby, Campbell, Chisholm,
Badgery, Gibson, Macarthur, and Manning.
We have now a permanent country residence at Moss Vale for our
governors, where Lord and Lady Carrington rest from their labours, and
escape some of the most trying weather of Sydney. I say rest, and surely
well earned, for though we have been favoured with some energetic
representatives of Her Majesty, we have never had one to equal the present.
From the arrival of His Excellency Lord Carrington to the present time, he
has indeed worked hard in fulfilling his duty to Her Majesty and the colony,
in which he has had the able co-operation of Lady Carrington. It is not to
the Government House receptions and gaieties that I refer only, but to the
interest shown in all public and social gatherings, their kindly sympathy
with the sorrows and bereavements of all classes, as well as joining in the
pleasures of the humblest, from purchasing a doll at a bazaar to give to a
poor little girl, to visiting the Children’s Hospital, that they have won a
place in the hearts of the people, and long after they return to their home in
their native land, their names will be “household words” in “The Golden
South.”
I have been anticipating, as I should have devoted some space to a fancy
fair held at Government House during Lady Loftus’s reign. It was in aid of
Bishop Selwyn’s mission, and was highly successful; many ladies held
stalls filled with the work of fair hands. It was a very gay scene, as most
people were pleased to avail themselves of the opportunity of going to
Government House, if only to a bazaar. I heard that two thousand pounds
was the result, and was very glad, as I had taken great interest in Bishop
Selwyn and his work, begun by his father, whom I met and heard preach at
the dear old church, as I had also the Bishop of Melanesia,—that martyr
who, while on his Master’s work, was killed by the natives, and his body
sent adrift in a boat on the lonely sea. Such men as these two and
Commodore Goodenough are fine examples of those devoting their lives to
good work.
A bright idea for raising funds to assist in either building, paying off the
debt of a church, or other good purpose struck some residents at Manly
Beach. It was to have a show of wildflowers of the colony. This quite
original scheme was carried out with wonderful success, and took numbers
from Sydney to visit this “hall of flowers.”
I thought most of the varieties of native flowers were known to me,
being a favourite study, but did not think them well fitted for decorative
purposes, owing to the insignificance of their foliage; but this show quite
dispelled both illusions. Here were pillars wreathed with waratahs,
Keneydia’s purple bloom, native begonia, lily-pillies entwined with ferns, at
the end of the hall dado formed with native roses (Boronia serrulata),
blandfordia, flannel flower, or Australian edelweis, epacris longiflora or
native fuchsia, boronia pinnata, and many others. An enormous group of
Welcome to our website – the perfect destination for book lovers and
knowledge seekers. We believe that every book holds a new world,
offering opportunities for learning, discovery, and personal growth.
That’s why we are dedicated to bringing you a diverse collection of
books, ranging from classic literature and specialized publications to
self-development guides and children's books.
More than just a book-buying platform, we strive to be a bridge
connecting you with timeless cultural and intellectual values. With an
elegant, user-friendly interface and a smart search system, you can
quickly find the books that best suit your interests. Additionally,
our special promotions and home delivery services help you save time
and fully enjoy the joy of reading.
Join us on a journey of knowledge exploration, passion nurturing, and
personal growth every day!
ebookmasss.com

More Related Content

PDF
Agent based Spatial Simulation with NetLogo Volume 2 Arnaud Banos Christophe ...
PDF
Agent Based Spatial Simulation With Netlogo Volume 2 Arnaud Banos Christophe ...
PPT
OPRF NetLogo Workshop
PDF
Agent-Based Modeling & Python @ PyData DC 2016
PPTX
Agent Based Modeling and Simulation - Overview and Tools
PDF
ICPSR - Complex Systems Models in the Social Sciences - Lab Session 1 - Profe...
PDF
Simulation of an Organization of Spatial Intelligent Agents in the Visual C#....
Agent based Spatial Simulation with NetLogo Volume 2 Arnaud Banos Christophe ...
Agent Based Spatial Simulation With Netlogo Volume 2 Arnaud Banos Christophe ...
OPRF NetLogo Workshop
Agent-Based Modeling & Python @ PyData DC 2016
Agent Based Modeling and Simulation - Overview and Tools
ICPSR - Complex Systems Models in the Social Sciences - Lab Session 1 - Profe...
Simulation of an Organization of Spatial Intelligent Agents in the Visual C#....

Recently uploaded (20)

PPTX
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PPTX
Cell Structure & Organelles in detailed.
PDF
01-Introduction-to-Information-Management.pdf
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
GDM (1) (1).pptx small presentation for students
PDF
Computing-Curriculum for Schools in Ghana
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
Complications of Minimal Access Surgery at WLH
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PPTX
Institutional Correction lecture only . . .
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
PDF
Classroom Observation Tools for Teachers
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
Cell Structure & Organelles in detailed.
01-Introduction-to-Information-Management.pdf
Final Presentation General Medicine 03-08-2024.pptx
GDM (1) (1).pptx small presentation for students
Computing-Curriculum for Schools in Ghana
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Anesthesia in Laparoscopic Surgery in India
Module 4: Burden of Disease Tutorial Slides S2 2025
Complications of Minimal Access Surgery at WLH
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Institutional Correction lecture only . . .
VCE English Exam - Section C Student Revision Booklet
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
Classroom Observation Tools for Teachers
STATICS OF THE RIGID BODIES Hibbelers.pdf
Ad
Ad

Agent based Spatial Simulation with NetLogo Volume 2 Arnaud Banos Christophe Lang Nicolas Marilleau

  • 1. Agent based Spatial Simulation with NetLogo Volume 2 Arnaud Banos Christophe Lang Nicolas Marilleau download pdf https://ebookmass.com/product/agent-based-spatial-simulation-with- netlogo-volume-2-arnaud-banos-christophe-lang-nicolas-marilleau/ Visit ebookmass.com today to download the complete set of ebook or textbook!
  • 2. Here are some recommended products for you. Click the link to download, or explore more at ebookmass.com Spatial Gems: Volume 2 John Krumm https://ebookmass.com/product/spatial-gems-volume-2-john-krumm/ Spatial Economics, Volume II: Applications Stefano Colombo https://ebookmass.com/product/spatial-economics-volume-ii- applications-stefano-colombo/ Spatial Economics, Volume I: Theory Stefano Colombo https://ebookmass.com/product/spatial-economics-volume-i-theory- stefano-colombo/ eTextbook 978-0470057476 Developing Multi-Agent Systems with JADE (Wiley Series in Agent Technology) https://ebookmass.com/product/etextbook-978-0470057476-developing- multi-agent-systems-with-jade-wiley-series-in-agent-technology/
  • 3. Everyday Applied Geophysics 2: Magnetics and Electromagnetism Nicolas Florsch https://ebookmass.com/product/everyday-applied-geophysics-2-magnetics- and-electromagnetism-nicolas-florsch/ Chipless RFID Based on RF Encoding Particle. Realization, Coding and Reading System 1st Edition Arnaud Vena https://ebookmass.com/product/chipless-rfid-based-on-rf-encoding- particle-realization-coding-and-reading-system-1st-edition-arnaud- vena/ Embedded Mechatronic Systems, Volume 2: Analysis of Failures, Modeling, Simulation and Optimization 2nd Edition Abdelkhalak El Hami https://ebookmass.com/product/embedded-mechatronic-systems- volume-2-analysis-of-failures-modeling-simulation-and- optimization-2nd-edition-abdelkhalak-el-hami/ Undercover Agent Slade https://ebookmass.com/product/undercover-agent-slade/ Biostatistics and Computer-based Analysis of Health Data using R 1st Edition Christophe Lalanne https://ebookmass.com/product/biostatistics-and-computer-based- analysis-of-health-data-using-r-1st-edition-christophe-lalanne/
  • 6. Agent-based Spatial Simulation with NetLogo 2 Advanced Concepts Edited by Arnaud Banos Christophe Lang Nicolas Marilleau
  • 7. Introduction The NetLogo platform is perfect for rapidly and effectively prototyping simple models. Volume 1, Agent-based Spatial Simulation with NetLogo 1, specifically focused on this remarkable quality [BAN 15a]. NetLogo also houses a number of commonly unexpected and underestimated resources that fully justify its status as a platform for agent-based modeling and simulation. These resources take two different forms. External resources allow specialized extensions to be directly constructed and/or exploited from within NetLogo, and allow NetLogo to be dynamically coupled with other libraries, software programs or platforms. The second form, more typically consisting of internal resources, arises from the suitability of NetLogo, its language and its architecture for developing models that are intrinsically more advanced. The objective of this second book is to give an educational presentation of these two important dimensions of agent-based spatial simulation with NetLogo. Readers will be offered a slightly atypical and unconventional presentation of NetLogo that emphasizes the aspect of being an open simulation environment (Chapter 1). Chapters 2–5 explore in depth the opportunities for extending and coupling NetLogo presented in the first chapter, situating them within a number of fundamental perspectives. Chapter written by Arnaud BANOS, Christophe LANG and Nicolas MARILLEAU. The scientific material this book relies on was developed within various research and pedagogic projects, which benefited from the financial or logistic support of several institutions: Mission pour l’interdisciplinarité du CNRS/PEPS HUMAIN CNRS (http://www.cnrs.fr/mi/spip.php?article193), LabeX DynamiTe (http://labex-dynamite.com/ en/the-labex/), ISC-PIF (https://iscpif.fr/), RNSC (http://rnsc.csregistry.org/), MAPS Network (http://maps.hypotheses.org/).
  • 8. x Agent-based Spatial Simulation with NetLogo 2 Chapter 2 discusses the question of multiscale modeling, with applications in road traffic management, and Chapter 3 focuses on coupling macro and micro models based on networks, with applications in spatial epidemiology. Chapter 4 explores the notion of network in much more depth, considering fundamental principles of graph theory but also more advanced features like dynamic graphs. Chapter 5 focuses on solving so-called “swarm” problems. Finally, Chapter 6 brings the book to a close by presenting a number of protocols for exploring complex models in NetLogo. In the same spirit as Volume 1, this second volume includes examples of NetLogo code and GitHub links for each of the models encountered. To be read and reread without moderation!
  • 9. 1 NetLogo, an Open Simulation Environment 1.1. Introduction to extensions in NetLogo NetLogo is a generic simulation environment in the sense that it was not designed with any specific domain of application in mind. NetLogo offers a wide range of features and generic operators to its users. Additionally, to make up for any missing features, NetLogo is compatible with other platforms and libraries, as we will demonstrate throughout this book. There is a vast library of extensions available to users, allowing them to integrate additional functionality that is not present in the native version of NetLogo, but which might nonetheless be necessary for the development of a given model. An official library of extensions is available on the official NetLogo Website. We will explore some of these extensions later in this chapter. But many modelers have also developed their own extensions to tackle specific problems that are of interest to them. These extensions are developed with an open Java API. We will discuss this in more detail in section 1.2. Conversely, NetLogo can also be called and controlled by other programs, such as OpenMole1, Python2 and R3. To do this, NetLogo provides a Java API Chapter written by Benoit GAUDOU, Christophe LANG, Nicolas MARILLEAU, Guilhelm SAVIN, Sébastien REY COYREHOURCQ and Jean-Marc NICOD. 1 http://www.openmole.org/. 2 https://www.pythong.org/. 3 https://www.r-project.org/.
  • 10. 2 Agent-based Spatial Simulation with NetLogo 2 that allows models to be loaded, executed and gives access to their variables and methods. The usage of this API is presented in detail in section 1.3. 1.1.1. Examples of typical NetLogo extensions There are many different types of extension. The GitHub page of the NetLogo platform4 gives one possible list of examples. This list distinguishes between internally developed extensions, which are included with the platform (e.g. GIS or network), and extensions developed by the community, which have to be installed manually (section 1.1.2). In Chapter 3 of Volume 1 [BAN 15a], we presented a number of these extensions (GIS and network) to showcase some of additional functionnalities of NetLogo. Some of these extensions include language extensions, which allow the modeler to manipulate more complex object types than those natively present in NetLogo. Indeed, the language of the platform has relatively few complex structures (unlike most programming languages) and primitives for manipulating them. For instance, the array, table and matrix extensions are now included with NetLogo. However, extensions such as string and file are external. More generally, the functionalities of the NetLogo language can be augmented with a wide range of extensions, for example to achieve better network management (network and nw), to provide more primitives for network analysis (additional metrics and indicators) or to integrate geographical data represented in vector form into NetLogo models (GIS). This is not an easy task, but this is absolutely necessary, as NetLogo models are natively based on a grid-based discrete environment. As another example, the SQL extension allows models to interact with a database by sending SQL-formatted queries and receiving data in response. Finally, the sound and MIDI extensions allow sounds to be integrated into NetLogo models. There are a number of extensions that enable NetLogo to interact with other tools. This interaction can take various different forms: it might simply involve reading or writing files that are compatible with a third-party application. For example, it is possible to process image files (bitmap), tabular data (csv), Java 4 https://github.com/Netlogo/Netlogo/wiki/Extensions.
  • 11. NetLogo, an Open Simulation Environment 3 system properties (Props), POV rays (RayTracing), VRML (VRML), NetCDF (NetCDF), etc. This allows modelers with different backgrounds to increase the realism of their simulations by exploiting real data in useful formats. Other extensions allow deeper forms of interaction by directly integrating third-party functionality into NetLogo; for this kind of interaction, NetLogo must be able to connect with another application to send requests and retrieve results, such as Matlab (MATLAB), Prolog (NetProLogo), IODA [KUB 11] (IODA) and Graphstream5 (gs). For example, the NetLogo language can be extended with primitives allowing it to benefit from the scientific calculation tool R [THI 10], and in particular to call R functions from within a NetLogo model. The R extension for NetLogo can be downloaded on the Netlogo-R-Extension Website6. It fulfills the task of communicating data between the two tools, and in particular performs type conversions from one language to the other. A working installation of R is required. There is also a reverse extension that allows NetLogo to be called from R, known as RNetlogo7. Finally, there are several extensions enabling NetLogo to connect with various types of hardware (sensors, actuators, etc.). Examples include the extensions Arduino (microcontroller), GoGo (sensors) and wiimote (game controller with an accelerometer). 1.1.2. Installing and using extensions in models The extensions used by NetLogo are located in the extensions folder in the NetLogo root directory. Each extension has its own separate folder. To use an extension that is not included with NetLogo, it has to first be downloaded (usually as an archive file), unzipped and installed. Installation is extremely simple – the folder extracted from the archive has to copied into the extensions folder. The folder name must be the same as the name of the extension. 5 http://graphstream-project.org. 6 http://r-ext.sourceforge.net/. 7 http://cran.r-project.org/web/packages/RNetlogo/index.html.
  • 12. 4 Agent-based Spatial Simulation with NetLogo 2 To use the primitives provided by the extension in a NetLogo model, we have to first declare the extensions used by the model: 1 extensions [extension_name1 extension_name2] To use a primitive defined in this extension, we simply call it by its name in the model prefixed by the name of the extension: extension_name1:primitive_name parameters For example, to extend NetLogo functionality to include additional time management functions, we can use the time extension, also known as the NetLogo Time Extension8. Once unzipped, the archive produces the folder time-1.3.0 (which corresponds to Version 1.3.0) containing the source files of the extension, documentation, example models and .jar files (Java archives). To use it in a NetLogo model, we have to simply rename this folder as time instead of time-1.3.0, and copy it into the extensions folder9. In order to use this extension, we declare it in the model: extensions [time] We can now use the primitives defined by this extension using the prefix time:. For example, time allows us to create a date object (with the create primitive) and to manipulate it, in order to retrieve the day, month or year of this date (get primitive), to perform operations on dates (plus primitive) or to compare dates (is-before, is-after and is-equal primitives)10: 8 https://github.com/colinsheppard/time/. 9 In fact, for this extension (and most other extensions), only the .jar files (time.jar and joda-time-2.2.jar) are required. These contain the definitions of the new primitives. 10 Other examples are included with the extension.
  • 13. NetLogo, an Open Simulation Environment 5 let my_date time:create "2016-02-28 17:28:07.777" print time:get "month" my_date print time:plus my_date 1.0 "year" 4 print time:is-before (time:create "2016-01-01") (time:create "2018-01-01") 1.2. Designing and developing extensions A project that allows minimal extensions to be easily compiled in Scala with SBT or Maven can be found within the GitHub repository Netlogo- extension-build-example11. 1.2.1. Environment for compiling extensions 1.2.1.1. Maven and Java Maven is a software build management system developed by the Apache Foundation. It works by defining and using Project Object Model (POM) files, which contain a set of instructions for successfully building the program. The first step is to install Maven on the workstation. Maven works by relying on repositories (local or online) containing the dependencies that must be downloaded at compilation. Since March 2016, NetLogo uses the online repository Bintray12, and it is no longer necessary to manually add the Netlogo.jar file to your local repository. Development versions (NetLogo 6.0) are already available from the online repository. However, in this book, we will use the stable Version 5.3.1. As a reminder, since only NetLogo versions 5.3 and later are available online, we will recall how to register a .jar file in the local repository of your device. Follow the instructions given in the documentation13. Once you are in the NetLogo /app/ directory that you wish to install (replace X.X by the version number), you can run the following command from the command line to install the .jar file in the local Maven repository: 11 https://github.com/Spatial-ABM-with-Netlogo/Chapitre-A. 12 https://bintray.com/netlogo/NetLogo-JVM/netlogo. 13 https://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html.
  • 14. 6 Agent-based Spatial Simulation with NetLogo 2 mvn install:install-file -Dfile=Netlogo.jar -DgroupId=org.nlogo -DartifactId=Netlogo -Dversion=X.X -Dpackaging=jar → For the development of most extensions, the Netlogo.jar file and the scala-library dependency will be enough. Other extensions that use specific NetLogo functions may, however, require other dependencies, most of which will be contained in the .jar files in the NetLogo /app/ directory. Users who wish to develop extensions in Scala or Java will need to pay attention to the version of NetLogo. NetLogo 5.3 is only compatible with Scala versions 2.9.x, and NetLogo 5.3.1 is only compatible with Scala versions 2.10.x. In both cases, the Java version needs to be 7.x. We have to wait for the next version of NetLogo before we can use Scala 2.10.x with Java 8.x. The simplest solution for compiling an extension is based on the modification of the JavaHOME variable used by Maven. In Linux, simply type the following command in the terminal before calling the mvn command: export Java_HOME=/path/to/jdk7/ The pom.xml file and the Maven project that can be used to compile a minimal Java extension may be obtained from the Java-plugin-Netlogo-maven project on GitHub. This project can be directly opened in the software workbench (or IDE) Java IntelliJ. The pom.xml file contains the list of dependencies to be loaded locally or from the Maven repositories, and also the configuration of two plugins: maven-compiler-plugin and maven-jar-plugin. The first plugin allows the Java sources to be compiled by running the Maven command mvn compile in the project root directory. The second one allows the .jar to be created in the /target repository by running the Maven command mvn install. 1.2.1.2. SBT and Scala Simple Build Tool (SBT) is a build system similar to Maven, but which is commonly used to compile sources written in Scala. NetLogo is compiled with SBT, since its most recent versions are written in Scala.
  • 15. Visit https://ebookmass.com today to explore a vast collection of ebooks across various genres, available in popular formats like PDF, EPUB, and MOBI, fully compatible with all devices. Enjoy a seamless reading experience and effortlessly download high- quality materials in just a few simple steps. Plus, don’t miss out on exciting offers that let you access a wealth of knowledge at the best prices!
  • 16. NetLogo, an Open Simulation Environment 7 Unlike Maven, which manages dependencies by using pom.xml files, SBT uses files written in Scala to determine the structure of the project and its dependencies. One of the most important such files is build.sbt, which may be found in the project root directory. SBT uses the same online repositories as Maven to download the right dependencies for compiling and packaging extensions in development. The primary SBT file, named build.sbt, uses Netlogo-Extension-Plugin14, which automatically downloads the right Netlogo.jar file and provides a simplified interface for packaging extensions. Since NetLogo version 5.3.1 can only be compiled with Java 7, we must tell SBT where to find this version on your device: sbt -Java-home /path/to/Java/home. Even though it may not be immediately useful in our case, note that it is possible to tell SBT which version of Java it should use to run Java programs by adding the following lines to build.sbt: fork in run := true JavaHome in run := Some(file(/path/to/Java/home/ )) Finally, the extension is compiled by running the sbt compile command, and the .jar is built by calling sbt package. 1.2.2. Notes on type conversion between NetLogo and Java/Scala All numeric variables used in NetLogo extensions must be converted into the Double type, as this is the only numeric type accepted by NetLogo. There are tools available to developers for converting from Java/Scala to NetLogo. But conversion in the other direction is not so easy. Type conversion from NetLogo to Java or Scala is more tricky, in particular for LogoList lists. Since NetLogo lists are able to contain different types, it is impossible to know in advance which types of objects are contained in the list variable. The only solution is to carefully typecast15 each element in the list before performing any operations. 14 https://github.com/Netlogo/Netlogo-Extension-Plugin. 15 Also known as type coercion, this means converting a variable from one type to another.
  • 17. 8 Agent-based Spatial Simulation with NetLogo 2 1.2.2.1. Java From Java to NetLogo: numeric type conversion can be performed with the command Double.valueOf(valueToConvert). This command wraps the double variables in a Double class, which is understood by NetLogo. From NetLogo to Java: handling lists requires generous use of try/catch blocks to detect and convert the types of objects contained in the list. We will illustrate this conversion when we present the code of the primitive for calculating the average of a list of values passed as parameters. 1.2.2.2. Scala Support for automatic type conversion from Scala to NetLogo has been added by the developers of NetLogo via the following import, which can be added to the start of a program: import org.nlogo.api.ScalaConversions. Calling the function .toLogoObject on any Scala data type (Boolean, Float, Character, Short, Int, Float, Long, Double, Byte, Seq) initiates the conversion process, which automatically returns a type that is compatible with NetLogo. With SBT, it is possible to initialize an interactive console, which can access the set of dependencies included in the project. This interactive mode allows us to enter commands directly into a terminal without having to compile or package the extension first. In the root directory, simply type the command sbt console into a terminal, followed by the following commands: import org.nlogo.api.ScalaConversions._ val myIntValue:Int = 5 myIntValue.toLogoObject // return Java.lang.Double val myFloatValue:Float = 2.2 myDoubleValue.toLogoObject // return Java.lang.Double val myScalaList = Seq(2,3,8) myScalaList.toLogoObject // return org.nlogo.api.LogoList
  • 18. NetLogo, an Open Simulation Environment 9 1.2.3. Commentary of an example extension The .jar file created by Maven or SBT after executing the second command includes a valid manifest file, which is usually named my-extension.jar. This should be copied into the directory /app/extensions/my-extension in NetLogo 5.3, and then called in the program with the following code: extensions [my-extension]. The extension named my-extension, which we compiled in the previous few sections, allows us to do three things: – return the sequence of characters “hello world” (print-message); – return the average of the numbers passed as parameters (get-mean); – construct a list of random numbers with length equal to the variable passed as an argument to the primitive (build-a-random-list). Calling the following command in the NetLogo observer returns the character sequence “hello world”: print my-extension:print-message. Calling the following command in the NetLogo observer returns the average of the list of numbers passed as parameters: print my-extension:get-mean list (10, 12, 15). Calling the following command in the NetLogo observer returns a list of five random elements: print my-extension:build-a-random-list 5. The extension code is given in Java in the below examples. Equivalent code in Scala is also available from the GitHub repository containing the examples for compilation with Maven and SBT. 1.2.4. Minimum content of an extension In order for NetLogo to be capable of loading an extension, the .jar file should contain two elements: a manifest containing NetLogo-specific properties, and a class implementing the ClassManager interface of the org.nlogo.api package. The .jar file must contain all classes associated with the extension. If additional software libraries are used, they can be placed in the extension folder in the NetLogo extensions directory.
  • 19. 10 Agent-based Spatial Simulation with NetLogo 2 1.2.4.1. Manifest The manifest must contain the following three properties: – Extension-Name, the name of the extension; – Class-Manager, the extension class implementing ClassManager; – Netlogo-Extension-API-version, the version of the NetLogo API used by the extension. If an extension named test has ClassManager implemented by the class MyExtension in the package org.test and uses the NetLogo API 5.1, it needs to have the following Manifest: Manifest-Version: 1.0 Extension-Name: test Class-Manager: org.test.MyExtension Netlogo-Extension-API-Version: 5.3 1.2.4.2. The ClassManager To develop the DefaultClassManager of the extension, we can extend the DefaultClassManager class of org.nlogo.api to reduce the list of methods that we must implement for load(PrimitiveManager). Passing the PrimitiveManager object as a parameter allows us to add new primitives (commands or reporters). Consider the following minimal example of the extension MyExtension: 1 package org.test; import org.nlogo.api.DefaultClassManager; import org.nlogo.api.ExtensionException; import org.nlogo.api.PrimitiveManager; 6 public class MyExtension extends DefaultClassManager { @Override public void load(PrimitiveManager primitiveManager) throws ExtensionException { //Declare primitives 11 } }
  • 20. NetLogo, an Open Simulation Environment 11 To define the call to the three primitives, we replace the comment in the load function with the following code: primitiveManager.addPrimitive(print-message, new MyMessage()); primitiveManager.addPrimitive(get-mean, new ComputeMean()); 3 primitiveManager.addPrimitive(build-a-random-list, new BuildRandomList()); 1.2.5. Snapshot of a primitive The three primitives are placed in three separate Java files, each of which contains the description of a primitive: 2 //BuildRandomList.Java public class BuildRandomList extends DefaultReporter { ... } //CountCharacter.Java 7 public class CountCharacter extends DefaultReporter { ... } //MyMessage.Java public class MyMessage extends DefaultReporter { ... } These three classes extend the DefaultReporter interface, and so have to implement the following functions: public Syntax getSyntax() {...} public Object report(Argument args[], Context context) throws ExtensionException, LogoException {...} In the next sections, we describe the way that these functions are called, and the results that they return. 1.2.5.1. Displaying “hello world” These primitives do not take any input parameter, and simply return a message. The function Syntax.reporterSyntax() therefore only has one
  • 21. 12 Agent-based Spatial Simulation with NetLogo 2 single argument, which indicates the expected type to be returned. Since “hello world” has the type of a string, we use the code Syntax.StringType(). public Syntax getSyntax() { 2 return Syntax.reporterSyntax(Syntax.StringType()); } Other types can be returned, such as Syntax.NumberType(), which indicates that a numerical value should be returned, Syntax.ListType(), indicating that a list is expected, or any other NetLogo object that can be manipulated by an extension, as shown by the list of functions defined in the Syntax object: BooleanType(), AgentsetType(), TurtleType(), PatchType(), LinkType()... 1.2.5.2. Return the average value of an array of variable size We can define the call to this primitive in two different ways, either by using the syntax Syntax.NumberType() | Syntax.RepeatableType() to define a repeatable number, or by directly using a variable-size list Syntax.ListType(). Finally, it should also be noted that we can specify as many Syntax.typeName values as the number of arguments that we wish to be returned when we call the primitive. Thus, new int[]{Syntax.NumberType() | Syntax.NumberType(), Syntax.StringType()} indicates a primitive that takes three input arguments, i.e. two numbers and one sequence of characters. // Way 1 using NumberType and RepeatableType 2 public Syntax getSyntax() { return Syntax.reporterSyntax(new int[]{Syntax.NumberType() | Syntax.RepeatableType()},Syntax.NumberType()); } // or Way 2 using ListType 7 public Syntax getSyntax() { return Syntax.reporterSyntax(new int[]{Syntax.ListType()},Syntax.NumberType()); }
  • 22. NetLogo, an Open Simulation Environment 13 In the first case, the primitive is called with: print (my-extension:get-mean 0.0 5.0 10.0), and in the second case with: print my-extension:get-mean list 0.0 5.0 10.0 or print my-extension:get-mean [0.0 5.0 10.0]. The second syntax, shown below, has the advantage of being more easily understood by beginners, but requires developers to check the content of the table before performing any operations. As discussed in the previous section on type conversion, the methods for retrieving the content of the LogoList variables return a collection of Object variables that need to be tested16. Arguments should always be recovered using the “safe methods” provided by the developers of NetLogo, which we wrapped into a method below. 1 private LogoList getListOrNull(Argument args[]) throws ExtensionException, LogoException { try { return args[0].getList(); } catch (LogoException e) { return null; 6 } } The operation that converts LogoList logoListNumbers into ArrayListDouble numbers is defined as follows in our code: 3 public Object report(Argument args[], Context context) throws ExtensionException, LogoException { final LogoList logoListNumbers = getListOrNull(args); // LogoList return an array of Object, so we need to cast to ArrayList[Double] 8 Double[] logoDouble = null; try { Object[] objectArray = logoListNumbers.toArray(); logoDouble = Arrays.copyOf(objectArray, objectArray.length, Double[].class); }catch (ClassCastException e){ 13 System.out.println(Cast Error, only numbers are supported here); 16 Both versions of the code are available from the GitHub repository online.
  • 23. 14 Agent-based Spatial Simulation with NetLogo 2 } ArrayListDouble numbers = new ArrayListDouble(Arrays.asList(logoDouble)); 18 return average(numbers); } Other conversion methods probably exist, but this topic is currently little documented on the official website. Note that in this last example wrapping the variable returned by the function average(numbers) in a Double is not strictly necessary, as Java can perform “autoboxing” in certain conditions: http://docs.oracle.com/Javase/tutorial/Java/data/autoboxing.html. 1.2.5.3. Construct and return a table of variable size The first argument new int[]{Syntax.NumberType()} of the function Syntax.reporterSyntax() states that the primitive expects an integer input. The second argument Syntax.ListType() tells NetLogo that a list will be returned. public Syntax getSyntax() { return Syntax.reporterSyntax(new int[]{Syntax.NumberType()},Syntax.ListType()); } Lists can be constructed using a “builder” provided by the developers: LogoListBuilder list = new LogoListBuilder(); Adding a Double (not double) can be achieved with a simple loop as a function of the value n, assigned by calling the getIntValue() method of the class Argument on the table args[0]: for (int i = 0; i n; i++) { list.add(Double.valueOf(r.nextDouble())); }
  • 24. NetLogo, an Open Simulation Environment 15 1.2.6. Future versions of the NetLogo API Although the NetLogo API has been relatively stable for several versions, it is expected to change with version 6.0. Here are a couple of changes that have already been confirmed for the future version of the API: – multiple classes will be renamed or reorganized in future. For example, a new package org.nlogo.core already uses classes from org.nlogo.api, org.nlogo.nvm, and org.nlogo.agent; – DefaultReporter and DefaultCommand will be removed, and org.nlogo.api.Reporter and org.nlogo.api.Command will become easier to extend. Since this version is still in development, more information can be found on the webpage dedicated to the transition17. Help will be available on the various channels of communication used by the developers of Netlogo: gitter18, GitHub19 and the NetLogo wiki, which details the extensions API20, the discussion group21, and the StackOverflow22 website under the NetLogo tag. 1.2.7. Extending the graphical interface The NetLogo API does not currently allow the development of dedicated graphics widgets. However, it is possible to add a new tab to the interface and directly manipulate its AWT/Swing canvas. We will use the GRAPHSTREAM23 software library, which allows graphs to be dynamically manipulated. The purpose of the extension is to display a graph showing the set of turtles and the links between them. 17 https://github.com/Netlogo/Netlogo/wiki/Hexy-Extension-Transition-Guide. 18 https://gitter.im/Netlogo/. 19 https://github.com/Netlogo/Netlogo/issues. 20 https://github.com/Netlogo/Netlogo/wiki/Extensions-API. 21 https://groups.google.com/forum/#!forum/Netlogo-devel. 22 http://stackoverflow.com/questions/tagged/Netlogo. 23 http://graphstream-project.org
  • 25. 16 Agent-based Spatial Simulation with NetLogo 2 The following code provides the basic structure of the extension. We will later show how to develop one part of the missing content. The code is available in full on GitHub24. import org.nlogo.api.*; import org.graphstream.graph.*; public class GSExtension extends DefaultClassManager { protected Graph graph; protected ExtensionContext ctx; public Graph getGraph() { return graph; } public ExtensionContext getContext() { return ctx; } public void load(PrimitiveManager manager) throws ExtensionException { manager.addPrimitive(init , new DefaultCommand() { public void perform(Argument[] arg0, Context arg1) throws ExtensionException, LogoException { → GSExtension.this.init((ExtensionContext) arg1); } }); } public void init(ExtensionContext ctx) { this.ctx = ctx; this.graph = new AdjacencyListGraph(netlogo ); this.graph.addSink(new GSNetLogoSink(this)); addTab(); } protected void addTab() { ... } } 1.2.7.1. NetLogo/GraphStream connection In a simulation, the NetLogo model and the graph coexist separately, and consistency needs to be maintained between them. Modifications affecting the NetLogo model must therefore update the graph, and vice versa. The GSNetLogoSink class of the extension is dedicated to managing this connection. 24 https://github.com/graphstream/gs-netlogo.
  • 26. Visit https://ebookmass.com today to explore a vast collection of ebooks across various genres, available in popular formats like PDF, EPUB, and MOBI, fully compatible with all devices. Enjoy a seamless reading experience and effortlessly download high- quality materials in just a few simple steps. Plus, don’t miss out on exciting offers that let you access a wealth of knowledge at the best prices!
  • 27. Exploring the Variety of Random Documents with Different Content
  • 28. CHAPTER XX From Lapstone Hill I again saw the valley of the Grose, with the Nepean River like a silver thread winding between banks and meadows fair. Emu plains, with its many farms, nestling amidst the luxuriant autumn foliage, formed a peaceful panorama. Mr. James kindly rested the horses, allowing us to feast our eyes until the approach of a train reminded him of progression, as he immediately remembered that we had some miles to travel ere we reached Glenmore. However, the distance appeared less to me, having so much to think of, past and future. We soon crossed the bridge and drove through part of Penrith; then along the road to our destination, which was so familiar to my companions and so strange to me. One of the greatest trials of my life had been the inevitable feeling of utter loneliness when first entering a family as a stranger, where they were all so familiar, so bound up together by the ties of home affection. My first impression of Glenmore was, “This place should be called Florence, as it was, indeed, the home of flowers.” Hereford House and others had been rich with “earth’s stars,” but not to compare with the profusion and richness of bloom before me. The cottage at the gate was covered with roses, honeysuckle, and the purple and white maurandria. We drove between hawthorn hedges, with arched entrances to orchard, vineyard, and orangery. The front of the house was literally a carpet of flowers, as the gravelled sweep was covered with many coloured portulacas and mignonette, which were allowed to grow and blossom during the master’s and mistress’s absence. While the parents greeted their elder children, I stood looking at the view before me. In the foreground a large bed with trees and flowering shrubs, bordered by verbenas and petunias of every hue; beyond croquet lawn, paddocks enclosed for kangaroo and deer; then grassy slopes bounded by distant hills, clothed from base to summit with foliage. The house was somewhat of the Italian style, commodious, with large lofty rooms, double halls, and cool passages; a long verandah covered with climbing plants on one side, into which my room opened, and immediately in front of my window the opening into the flower garden, which was always full of blossom, and showed each season’s calendar written by Nature’s hand. The finest oak tree I had seen for many a day was here, surrounded by a low hedge of
  • 29. laurestines. Beyond this was the orangery, with the rich green of the leafy trees, the snowy buds and blossoms then perfuming the air—a veritable garden of the Hesperides. Fern Hill and Wimborne, the other estates in “the valley,” were also in their different styles pleasant country houses. The first was a modern mansion situated on rising ground, with well-kept shrubberies, lawns, and vineyard. Wimborne had many acres of cultivated land, parklike in extent. The house was large, but more in the older colonial style of architecture. The owners of the estates were related, so the picturesque church between Fern Hill and Glenmore was like a private family chapel, as the congregation, with few exceptions, consisted of the households of the three places. We had service—conducted with great simplicity—alternately morning and afternoon. It was pleasant to observe the family greetings in the porch on Sundays. Sometimes we left Glenmore for walks in the neighbourhood. One was an especial favourite—a deserted burial-place of an aboriginal tribe on the banks of a creek. It was a very picturesque spot, thickly wooded, with groups of trees with rude carvings on their trunks. I was informed that they left their dead above ground, wrapped in rude hammocks slung between trees, always selecting places near rivers or creeks. Another object for long walks was the collecting of gum by the children; at some seasons it literally poured down the trees. On seeing this, I could understand the large deposits of Kauri gum dug out of the ground in New Zealand, the accumulation of many years. Some mornings we would go on a mushrooming expedition, our paddocks supplying us in great profusion with these delicacies, so that our baskets were always well filled. The arrowroot grew plentifully at Glenmore, so Mrs. James had nearly a hundredweight made one season. It was interesting to watch the process of grinding the root into pulp, the cleansing of the muddy-looking wash with many waters, until the sediment was a pure white, which is then spread over calico and laid on the grass to dry. For indoor amusements we had music, reading, and work. Mr. James had an excellent library, and for modern literature a box from Maddock’s (our Australian Mudie) kept us au fait in the doings of the literary world. Occasionally we had croquet parties on the lawn at Fern Hill, with afternoon tea and claret cup. Playing at croquet, or watching the graceful figures of our girls, and the elegant, genial hostess moving amongst her guests, made a very pleasant diversion in the quiet home life. Our
  • 30. household at Glenmore was a very happy one. Mrs. James, one of the sweetest-tempered women I ever met, ruled her large family by love and gentleness, and during three years’ residence under her roof I never saw her angry or in any way ruffled, which, considering there were eight children, from one to twenty years of age, at home, with three boys at holiday time, was really wonderful. She had her two elder girls as companions; I, my children, and one dear girl who rode over from Fern Hill every day to join in our studies—clever, loving, little Lilly. How we missed her when God gathered her for His garden of angels, and our “happy valley” knew her only by the quiet grave which marked her resting-place under the church’s shadow on the hill! My long holidays were spent with various friends in Sydney. During one, Sydney was en fête in honour of the Duke of Edinburgh; this being the first visit paid by a member of the Royal family to Australian shores. James, Maria, and I watched the public reception from a stand in Macquarie Street, and from our friend’s windows in Cumberland Street had an excellent view of the naval reception and harbour illuminations. Afterwards, when staying with Mrs. Frederick, I saw our Royal guest driving past to Point Piper, and later on heard his kindly-natured hostess speak of “the great interest he evinced in colonial life.” Does His Royal Highness ever think of his first experiences of life in Australia?—the dances, picnics, shooting-parties at Nepean Towers and elsewhere? A friend related an anecdote of him which proved he was really fond of animals. On one occasion he returned to the dining-room to give his dog water instead of “leaving it to others,” as his host suggested. I heard he had quite a menagerie on board. A young friend of mine sent him a parrot, and handsome Mrs. E. K. C. an owl, which he named after the donor. I am certain he has never received a more heartfelt welcome than he did in his Royal mother’s “Golden South,” which welcome was so terribly sullied by the maniac’s attempt on his life. Australia will never forget the thrill of horror this caused through the length and breadth of the land. The fair-faced youth to be shot in our midst at a time when all classes met to greet him as a friend and guest! This was my last glimpse of royalty, being an invalid when the Prince of Wales’s sons visited Sydney, and during my year’s residence in England. Still I hope ere my return to Australia to see Her Majesty and members of the Royal family again. While at Glenmore I was present at two weddings—Mr. James’s eldest daughter’s and her cousin’s at Wim: both were very grand affairs. At
  • 31. ours there was a very large family party; out of seventy guests there were only about ten not connected by birth or marriage. Unfortunately the sun refused to shine on our bride, so the grounds were not utilised; but the time passed quickly, and an enjoyable dance finished the day. Miss Una was more favoured a fortnight after, as she had a lovely day to bid farewell to her childhood’s home, the youngest and last to leave. The extensive grounds at Wim were thoroughly appreciated by cricket and croquet players on this occasion. During one of my visits to Sydney, I saw and heard of the man who afterwards became famous as “the claimant” to the Tichborne estate; he had just arrived from the country and was staying at the same hotel as my brother. One afternoon, on calling there, in the hall I met this man face to face. “Do you know who that is, K——?” “No; who is he?” “Well, he says he is Sir Roger Tichborne.” That evening after dinner at our friend’s the subject was alluded to, and on our host asking, “What do you think of him, L——?” “What do I think? Why, he is no more Sir Roger Tichborne than you are. No man, however unused for years to the society or manners of gentlemen, could ever forget certain usages of his youth as this man has, who cannot even spell the simplest words correctly.” “That is nothing.” “Well, that may be; but if you saw this man often, you would understand what I mean.” In after years, when I heard how the impostor was believed in, I thought of this conversation. Of course at the time I write of, the infamous scheme had only commenced, and the man was off his guard and untutored. My peaceful life at Glenmore had to cease, owing to bad health; a long rest was imperative, so once more I had to avail myself of my friends’ kind offer to pay them a long visit at Oviedo Cottage, Petersham, where as usual I was treated as a sister. One family—James’s oldest friends—had a nice suburban house and grounds near to us. He had known the owner from boyhood in England, and had been present at his marriage to a young and very pretty girl, now the energetic and hospitable mistress of Derry Vale, with a fine family to brighten their home. This place, greatly enlarged since my first visit, was our last resting-place in New South Wales. I also paid several visits to Parramatta, which always interested me. Parramatta or Rose Hill, as it was first called, is the oldest inland town in the colony, and the first harvest ever gathered in New South Wales, one hundred years ago, was reaped there. Old Government House still remains in the Inner Domain,
  • 32. or Parramatta Park. This place, with its avenue of oaks, is like a scene from the old country. The orchards are very numerous now, extending over an area of four thousand acres, varying in size from fifty to a hundred acres each; the orangeries cluster more thickly around Castle and Pennant Hills. Here the vine was first planted, and grows luxuriantly—in fact, the district seems adapted to every kind of fruit. Apples, pears, and plums from the northern lands; oranges, grapes, peaches, and other fruits from the southern lands of Europe flourish equally well. Alas! Parramatta has one drawback— mosquitoes. These pests are found in all the districts on the eastern side of the mountain range, and to some people make night far from comfortable. I have known many, after living in the country a quarter of a century, dread on this account the approach of summer. Besides visiting Parramatta by steamboat and train, I have been by the well-known road, scarcely altered since I travelled on it so many years ago. Races were still held on the Homebush Course, and boating parties on the river, now world renowned as the scene where our Australian scullers have won their laurels. The trip by the steamer is very agreeable, passing on the way up the river Five Dock, Hunter’s Hill, Kissing Point—the latter now called Ryde; others renamed Greenwich, Mortlake, etc. I read an article the other day in an English paper on the fondness Australians have of naming places after celebrated men; Gladstone was one mentioned. I quite agree with the writer to a certain extent; still is it not unwise to sneer at colonials, who wish by so doing to honour their country by such names as Wellington, Gordon, Drake, Nelson, and others? No doubt they have many absurd as well as commonplace names. But are there none equally so near home? In my opinion the natives’ names should have been retained and adopted. What could be more euphonious than those we have still,—such as Ulladulla, Illawarra, Wollondilly, Nanima, Eurunderie, Marulan, Moruya, Murrurundi, Merriwa, and hundreds of others? I had an excellent view from Point Piper of the Flying Squadron that visited Sydney. It was a fine sight, watching the ships under canvas gliding on the intensely blue waters, under an equally blue sky, to Middle Harbour. We had flower shows in the gardens, cricket-matches in the Domain, bazaars everywhere now. Our church school feasts were held in many spots open to the public, and on the shores of the harbour, which later on, when the train was available, were deserted for fresher fields. Australia is certainly well adapted for outdoor amusements. Cricket and tennis can be
  • 33. played almost all the year round, and picnics and garden parties are practicable through about eight months. Holidays are spent in the open air, as there are few places for day amusements under cover like the Crystal Palace at Sydenham and others in England. Trains, omnibuses, trams, and steamers swarm with well-dressed and happy-looking people, all bent on enjoyment, while the city and suburbs are almost deserted. I have often watched them, and thought this is really “a land flowing with milk and honey.” No cruel winter, when men and women, however willing, cannot find work. There seems to be no real want or poverty. Surely such a land must become the home of millions!—this sunny land, “a land of promise” for the overgrown population of cities of the older world. A sad bereavement made me leave Sydney for a time. Maria’s death caused a terrible blank in my life, so hearing of an engagement to educate a girl of sixteen, I left in the autumn for Singleton.
  • 34. CHAPTER XXI I left by steamer for Newcastle to meet the train by which I was to travel as far as Singleton, where a carriage was to meet me. The country we travelled through struck me as being flat and uninteresting compared with the scenery of the mountains so well known to me. Singleton was a well- laid-out town, already possessing several good buildings, a church, large store, and public school. My destination—a large cattle farm some miles out—was very unlike anything I had hitherto lived at, low and flat; the house, however, was very comfortable and nicely furnished. My own apartments were large, and certainly everything was suitable for our requirements: bookcase and piano for study or amusement. My pupil, a girl of sixteen, decidedly above the average in intelligence, promised to be a pleasant companion. There was originality in her character. Under judicious and wider training she was likely to develop into a clever woman; but with present surroundings I used to think, “She will grow hard, and perhaps sceptical.” Wombo was a large farm and station for breeding from famous imported cattle. My pupil, the youngest of the family, seemed quite an anomaly there. Though her mother was of good natural ability, a long residence in such an isolated place had to a certain extent dried up the early impressions of a visit to England and life in Sydney. For the first time I saw there what splendid servants the Chinese can be made. They had a cook equal to the best European I ever met with; his dishes, bread, and butter the best of their kind; his kitchen a picture of cleanliness, as he also was in person. A daughter of his, about fourteen years of age, born on the place, was being trained as a parlour-maid, and already waited at table quickly and well. The cook had married a young emigrant girl from Somersetshire, who had been housemaid at Wombo, and certainly in this union had the best of it; she being an ignorant, lazy woman. She lived in what might have been made a pretty, comfortable home; instead of which it was a miserable, untidy, dirty hole, with numbers of children running about like half-caste savages, unkempt, uncared for. Poor “Jimmy” occasionally asked for half a day from the house, and then had a turn-out of his own. Several times I tried to get his wife to speak of herself, or her early home, but she seemed to have sunk into a state of apathy. She must have been a fine-looking woman;
  • 35. indeed, her former mistress told me she was, and could have married a white man. When she told her she was going to marry the Chinese cook, her mistress had remonstrated with her, asking, “What would your mother say to such a thing as your marrying a Chinese heathen?” “I dunno; he’s as good as she; same God made ’em both.” Mrs. Durham now thought Jimmy was the more to be pitied. A most agreeable break in our usually monotonous life occurred soon after my advent at Wombo in a visit from W. B. Dalley, who was an old and intimate friend of the family, accompanied by a brother of Mrs. Durham. They spent several days with us. It was a treat listening to the conversation of these men at dinner in the evening; and afterwards Mr. Dalley would come into my sanctum, have a chat, and read to Sophie and me. He was certainly a man his country should honour; was, I have to write, as lately I have heard he has joined the “great majority.” A more courteous gentleman could not be; refined in taste, liberal in views on all subjects, one of Australia’s most gifted sons. The fire of eloquence had touched his lips, and his “silver speech” added beauty to the poems he read to us, which would have given delight to the authors. I had just been reading Longfellow’s Hyperion, and Bulwer’s Pilgrims of the Rhine to Sophie, from both of which he quoted long passages; then he read several of Tennyson’s and Longfellow’s, and with two extracts from the latter, “his especial favourites” he told us, I will close this poor tribute to his memory— “Thus, O Nuremberg, a wanderer from a region far away, As he paced thy streets and courtyards, sang in thought his careless lay: Gathering from the pavement’s crevice, as a floweret of the soil, The nobility of labour,—the long pedigree of toil.” “Honour to those whose words or deeds Thus help us in our daily needs, And by their overflow Raise us from what is low!” My health being still delicate, I found Wombo too bleak, so after a few months left for Sydney, where I spent several months visiting friends. Before returning I paid a visit to Morpeth by train, and found little alteration there; the same long, quiet, grass-grown streets, the same old houses. Altogether the northern district struck me as being far behind the
  • 36. western in every respect, owing no doubt to the absence of gold-fields in the immediate neighbourhood, as in the western and southern districts. There were many fine estates, such as Duckenfield and others, in this district; but East and West Maitland had not altered since my visit to them nearly ten years before. I heard, after the mining mania later on, when companies were formed to work old fields and new ones were started, business brightened here, as elsewhere in the colony. On arriving in Sydney, diamonds were much talked about, owing to some fine stones having been found, and it was stated one very large stone was in Sydney, an Australian koh-i-noor. As the Mudgee district was said to be the best diamond field, I remembered the crystals given to me at Pipeclay diggings, some of which I had given to a friend. Staying at Clarendon House in town, where there were so many visitors, my diamonds caused quite a sensation, especially as one was as large as a pigeon’s egg. How earnestly, listening to the opinions for and against their being diamonds, did the gentle face of Mrs. Woolley brighten at the idea of my being so fortunate; what books were examined on the subject! At Mrs. Frederick’s too the same amount of interest was taken in them. One friend tested a specimen by fire, and several windows suffered by scratching on them. At last they were submitted to the best authority in Sydney, whose verdict soon shattered the airy castles of my friends, and my brief reign of having “great expectations” was over. The different bands now played in the Botanic Gardens, a great improvement on the former custom of playing in the Domain, as there were so many shady seats for rest in the former, and flower-scented paths to stroll in. The view from the gardens,—embracing as it does Government House, Farm Cove, where H.M. ships and yachts lie at anchor, a large expanse of the harbour, with the north shore in the distance—is one that can scarcely be surpassed anywhere. We do not require glass houses for winter gardens in “The Golden South.” All the year round tropical plants and evergreens abound, and the sward is brilliantly green, though it is necessary to state that the hot winds in summer are most destructive to all kinds of vegetation. The camellias flower in the winter. What beds of anemones, ranunculus, and pansies have I seen there during the season we term winter, which is certainly not so cold as spring in England! At times the long-continued sunshine tired me, and made me long for grayer skies, especially as the air of Sydney is very relaxing. The summers are longer there than in the
  • 37. country, where cooler weather often begins in March and continues until October. In many parts of the western and southern districts geraniums, heliotropes, and all tropical shrubs have to be housed in winter; but even there the weather is only cool, not cold. Our flower shows used to be looked forward to as important events; now the agricultural shows share the popularity. Only the principal nurserymen and florists, with a few gardeners of wealthy residents, exhibit in Sydney, as the suburbs have their local shows. During this visit to Clarendon House one of my friend’s daughters was married; later on I saw two others of the same family stand at the altar of the dear old church so full of memories of the past. After the wedding was over, I went to my friends at Humberstone, where I remained an ever welcome guest, until I heard of an engagement in a family living near, the home of a widowed lady whose two youngest girls were my pupils. I was very happy, being near many friends, and having the society of an elder daughter of the house, and her young companions—girls of seventeen or eighteen. Miss Mossman was very bright and sang charmingly. Since those merry days she has married well, holds a high position in society, and while in England was presented at court. “The Grove” was a picturesque house, only a pleasant walk from Petersham and Marrickville, half an hour’s drive from Sydney or Burwood, and near two old estates, Annandale and Dobroyd. I am reminded continually of the first by our avenue of pines here, as the old trees at Annandale have been a landmark for years, no doubt to be soon removed by decay or progress. Since the time I am writing about, one portion of the estate has been built on, and is now a largely populated suburb, just as many others have sprung up in a decade or two. The Warren Estate, Hurstville, and Sutherland are instances enough of the growth of the suburbs of Sydney in a few years. I was glad to be constantly employed, for Death had been busy with his scythe this year. My kind friends, Mrs. Frederick and Mrs. du Moulin, left me sorrowing. Both being in delicate health for years, life was perhaps wearisome to them, and those who mourned for them knew that they had through life garnered above the “golden grain” of true charity. Losing three such friends in two years was a great trial, and certainly the best palliative for grief is the constant companionship of children. It would be selfish to cast a shadow from it over their young lives; their innocent hopes and confidences should never be darkened by the losses time invariably brings. Wreathe his brow with flowers for them; years will entwine the thorns only
  • 38. too soon. The dear old home in Cumberland Street, with the kind hearts there, and the true friends at Humberstone, ever ready to welcome me, with gentle Marian’s companionship always willing to sympathise and cheer, were still left to me. I left the Grove, and after a short visit to Petersham went to Clarendon House, where I remained until my marriage in September, the kind, generous friend there treating me as a daughter, and her children taking as much interest in my future as though I was one of themselves. Again the old church was visited, and I stood at the altar, where as a girl and woman I had so often knelt, and left many a burden of care and sorrow. Now if it should come, I should not have to bear it alone. The day was bright, and our drive to “Sans Souci” very charming; I had not been in that direction for years, and never beyond Cook’s River dam. Sans Souci was a favourite spot for the honeymoon, especially at this season of the year, when visitors were few. We were the sole visitors, except on one occasion, when the Rev. Mr. Pendrill (master of one of the principal private schools in Sydney) brought a party of young men there for the day. We were much amused at their evident desire to catch a glimpse of the bride, thinking very likely she was young and fair. The hotel being close to the water, we could wander amongst the rocks in one direction, and in another stroll through the bush gathering wildflowers, which at this season were to be found in profusion. The hotel was well managed, and our stay there a peaceful and propitious commencement of a new life to us both.
  • 39. CHAPTER XXII Our first home, being on the North Shore, gave me an opportunity of seeing that hitherto to me unknown suburb which from its position made it difficult to visit. After trying Milsom’s Point and Lavender Bay, we decided on travelling via Blue’s Point, as being equally near my husband’s office and the dear old house in Cumberland Street, where I was looked for every week at least, and often on Sunday. Our home was a very nice cottage near “Berry’s Bay,” and from the grounds at the back a beautiful view of the harbour, Parramatta River, and islands, with the Blue Mountains in the distance. This I painted and sent to our brother in England, it now hangs in his wife’s morning room. This with another sketch of Sans Souci are the only two left out of many. The North Shore is most picturesque, but the ascents are very steep, and the means for locomotion few at this time; we found it very trying. The views of the harbour, bays, and city from the heights are exquisite, and now that there are plenty of vehicles and a tramway, the difficulties of visiting this district are small. Houses are rising rapidly and soon occupied. Near the shores of the harbour there are several superior houses, with grounds extending to the water. The Admiral of the station lives there, and also several leading men of the colony. A bridge across the harbour has been promised by one of our politicians; but this was during an electioneering contest, so it will be understood that such promises by such men generally prove to be words, idle words. When a bridge connects Sydney and the North Shore, another city will spring up that will rival Sydney; but it is to be hoped it will be better laid out, with the roads and streets of a respectable width, with trees planted to shade the side walks. The land towards Middle Harbour and in other directions will become valuable then as suburban sites. The scenery here, as in other portions of the harbour, is very beautiful. We engaged a boat at Pearl Bay and went some distance up the harbour; one of the party, who had just returned from a tour in Europe, remarked that it reminded him of parts of the Rhine, only here there were no ancient castles immortalised by romantic legends. We did see one solitary and dilapidated hut and a single figure fishing from a rock. The scenery on the Hawkesbury River I consider far more like the Rhine.
  • 40. As the mistress of a house, the domestic problem had to be solved; and with one or two exceptions, I have not found any difficulty in that respect. My maids for thirteen years were colonials, from the age of fifteen to twenty-four. Some required training; all were respectable and well behaved, and are well married. It is the emigrants, principally Irish, who give the most trouble to mistresses. They leave their own country perfectly ignorant of their duties, with the idea of very high wages and little to do, or that they will get married shortly after landing. They soon grow discontented, and what they consider independent; change from one place to another, and too often, poor creatures, drift into the depths of degradation. We had but one emigrant; she is a Scotch girl of the better class, who left “Bonnie Scotland” five years ago with her family, and has been with us ever since her arrival in the colony, leaving all her family in Australia, to be our greatest comfort in what to me now is almost a foreign land. The working classes in Australia are exceedingly well off, having high wages, generally plenty of work, short hours, and plenty of time for pleasure. Seventeen years ago wages were lower, but so were rents, and provisions were cheaper,—meat at that time being twopence per pound, and fruit almost given away. I have bought peaches, nectarines, and apricots at twopence the dozen, while grapes could be had for a penny the pound. Every year things are becoming dearer as the population increases, but still there is plenty for all. Discontent and strikes have increased the proportion of those requiring assistance at our doors. There is a class who emigrate totally unfitted for a new country, perhaps for any. To the credit of the colonies, be it said, that whenever distress is made known assistance is forthcoming. We have heard a great deal lately of the unemployed in Sydney, and the Government (I think unwisely) finding work for them at the public expense. Nearly two years ago, when a portion of the Southern and Northern Junction Railway was open, I went with a friend to see the country, passing through Concord, then over the bridge across Parramatta River, until we came in sight of what we thought must be a volunteer encampment, as under the trees there were several snowy tents pitched and men clustered about. Presently we stopped at an impromptu platform, and at once the train was met by several men, the officials from the trucks throwing out loaves of bread, and lifting out whole sheep and sides of beef. “What is it?” we inquired. “The week’s rations for the unemployed who are clearing the bush at Hornsby and other places.” Out of the crowd there we only noticed two
  • 41. men who looked really deserving. One poor fellow was quite concerned at the rough treatment the bread received, and lifted the loaves carefully, dusting the dirt off with his ragged sleeve; at last he remonstrated, saying, “Don’t throw good food about like that! Had you known the want of it, as I have in the old country, you would be more careful of it.” Up to this time we had not held any intercolonial exhibition; some public men arranged for the erection of a spacious building in Prince Alfred Park, Redfern, where exhibits from the adjoining colonies gave a good idea of their progress as well as our own. It was well attended, and brought numbers of people from the country and the other colonies. In the grounds outside the building an agricultural show was held,—implements, horses, sheep, cattle, poultry, dogs, and produce showing to me the advance made in thirty years. This exhibition building, the property of the city, has since been used for various amusements,—concerts, meetings, balls, dinners, fancy fairs,—and the winter before I left was converted into a skating rink, open to the public night and day, excepting when engaged for private parties for skating and afternoon tea. The new buildings in Sydney are imposing structures, and as the value of city property is rapidly increasing, the old houses are fast disappearing, and others more lofty and of better design rise in their places. Great expense has been gone to in the erection of public offices, the University and its affiliated colleges, offices of companies, banks, and private firms, mostly of sandstone of excellent quality from the Pyrmont quarries. About this time we lost our dear old friend in Cumberland Street, and the home was broken up. James left for a responsible position in Western Australia, and by regular correspondence kept us fully informed of all that was going on there. From his description I gleaned that society there was exactly as it had been in Sydney over thirty years ago, consisting of Government officials, wealthy squatters, and a few merchants. But the advantages of constant and quick communication with the mother country and the more advanced colonies of Australia, with a railway from Freemantle to Perth—the seat of Government,—made life more pleasant. Western Australia will assist in absorbing the surplus of population from older countries; part of it is well adapted for sheep and cattle. In the northwestern portion there is the Fitzroy River, falling into King Sound, which is about sixty miles long from the mouth of the Fitzroy to the islands at its entrance from the ocean, and about thirty miles wide in the broadest
  • 42. part; the river is two hundred and forty miles in length, and flows through large tracts of good pasturage. The timber is good,—the jarrah, pine, cajeput, cork-bark, acacia, banksia, and eucalyptus—one variety of the latter peculiar to Western Australia bearing a beautiful scarlet flower. The wildflowers are somewhat different from New South Wales,—the desert pea and everlastings of many colours, with others whose names are unknown to me. Perth has a fine Government house, town-hall, and other public buildings, better than Sydney could boast of when I first saw it, but from James’s letters everything in the way of business was flat compared to Sydney. I have forgotten to mention the pearl fishing industry. We had some pearls sent to us which were large and of good colour; and when mounted, they appear equal to any from other parts. Gold, lead, and coal have been found there. Though containing the largest area of land of any of the Australian colonies, and a climate varying from tropical to temperate, there is much difficulty in exploring, as water is scarce in many parts, and this retards settlement. Queensland in its northern portion is similar in climate to the northern part of Western Australia, and the former has for many years been famous for sheep. I have four young friends settled in Queensland; one on a station a hundred miles from post or telegraph office, another near a township; but the heat is so great, she has to spend the summers with her mother, near Sydney; another has a luxurious home near Rockhampton; but even there she soon lost her youthful bloom. Yet it appears to be a healthy climate for men, as these ladies’ husbands are all from home and enjoy good health. Their wives are of the second generation of Australians; perhaps this is the reason that they suffer from the climate more. Another brave girl friend of mine by this time has gone as a bride to the borders of South Australia, leaving mother, sisters, and large circle of friends, to make a home for her husband there. She is a true Australian girl, an accomplished musician, a champion tennis player; and better than all, an excellent housekeeper. No one knows better than myself how deserving of pity an English girl is who marries to go into bush life in the northern portions of these colonies; however willing, her training has unfitted her to rough it or to make the best of everything. We were now living in Sydney in quite a new neighbourhood, at the top of Elizabeth Street, where a Hunter Street tradesman had purchased the lease of portion of Sir Daniel Cooper’s Waterloo estate, building thereon
  • 43. rows of neat cottages and terraces of houses. The soil was sandy and rather swampy in parts, with a thick layer of decayed vegetable soil on the surface: this, when dug in and mixed with the sand, formed a splendid soil for flowers. In less than a year we had bushes of fuchsias, begonias, and pelargoniums, and the dividing fences covered with dolichos, maurandria, and hoya. The street terminated in sandhills. On the summit of the highest, “Mount Carmel,” stands the Roman Catholic Church, which is built on the best sites for the purpose in Sydney. At this church I heard Archbishop Vaughan preach, whose death was an irreparable loss to his people. The lower part of the Waterloo estate, towards Botany, was and is the “east end” of Sydney, chiefly occupied by the lower classes; the vicious, idle, and worthless congregate there. Of late years the Chinese have flocked to this neighbourhood, which has not improved its cleanliness or morality. Sydney at this time was supplied with water from the Lachlan and Botany Swamps, considering the area, a wonderful watershed. Increased population has rendered it necessary to construct other works, and the Prospect dam closes in the waters of an enormous catchment area. A very great mistake has been made in allowing any portion of the old watershed to be built upon, or otherwise used till the works at Prospect had received the severest test. Instead of this precaution (which would strike all thinking men) being taken, a park has been formed, by filling in the lower portions with any filth and refuse brought for the purpose, which will pollute the water percolating through it to the lower levels, and for years to come, especially during the extreme heat of summer, will give off fever germs to the surrounding neighbourhood. Certainly the Nepean works have not been sufficiently tested. Already there are dangerous signs of the dam being faulty, and patching in such works, I am informed, is of very little use, sometimes hastening the mischief. There really was no necessity for this park being formed, as Sydney is rich in parks (perhaps too rich),— Hyde, Moore, Prince Alfred, Belmore, and Victoria, all of large areas, with the Domain and Botanical Gardens. These ought to be sufficient, especially as every suburb is getting a park of its own. Hyde Park, once the bare, ill- kept racecourse, is now worthy of its name, with its green sward, fine avenue of trees, and beds filled with flowers. Moore Park is the great playground of the people, having a recreation ground. The Zoological Gardens and Rifle butts are close by. It is also on the road to Randwick, where the principal race meetings of the year are held.
  • 44. Dr. Cuthill little thought the Asylum for Destitute Children he founded there would so soon have in its vicinity such attractive residences. Certainly a more healthy or suitable site could not have been chosen for the little ones to grow and thrive in. I visited it many times when Mr. May was superintendent, and the several hundred children there looked well and happy. The earlier institutions for children were the Orphan School, Parramatta, and the School of Industry, Sydney. Now we have an Infants’ Home, Ashfield, in which a few charitable ladies take an interest. I went there once with a friend, one of the committee, and saw forty infants under two years of age; some in their cots asleep, others toddling about the rooms. The institution is beautifully kept, so well indeed that I thought, “These poor little mites are far better off than those reared in many well-to-do homes.” New South Wales has always been mindful of her sick and helpless, providing asylums for the aged, blind, deaf, and dumb. There are hospitals in Sydney and in nearly every country town. Lately a Sydney merchant left a large sum for a convalescent home, and another more recently has given a valuable property at Camden for a similar purpose. The situations of both will to many sick and weary be a foretaste of that rest “that passeth man’s understanding.”
  • 45. CHAPTER XXIII We lived for a time on the heights of Marrickville, our ground opening on to bush, or what in England would be termed wood or forest-land, leading to Cooks River, where there were vistas through which we could see houses “bosomed high in tufted trees;” cleared land, and luxurious foliage of pittosporum, lily-pilly, and other native trees: ferns too were very plentiful. We were near old friends, and became intimate with a family residing near us,—an Englishman, his wife, and five daughters; the parents arrived in the colony in the early days. The father, a university man, was master of a private school at Parramatta, and the mother was the true type of an Englishwoman,—tall, handsome, and clever, so it is needless to say the daughters of such parents were agreeable, and became intimate friends of ours. Their mother has gone; but her children live to show another generation of Australians the results of a brave unselfish life. A little later we welcomed another family to our home, as the introduction of a young gentlewoman who brought letters from my husband’s family ended in a close friendship with her relatives in Sydney, with whom she stayed a year. Our little world in Australia was anticipating a great event, the opening of the first International Exhibition. The site chosen for the building was a “happy thought,” just inside the Domain gates, near the principal streets of the city, and with a panorama of earth, sea, and sky from every part of it, which few, if any exhibitions ever had before. The building could not be said to be original in design: still many said, “It was an exhibition in itself;” and certainly the site was unique for beauty. When filled with our own and the products from many lands, our anticipations of pleasure were fulfilled. The numerous courts were always crowded day after day. The Italian, Austrian, and German especially, so much so that we and others preferred visiting it early in the morning, and having a quiet view of the sculpture and pictures, including “St. Cecilia,” “Non Angli sed Angeli,” Meissonier’s marvellous works, and other poetry of the brush; the china, glass, furniture, jewellery, and silver, which it would be difficult to give any idea of from mere description. Several talented musicians visited us, so every day organ and pianoforte recitals, with concerts, gave pleasure and instruction to the ear, as so much that was beautiful did to the eye. The Queensland and island
  • 46. courts showed us much that was interesting,—pine-apples growing in huge pots, sugar-cane, native cloth, and many tinted shells; the Chinese and Japanese courts with their quaint wonders and delicious tea; India with her rich gems and stuffs,—all not only a pleasure but an educator. Week after week our people visited this exhibition and the annexes in the grounds, where machinery and other useful inventions were shown. Sydney was crowded with visitors, and the first tramway was opened to bring many from the railway station. From this time many improvements were made in our shops, as numberless things that had been sent from home for the first time as exhibits became common. At the end of this year ten years will have passed since it was opened, and when I left Sydney it was still talked of; nothing now remains of it except the lovely grounds where it once stood. Will another ever rise in its place, like a phœnix? It was a pity that it was destroyed; still, being built of perishable materials, it would have been a never-ending expense to the country to keep it in repair. The last time I visited the building was to see “The Old English Fayre,”—a very pretty sight. The centre was arranged as a street in the olden time, with shops on either side with quaint old signs; the wares were sold by ladies in costumes of the time; and certainly our Australian beauties looked very fair. When the Exhibition closed, almost every one felt, “What shall we do with our afternoons?” For me this was soon answered. My husband’s health failing, the doctor ordered change, and we left for a tour in the Western district. This was my first journey by train over the Blue Mountains. I did not enjoy it; in fact, when we wound our devious way over the wonderful zigzag, I wished we were on the old road I had last travelled, with all its discomforts attached to it. When near, terribly near the edge of the precipices, I held my breath, and looking back on the way we had come, said, “I wish we were safe at home.” My husband, to reassure me, remarked, “The engineer-in-chief is in the next carriage, so it is all right.” “What of that! clever as he is, he cannot prevent accidents. Perhaps there is something wrong.” Just then we stopped, and not at a station. “I am sure there is.” “No, nothing of importance,” as the panting engine went on again. The worst was over when we reached Hartley Vale, and by the time we reached Bathurst I was no longer nervous. After dinner we left our hotel and walked through the town, so altered and improved that I could scarcely recognise it. We inspected the new block of public buildings, and after
  • 47. trying in vain to find the cottage residence where I stayed nearly thirty years ago, returned to the hotel, which we left next morning and took the train to Orange, remaining there a week with our old friend Marian. We visited a young friend, whose husband had the best brewery in the town, and inspected the shops and numerous buildings erected since I drove through some years previous. We were present at a cricket match and at the laying of the foundation stone of a public school. Several speeches were made, the best (and that is not saying much in praise) from an Australian orator, whose voice is bad, and who never forgets one letter in the alphabet, though often another, while speaking. We then left for Wellington, where my brother met us at the railway station. If I had felt like Rip van Winkle in Sydney after being absent three years, what did I feel now in Wellington? Now I saw a busy little town with churches, banks, shops, private residences, and hotels; a substantial road bridge over the Macquarie, and another, an iron bridge, nearly finished, for the railway. A few brick cottages in Montefiores was the only difference there except at Gobolion, now a large comfortable cottage with gardens and orchard. The children I had left were married, with children of their own. Since our visit many other improvements had taken place,—handsome bank buildings, a hall, where last winter they had a skating rink, had been built, and a volunteer corps and a band founded. The town is now a municipality, and the Corporation have an idea of lighting it by electricity. This, for a small town two hundred miles from Sydney, proves Australian progress. My niece, who has always taken a great interest in Church affairs, Sunday school, and choir, and has played the organ in the church for two years, had been presented with a gold watch and handsome brooch.
  • 48. CHAPTER XXIV Our next excitement was the arrival of H.M.S. Bacchante with the young princes; but this I was too ill to join in. After this, our contingent left for the Soudan, a matter already sufficiently described. I had paid several visits to my dearest young friend at Darling Point, where the child I loved so well was now a wife and mother, and the mistress of a large household, fulfilling her life’s duties kindly and well. Two visits with her and her generous husband to their country house in the Southern district gave me an opportunity of seeing that part of the country which is more like England; the trees are larger and fuller in foliage, owing to the cooler climate. All the English trees, fruits, and flowers flourish there. Bowral, Moss Vale, and Sutton Forest present a cultivated appearance. There are many country houses belonging to Sydney people, besides those of the permanent residents in the neighbourhood. Erridge Park is my ideal of a country home, with its acres of garden, orchard, and meadow land. My friend had his coursing establishment here, his pretty cattle and dairy. The interior to the house is in accordance with the exterior,—ornamental ceilings, dadoes to walls, artistic furniture, and though in the country, water laid on from a spring, and gas generated in a building in the garden. While at Erridge Park we called on an old resident in the district, whom we found busy preparing for a large family party of over seventy; she, being the head, was looking forward to it with natural pleasure. Children, grandchildren, and great-grandchildren hoped to meet in a few days in their early home, a large residence with hundreds of acres around it, once rented for a governor’s country house. In the earlier days, no doubt, it was the home of a family corresponding with many I knew in the Western district, such as the families of White, Windeyer, Throsby, Campbell, Chisholm, Badgery, Gibson, Macarthur, and Manning. We have now a permanent country residence at Moss Vale for our governors, where Lord and Lady Carrington rest from their labours, and escape some of the most trying weather of Sydney. I say rest, and surely well earned, for though we have been favoured with some energetic representatives of Her Majesty, we have never had one to equal the present.
  • 49. From the arrival of His Excellency Lord Carrington to the present time, he has indeed worked hard in fulfilling his duty to Her Majesty and the colony, in which he has had the able co-operation of Lady Carrington. It is not to the Government House receptions and gaieties that I refer only, but to the interest shown in all public and social gatherings, their kindly sympathy with the sorrows and bereavements of all classes, as well as joining in the pleasures of the humblest, from purchasing a doll at a bazaar to give to a poor little girl, to visiting the Children’s Hospital, that they have won a place in the hearts of the people, and long after they return to their home in their native land, their names will be “household words” in “The Golden South.” I have been anticipating, as I should have devoted some space to a fancy fair held at Government House during Lady Loftus’s reign. It was in aid of Bishop Selwyn’s mission, and was highly successful; many ladies held stalls filled with the work of fair hands. It was a very gay scene, as most people were pleased to avail themselves of the opportunity of going to Government House, if only to a bazaar. I heard that two thousand pounds was the result, and was very glad, as I had taken great interest in Bishop Selwyn and his work, begun by his father, whom I met and heard preach at the dear old church, as I had also the Bishop of Melanesia,—that martyr who, while on his Master’s work, was killed by the natives, and his body sent adrift in a boat on the lonely sea. Such men as these two and Commodore Goodenough are fine examples of those devoting their lives to good work. A bright idea for raising funds to assist in either building, paying off the debt of a church, or other good purpose struck some residents at Manly Beach. It was to have a show of wildflowers of the colony. This quite original scheme was carried out with wonderful success, and took numbers from Sydney to visit this “hall of flowers.” I thought most of the varieties of native flowers were known to me, being a favourite study, but did not think them well fitted for decorative purposes, owing to the insignificance of their foliage; but this show quite dispelled both illusions. Here were pillars wreathed with waratahs, Keneydia’s purple bloom, native begonia, lily-pillies entwined with ferns, at the end of the hall dado formed with native roses (Boronia serrulata), blandfordia, flannel flower, or Australian edelweis, epacris longiflora or native fuchsia, boronia pinnata, and many others. An enormous group of
  • 50. Welcome to our website – the perfect destination for book lovers and knowledge seekers. We believe that every book holds a new world, offering opportunities for learning, discovery, and personal growth. That’s why we are dedicated to bringing you a diverse collection of books, ranging from classic literature and specialized publications to self-development guides and children's books. More than just a book-buying platform, we strive to be a bridge connecting you with timeless cultural and intellectual values. With an elegant, user-friendly interface and a smart search system, you can quickly find the books that best suit your interests. Additionally, our special promotions and home delivery services help you save time and fully enjoy the joy of reading. Join us on a journey of knowledge exploration, passion nurturing, and personal growth every day! ebookmasss.com