Ferramentas do usuário

Ferramentas do site


geopro:pedro:repast

Diferenças

Aqui você vê as diferenças entre duas revisões dessa página.

Link para esta página de comparações

Ambos lados da revisão anteriorRevisão anterior
geopro:pedro:repast [2008/07/22 20:13] pedrogeopro:pedro:repast [2010/03/09 14:33] (atual) pedro
Linha 246: Linha 246:
 GeoGraphs can import network landscapes and corresponding territorial outline maps from **shape files**. GeoGraphs can import network landscapes and corresponding territorial outline maps from **shape files**.
 The original version of GeoGraphs was built for  Swarm. The original version of GeoGraphs was built for  Swarm.
 +
  
  
Linha 260: Linha 261:
 {{http://leg.ufpr.br/~pedro/figures/repast-virtual-mars.jpg}} {{http://leg.ufpr.br/~pedro/figures/repast-virtual-mars.jpg}}
  
 +
 +==== Triggering actions====
 +I have two trigger actions in my SynapseAgent class as below. Basically when its neuron is excited (when its potential is equal to 30) synapses are activated to conduct the neuronal signal to postsynaptic neurons with a delay of 2 time steps because of axonal delay and processing time of synapses. However, axonal delay can change is some circumstances. In this sense, how can I re-schedule my SynapseAgent's trigger methods? Or, should I remove this synapse agent and create a new one? There is a DefaultTriggerAction class but I am not sure how to use it. Is there sample codes (I couldn't find one).
 +
 +Thanks in advace,
 +
 +Önder.
 +
 +  public class SynapseAgent {
 +  
 +    /**
 +    * Initially, it takes 10 time steps to process the signal. 
 +    */
 +    @Watch(watcheeClassName = "wiringexperiment001.SensoryNeuronAgent", 
 +           watcheeFieldNames = "potential",
 +           query = "linked_from", 
 +           triggerCondition = "$watchee.getPotential() == 30", 
 +           whenToTrigger = WatcherTriggerSchedule.LATER, 
 +           scheduleTriggerDelta = 2d)
 +  
 +    public void activate() {
 +      System.out.println("activate! " + RunEnvironment.getInstance().getCurrentSchedule().getTickCount());
 +      Network<Object> network = WiringExperiment001Utility.getNetwork(this);
 +      Iterable<RepastEdge<Object>> outEdges = network.getOutEdges(this);
 +      Iterator<RepastEdge<Object>> outEdgeIterator = outEdges.iterator();
 +      while (outEdgeIterator.hasNext()) {
 +        RepastEdge<Object> edge = outEdgeIterator.next();
 +        edge.setWeight(30);
 +      }
 +    }
 +    @Watch(watcheeClassName = "wiringexperiment001.SensoryNeuronAgent", 
 +           watcheeFieldNames = "potential",
 +           query = "linked_from", 
 +           triggerCondition = "$watchee.getPotential() == -70", 
 +           whenToTrigger = WatcherTriggerSchedule.LATER, 
 +           scheduleTriggerDelta = 2d)
 +    public void deactivate() {
 +      System.out.println("deactivate! " + RunEnvironment.getInstance().getCurrentSchedule().getTickCount());
 +      Network<Object> network = WiringExperiment001Utility.getNetwork(this);
 +      Iterable<RepastEdge<Object>> outEdges = network.getOutEdges(this);
 +      Iterator<RepastEdge<Object>> outEdgeIterator = outEdges.iterator();
 +      while (outEdgeIterator.hasNext()) {
 +        RepastEdge<Object> edge = outEdgeIterator.next();
 +        edge.setWeight(-70);
 +      }
 +    }
 +  
 +  }
  
  
geopro/pedro/repast.1216757614.txt.gz · Última modificação: 2008/07/22 20:13 por pedro