Anylogic - Measuring time through multiple layers of a model












0















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










share|improve this question





























    0















    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










    share|improve this question



























      0












      0








      0








      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










      share|improve this question
















      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






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 27 '18 at 11:55







      Snuffduff

















      asked Nov 16 '18 at 9:31









      SnuffduffSnuffduff

      63




      63
























          1 Answer
          1






          active

          oldest

          votes


















          1














          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:



          enter image description here



          Now you can call on any 'TimeMeasureStart' object anywhere in the model, similar to below where it sits in 'Main':
          enter image description here






          share|improve this answer
























          • 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












          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%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









          1














          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:



          enter image description here



          Now you can call on any 'TimeMeasureStart' object anywhere in the model, similar to below where it sits in 'Main':
          enter image description here






          share|improve this answer
























          • 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
















          1














          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:



          enter image description here



          Now you can call on any 'TimeMeasureStart' object anywhere in the model, similar to below where it sits in 'Main':
          enter image description here






          share|improve this answer
























          • 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














          1












          1








          1







          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:



          enter image description here



          Now you can call on any 'TimeMeasureStart' object anywhere in the model, similar to below where it sits in 'Main':
          enter image description here






          share|improve this answer













          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:



          enter image description here



          Now you can call on any 'TimeMeasureStart' object anywhere in the model, similar to below where it sits in 'Main':
          enter image description here







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 16 '18 at 10:09









          BenjaminBenjamin

          1,0851613




          1,0851613













          • 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











          • 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




















          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%2f53334948%2fanylogic-measuring-time-through-multiple-layers-of-a-model%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

          Bressuire

          Vorschmack

          Quarantine