Pedestrian Position/coordination in anylogic in certain time period












1















I have a simple pedestrian model where 7000 pedestrians are going from an entry line to target line. I want to know the position of the pedestrians after certain time period for predicting how much time they need for going from one point to another. In anylogic help i saw getX,getY function but where to use these and how?
Pedestrian Model and Simulation










share|improve this question

























  • Hey there & welcome to StackOverflow! Your question is incomplete and has little chances to get answered as is. Please read the How-To-Ask article & edit your question adding more information. Let's start with some snippets that you've worked on regarding the matter! (if you need help with this, read up on how to create a Minimal, Complete and Verifiable Example)

    – iamdanchiv
    Jan 1 at 7:02











  • you can use ped.getX() in any of the pedestrian library block actions.. you can use agent.getX() in any of the PML blocks actions. You can use getX() anywhere inside the pedestrian agent... you can also in main potentially do pedestrians.get(index).getX().. so it depends on how you want to do whatever you are doing

    – Felipe
    Jan 1 at 7:33













  • @Felipe Thanks. Have you seen my model, it's in the question. I just used 3 blocks pedsource, pedgoto and pedsink, and time measure. And I want is to get each pedestrians positon after 1 second and so on. I wrote ped.getX(),ped.getY() in ped source agentaction,on startup box but i'm getting error. i need the data of each pedestrians position after 1 second, hope you get my question. thanks.

    – Mohammed Saleheen
    Jan 1 at 8:14











  • @Felipe thanks a lot, but i am getting an error which is Description: The method create_GetCoordinates(int, TimeUnits, Pedestrian) is undefined for the type Main. Location: Pedestrian Flow/Main/pedGoTo - PedGoTo. What should i do?

    – Mohammed Saleheen
    Jan 2 at 4:02











  • @Felipe I tried to drag the Getcoordinates dynamic event to the Main, this time it's running but i cant see the information after 1 second. in model running window it's showing getcordinates but i cant click or get any info. hope you understand. thanks

    – Mohammed Saleheen
    Jan 2 at 4:49
















1















I have a simple pedestrian model where 7000 pedestrians are going from an entry line to target line. I want to know the position of the pedestrians after certain time period for predicting how much time they need for going from one point to another. In anylogic help i saw getX,getY function but where to use these and how?
Pedestrian Model and Simulation










share|improve this question

























  • Hey there & welcome to StackOverflow! Your question is incomplete and has little chances to get answered as is. Please read the How-To-Ask article & edit your question adding more information. Let's start with some snippets that you've worked on regarding the matter! (if you need help with this, read up on how to create a Minimal, Complete and Verifiable Example)

    – iamdanchiv
    Jan 1 at 7:02











  • you can use ped.getX() in any of the pedestrian library block actions.. you can use agent.getX() in any of the PML blocks actions. You can use getX() anywhere inside the pedestrian agent... you can also in main potentially do pedestrians.get(index).getX().. so it depends on how you want to do whatever you are doing

    – Felipe
    Jan 1 at 7:33













  • @Felipe Thanks. Have you seen my model, it's in the question. I just used 3 blocks pedsource, pedgoto and pedsink, and time measure. And I want is to get each pedestrians positon after 1 second and so on. I wrote ped.getX(),ped.getY() in ped source agentaction,on startup box but i'm getting error. i need the data of each pedestrians position after 1 second, hope you get my question. thanks.

    – Mohammed Saleheen
    Jan 1 at 8:14











  • @Felipe thanks a lot, but i am getting an error which is Description: The method create_GetCoordinates(int, TimeUnits, Pedestrian) is undefined for the type Main. Location: Pedestrian Flow/Main/pedGoTo - PedGoTo. What should i do?

    – Mohammed Saleheen
    Jan 2 at 4:02











  • @Felipe I tried to drag the Getcoordinates dynamic event to the Main, this time it's running but i cant see the information after 1 second. in model running window it's showing getcordinates but i cant click or get any info. hope you understand. thanks

    – Mohammed Saleheen
    Jan 2 at 4:49














1












1








1


1






I have a simple pedestrian model where 7000 pedestrians are going from an entry line to target line. I want to know the position of the pedestrians after certain time period for predicting how much time they need for going from one point to another. In anylogic help i saw getX,getY function but where to use these and how?
Pedestrian Model and Simulation










share|improve this question
















I have a simple pedestrian model where 7000 pedestrians are going from an entry line to target line. I want to know the position of the pedestrians after certain time period for predicting how much time they need for going from one point to another. In anylogic help i saw getX,getY function but where to use these and how?
Pedestrian Model and Simulation







