Problems displaying contexts

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Problems displaying contexts

Van Parunak
My model has three subcontexts. Two of them are networks (representing
two separate graphs) in which the agents are nodes, and the third is a
2D spatial arrangement of yet another kind of agent. My context.xml
looks like this:

> <context id="assist"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:noNamespaceSchemaLocation="http://repast.org/scenario/context">
>     <context id = "targetContext">
>           <projection type="network" id="target"></projection>
>     </context>
>     <context id = "patternContext">
>         <projection type="network" id="pattern"></projection>
>     </context>
>     <context id = "antContext">
>         <projection type="continuous space" id="space"></projection>
>         <projection type="grid" id="grid"></projection>
>     </context>
> </context>
In the interface, in the Scenario Tree, I have defined a display in each
subcontext. The two for networks work just fine--I see a button for each
at the bottom of the display, and when I click on it, that graph is
displayed. But there is no display, not even a button, for the third
display (the one for antContext). I've gone over the display definition
dialog several times, basically following the settings in the JZombie
demo, but I'm clearly missing something. Where should I start looking
for the problem?



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest
Reply | Threaded
Open this post in threaded view
|

Re: Problems displaying contexts

srcnick
Hmm. Do you see the missing display in the scenario tree? Is it attached to the correct context? Can you send the display xml for the ant context? In the scenario folder there should be some xml files with display in the names. One of those will be for the antContext.

Nick

> On Apr 20, 2017, at 5:47 PM, Van Parunak <[hidden email]> wrote:
>
> My model has three subcontexts. Two of them are networks (representing
> two separate graphs) in which the agents are nodes, and the third is a
> 2D spatial arrangement of yet another kind of agent. My context.xml
> looks like this:
>> <context id="assist"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xsi:noNamespaceSchemaLocation="http://repast.org/scenario/context">
>>   <context id = "targetContext">
>>         <projection type="network" id="target"></projection>
>>   </context>
>>   <context id = "patternContext">
>>       <projection type="network" id="pattern"></projection>
>>   </context>
>>   <context id = "antContext">
>>       <projection type="continuous space" id="space"></projection>
>>       <projection type="grid" id="grid"></projection>
>>   </context>
>> </context>
> In the interface, in the Scenario Tree, I have defined a display in each
> subcontext. The two for networks work just fine--I see a button for each
> at the bottom of the display, and when I click on it, that graph is
> displayed. But there is no display, not even a button, for the third
> display (the one for antContext). I've gone over the display definition
> dialog several times, basically following the settings in the JZombie
> demo, but I'm clearly missing something. Where should I start looking
> for the problem?
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Repast-interest mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/repast-interest


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest
Reply | Threaded
Open this post in threaded view
|

Re: Problems displaying contexts

Van Parunak

Thank you very much for your help, Nick. Responses interleaved:


On 4/24/17 09:07, Nick Collier wrote:
Hmm. Do you see the missing display in the scenario tree? 
Yes--screenshot of the scenario tree attached.
Is it attached to the correct context?
Yes, at least as far as the scenario tree display is concerned.
Can you send the display xml for the ant context? In the scenario folder there should be some xml files with display in the names. One of those will be for the antContext. 
Also attached

Nick

On Apr 20, 2017, at 5:47 PM, Van Parunak [hidden email] wrote:

My model has three subcontexts. Two of them are networks (representing 
two separate graphs) in which the agents are nodes, and the third is a 
2D spatial arrangement of yet another kind of agent. My context.xml 
looks like this:
<context id="assist" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://repast.org/scenario/context">
  <context id = "targetContext">
        <projection type="network" id="target"></projection>
  </context>
  <context id = "patternContext">
      <projection type="network" id="pattern"></projection>
  </context>
  <context id = "antContext">
      <projection type="continuous space" id="space"></projection>
      <projection type="grid" id="grid"></projection>
  </context>
</context>
In the interface, in the Scenario Tree, I have defined a display in each 
subcontext. The two for networks work just fine--I see a button for each 
at the bottom of the display, and when I click on it, that graph is 
displayed. But there is no display, not even a button, for the third 
display (the one for antContext). I've gone over the display definition 
dialog several times, basically following the settings in the JZombie 
demo, but I'm clearly missing something. Where should I start looking 
for the problem?



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest

    

