<?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: Elevator Bank logics in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/elevator-bank-logics/m-p/13488020#M6160</link>
    <description>&lt;DIV class="fr-view clearfix"&gt;
 Thanks a lot!
&lt;/DIV&gt;</description>
    <pubDate>Wed, 29 Sep 2021 05:23:53 GMT</pubDate>
    <dc:creator>tomi_kosunen</dc:creator>
    <dc:date>2021-09-29T05:23:53Z</dc:date>
    <item>
      <title>Elevator Bank logics</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/elevator-bank-logics/m-p/13488014#M6154</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 21.2.0 ]&lt;/I&gt;&lt;/P&gt;&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Hi. ElevatorBank testing continues. In the attached model, there is one ElevatorBank with three cars in it. Travelers arrive at 0, 1, 2 and 3 sec. My question is, why the car #2 and car#3 are sent down (for Traveler#4) at time ~40 sec? Can I modify the logics somehow?&lt;/P&gt;
 &lt;P&gt;I guess that the reason is that car #2&amp;amp;3 can't be sure if the traveler will get into car#1. So it's better to send also car#2&amp;amp;3 as the request remains in the queue. This is a good default logic. But if I'd like to modify it so that when a car takes the request/one car is sent, the other car is not sent. But if the traveler can't get in, s/he orders a new car. I'd say that most of the elevators work that way: 1) press the button to order a car 2) &lt;STRONG&gt;one &lt;/STRONG&gt;car is sent 3) if the traveler for example doesn't fit into the car, s/he orders second car by pressing the button again&lt;/P&gt;
 &lt;P&gt;The default logic works fine if the utilization rate is low (well, at least for the capacity calculation, not utilization rate calculation). But I think it will strengthten the high utilization periods: queue is built up-&amp;gt; all cars are busy -&amp;gt; all cars are sent toward one request (only one is actually needed) -&amp;gt; even more queue is built up-&amp;gt; elevators are even more busy&lt;/P&gt;
 &lt;P&gt;So is it possible to modify the logic so that only one car per request would be sent and new request is created if the request cannon be served (while the car arrives)?&lt;/P&gt;
 &lt;P&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/44241-elebank-testing2.fsm" target="_blank"&gt;elebank-testing2.fsm&lt;/A&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 27 Sep 2021 07:32:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/elevator-bank-logics/m-p/13488014#M6154</guid>
      <dc:creator>tomi_kosunen</dc:creator>
      <dc:date>2021-09-27T07:32:48Z</dc:date>
    </item>
    <item>
      <title>Re: Elevator Bank logics</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/elevator-bank-logics/m-p/13488015#M6155</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;It seems to be a problem with AStar updating its elevator request several times while waiting for the elevator and thus requesting several elevators. So it looks like a bug as it does not behave as stated in the documentation &lt;A href="https://docs.flexsim.com/en/21.2/Reference/PropertiesPanels/PeoplePanels/ElevatorBank/ElevatorBank.html"&gt;Elevator Bank (flexsim.com)&lt;/A&gt;. &lt;A rel="user" href="https://answers.flexsim.com/users/87/matthew.g.html" nodeid="87"&gt;@Matthew Gillespie&lt;/A&gt; &lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 27 Sep 2021 08:38:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/elevator-bank-logics/m-p/13488015#M6155</guid>
      <dc:creator>lars_jacobsen_ScandiSim</dc:creator>
      <dc:date>2021-09-27T08:38:23Z</dc:date>
    </item>
    <item>
      <title>Re: Elevator Bank logics</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/elevator-bank-logics/m-p/13488016#M6156</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 Thanks 
 &lt;A rel="user" href="https://answers.flexsim.com/users/13418/lars-christianj2.html" nodeid="13418"&gt;@Lars Christian J2&lt;/A&gt; . If the Traveler #4 comes at time 45 (when all cars are idle), then only one car is sent.
