|
List Info
Thread: Order
|
|
| Order |
  Canada |
2008-06-04 10:30:23 |
|
Hello,
I need some help to establish the order in which my simulation procedures are been made.
I have a GO command that asks turtles to do a sequence of procedures and than a sequence of Report commands that calculate the sum of all turtles values that have been calculated by the GO commands.
My problem is that I would like to use the first two reporters for my the last five procedures in GO command.
How do I do that and how do I know what is calculated first and second and third and so on ?
Regards
Daniel Tanis
__._,_.___
.
__,_._,___
|
| Re: Order |
  United States |
2008-06-04 17:42:45 |
|
The order that procedure and reporter definitions appear in the
procedure pane does not affect the order you can use them in GO or
other procedures.
In a procedure, commands execute in the order they appear, one after the other.
If it is important that ALL turtles complete ONE procedure before any
turtles begin the NEXT procedure, use seperate ask clauses:
ask turtles [ do-procedure-one ]
ask turtles [ do-procedure-two ]
If it is important that each turtle complete all the commands before
ANY other turtle starts running any commands, then put the commands
inside a single ASK:
ask turtles
[ do-procedure-one
do-procedure-two
do-procedure-three
]
I hope this helps.
On Wed, Jun 4, 2008 at 11:30 AM, Daniel Tanis < daniel.tanis%40gmail.com">daniel.tanis gmail.com> wrote:
> Hello,
> I need some help to establish the order in which my simulation procedures
> are been made.
> I have a GO command that asks turtles to do a sequence of procedures and
> than a sequence of Report commands that calculate the sum of all turtles
> values that have been calculated by the GO commands.
> My problem is that I would like to use the first two reporters for my the
> last five procedures in GO command.
> How do I do that and how do I know what is calculated first and second and
> third and so on ?
>
> Regards
> Daniel Tanis
__._,_.___
.
__,_._,___
|
| Re: Order |
  Canada |
2008-06-05 09:46:34 |
|
Thank you, it is usefull.
And how does it work with the report procedures? I have:
ask turtles [ do-procedure-one do-procedure-two do-procedure-three ]
and for procedure-two, turtles must use a specific report result. What I want is that the second turtle to do procedure-two use a Reporter that was calculated based on the result of the first turtle to do procedure-two.
Is it possible?
Or to I have to use globals?
Regards
Daniel Tanis
2008/6/4 James Steiner < gregortrol l gmail.com">gregortroll gmail.com>:
The order that procedure and reporter definitions appear in the procedure pane does not affect the order you can use them in GO or other procedures.
In a procedure, commands execute in the order they appear, one after the other.
If it is important that ALL turtles complete ONE procedure before any turtles begin the NEXT procedure, use seperate ask clauses:
ask turtles [ do-procedure-one ] ask turtles [ do-procedure-two ]
If it is important that each turtle complete all the commands before
ANY other turtle starts running any commands, then put the commands inside a single ASK:
ask turtles [ do-procedure-one do-procedure-two do-procedure-three ]
I hope this helps.
On Wed, Jun 4, 2008 at 11:30 AM, Daniel Tanis < daniel.tan is%40gmail.com" target="_blank">daniel.tanis gmail.com> wrote: > Hello, > I need some help to establish the order in which my simulation procedures
> are been made. > I have a GO command that asks turtles to do a sequence of procedures and > than a sequence of Report commands that calculate the sum of all turtles > values that have been calculated by the GO commands.
> My problem is that I would like to use the first two reporters for my the > last five procedures in GO command. > How do I do that and how do I know what is calculated first and second and > third and so on ?
> > Regards > Daniel Tanis
__._,_.___
.
__,_._,___
|
| Re: Order |
  Canada |
2008-06-05 09:46:34 |
|
Thank you, it is usefull.
And how does it work with the report procedures? I have:
ask turtles [ do-procedure-one do-procedure-two do-procedure-three ]
and for procedure-two, turtles must use a specific report result. What I want is that the second turtle to do procedure-two use a Reporter that was calculated based on the result of the first turtle to do procedure-two.
Is it possible?
Or to I have to use globals?
Regards
Daniel Tanis
2008/6/4 James Steiner < gregortrol l gmail.com">gregortroll gmail.com>:
The order that procedure and reporter definitions appear in the procedure pane does not affect the order you can use them in GO or other procedures.
In a procedure, commands execute in the order they appear, one after the other.
If it is important that ALL turtles complete ONE procedure before any turtles begin the NEXT procedure, use seperate ask clauses:
ask turtles [ do-procedure-one ] ask turtles [ do-procedure-two ]
If it is important that each turtle complete all the commands before
ANY other turtle starts running any commands, then put the commands inside a single ASK:
ask turtles [ do-procedure-one do-procedure-two do-procedure-three ]
I hope this helps.
On Wed, Jun 4, 2008 at 11:30 AM, Daniel Tanis < daniel.tan is%40gmail.com" target="_blank">daniel.tanis gmail.com> wrote: > Hello, > I need some help to establish the order in which my simulation procedures
> are been made. > I have a GO command that asks turtles to do a sequence of procedures and > than a sequence of Report commands that calculate the sum of all turtles > values that have been calculated by the GO commands.
> My problem is that I would like to use the first two reporters for my the > last five procedures in GO command. > How do I do that and how do I know what is calculated first and second and > third and so on ?
> > Regards > Daniel Tanis
__._,_.___
.
__,_._,___
|
[1-4]
|
|
|
about | contact Other archives ( Real Estate discussion Medical topics )
|