Hey Miles
I will include the file below. I just tried deleting all my generated files and
the .class files. When I try to run, I get
Exception in thread "main" java.lang.RuntimeException: The class "org.example.ascape.StupidModel1 could not be found.
at org.ascape.model.ModelRoot.open(ModelRoot.java:846)
at org.ascape.model.ModelRoot.open(ModelRoot.java:856)
at org.ascape.model.ModelRoot.main(ModelRoot.java:1072)
at org.ascape.model.Scape.main(Scape.java:2986)
So it is not being re-generated.
Evelyn
----------------------------------------------------------------------------------------------------
--
| Code: |
<?xml version="1.0" encoding="UTF-8"?>
<metaabm:SContext xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:act="http://
metaabm.org/act" xmlns:function="http://metaabm.org/function" xmlns:metaabm="http://metaabm.org/
structure" label="StupidModel1" ID="stupidModel1" pluralLabel="StupidModel1s">
<attributes label="Bug Count" ID="bugCount" pluralLabel="Bug Counts" description="The number of
bugs to create." sType="INTEGER" defaultValue="100"/>
<attributes label="Habitat Count" ID="habitatCount" pluralLabel="Habitat Counts" description="The
number of habitats to create." sType="INTEGER"/>
<attributes label="Bug Vision" ID="bugVision" pluralLabel="Bug Visions" sType="INTEGER"
defaultValue="4"/>
<attributes label="Attribute" ID="attribute" pluralLabel="Attributes"/>
<rootActivity xsi:type="act:AGroup" label="Root Act Group" ID="rootActGroup" pluralLabel="Root
Act Groups">
<members xsi:type="act:ABuild" label="Build StupidModel1" ID="buildStupidModel1" targets="//
@rootActivity/@members[ID='createBugs'] //@rootActivity/@members[ID='createHabitats'] //
@rootActivity/@members[ID='fillGrid'] //@rootActivity/@members[ID='createStupidModel1Contexts']"
selected="//@rootActivity/@members[ID='buildStupidModel1']" agent="/" pluralLabel="Build
StupidModel1s"/>
<members xsi:type="act:ACreateAgents" label="Create Bugs" ID="createBugs" sources="//
@rootActivity/@members[ID='buildStupidModel1']" selected="//@rootActivity/@members[ID='
buildStupidModel1']" agent="//@agents[ID='bug']" agentCount="//@attributes[ID='bugCount']"/>
<members xsi:type="act:ACreateAgents" label="Create Habitats" ID="createHabitats" sources="//
@rootActivity/@members[ID='buildStupidModel1']" selected="//@rootActivity/@members[ID='
buildStupidModel1']" agent="//@agents[ID='habitat']" agentCount="//@attributes[ID='habitatCount']"/>
<members xsi:type="act:ABuildGrid" label="FillGrid" ID="fillGrid" sources="//@rootActivity/
@members[ID='buildStupidModel1']" selected="//@rootActivity/@members[ID='buildStupidModel1']"
pluralLabel="FillGrids" agents="//@agents[ID='bug']" projection="//@projections[ID='grid2D']"
fillAgent="//@agents[ID='habitat']"/>
<members xsi:type="act:ACreateAgents" label="Create StupidModel1 Contexts" ID="
createStupidModel1Contexts" sources="//@rootActivity/@members[ID='buildStupidModel1']" selected="//
@rootActivity/@members[ID='buildStupidModel1']"/>
</rootActivity>
<implementation package="org.example.ascape" className="StupidModel1" basePath=""/>
<agents label="Bug" ID="bug" pluralLabel="Bugs">
<attributes label="Size" ID="size" pluralLabel="Sizes" sType="INTEGER" defaultValue="0"/>
<rootActivity xsi:type="act:AGroup" label="Root Act Group" ID="rootActGroup" pluralLabel="Root
Act Groups">
<members xsi:type="act:AInitialize" label="Initialize" ID="initialize" targets="//@agents[ID='
bug']/@rootActivity/@members[ID='randomHabitat']" selected="//@agents[ID='bug']/@rootActivity/
@members[ID='initialize']" agent="//@agents[ID='bug']" space="//@projections[ID='grid2D']"
pluralLabel="Initializes"/>
<members xsi:type="act:ASelect" label="Random Habitat" ID="randomHabitat" sources="//
@agents[ID='bug']/@rootActivity/@members[ID='initialize']" targets="//@agents[ID='bug']/
@rootActivity/@members[ID='randomHabitatAvailableQuery']" selected="//@agents[ID='bug']/
@rootActivity/@members[ID='initialize']" agent="//@agents[ID='habitat']" space="//@projections[ID='
grid2D']"/>
<members xsi:type="act:AQuery" label="Random Habitat: Available() Query" ID="
randomHabitatAvailableQuery" sources="//@agents[ID='bug']/@rootActivity/@members[ID='randomHabitat']
" targets="//@agents[ID='bug']/@rootActivity/@members[ID='movetoHabitatinGrid2D']" selected="//
@agents[ID='bug']/@rootActivity/@members[ID='randomHabitat']">
<function xsi:type="function:FGenericLogical" href="http://metaabm.org/
core_library.metaabm#//@library[ID='coreFunctions']/@subs[ID='spatial']/@functions[ID='available']"/
>
</members>
<members xsi:type="act:AMove" label="Move to Habitat in Grid2D" ID="movetoHabitatinGrid2D"
sources="//@agents[ID='bug']/@rootActivity/@members[ID='randomHabitatAvailableQuery']" selected="//
@agents[ID='bug']/@rootActivity/@members[ID='initialize']" destination="//@agents[ID='bug']/
@rootActivity/@members[ID='randomHabitat']"/>
<members xsi:type="act:ARule" label="Bug Rule" ID="bugRule" targets="//@agents[ID='bug']/
@rootActivity/@members[ID='nearbySpace']" selected="//@agents[ID='bug']/@rootActivity/@members[ID='
bugRule']" agent="//@agents[ID='bug']" space="//@projections[ID='grid2D']" pluralLabel="Bug Rules"/>
<members xsi:type="act:ASelect" label="NearbySpace" ID="nearbySpace" sources="//@agents[ID='
bug']/@rootActivity/@members[ID='bugRule']" targets="//@agents[ID='bug']/@rootActivity/@members[ID='
nearbySpaceAvailableQuery'] //@agents[ID='bug']/@rootActivity/@members[ID='
nearbySpaceWithin_BugVision_Query']" selected="//@agents[ID='bug']/@rootActivity/@members[ID='
bugRule']" agent="//@agents[ID='habitat']" space="//@projections[ID='grid2D']"/>
<members xsi:type="act:AQuery" label="NearbySpace: Available() Query" ID="
nearbySpaceAvailableQuery" sources="//@agents[ID='bug']/@rootActivity/@members[ID='nearbySpace']"
targets="//@agents[ID='bug']/@rootActivity/@members[ID='
nearbySpace_AvailableQueryAndWithin_BugVision_Query_']" selected="//@agents[ID='bug']/@rootActivity/
@members[ID='nearbySpace']">
<function xsi:type="function:FGenericLogical" href="http://metaabm.org/
core_library.metaabm#//@library[ID='coreFunctions']/@subs[ID='spatial']/@functions[ID='available']"/
>
</members>
<members xsi:type="act:AQuery" label="NearbySpace: Within(Bug Vision) Query" ID="
nearbySpaceWithin_BugVision_Query" sources="//@agents[ID='bug']/@rootActivity/@members[ID='
nearbySpace']" targets="//@agents[ID='bug']/@rootActivity/@members[ID='
nearbySpace_AvailableQueryAndWithin_BugVision_Query_']" selected="//@agents[ID='bug']/@rootActivity/
@members[ID='nearbySpace']">
<inputs selected="//@agents[ID='bug']/@rootActivity/@members[ID='bugRule']" value="//
@attributes[ID='bugVision']"/>
<function xsi:type="function:FGenericLogical" href="http://metaabm.org/
core_library.metaabm#//@library[ID='coreFunctions']/@subs[ID='spatial']/@functions[ID='within']"/>
</members>
<members xsi:type="act:AAll" label="NearbySpace (Available() Query & Within(Bug Vision) Query)
" ID="nearbySpace_AvailableQueryAndWithin_BugVision_Query_" sources="//@agents[ID='bug']/
@rootActivity/@members[ID='nearbySpaceAvailableQuery'] //@agents[ID='bug']/@rootActivity/
@members[ID='nearbySpaceWithin_BugVision_Query']" targets="//@agents[ID='bug']/@rootActivity/
@members[ID='movetoHabitatinGrid2DCopy']" selected="//@agents[ID='bug']/@rootActivity/@members[ID='
nearbySpace']"/>
<members xsi:type="act:AMove" label="Move to Habitat in Grid2D Copy" ID="
movetoHabitatinGrid2DCopy" sources="//@agents[ID='bug']/@rootActivity/@members[ID='
nearbySpace_AvailableQueryAndWithin_BugVision_Query_']" selected="//@agents[ID='bug']/@rootActivity/
@members[ID='bugRule']" destination="//@agents[ID='bug']/@rootActivity/@members[ID='nearbySpace']"/>
<members xsi:type="act:ARule" label="Growth" ID="growth" targets="//@agents[ID='bug']/
@rootActivity/@members[ID='setSizeToBugCount'] //@agents[ID='bug']/@rootActivity/@members[ID='
method']" selected="//@agents[ID='bug']/@rootActivity/@members[ID='growth']" agent="//@agents[ID='
bug']" space="//@projections[ID='grid2D']" pluralLabel="Growths"/>
<members xsi:type="act:ASet" label="Set Size To Bug Count" ID="setSizeToBugCount" sources="//
@agents[ID='bug']/@rootActivity/@members[ID='growth']" selected="//@agents[ID='bug']/@rootActivity/
@members[ID='growth']" attribute="//@agents[ID='bug']/@attributes[ID='size']" parameter="//
@attributes[ID='bugCount']"/>
<members xsi:type="act:AMethod" label="Method" ID="method" sources="//@agents[ID='bug']/
@rootActivity/@members[ID='growth']" selected="//@agents[ID='bug']/@rootActivity/@members[ID='
growth']" pluralLabel="Methods" body="Size++;
switch(Size)
{
case: 1
{
}
}"/>
</rootActivity>
<implementation className="Bug"/>
<styles xsi:type="metaabm:SStyle2D" label="New Bug Style 2D" ID="newBugStyle2D" pluralLabel="
New Bug Style 2Ds">
<rootActivity xsi:type="act:AGroup" label="Root Act Group" ID="rootActGroup" pluralLabel="
Root Act Groups">
<members xsi:type="act:ARule" label="Bug Style Rule" ID="bugStyleRule" targets="//
@agents[ID='bug']/@styles[ID='newBugStyle2D']/@rootActivity/@members[ID='bugStyleRuleShapeDiamond']"
selected="//@agents[ID='bug']/@styles[ID='newBugStyle2D']/@rootActivity/@members[ID='bugStyleRule']
" agent="//@agents[ID='bug']" space="//@projections[ID='grid2D']" pluralLabel="Bug Style Rules"/>
<members xsi:type="act:AEvaluate" label="Bug Style Rule: Shape Diamond()" ID="
bugStyleRuleShapeDiamond" sources="//@agents[ID='bug']/@styles[ID='newBugStyle2D']/@rootActivity/
@members[ID='bugStyleRule']" targets="//@agents[ID='bug']/@styles[ID='newBugStyle2D']/@rootActivity/
@members[ID='bugStyleRuleGraphicFill']" selected="//@agents[ID='bug']/@styles[ID='newBugStyle2D']/
@rootActivity/@members[ID='bugStyleRule']">
<function xsi:type="function:FGenericFunction" href="http://metaabm.org/
core_library.metaabm#//@library[ID='coreFunctions']/@subs[ID='graphic']/@functions[ID='shapeDiamond'
]"/>
</members>
<members xsi:type="act:AEvaluate" label="Bug Style Rule: Graphic Fill()" ID="
bugStyleRuleGraphicFill" sources="//@agents[ID='bug']/@styles[ID='newBugStyle2D']/@rootActivity/
@members[ID='bugStyleRuleShapeDiamond']" selected="//@agents[ID='bug']/@styles[ID='newBugStyle2D']/
@rootActivity/@members[ID='bugStyleRule']">
<function xsi:type="function:FGenericFunction" href="http://metaabm.org/
core_library.metaabm#//@library[ID='coreFunctions']/@subs[ID='graphic']/@functions[ID='graphicFill']
"/>
</members>
</rootActivity>
<implementation className="NewBugStyle2D"/>
</styles>
</agents>
<agents label="Habitat" ID="habitat" pluralLabel="Habitats">
<rootActivity xsi:type="act:AGroup" label="Root Act Group" ID="rootActGroup" pluralLabel="Root
Act Groups"/>
<implementation className="Habitat"/>
<styles xsi:type="metaabm:SStyle2D" label="Habitat Style 2D" ID="habitatStyle2D" pluralLabel="
Habitat Style 2Ds">
<rootActivity xsi:type="act:AGroup" label="Root Act Group" ID="rootActGroup" pluralLabel="
Root Act Groups">
<members xsi:type="act:ARule" label="Habitat Rule" ID="habitatRule" targets="//@agents[ID='
habitat']/@styles[ID='habitatStyle2D']/@rootActivity/@members[ID='habitatRuleColorBlack']"
selected="//@agents[ID='habitat']/@styles[ID='habitatStyle2D']/@rootActivity/@members[ID='
habitatRule']" agent="//@agents[ID='habitat']" space="//@projections[ID='grid2D']" pluralLabel="
Habitat Rules"/>
<members xsi:type="act:AEvaluate" label="Habitat Rule: Color Black()" ID="
habitatRuleColorBlack" sources="//@agents[ID='habitat']/@styles[ID='habitatStyle2D']/@rootActivity/
@members[ID='habitatRule']" targets="//@agents[ID='habitat']/@styles[ID='habitatStyle2D']/
@rootActivity/@members[ID='habitatRuleShapeRectangle']" selected="//@agents[ID='habitat']/
@styles[ID='habitatStyle2D']/@rootActivity/@members[ID='habitatRule']">
<function xsi:type="function:FGenericFunction" href="http://metaabm.org/
core_library.metaabm#//@library[ID='coreFunctions']/@subs[ID='graphic']/@functions[ID='colorBlack']"
/>
</members>
<members xsi:type="act:AEvaluate" label="Habitat Rule: Shape Rectangle()" ID="
habitatRuleShapeRectangle" sources="//@agents[ID='habitat']/@styles[ID='habitatStyle2D']/
@rootActivity/@members[ID='habitatRuleColorBlack']" targets="//@agents[ID='habitat']/@styles[ID='
habitatStyle2D']/@rootActivity/@members[ID='habitatRuleGraphicFill']" selected="//@agents[ID='
habitat']/@styles[ID='habitatStyle2D']/@rootActivity/@members[ID='habitatRule']">
<function xsi:type="function:FGenericFunction" href="http://metaabm.org/
core_library.metaabm#//@library[ID='coreFunctions']/@subs[ID='graphic']/@functions[ID='
shapeRectangle']"/>
</members>
<members xsi:type="act:AEvaluate" label="Habitat Rule: Graphic Fill()" ID="
habitatRuleGraphicFill" sources="//@agents[ID='habitat']/@styles[ID='habitatStyle2D']/@rootActivity/
@members[ID='habitatRuleShapeRectangle']" selected="//@agents[ID='habitat']/@styles[ID='
habitatStyle2D']/@rootActivity/@members[ID='habitatRule']">
<function xsi:type="function:FGenericFunction" href="http://metaabm.org/
core_library.metaabm#//@library[ID='coreFunctions']/@subs[ID='graphic']/@functions[ID='graphicFill']
"/>
</members>
</rootActivity>
<implementation className="HabitatStyle2D"/>
</styles>
</agents>
<projections xsi:type="metaabm:SGrid" label="Grid2D" ID="grid2D" pluralLabel="Grid2Ds"
dimensionality="2" borderRule="PERIODIC" neighborhood="MOORE">
<attributes xsi:type="metaabm:SAttributeArray" label="Dimensions" ID="dimensions" pluralLabel="
Dimensionss" description="The size of each dimension." sType="INTEGER" size="2"/>
<attributes label="Width" ID="width" pluralLabel="Widths" description="The horizontal extent of
the space." sType="INTEGER" defaultValue="100"/>
<attributes label="Height" ID="height" pluralLabel="Heights" description="The vertical extent
of the space." sType="INTEGER" defaultValue="100"/>
</projections>
</metaabm:SContext>
|
Post edited by: ecasotti, at: 2008/01/09 12:02