&lt;/DIV&gt;</description>
      <pubDate>Mon, 27 Sep 2021 08:45:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/elevator-bank-logics/m-p/13488016#M6156</guid>
      <dc:creator>tomi_kosunen</dc:creator>
      <dc:date>2021-09-27T08:45:31Z</dc:date>
    </item>
    <item>
      <title>Re: Elevator Bank logics</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/elevator-bank-logics/m-p/13488017#M6157</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;&lt;A rel="user" href="https://answers.flexsim.com/users/87/matthew.g.html" nodeid="87"&gt;@Matthew Gillespie&lt;/A&gt; &lt;A rel="user" href="https://answers.flexsim.com/users/13418/lars-christianj2.html" nodeid="13418"&gt;@Lars Christian J2&lt;/A&gt; Do you have a fix or workaround on this problem. We have spent a lot of time to build a logistics model that utilizes ElevatorBank module. It would be a big setback if the logic cannot be fixed.&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 28 Sep 2021 09:50:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/elevator-bank-logics/m-p/13488017#M6157</guid>
      <dc:creator>tomi_kosunen</dc:creator>
      <dc:date>2021-09-28T09:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: Elevator Bank logics</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/elevator-bank-logics/m-p/13488018#M6158</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;A rel="user" href="https://answers.flexsim.com/users/226/jason.l.html" nodeid="226"&gt;@Jason Lightfoot&lt;/A&gt; Can you help with this bug and also prioritize it, if possible? Thanks!&lt;/DIV&gt;</description>
      <pubDate>Tue, 28 Sep 2021 11:35:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/elevator-bank-logics/m-p/13488018#M6158</guid>
      <dc:creator>lars_jacobsen_ScandiSim</dc:creator>
      <dc:date>2021-09-28T11:35:01Z</dc:date>
    </item>
    <item>
      <title>Re: Elevator Bank logics</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/elevator-bank-logics/m-p/13488019#M6159</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;You can customize the elevator bank's Pull Query to filter out requests if another elevator is already going to that floor. For example, in the attached model I added a user command called firstToFloor():&lt;/P&gt;&lt;PRE&gt;ElevatorBank.Elevator elevator = param(1);
double floorZ = param(2);

ElevatorBank bank = elevator.up;
for (int i = 1; i &amp;lt;= bank.elevators.length; i++) {
&lt;SPAN style="white-space:pre;"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;ElevatorBank.Elevator elev = bank.elevators&lt;I&gt;;
&lt;SPAN style="white-space:pre;"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;if (elev == elevator)
&lt;SPAN style="white-space:pre;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;continue;
&lt;SPAN style="white-space:pre;"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;if (elev.nextFloorZ == floorZ)
&lt;SPAN style="white-space:pre;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;return 0;
}
return 1;&lt;/I&gt;&lt;/PRE&gt;&lt;P&gt;And then I added a call to my user command in the pull query:&lt;/P&gt;&lt;PRE&gt;WHERE&amp;nbsp;
&amp;nbsp; (request.onElevator == elevator OR (request.onElevator == 0 AND firstToFloor(elevator, request.floorZ)))
&amp;nbsp; AND elevator.canStop(request.floorZ, request.travelDirection)
ORDER BY distance ASC &lt;/PRE&gt;&lt;P&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/44310-firsttofloorquery.fsm" target="_blank"&gt;firstToFloorQuery.fsm&lt;/A&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 28 Sep 2021 21:04:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/elevator-bank-logics/m-p/13488019#M6159</guid>
      <dc:creator>Matthew_Gillespie</dc:creator>
      <dc:date>2021-09-28T21:04:07Z</dc:date>
    </item>
    <item>
      <title>Re: Elevator Bank logics</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/elevator-bank-logics/m-p/13488020#M6160</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 Thanks a lot!
