february 2005jes open foundation1 cover how to use jes open foundation program (a demo presentation)...
TRANSCRIPT
February 2005 jES Open Foundation 1
cove
r
How to Use jES Open Foundation Program
(a demo presentation)
(February 2005, Pietro Terna)
(related to jesopenfoundation-0.1.60.tar.gz, How to v. 0.0.21)
February 2005 jES Open Foundation 2
_jE
S→
jES
O F
_______________________________________
jES jES O F
_______________________________________
February 2005 jES Open Foundation 3
From jES …
jVE
→jE
S
java Enterprise Simulator
… to jES Open Foundation to simulate multi-model frameworks of system of units or agents
http://www.flightgear.org/
February 2005 jES Open Foundation 4
_jE
S b
asic
s
_______________________________________
jES basics
_______________________________________
February 2005 jES Open Foundation 5
WD
, D
W, W
DW
WD side or formalism: What to Do
DW side or formalism: which is Doing What
WDW formalism: When Doing What
Three formalisms
February 2005 jES Open Foundation 6
dict
iona
ry
unit = a productive structure; a unit is able to perform one of the steps required to accomplish an order
order = the object representing a good to be produced; an order contains technical information (the recipe describing the production steps)
recipe = a sequence of steps to be executed to produce a good
A dictionary
February 2005 jES Open Foundation 7
_A f
lexi
ble
sche
me
_______________________________________
A flexible scheme in jES Open Foundation
_______________________________________
February 2005 jES Open Foundation 8
DW
: a f
lexi
ble
sche
me
Units …
DW
… on a
toroidal space
(left and right borders and top and bottom ones are close together)
2
13
2
1
4
53
1
Each unit is able to
do a specific step …
February 2005 jES Open Foundation 9
WD
: rec
ipes
WD
with the recipes of the orders (what to do) expressed as sequences of numbers; orders with recipes are randomly generated with different lengths and structures
1 3 2 4
5 3
4 3 5 1 1
…
… of a recipe
February 2005 jES Open Foundation 10
mov
ing
reci
pes
DW and WD
2
13
2
1
4
53
11 3 2 4
1 3 2 4
moving around
among units
1 3 2 4
1 3 2 4 ?
lack of
visibilit
y
how to choose
Visibility is a metaphorical representation of trustiness and cooperation in a social network; when global visibility increases, we have more “social capital”
February 2005 jES Open Foundation 11
visi
bili
ty a
nd …
visibility changes
new units appear randomly (enterprise creation)
• with strategic relationships …
• … or alone
some units are dropped out
Visibility increases with the time (initial visibility is randomly chosen)
February 2005 jES Open Foundation 12
… b
ars
The left (blue) bar of each unit reports the number of waiting orders (do be done)
The down (grey) bar of each unit reports the number of consecutive clock ticks in which the unit has been idle
If > maxInactivity the unit is dropped out and all unsent products are lost
The right (red) bar of each unit reports the number of unsent products, due to the fact that a unit able to do the required step does not exist or is not visible
If > maxUnsentProducts the unit is dropped out and all unsent and waiting products are lost
February 2005 jES Open Foundation 13
jES Open Foundation
recipe generator or
distiller
recipeseach unit owns a public matrix
recipe generator or
distiller
recipeseach unit owns a public matrix
recipe generator or
distiller
recipeseach unit owns a public matrix
recipe generator or
distiller
recipeseach unit owns a public matrix
many levels
built in a parametric way
by the Observer The system uses only simple recipes containing computational steps applied to unit matrixes and to general matrixsjE
S O
pen
Foun
datio
n
February 2005 jES Open Foundation 14
Vis
ibil
ity
Visibility between two units
Unit a area Unit b area
Unit a
Unit b
a cannot see b; b can see a
February 2005 jES Open Foundation 15
mem
ory
mat
rixe
s
Memory matrixes data are reported in a text file (unitData/memoryMatrixes.txt)
number(from_0_ordered)_rows_cols
0 2 3
1 3 5
2 4 1
3 3 1
Mandatory first line
February 2005 jES Open Foundation 16
com
puta
tion
al s
teps
1/3
Recipes with computations (recipes are reported in external and intermediate format)
External format (remember: step, time specification, time):
1 s 1 c 1999 3 0 1 3 2 s 2 3 s 2
1 s 1 c 1998 1 0 5 s 2
1 s 1 c 1998 1 1 6 s 2
1 s 1 c 1998 1 3 7 s 2
time specification: seconds
time in seconds
step in recipe
Intermediate format (remember: each step is repeated for each unit of time):
1 2 2 -1999 3 0 1 4 1000000002 3 3
1 5 5 -1998 1 0 1000000005
1 6 6 -1998 1 1 1000000006
1 7 7 -1998 1 3 1000000007
a step with computation: step 2, requiring 2 seconds, involves computation 1999 with 3 matrixes (those numbered 0, 1, 3 in the previous Figure)
after automatic translation, the intermediate format reports the computational processes with a trick (which can be modified, adopting an other translation in OrderDistiller): we imagine here that the computations require the time reported in their steps; so they are placed at the end of the time, followed by a 0 time step (at the intermediate format level, 0 time step are reported as ‘1000000000+step’
a step with computation: step 7, requiring 2 seconds, involves computation 1998 with 1 matrix (that numbered 3 in the previous Figure)
Computational steps
February 2005 jES Open Foundation 17
com
puta
tiona
l ste
ps 2
/3
The Java Swarm code used by the recipes with the example code c 1998
/** computational operations with code -1998 (a code for the checking * phase of the program * * this computational code place a number in position 0,0 of the * unique received matrix and set the status to done */ public void c1998(){
mm0=(MemoryMatrix) pendingComputationalSpecificationSet. getMemoryMatrixAddress(0);layer=pendingComputationalSpecificationSet. getOrderLayer();
mm0.setValue(layer,0,0,1.0);mm0.print();
done=true; } // end c1998
Computational steps,
Java code
February 2005 jES Open Foundation 18
com
puta
tiona
l ste
ps 3
/3
The Java Swarm code used by the recipes with the example code c 1999
/** computational operations with code -1999 (a code for the checking * phase of the program * * this computational code verifies position 0,0 of the three * received matrixes; only if these positions are all not empty * the code empties them and set the status to done */ public void c1999(){
mm0=(MemoryMatrix) pendingComputationalSpecificationSet. getMemoryMatrixAddress(0);mm1=(MemoryMatrix) pendingComputationalSpecificationSet. getMemoryMatrixAddress(1);mm2=(MemoryMatrix) pendingComputationalSpecificationSet. getMemoryMatrixAddress(2);layer=pendingComputationalSpecificationSet. getOrderLayer();
if(! (mm0.getEmpty(layer,0,0) || mm1.getEmpty(layer,0,0) || mm2.getEmpty(layer,0,0) ) ) {
mm0.setEmpty(layer,0,0);mm1.setEmpty(layer,0,0);mm2.setEmpty(layer,0,0);done=true;
} } // end c1999
Computational steps,
Java code
February 2005 jES Open Foundation 19
_ pr
eys-
pred
ator
s
_______________________________________
preys-predators
_______________________________________
February 2005 jES Open Foundation 20
# Recipes ;
grassGeneration 1 c
1201 2 0 0 1 s 0 ;
utility 100 c110
0 3 0 1 2 1 s 0 ;
# Recipes ;
preysEating 1100
1 s 0 c120
2 2 1 1 1 s 0 ;
timeStep 23 c129
9 2 1 1100
1 s 0 ;
preysReproducing 4 c
1206 2 1 1
1001 s 0 ;
# Recipes ;
predatorsEating 1200
1 s 0 c120
2 2 2 2100
1 s 0 ;
timeStep 23 c129
9 2 2 2200
1 s 0 ;
predatorsReproducing 4 c
1206 2 2 2
2001 s 0 ;
simple
sprea
dshee
ts
reci
pes
February 2005 jES Open Foundation 21
# sequence
1 1 * 50 ;
# sequence
1 1 * 100 23 * 1 4 * 100 ;
# sequence
1 1 * 33 23 * 1 4 * 33 ;
simple
sprea
dshee
ts
sequ
ence
s
February 2005 jES Open Foundation 22
units
unit_#___prod.phase_# 1001 1001
unit_#___prod.phase_# 1 1
unit_#___prod.phase_# 2001 2001
text fi
les
February 2005 jES Open Foundation 23
prey
s-pr
edat
ors
1/5
Tutorial, step3b / time 278, look at the complex codetermination of grass, preys and predators
February 2005 jES Open Foundation 24
prey
s-pr
edat
ors
2/5
Tutorial, step3b / time 744, another codetermined configuration
February 2005 jES Open Foundation 25
prey
s-pr
edat
ors
3/5
Tutorial, step3b / time 1056, another codetermined configuration
February 2005 jES Open Foundation 26
prey
s-pr
edat
ors
4/5
Tutorial, step3b / time 1648, another codetermined configuration
February 2005 jES Open Foundation 27
prey
s-pr
edat
ors
5/5
Tutorial, step3b / time 3448, predators disappeared at 2132, now we have a simplified two stage model
February 2005 jES Open Foundation 28
_ w
orke
rs-s
kill
s-fi
rms
_______________________________________
workers-skills-firms
_______________________________________
February 2005 jES Open Foundation 29
Version 0, no links between firms and workers
February 2005 jES Open Foundation 30
Version 1, new workers with skills equal to that of
their neighbors
February 2005 jES Open Foundation 31
Version 2, new workers with skills randomly
distributed in the stratum space
February 2005 jES Open Foundation 32
Version 3, new workers with skills equal to that of their neighbors, but arising in unequal quantities
February 2005 jES Open Foundation 33
Version 4, new workers with skills randomly distributed in
the stratum space, but arising in unequal quantities