anylogic






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 1 at 7:30







Mohammed Saleheen

















asked Jan 1 at 6:53









Mohammed SaleheenMohammed Saleheen

64




64













  • Hey there & welcome to StackOverflow! Your question is incomplete and has little chances to get answered as is. Please read the How-To-Ask article & edit your question adding more information. Let's start with some snippets that you've worked on regarding the matter! (if you need help with this, read up on how to create a Minimal, Complete and Verifiable Example)

    – iamdanchiv
    Jan 1 at 7:02











  • you can use ped.getX() in any of the pedestrian library block actions.. you can use agent.getX() in any of the PML blocks actions. You can use getX() anywhere inside the pedestrian agent... you can also in main potentially do pedestrians.get(index).getX().. so it depends on how you want to do whatever you are doing

    – Felipe
    Jan 1 at 7:33













  • @Felipe Thanks. Have you seen my model, it's in the question. I just used 3 blocks pedsource, pedgoto and pedsink, and time measure. And I want is to get each pedestrians positon after 1 second and so on. I wrote ped.getX(),ped.getY() in ped source agentaction,on startup box but i'm getting error. i need the data of each pedestrians position after 1 second, hope you get my question. thanks.

    – Mohammed Saleheen
    Jan 1 at 8:14











  • @Felipe thanks a lot, but i am getting an error which is Description: The method create_GetCoordinates(int, TimeUnits, Pedestrian) is undefined for the type Main. Location: Pedestrian Flow/Main/pedGoTo - PedGoTo. What should i do?

    – Mohammed Saleheen
    Jan 2 at 4:02











  • @Felipe I tried to drag the Getcoordinates dynamic event to the Main, this time it's running but i cant see the information after 1 second. in model running window it's showing getcordinates but i cant click or get any info. hope you understand. thanks

    – Mohammed Saleheen
    Jan 2 at 4:49



















  • Hey there & welcome to StackOverflow! Your question is incomplete and has little chances to get answered as is. Please read the How-To-Ask article & edit your question adding more information. Let's start with some snippets that you've worked on regarding the matter! (if you need help with this, read up on how to create a Minimal, Complete and Verifiable Example)

    – iamdanchiv
    Jan 1 at 7:02











  • you can use ped.getX() in any of the pedestrian library block actions.. you can use agent.getX() in any of the PML blocks actions. You can use getX() anywhere inside the pedestrian agent... you can also in main potentially do pedestrians.get(index).getX().. so it depends on how you want to do whatever you are doing

    – Felipe
    Jan 1 at 7:33













  • @Felipe Thanks. Have you seen my model, it's in the question. I just used 3 blocks pedsource, pedgoto and pedsink, and time measure. And I want is to get each pedestrians positon after 1 second and so on. I wrote ped.getX(),ped.getY() in ped source agentaction,on startup box but i'm getting error. i need the data of each pedestrians position after 1 second, hope you get my question. thanks.

    – Mohammed Saleheen
    Jan 1 at 8:14











  • @Felipe thanks a lot, but i am getting an error which is Description: The method create_GetCoordinates(int, TimeUnits, Pedestrian) is undefined for the type Main. Location: Pedestrian Flow/Main/pedGoTo - PedGoTo. What should i do?

    – Mohammed Saleheen
    Jan 2 at 4:02











  • @Felipe I tried to drag the Getcoordinates dynamic event to the Main, this time it's running but i cant see the information after 1 second. in model running window it's showing getcordinates but i cant click or get any info. hope you understand. thanks

    – Mohammed Saleheen
    Jan 2 at 4:49

















Hey there & welcome to StackOverflow! Your question is incomplete and has little chances to get answered as is. Please read the How-To-Ask article & edit your question adding more information. Let's start with some snippets that you've worked on regarding the matter! (if you need help with this, read up on how to create a Minimal, Complete and Verifiable Example)

– iamdanchiv
Jan 1 at 7:02





Hey there & welcome to StackOverflow! Your question is incomplete and has little chances to get answered as is. Please read the How-To-Ask article & edit your question adding more information. Let's start with some snippets that you've worked on regarding the matter! (if you need help with this, read up on how to create a Minimal, Complete and Verifiable Example)

– iamdanchiv
Jan 1 at 7:02













you can use ped.getX() in any of the pedestrian library block actions.. you can use agent.getX() in any of the PML blocks actions. You can use getX() anywhere inside the pedestrian agent... you can also in main potentially do pedestrians.get(index).getX().. so it depends on how you want to do whatever you are doing