&lt;/DIV&gt;</description>
      <pubDate>Wed, 29 Sep 2021 05:23:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/elevator-bank-logics/m-p/13488020#M6160</guid>
      <dc:creator>tomi_kosunen</dc:creator>
      <dc:date>2021-09-29T05:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: Elevator Bank logics</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/elevator-bank-logics/m-p/13488021#M6161</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;&lt;A rel="user" href="https://answers.flexsim.com/users/87/matthew.g.html" nodeid="87"&gt;@Matthew Gillespie&lt;/A&gt; I still have two more questions. Can you help?&lt;/P&gt;
 &lt;P&gt;1) How the distance is calculated? If the elevator is in 2nd floor and there is traveler waiting in 3rd and 1st floor, the lift always selects 1st floor (even if the 3rd floor has been waiting longer). I suppose that the distance from floor 2-3 if 10.2 m and floor 1-2 9.8 m (not sure though). The AStart grid z levels are 0, 10m and 20 m.&lt;/P&gt;
 &lt;P&gt;You can test it (with the model &lt;A rel="nofollow" href="https://answers.flexsim.com/storage/attachments/44310-firsttofloorquery.fsm"&gt;firsttofloorquery.fsm&lt;/A&gt;) by creating traveler at time 1: from floor 1-&amp;gt;2, at time 2: from floor 3-&amp;gt;2, at time 10: from floor 1-&amp;gt;2. Only one elevator car in the elevator bank.&lt;/P&gt;
 &lt;P&gt;2) The elevator logic must be modified so that if two travelers are in the same floor but they are going to different directions (up and down), two cars is sent. Now the UserCommand firstToFloor allows only one car.&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 04 Oct 2021 11:21:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/elevator-bank-logics/m-p/13488021#M6161</guid>
      <dc:creator>tomi_kosunen</dc:creator>
      <dc:date>2021-10-04T11:21:02Z</dc:date>
    </item>
    <item>
      <title>Re: Elevator Bank logics</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/elevator-bank-logics/m-p/13488022#M6162</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;&lt;A rel="user" href="https://answers.flexsim.com/users/147/tomi.k.html" nodeid="147"&gt;@Tomi Kosunen&lt;/A&gt; &lt;/P&gt;&lt;P&gt;1) It looks like the elevators stop 0.1 meters below the floor to line up the top of the inside floor with the outside grid height. So when the elevators stop at the 20 m grid their actual z location is 19.9.&lt;/P&gt;&lt;P&gt;2) You could modify the firstToFloor function to let a second elevator go if there are two requests on the floor with different directions.&lt;/P&gt;&lt;P&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/44536-elevatorsdifferentdirections.fsm" target="_blank"&gt;ElevatorsDifferentDirections.fsm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Feel free to customize the firstToFloor function or even the Pull Query as much as you want until you get the behavior you want.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 04 Oct 2021 19:35:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/elevator-bank-logics/m-p/13488022#M6162</guid>
      <dc:creator>Matthew_Gillespie</dc:creator>
      <dc:date>2021-10-04T19:35:50Z</dc:date>
    </item>
    <item>
      <title>Re: Elevator Bank logics</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/elevator-bank-logics/m-p/13488023#M6163</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;&lt;A rel="user" href="#"&gt;@Matthew Gillespie&lt;/A&gt; Thanks a lot (again)! The solution is clever. To be honest, I have not played a lot with the pullQuerys and I have one question as I have been debugging the code: why the firstToFloor code does not fire for a idle car? For example the first Traveler doesn't fire the code but when the car has unloaded in the upper floor and there are requests waiting in the list, then the code is fired. How does the car select the first traveler? This is important as the model doesn't work correctly if all the cars are idle when two travelers ask for a ride from the same floor to different directions.&lt;/P&gt;
 &lt;P&gt;BTW: I didn't know that if the TravelExecuter is created in the AStarNavigator, it is automatically connected into AStar.&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 07 Oct 2021 06:38:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/elevator-bank-logics/m-p/13488023#M6163</guid>
      <dc:creator>tomi_kosunen</dc:creator>
      <dc:date>2021-10-07T06:38:37Z</dc:date>
    </item>
    <item>
      <title>Re: Elevator Bank logics</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/elevator-bank-logics/m-p/13488024#M6164</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;&lt;A rel="user" href="https://answers.flexsim.com/users/147/tomi.k.html" nodeid="147"&gt;@Tomi Kosunen&lt;/A&gt; The pull query is only fired when an elevator becomes idle and looks for something else to do. When a traveler arrives at the bank and pushes the button the bank just sends the closest available elevator to the floor. You might be able to get the elevators to act more like you want by listening to the bank's OnTravelerArrival event and then using the ElevatorBank.Elevator.moveToFloor() method to send enough elevators to the floor. Here's an example: &lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/44698-bring2idleelevators.fsm" target="_blank"&gt;Bring2IdleElevators.fsm&lt;/A&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 07 Oct 2021 22:05:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/elevator-bank-logics/m-p/13488024#M6164</guid>
      <dc:creator>Matthew_Gillespie</dc:creator>
      <dc:date>2021-10-07T22:05:06Z</dc:date>
    </item>
  </channel>
</rss>

