<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Mismatched Id of stop/resume object in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/mismatched-id-of-stop-resume-object/m-p/13497124#M13105</link>
    <description>&lt;P&gt;As described in the manual, the "id" parameter is used to fix the issue of choosing which &lt;STRONG&gt;state &lt;/STRONG&gt;to put the object in when it is resumed. Having mismatched ids does not cause the object to not resume if the id doesn't match.&lt;/P&gt;&lt;P&gt;The documentation doesn't say that the software will make sure they match. It says that &lt;STRONG&gt;you&lt;/STRONG&gt;--the modeler--needs to make sure they match, otherwise it won't work correctly.&lt;/P&gt;&lt;P&gt;From &lt;A href="https://docs.flexsim.com/en/19.2/Reference/CodingInFlexSim/FlexScriptAPIReference/Tree/Object.html#Method-stop"&gt;Object.stop()&lt;/A&gt; (emphasis added):&lt;/P&gt;&lt;P&gt;"Be aware that, if there are several stop requests for the same object, &lt;STRONG&gt;the state for each stop request is not remembered&lt;/STRONG&gt;. If an object is requested to stop by entity A with state 12, and then is later requested to stop by entity B for state 14, it will go into state 14 and forget state 12. Even if entity B resumes the object before entity A, the object will remain in state 14 until all stop requests have resumed.&lt;/P&gt;&lt;P&gt;The id and priority parameters are optional and were added &lt;STRONG&gt;to fix the problem in the previous paragraph&lt;/STRONG&gt;. If you specify these parameters, then it will store a record of the stop request, instead of just incrementing a value for the number of stops requested. The id is like a key for that stop request. The priority allows the object to prioritize its stop requests. For example, if you have a stop request for the scheduled down state, and another for the breakdown state at the same time, technically the object should be in two states at once, but since a FlexSim object can only be in one state at a time, the priority value breaks the tie and goes into &lt;STRONG&gt;the state of the highest priority stop request&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;The id value should match an id value that is added to a resume() call later on. This is for matching stop requests with their appropriate resume requests. For example,&lt;STRONG&gt; if you stop&lt;/STRONG&gt; an object for scheduled maintenance with an id of 1, once the scheduled maintenance is finished,&lt;STRONG&gt; you will need to&lt;/STRONG&gt; resume the object with the same id of 1."&lt;/P&gt;&lt;P&gt;This is not a bug in those commands; they are working exactly the way they were designed to work. The bug is in your model using those commands incorrectly.&lt;/P&gt;</description>
    <pubDate>Tue, 29 Oct 2019 17:57:40 GMT</pubDate>
    <dc:creator>philboboADSK</dc:creator>
    <dc:date>2019-10-29T17:57:40Z</dc:date>
    <item>
      <title>Mismatched Id of stop/resume object</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/mismatched-id-of-stop-resume-object/m-p/13497123#M13104</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 19.2.3 ]&lt;/I&gt;&lt;/P&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;As manual explained that object.resume() works only if the resume id matches the stop id.&lt;/P&gt;&lt;P&gt;The model below has different Id for stop() and resume() but resume() still make object resumed.&lt;/P&gt;&lt;P&gt;&lt;A id="23161" href="https://answers.flexsim.com/storage/attachments/23161-stop-resume-192.fsm"&gt;stop-resume-192.fsm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2019 06:59:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/mismatched-id-of-stop-resume-object/m-p/13497123#M13104</guid>
      <dc:creator>mail7WJMZ</dc:creator>
      <dc:date>2019-10-29T06:59:25Z</dc:date>
    </item>
    <item>
      <title>Re: Mismatched Id of stop/resume object</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/mismatched-id-of-stop-resume-object/m-p/13497124#M13105</link>
      <description>&lt;P&gt;As described in the manual, the "id" parameter is used to fix the issue of choosing which &lt;STRONG&gt;state &lt;/STRONG&gt;to put the object in when it is resumed. Having mismatched ids does not cause the object to not resume if the id doesn't match.&lt;/P&gt;&lt;P&gt;The documentation doesn't say that the software will make sure they match. It says that &lt;STRONG&gt;you&lt;/STRONG&gt;--the modeler--needs to make sure they match, otherwise it won't work correctly.&lt;/P&gt;&lt;P&gt;From &lt;A href="https://docs.flexsim.com/en/19.2/Reference/CodingInFlexSim/FlexScriptAPIReference/Tree/Object.html#Method-stop"&gt;Object.stop()&lt;/A&gt; (emphasis added):&lt;/P&gt;&lt;P&gt;"Be aware that, if there are several stop requests for the same object, &lt;STRONG&gt;the state for each stop request is not remembered&lt;/STRONG&gt;. If an object is requested to stop by entity A with state 12, and then is later requested to stop by entity B for state 14, it will go into state 14 and forget state 12. Even if entity B resumes the object before entity A, the object will remain in state 14 until all stop requests have resumed.&lt;/P&gt;&lt;P&gt;The id and priority parameters are optional and were added &lt;STRONG&gt;to fix the problem in the previous paragraph&lt;/STRONG&gt;. If you specify these parameters, then it will store a record of the stop request, instead of just incrementing a value for the number of stops requested. The id is like a key for that stop request. The priority allows the object to prioritize its stop requests. For example, if you have a stop request for the scheduled down state, and another for the breakdown state at the same time, technically the object should be in two states at once, but since a FlexSim object can only be in one state at a time, the priority value breaks the tie and goes into &lt;STRONG&gt;the state of the highest priority stop request&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;The id value should match an id value that is added to a resume() call later on. This is for matching stop requests with their appropriate resume requests. For example,&lt;STRONG&gt; if you stop&lt;/STRONG&gt; an object for scheduled maintenance with an id of 1, once the scheduled maintenance is finished,&lt;STRONG&gt; you will need to&lt;/STRONG&gt; resume the object with the same id of 1."&lt;/P&gt;&lt;P&gt;This is not a bug in those commands; they are working exactly the way they were designed to work. The bug is in your model using those commands incorrectly.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2019 17:57:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/mismatched-id-of-stop-resume-object/m-p/13497124#M13105</guid>
      <dc:creator>philboboADSK</dc:creator>
      <dc:date>2019-10-29T17:57:40Z</dc:date>
    </item>
  </channel>
</rss>