--
H. Van Dyke Parunak, Ph.D.
President, ABC Research, LLC

Superior solutions through Agent-Based and Complex systems
1027 Ferdon Road
Ann Arbor, MI 48104-3630
email: van.parunak@...
cell: 734 395 3253
www.ABCResearch.org

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest

Screen Shot 2017-04-24 at 10.16.31.png (63K) Download Attachment
repast.simphony.action.display_3.xml (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Problems displaying contexts

srcnick
I don’t see anything obviously wrong. Is the space projection when created in your context builder called “space”? I would think you’d get an error trying to display a projection that doesn’t exist (i.e. it has a different name) but I can’t think of anything else.

Nick


On Apr 24, 2017, at 10:20 AM, Van Parunak <[hidden email]> wrote:

Thank you very much for your help, Nick. Responses interleaved:


On 4/24/17 09:07, Nick Collier wrote:
Hmm. Do you see the missing display in the scenario tree? 
Yes--screenshot of the scenario tree attached.
Is it attached to the correct context?
Yes, at least as far as the scenario tree display is concerned. 
Can you send the display xml for the ant context? In the scenario folder there should be some xml files with display in the names. One of those will be for the antContext. 
Also attached
Nick

On Apr 20, 2017, at 5:47 PM, Van Parunak [hidden email] wrote:

My model has three subcontexts. Two of them are networks (representing 
two separate graphs) in which the agents are nodes, and the third is a 
2D spatial arrangement of yet another kind of agent. My context.xml 
looks like this:
<context id="assist" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://repast.org/scenario/context">
  <context id = "targetContext">
        <projection type="network" id="target"></projection>
  </context>
  <context id = "patternContext">
      <projection type="network" id="pattern"></projection>
  </context>
  <context id = "antContext">
      <projection type="continuous space" id="space"></projection>
      <projection type="grid" id="grid"></projection>
  </context>
</context>
In the interface, in the Scenario Tree, I have defined a display in each 
subcontext. The two for networks work just fine--I see a button for each 
at the bottom of the display, and when I click on it, that graph is 
displayed. But there is no display, not even a button, for the third 
display (the one for antContext). I've gone over the display definition 
dialog several times, basically following the settings in the JZombie 
demo, but I'm clearly missing something. Where should I start looking 
for the problem?



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest

-- 
H. Van Dyke Parunak, Ph.D.
President, ABC Research, LLC
<LogoColorArtNouveau_Small.png>
Superior solutions through Agent-Based and Complex systems
1027 Ferdon Road
Ann Arbor, MI 48104-3630
email: <a href="x-msg://13/van.parunak@gmail.com" class="">van.parunak@...
cell: 734 395 3253
www.ABCResearch.org
<Screen Shot 2017-04-24 at 10.16.31.png><repast.simphony.action.display_3.xml>


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest
Reply | Threaded
Open this post in threaded view
|

Re: Problems displaying contexts

Van Parunak

Yes, copied right from the Zombie demo...

ContinuousSpaceFactory spaceFactory = ContinuousSpaceFactoryFinder
                .createContinuousSpaceFactory(null);
        ContinuousSpace<Object> space = spaceFactory.createContinuousSpace("space",
                antsContext, new RandomCartesianAdder<Object>(),
                new repast.simphony.space.continuous.WrapAroundBorders(), 50,
                50);

        GridFactory gridFactory = GridFactoryFinder.createGridFactory(null);
        Grid<Object> grid = gridFactory.createGrid("grid", antsContext,
                new GridBuilderParameters<Object>(new WrapAroundBorders(),
                        new SimpleGridAdder<Object>(), true, 50, 50));

        int numAnts = (Integer) params.getValue("numAnts");
        for (int i = 0; i < numAnts; i++) {
            AssistAnt ant = new AssistAnt(space, grid);
            ant.initializeAnt(pickRandomPatternNode());
            antsContext.add(ant);
        }


On 4/24/17 13:37, Nick Collier wrote:
I don’t see anything obviously wrong. Is the space projection when created in your context builder called “space”? I would think you’d get an error trying to display a projection that doesn’t exist (i.e. it has a different name) but I can’t think of anything else.

Nick


On Apr 24, 2017, at 10:20 AM, Van Parunak <[hidden email]> wrote:

Thank you very much for your help, Nick. Responses interleaved:


On 4/24/17 09:07, Nick Collier wrote:
Hmm. Do you see the missing display in the scenario tree? 
Yes--screenshot of the scenario tree attached.
Is it attached to the correct context?
Yes, at least as far as the scenario tree display is concerned. 
Can you send the display xml for the ant context? In the scenario folder there should be some xml files with display in the names. One of those will be for the antContext. 
Also attached
Nick

On Apr 20, 2017, at 5:47 PM, Van Parunak [hidden email] wrote:

My model has three subcontexts. Two of them are networks (representing 
two separate graphs) in which the agents are nodes, and the third is a 
2D spatial arrangement of yet another kind of agent. My context.xml 
looks like this:
<context id="assist" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://repast.org/scenario/context">
  <context id = "targetContext">
        <projection type="network" id="target"></projection>
  </context>
  <context id = "patternContext">
      <projection type="network" id="pattern"></projection>
  </context>
  <context id = "antContext">
      <projection type="continuous space" id="space"></projection>
      <projection type="grid" id="grid"></projection>
  </context>
</context>
In the interface, in the Scenario Tree, I have defined a display in each 
subcontext. The two for networks work just fine--I see a button for each 
at the bottom of the display, and when I click on it, that graph is 
displayed. But there is no display, not even a button, for the third 
display (the one for antContext). I've gone over the display definition 
dialog several times, basically following the settings in the JZombie 
demo, but I'm clearly missing something. Where should I start looking 
for the problem?



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest

-- 
H. Van Dyke Parunak, Ph.D.
President, ABC Research, LLC
<LogoColorArtNouveau_Small.png>
Superior solutions through Agent-Based and Complex systems
1027 Ferdon Road
Ann Arbor, MI 48104-3630
email: <a moz-do-not-send="true" href="x-msg://13/van.parunak@gmail.com" class="">van.parunak@...
cell: 734 395 3253
www.ABCResearch.org
<Screen Shot 2017-04-24 at 10.16.31.png><repast.simphony.action.display_3.xml>


--
H. Van Dyke Parunak, Ph.D.
President, ABC Research, LLC

Superior solutions through Agent-Based and Complex systems
1027 Ferdon Road
Ann Arbor, MI 48104-3630
email: van.parunak@...
cell: 734 395 3253
www.ABCResearch.org

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest
Reply | Threaded
Open this post in threaded view
|

Re: Problems displaying contexts

Tatara, Eric R.

In your ContextBuilder, do you add the antContext to the root context via

 

context.addSubContext(antsContext);

 

 

This is the only possibility I am coming up with.  I tested a new project with your context.xml, projection code and display XML and the only reason you won’t get a display is if the subcontext is not add to the main context, since it’s essentially thrown away by the runtime unless it’s added to the root context.

 

eric

 

From: Van Parunak [mailto:[hidden email]]
Sent: Monday, April 24, 2017 1:08 PM
To: Nick Collier <[hidden email]>; Van Parunak <[hidden email]>
Cc: [hidden email]
Subject: Re: [Repast-interest] Problems displaying contexts

 

Yes, copied right from the Zombie demo...

ContinuousSpaceFactory spaceFactory = ContinuousSpaceFactoryFinder
                .createContinuousSpaceFactory(null);
        ContinuousSpace<Object> space = spaceFactory.createContinuousSpace("space",
                antsContext, new RandomCartesianAdder<Object>(),
                new repast.simphony.space.continuous.WrapAroundBorders(), 50,
                50);

        GridFactory gridFactory = GridFactoryFinder.createGridFactory(null);
        Grid<Object> grid = gridFactory.createGrid("grid", antsContext,
                new GridBuilderParameters<Object>(new WrapAroundBorders(),
                        new SimpleGridAdder<Object>(), true, 50, 50));

        int numAnts = (Integer) params.getValue("numAnts");
        for (int i = 0; i < numAnts; i++) {
            AssistAnt ant = new AssistAnt(space, grid);
            ant.initializeAnt(pickRandomPatternNode());
            antsContext.add(ant);
        }

 

 

On 4/24/17 13:37, Nick Collier wrote:

I don’t see anything obviously wrong. Is the space projection when created in your context builder called “space”? I would think you’d get an error trying to display a projection that doesn’t exist (i.e. it has a different name) but I can’t think of anything else.

 

Nick

 

 

On Apr 24, 2017, at 10:20 AM, Van Parunak <[hidden email]> wrote:

 

Thank you very much for your help, Nick. Responses interleaved:

 

On 4/24/17 09:07, Nick Collier wrote:

Hmm. Do you see the missing display in the scenario tree? 

Yes--screenshot of the scenario tree attached.

Is it attached to the correct context?

Yes, at least as far as the scenario tree display is concerned. 

Can you send the display xml for the ant context? In the scenario folder there should be some xml files with display in the names. One of those will be for the antContext. 

Also attached

Nick
 
On Apr 20, 2017, at 5:47 PM, Van Parunak [hidden email] wrote:
 
My model has three subcontexts. Two of them are networks (representing 
two separate graphs) in which the agents are nodes, and the third is a 
2D spatial arrangement of yet another kind of agent. My context.xml 
looks like this:
<context id="assist" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://repast.org/scenario/context">
  <context id = "targetContext">
        <projection type="network" id="target"></projection>
  </context>
  <context id = "patternContext">
      <projection type="network" id="pattern"></projection>
  </context>
  <context id = "antContext">
      <projection type="continuous space" id="space"></projection>
      <projection type="grid" id="grid"></projection>
  </context>
</context>
In the interface, in the Scenario Tree, I have defined a display in each 
subcontext. The two for networks work just fine--I see a button for each 
at the bottom of the display, and when I click on it, that graph is 
displayed. But there is no display, not even a button, for the third 
display (the one for antContext). I've gone over the display definition 
dialog several times, basically following the settings in the JZombie 
demo, but I'm clearly missing something. Where should I start looking 
for the problem?
 
 
 
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest

 

-- 

H. Van Dyke Parunak, Ph.D.
President, ABC Research, LLC
<LogoColorArtNouveau_Small.png>
Superior solutions through Agent-Based and Complex systems
1027 Ferdon Road
Ann Arbor, MI 48104-3630
email: <a href="x-msg://13/van.parunak@gmail.com">van.parunak@...
cell: 734 395 3253
www.ABCResearch.org

<Screen Shot 2017-04-24 at 10.16.31.png><repast.simphony.action.display_3.xml>

 

 

--

H. Van Dyke Parunak, Ph.D.
President, ABC Research, LLC

Superior solutions through Agent-Based and Complex systems
1027 Ferdon Road
Ann Arbor, MI 48104-3630
email: van.parunak@...
cell: 734 395 3253
www.ABCResearch.org


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest
Reply | Threaded
Open this post in threaded view
|

Re: Problems displaying contexts

Van Parunak

Yes, exactly the way I add the other two contexts (which display correctly):

patternContext  = new DefaultContext<Object>("patternContext");
        patternContext.setId("patternContext");
        context.addSubContext(patternContext);
        context.add(patternContext);
        
        targetContext = new DefaultContext<Object>("targetContext");
        targetContext.setId("targetContext");
        context.addSubContext(targetContext);
        context.add(targetContext);
        
        antsContext = new DefaultContext<Object>("antsContext");
        antsContext.setId("antsContext");
        context.addSubContext(antsContext);
        context.add(antsContext);


On 4/25/17 11:17, Tatara, Eric R. wrote:

In your ContextBuilder, do you add the antContext to the root context via

 

context.addSubContext(antsContext);

 

 

This is the only possibility I am coming up with.  I tested a new project with your context.xml, projection code and display XML and the only reason you won’t get a display is if the subcontext is not add to the main context, since it’s essentially thrown away by the runtime unless it’s added to the root context.

 

eric

 

From: Van Parunak [[hidden email]]
Sent: Monday, April 24, 2017 1:08 PM
To: Nick Collier [hidden email]; Van Parunak [hidden email]
Cc: [hidden email]
Subject: Re: [Repast-interest] Problems displaying contexts

 

Yes, copied right from the Zombie demo...

ContinuousSpaceFactory spaceFactory = ContinuousSpaceFactoryFinder
                .createContinuousSpaceFactory(null);
        ContinuousSpace<Object> space = spaceFactory.createContinuousSpace("space",
                antsContext, new RandomCartesianAdder<Object>(),
                new repast.simphony.space.continuous.WrapAroundBorders(), 50,
                50);

        GridFactory gridFactory = GridFactoryFinder.createGridFactory(null);
        Grid<Object> grid = gridFactory.createGrid("grid", antsContext,
                new GridBuilderParameters<Object>(new WrapAroundBorders(),
                        new SimpleGridAdder<Object>(), true, 50, 50));

        int numAnts = (Integer) params.getValue("numAnts");
        for (int i = 0; i < numAnts; i++) {
            AssistAnt ant = new AssistAnt(space, grid);
            ant.initializeAnt(pickRandomPatternNode());
            antsContext.add(ant);
        }

 

 

On 4/24/17 13:37, Nick Collier wrote:

I don’t see anything obviously wrong. Is the space projection when created in your context builder called “space”? I would think you’d get an error trying to display a projection that doesn’t exist (i.e. it has a different name) but I can’t think of anything else.

 

Nick

 

 

On Apr 24, 2017, at 10:20 AM, Van Parunak <[hidden email]> wrote:

 

Thank you very much for your help, Nick. Responses interleaved:

 

On 4/24/17 09:07, Nick Collier wrote:

Hmm. Do you see the missing display in the scenario tree? 

Yes--screenshot of the scenario tree attached.

Is it attached to the correct context?

Yes, at least as far as the scenario tree display is concerned. 

Can you send the display xml for the ant context? In the scenario folder there should be some xml files with display in the names. One of those will be for the antContext. 

Also attached

Nick
 
On Apr 20, 2017, at 5:47 PM, Van Parunak [hidden email] wrote:
 
My model has three subcontexts. Two of them are networks (representing 
two separate graphs) in which the agents are nodes, and the third is a 
2D spatial arrangement of yet another kind of agent. My context.xml 
looks like this:
<context id="assist" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://repast.org/scenario/context">
  <context id = "targetContext">
        <projection type="network" id="target"></projection>
  </context>
  <context id = "patternContext">
      <projection type="network" id="pattern"></projection>
  </context>
  <context id = "antContext">
      <projection type="continuous space" id="space"></projection>
      <projection type="grid" id="grid"></projection>
  </context>
</context>
In the interface, in the Scenario Tree, I have defined a display in each 
subcontext. The two for networks work just fine--I see a button for each 
at the bottom of the display, and when I click on it, that graph is 
displayed. But there is no display, not even a button, for the third 
display (the one for antContext). I've gone over the display definition 
dialog several times, basically following the settings in the JZombie 
demo, but I'm clearly missing something. Where should I start looking 
for the problem?
 
 
 
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest

 

-- 

H. Van Dyke Parunak, Ph.D.
President, ABC Research, LLC
<LogoColorArtNouveau_Small.png>
Superior solutions through Agent-Based and Complex systems
1027 Ferdon Road
Ann Arbor, MI 48104-3630
email: <a moz-do-not-send="true" href="x-msg://13/van.parunak@gmail.com">van.parunak@...
cell: 734 395 3253
www.ABCResearch.org

<Screen Shot 2017-04-24 at 10.16.31.png><repast.simphony.action.display_3.xml>

 

 

--

H. Van Dyke Parunak, Ph.D.
President, ABC Research, LLC

Superior solutions through Agent-Based and Complex systems
1027 Ferdon Road
Ann Arbor, MI 48104-3630
email: van.parunak@...
cell: 734 395 3253
www.ABCResearch.org


--
H. Van Dyke Parunak, Ph.D.
President, ABC Research, LLC

Superior solutions through Agent-Based and Complex systems
1027 Ferdon Road
Ann Arbor, MI 48104-3630
email: van.parunak@...
cell: 734 395 3253
www.ABCResearch.org

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest