Anylogic - Measuring time through multiple layers of a model
I'm simulating a train system and want to measure the time a passenger spends from entering the system to boarding. Entering the system happens on a higher, boarding on a lower level of the model. The problem is that the TimeMeasureEnd block doesn't see the TimeMeasureStart blocks on a different level. Does anyone have experience with this problem or an idea for a solution?
Edit:
I call set_startObjects(TimeMeasureStart) in an event occuring once at the creation of the agent in the lower level and set either the start blocks of the one or the other parent, depending on what the parent is. The data is being collected in all child agents separately and displayed in separate histograms in each child agent. How can I accumulate all of them in one single histogram to display in main which is two layers above the child agent where the data is being collected?
see attached image about layer problem
anylogic agent-based-modeling
add a comment |
I'm simulating a train system and want to measure the time a passenger spends from entering the system to boarding. Entering the system happens on a higher, boarding on a lower level of the model. The problem is that the TimeMeasureEnd block doesn't see the TimeMeasureStart blocks on a different level. Does anyone have experience with this problem or an idea for a solution?
Edit:
I call set_startObjects(TimeMeasureStart) in an event occuring once at the creation of the agent in the lower level and set either the start blocks of the one or the other parent, depending on what the parent is. The data is being collected in all child agents separately and displayed in separate histograms in each child agent. How can I accumulate all of them in one single histogram to display in main which is two layers above the child agent where the data is being collected?
see attached image about layer problem
anylogic agent-based-modeling
add a comment |
I'm simulating a train system and want to measure the time a passenger spends from entering the system to boarding. Entering the system happens on a higher, boarding on a lower level of the model. The problem is that the TimeMeasureEnd block doesn't see the TimeMeasureStart blocks on a different level. Does anyone have experience with this problem or an idea for a solution?
Edit:
I call set_startObjects(TimeMeasureStart) in an event occuring once at the creation of the agent in the lower level and set either the start blocks of the one or the other parent, depending on what the parent is. The data is being collected in all child agents separately and displayed in separate histograms in each child agent. How can I accumulate all of them in one single histogram to display in main which is two layers above the child agent where the data is being collected?
see attached image about layer problem
anylogic agent-based-modeling
I'm simulating a train system and want to measure the time a passenger spends from entering the system to boarding. Entering the system happens on a higher, boarding on a lower level of the model. The problem is that the TimeMeasureEnd block doesn't see the TimeMeasureStart blocks on a different level. Does anyone have experience with this problem or an idea for a solution?
Edit:
I call set_startObjects(TimeMeasureStart) in an event occuring once at the creation of the agent in the lower level and set either the start blocks of the one or the other parent, depending on what the parent is. The data is being collected in all child agents separately and displayed in separate histograms in each child agent. How can I accumulate all of them in one single histogram to display in main which is two layers above the child agent where the data is being collected?
see attached image about layer problem
anylogic agent-based-modeling
anylogic agent-based-modeling
edited Nov 27 '18 at 11:55
Snuffduff
asked Nov 16 '18 at 9:31
SnuffduffSnuffduff
63
63
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
you can always define the 'TimeMeasureStart' block dynamically in your 'TimeMeasureEnd' block. Just switch the entry mode for defining it to "static value" as below:
Now you can call on any 'TimeMeasureStart' object anywhere in the model, similar to below where it sits in 'Main':
It is generally a good idea to always check which options you have with any characteristic by clicking on that little switch icon. Sometimes, you can also load stuff easily from your database...
– Benjamin
Nov 16 '18 at 10:10
That was helpful, but another problem arose. The agent the end block is in, can have two different "parent" agents (two types of train stations). I want to measure the time from both of these. The problem is, that, when compiling, it always throws an exception for the other parent, of which the reference is obviously not there. I've tried setting the start block dynamically, depending on wheather the parent is one or the other station type, but I can't seem to find the proper attribute or method for setting the start block manually in the end block. Maybe you have an idea?
– Snuffduff
Nov 21 '18 at 11:37
After digging through the documentation for ages I found out that the method in question is called set_startObjects(TimeMeasureStart). I call this in an event occuring once and depending on what the parent is. The data is being collected in all child agents and displayed in separate histograms. How can I accumulate all of them in one single histogram to display in main?
– Snuffduff
Nov 21 '18 at 12:32
Hi SnuffDuff, can you actually turn this into a new issue here and describe from scratch (with screenshots...) your new problem? A little hard to understand ;-)
– Benjamin
Nov 21 '18 at 12:56
I will do so next time I have access to the model, as we only have a limited amount of licences at my university.
– Snuffduff
Nov 21 '18 at 13:21
|
show 2 more comments
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53334948%2fanylogic-measuring-time-through-multiple-layers-of-a-model%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
you can always define the 'TimeMeasureStart' block dynamically in your 'TimeMeasureEnd' block. Just switch the entry mode for defining it to "static value" as below:
Now you can call on any 'TimeMeasureStart' object anywhere in the model, similar to below where it sits in 'Main':
It is generally a good idea to always check which options you have with any characteristic by clicking on that little switch icon. Sometimes, you can also load stuff easily from your database...
– Benjamin
Nov 16 '18 at 10:10
That was helpful, but another problem arose. The agent the end block is in, can have two different "parent" agents (two types of train stations). I want to measure the time from both of these. The problem is, that, when compiling, it always throws an exception for the other parent, of which the reference is obviously not there. I've tried setting the start block dynamically, depending on wheather the parent is one or the other station type, but I can't seem to find the proper attribute or method for setting the start block manually in the end block. Maybe you have an idea?
– Snuffduff
Nov 21 '18 at 11:37
After digging through the documentation for ages I found out that the method in question is called set_startObjects(TimeMeasureStart). I call this in an event occuring once and depending on what the parent is. The data is being collected in all child agents and displayed in separate histograms. How can I accumulate all of them in one single histogram to display in main?
– Snuffduff
Nov 21 '18 at 12:32
Hi SnuffDuff, can you actually turn this into a new issue here and describe from scratch (with screenshots...) your new problem? A little hard to understand ;-)
– Benjamin
Nov 21 '18 at 12:56
I will do so next time I have access to the model, as we only have a limited amount of licences at my university.
– Snuffduff
Nov 21 '18 at 13:21
|
show 2 more comments
you can always define the 'TimeMeasureStart' block dynamically in your 'TimeMeasureEnd' block. Just switch the entry mode for defining it to "static value" as below:
Now you can call on any 'TimeMeasureStart' object anywhere in the model, similar to below where it sits in 'Main':
It is generally a good idea to always check which options you have with any characteristic by clicking on that little switch icon. Sometimes, you can also load stuff easily from your database...
– Benjamin
Nov 16 '18 at 10:10
That was helpful, but another problem arose. The agent the end block is in, can have two different "parent" agents (two types of train stations). I want to measure the time from both of these. The problem is, that, when compiling, it always throws an exception for the other parent, of which the reference is obviously not there. I've tried setting the start block dynamically, depending on wheather the parent is one or the other station type, but I can't seem to find the proper attribute or method for setting the start block manually in the end block. Maybe you have an idea?
– Snuffduff
Nov 21 '18 at 11:37
After digging through the documentation for ages I found out that the method in question is called set_startObjects(TimeMeasureStart). I call this in an event occuring once and depending on what the parent is. The data is being collected in all child agents and displayed in separate histograms. How can I accumulate all of them in one single histogram to display in main?
– Snuffduff
Nov 21 '18 at 12:32
Hi SnuffDuff, can you actually turn this into a new issue here and describe from scratch (with screenshots...) your new problem? A little hard to understand ;-)
– Benjamin
Nov 21 '18 at 12:56
I will do so next time I have access to the model, as we only have a limited amount of licences at my university.
– Snuffduff
Nov 21 '18 at 13:21
|
show 2 more comments
you can always define the 'TimeMeasureStart' block dynamically in your 'TimeMeasureEnd' block. Just switch the entry mode for defining it to "static value" as below:
Now you can call on any 'TimeMeasureStart' object anywhere in the model, similar to below where it sits in 'Main':
you can always define the 'TimeMeasureStart' block dynamically in your 'TimeMeasureEnd' block. Just switch the entry mode for defining it to "static value" as below:
Now you can call on any 'TimeMeasureStart' object anywhere in the model, similar to below where it sits in 'Main':
answered Nov 16 '18 at 10:09
BenjaminBenjamin
1,1351613
1,1351613
It is generally a good idea to always check which options you have with any characteristic by clicking on that little switch icon. Sometimes, you can also load stuff easily from your database...
– Benjamin
Nov 16 '18 at 10:10
That was helpful, but another problem arose. The agent the end block is in, can have two different "parent" agents (two types of train stations). I want to measure the time from both of these. The problem is, that, when compiling, it always throws an exception for the other parent, of which the reference is obviously not there. I've tried setting the start block dynamically, depending on wheather the parent is one or the other station type, but I can't seem to find the proper attribute or method for setting the start block manually in the end block. Maybe you have an idea?
– Snuffduff
Nov 21 '18 at 11:37
After digging through the documentation for ages I found out that the method in question is called set_startObjects(TimeMeasureStart). I call this in an event occuring once and depending on what the parent is. The data is being collected in all child agents and displayed in separate histograms. How can I accumulate all of them in one single histogram to display in main?
– Snuffduff
Nov 21 '18 at 12:32
Hi SnuffDuff, can you actually turn this into a new issue here and describe from scratch (with screenshots...) your new problem? A little hard to understand ;-)
– Benjamin
Nov 21 '18 at 12:56
I will do so next time I have access to the model, as we only have a limited amount of licences at my university.
– Snuffduff
Nov 21 '18 at 13:21
|
show 2 more comments
It is generally a good idea to always check which options you have with any characteristic by clicking on that little switch icon. Sometimes, you can also load stuff easily from your database...
– Benjamin
Nov 16 '18 at 10:10
That was helpful, but another problem arose. The agent the end block is in, can have two different "parent" agents (two types of train stations). I want to measure the time from both of these. The problem is, that, when compiling, it always throws an exception for the other parent, of which the reference is obviously not there. I've tried setting the start block dynamically, depending on wheather the parent is one or the other station type, but I can't seem to find the proper attribute or method for setting the start block manually in the end block. Maybe you have an idea?
– Snuffduff
Nov 21 '18 at 11:37
After digging through the documentation for ages I found out that the method in question is called set_startObjects(TimeMeasureStart). I call this in an event occuring once and depending on what the parent is. The data is being collected in all child agents and displayed in separate histograms. How can I accumulate all of them in one single histogram to display in main?
– Snuffduff
Nov 21 '18 at 12:32
Hi SnuffDuff, can you actually turn this into a new issue here and describe from scratch (with screenshots...) your new problem? A little hard to understand ;-)
– Benjamin
Nov 21 '18 at 12:56
I will do so next time I have access to the model, as we only have a limited amount of licences at my university.
– Snuffduff
Nov 21 '18 at 13:21
It is generally a good idea to always check which options you have with any characteristic by clicking on that little switch icon. Sometimes, you can also load stuff easily from your database...
– Benjamin
Nov 16 '18 at 10:10
It is generally a good idea to always check which options you have with any characteristic by clicking on that little switch icon. Sometimes, you can also load stuff easily from your database...
– Benjamin
Nov 16 '18 at 10:10
That was helpful, but another problem arose. The agent the end block is in, can have two different "parent" agents (two types of train stations). I want to measure the time from both of these. The problem is, that, when compiling, it always throws an exception for the other parent, of which the reference is obviously not there. I've tried setting the start block dynamically, depending on wheather the parent is one or the other station type, but I can't seem to find the proper attribute or method for setting the start block manually in the end block. Maybe you have an idea?
– Snuffduff
Nov 21 '18 at 11:37
That was helpful, but another problem arose. The agent the end block is in, can have two different "parent" agents (two types of train stations). I want to measure the time from both of these. The problem is, that, when compiling, it always throws an exception for the other parent, of which the reference is obviously not there. I've tried setting the start block dynamically, depending on wheather the parent is one or the other station type, but I can't seem to find the proper attribute or method for setting the start block manually in the end block. Maybe you have an idea?
– Snuffduff
Nov 21 '18 at 11:37
After digging through the documentation for ages I found out that the method in question is called set_startObjects(TimeMeasureStart). I call this in an event occuring once and depending on what the parent is. The data is being collected in all child agents and displayed in separate histograms. How can I accumulate all of them in one single histogram to display in main?
– Snuffduff
Nov 21 '18 at 12:32
After digging through the documentation for ages I found out that the method in question is called set_startObjects(TimeMeasureStart). I call this in an event occuring once and depending on what the parent is. The data is being collected in all child agents and displayed in separate histograms. How can I accumulate all of them in one single histogram to display in main?
– Snuffduff
Nov 21 '18 at 12:32
Hi SnuffDuff, can you actually turn this into a new issue here and describe from scratch (with screenshots...) your new problem? A little hard to understand ;-)
– Benjamin
Nov 21 '18 at 12:56
Hi SnuffDuff, can you actually turn this into a new issue here and describe from scratch (with screenshots...) your new problem? A little hard to understand ;-)
– Benjamin
Nov 21 '18 at 12:56
I will do so next time I have access to the model, as we only have a limited amount of licences at my university.
– Snuffduff
Nov 21 '18 at 13:21
I will do so next time I have access to the model, as we only have a limited amount of licences at my university.
– Snuffduff
Nov 21 '18 at 13:21
|
show 2 more comments
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53334948%2fanylogic-measuring-time-through-multiple-layers-of-a-model%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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