– Felipe
Jan 1 at 7:33







you can use ped.getX() in any of the pedestrian library block actions.. you can use agent.getX() in any of the PML blocks actions. You can use getX() anywhere inside the pedestrian agent... you can also in main potentially do pedestrians.get(index).getX().. so it depends on how you want to do whatever you are doing

– Felipe
Jan 1 at 7:33















@Felipe Thanks. Have you seen my model, it's in the question. I just used 3 blocks pedsource, pedgoto and pedsink, and time measure. And I want is to get each pedestrians positon after 1 second and so on. I wrote ped.getX(),ped.getY() in ped source agentaction,on startup box but i'm getting error. i need the data of each pedestrians position after 1 second, hope you get my question. thanks.

– Mohammed Saleheen
Jan 1 at 8:14





@Felipe Thanks. Have you seen my model, it's in the question. I just used 3 blocks pedsource, pedgoto and pedsink, and time measure. And I want is to get each pedestrians positon after 1 second and so on. I wrote ped.getX(),ped.getY() in ped source agentaction,on startup box but i'm getting error. i need the data of each pedestrians position after 1 second, hope you get my question. thanks.

– Mohammed Saleheen
Jan 1 at 8:14













@Felipe thanks a lot, but i am getting an error which is Description: The method create_GetCoordinates(int, TimeUnits, Pedestrian) is undefined for the type Main. Location: Pedestrian Flow/Main/pedGoTo - PedGoTo. What should i do?

– Mohammed Saleheen
Jan 2 at 4:02





@Felipe thanks a lot, but i am getting an error which is Description: The method create_GetCoordinates(int, TimeUnits, Pedestrian) is undefined for the type Main. Location: Pedestrian Flow/Main/pedGoTo - PedGoTo. What should i do?

– Mohammed Saleheen
Jan 2 at 4:02













@Felipe I tried to drag the Getcoordinates dynamic event to the Main, this time it's running but i cant see the information after 1 second. in model running window it's showing getcordinates but i cant click or get any info. hope you understand. thanks

– Mohammed Saleheen
Jan 2 at 4:49





@Felipe I tried to drag the Getcoordinates dynamic event to the Main, this time it's running but i cant see the information after 1 second. in model running window it's showing getcordinates but i cant click or get any info. hope you understand. thanks

– Mohammed Saleheen
Jan 2 at 4:49












1 Answer
1






active

oldest

votes


















0















  1. Create a dynamic event called GetCoordinates with 1 argument called ped of type Pedestrian


  2. in the pedGoTo block when an agent enters the block you will use this code:



    create_GetCoordinates(1,SECOND,ped);



  3. In the GetCoordinates dynamic event you can now use ped.getX() and ped.getY() to collect the information you need after 1 second.







share|improve this answer
























  • I tried to drag the Getcoordinates dynamic event to the Main, this time it's running but i cant see the information after 1 second. in model running window it's showing getcordinates but i cant click or get any info. hope you understand. thanks –

    – Mohammed Saleheen
    Jan 2 at 8:04











  • you can use the function traceln( ped.getX() ) to print the value in the console.

    – Felipe
    Jan 2 at 16:00











  • Okay thanks, but where I'll write that function? Action box of dynamic event? Thanks

    – Mohammed Saleheen
    Jan 2 at 18:55











  • Bro thank you very much. I did it

    – Mohammed Saleheen
    Jan 2 at 19:00











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53993576%2fpedestrian-position-coordination-in-anylogic-in-certain-time-period%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0















  1. Create a dynamic event called GetCoordinates with 1 argument called ped of type Pedestrian


  2. in the pedGoTo block when an agent enters the block you will use this code:



    create_GetCoordinates(1,SECOND,ped);



  3. In the GetCoordinates dynamic event you can now use ped.getX() and ped.getY() to collect the information you need after 1 second.







share|improve this answer
























  • I tried to drag the Getcoordinates dynamic event to the Main, this time it's running but i cant see the information after 1 second. in model running window it's showing getcordinates but i cant click or get any info. hope you understand. thanks –

    – Mohammed Saleheen
    Jan 2 at 8:04











  • you can use the function traceln( ped.getX() ) to print the value in the console.

    – Felipe
    Jan 2 at 16:00











  • Okay thanks, but where I'll write that function? Action box of dynamic event? Thanks

    – Mohammed Saleheen
    Jan 2 at 18:55











  • Bro thank you very much. I did it

    – Mohammed Saleheen
    Jan 2 at 19:00
















0















  1. Create a dynamic event called GetCoordinates with 1 argument called ped of type Pedestrian


  2. in the pedGoTo block when an agent enters the block you will use this code:



    create_GetCoordinates(1,SECOND,ped);



  3. In the GetCoordinates dynamic event you can now use ped.getX() and ped.getY() to collect the information you need after 1 second.







share|improve this answer
























  • I tried to drag the Getcoordinates dynamic event to the Main, this time it's running but i cant see the information after 1 second. in model running window it's showing getcordinates but i cant click or get any info. hope you understand. thanks –

    – Mohammed Saleheen
    Jan 2 at 8:04











  • you can use the function traceln( ped.getX() ) to print the value in the console.

    – Felipe
    Jan 2 at 16:00











  • Okay thanks, but where I'll write that function? Action box of dynamic event? Thanks

    – Mohammed Saleheen
    Jan 2 at 18:55











  • Bro thank you very much. I did it

    – Mohammed Saleheen
    Jan 2 at 19:00














0












0








0








  1. Create a dynamic event called GetCoordinates with 1 argument called ped of type Pedestrian


  2. in the pedGoTo block when an agent enters the block you will use this code:



    create_GetCoordinates(1,SECOND,ped);



  3. In the GetCoordinates dynamic event you can now use ped.getX() and ped.getY() to collect the information you need after 1 second.







share|improve this answer














  1. Create a dynamic event called GetCoordinates with 1 argument called ped of type Pedestrian


  2. in the pedGoTo block when an agent enters the block you will use this code:



    create_GetCoordinates(1,SECOND,ped);



  3. In the GetCoordinates dynamic event you can now use ped.getX() and ped.getY() to collect the information you need after 1 second.








share|improve this answer












share|improve this answer



share|improve this answer










answered Jan 1 at 10:58









FelipeFelipe

1,9702721




1,9702721













  • I tried to drag the Getcoordinates dynamic event to the Main, this time it's running but i cant see the information after 1 second. in model running window it's showing getcordinates but i cant click or get any info. hope you understand. thanks –

    – Mohammed Saleheen
    Jan 2 at 8:04











  • you can use the function traceln( ped.getX() ) to print the value in the console.

    – Felipe
    Jan 2 at 16:00











  • Okay thanks, but where I'll write that function? Action box of dynamic event? Thanks

    – Mohammed Saleheen
    Jan 2 at 18:55











  • Bro thank you very much. I did it

    – Mohammed Saleheen
    Jan 2 at 19:00



















  • I tried to drag the Getcoordinates dynamic event to the Main, this time it's running but i cant see the information after 1 second. in model running window it's showing getcordinates but i cant click or get any info. hope you understand. thanks –

    – Mohammed Saleheen
    Jan 2 at 8:04











  • you can use the function traceln( ped.getX() ) to print the value in the console.

    – Felipe
    Jan 2 at 16:00











  • Okay thanks, but where I'll write that function? Action box of dynamic event? Thanks

    – Mohammed Saleheen
    Jan 2 at 18:55











  • Bro thank you very much. I did it

    – Mohammed Saleheen
    Jan 2 at 19:00

















I tried to drag the Getcoordinates dynamic event to the Main, this time it's running but i cant see the information after 1 second. in model running window it's showing getcordinates but i cant click or get any info. hope you understand. thanks –

– Mohammed Saleheen
Jan 2 at 8:04





I tried to drag the Getcoordinates dynamic event to the Main, this time it's running but i cant see the information after 1 second. in model running window it's showing getcordinates but i cant click or get any info. hope you understand. thanks –

– Mohammed Saleheen
Jan 2 at 8:04













you can use the function traceln( ped.getX() ) to print the value in the console.

– Felipe
Jan 2 at 16:00





you can use the function traceln( ped.getX() ) to print the value in the console.

– Felipe
Jan 2 at 16:00













Okay thanks, but where I'll write that function? Action box of dynamic event? Thanks

– Mohammed Saleheen
Jan 2 at 18:55





Okay thanks, but where I'll write that function? Action box of dynamic event? Thanks

– Mohammed Saleheen
Jan 2 at 18:55













Bro thank you very much. I did it

– Mohammed Saleheen
Jan 2 at 19:00





Bro thank you very much. I did it

– Mohammed Saleheen
Jan 2 at 19:00




















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53993576%2fpedestrian-position-coordination-in-anylogic-in-certain-time-period%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Monofisismo

Angular Downloading a file using contenturl with Basic Authentication

Olmecas