Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - cheapie

Pages: [1]
1
Elevator Discussion / 6 or 12-pulse DC drives?
« on: October 19, 2024, 11:20:03 pm »
There are two main types of SCR drive used for DC motor control for elevators. They both work in about the same way but sound different. I'll skip the explanation of the differences, see here for a document from MCE that explains it far better than I ever could.

Here's a sample of what a 6-pulse drive (Montgomery SSC-6010, in this case) sounds like from in the machine room. Note the low-pitched buzz when running, especially at low speed. (skip to 5:45 if it doesn't do so automatically)
https://www.youtube.com/watch?v=GN_VPUt0juo&t=345

For comparison, here's a 12-pulse drive (MCE System 12), again from in the machine room. Note the higher-pitched hum noise instead of the buzz. (skip to 0:10 if it doesn't do so automatically)
https://www.youtube.com/watch?v=q9zvWsU-Ay4&t=10

Both can be heard from inside the car in this video - the car at 2:55 has a 6-pulse drive (probably another SSC-6010) while the one at 6:45 has a 12-pulse drive:
https://www.youtube.com/watch?v=zHRQ0dkS83g

Which one do you think sounds better?

2
Off Topic / Re: How about some elevators in Minetest?
« on: October 13, 2024, 01:09:14 am »
I remember you wanting that group display screen, I was thinking about that recently before you mentioned it, and have wanted to add that eventually.  The problem with adding it, is that you need a 2D shape library for creating the shapes, Skyscraper doesn't yet have support for that

I suppose that's one way to do it (and probably the best way, with a suitable library) but in the case of celevator it's just made from the game's standard UI controls. I do have the buttons customized a little to make them look less button-like, but that's it.

3
Off Topic / Re: How about some elevators in Minetest?
« on: October 12, 2024, 02:33:51 pm »
I think what's needed in Skyscraper's code is an ETA function, since the dispatch controller doesn't calculate ETA at the moment.

Yes, this is more or less the point I was attempting to make. I've tried to write dispatching algorithms without an ETA calculation before, but they always ended up being a mess of edge cases and never worked all that well.

I did come across a document here that describes how the dispatching logic in the Montgomery Miprom 21 controller worked, starting around page 7 or 8. It might be easier to read than the wall of text I wrote, but it's describing approximately the same algorithm.

For anyone reading this who might be interested in more documents like that one, Kone Spares has uploaded quite a few other old Montgomery brochures here.



The dispatch controller code in Skyscraper is somewhat based on the old Call Button object.  The old call button code did the elevator selection, and the buttons would "team" together as part of a call group.  I took the call button code, split it into a controller (Dispatch Controller) and client (Call Station), and enhanced both of those so that they have more features than the original code.

If anything, I'd expect this to make implementation of an ETA-based algorithm easier, as all of the hall calls are being processed in the same place instead of call buttons all acting on their own.

It might also make implementation of a "group display" screen (see attachment) easier. I vaguely remember asking for one of those years ago, and I can see now why that would have been difficult with the old call button code.

4
Off Topic / Re: How about some elevators in Minetest?
« on: September 11, 2024, 07:58:52 pm »
You can also look at the dispatch controller code, that handles the waiting, selection, etc (it's in controller.cpp).

controller.cpp seems to be the main part in question here. I did take a quick look at it earlier today, and it looks like it still works much the same way I remember it working back in "the old days"... or at least how it did once it was implemented in the first place. I vaguely remember the dispatching logic briefly just being "call the first elevator" back when I first played Skyscraper.

I'm not that great at reading C++ (or C), so I did a bit of a test as well, using the "Express to 134 to 136" elevators (33 and 34) in the back of the Triton Center. I did the following:
  • Placed car 33 on floor 136
  • Placed car 34 at the lobby
  • Placed the camera on floor 136
  • Waited for all elevators to be idle, in normal operation, and with the doors closed
  • Placed a down hall call on floor 136 (which was answered immediately by car 33), then a car call in car 33 for floor 135, then waited for the doors to close
  • Immediately after the doors closed, placed another down hall call on floor 136

I observed what the two elevators did after I placed the second hall call, and it appears that car 34 was initially selected and began moving upwards. Once car 33 became idle, the call was moved ("Dispatch Controller 12: Switching to closer elevator 33"), car 33 answered the call, and car 34 stopped in the express zone(!) at floor 39.

I would expect a typical ETA-based dispatcher to have initially selected car 33 instead, as the time needed to finish serving the car call on floor 135 and then return to floor 136 is much less than the time needed to travel from the lobby all the way to floor 136.

As another test, I did this on the same two elevators:
  • Started with the camera on floor 136, car 33 on floor 135, and car 34 on floor 134, both idle, in normal operation, and with the doors closed
  • Changed the UpSpeed value for car 33 from the default of 30 to 0.25. The UpSpeed value for car 34 was left at 30.
  • Placed a down hall call on floor 136

In this case, car 33 responded to the call, even though the time that car 34 would take to travel 2 floors is significantly less than the time car 33 took to travel one floor at the reduced speed. A typical ETA-based dispatcher would have assigned the call to car 34 as it would have been able to arrive sooner.

And for a third and final (for now) test, I went for the first elevators I ever tried in the Triton Center (cars 25 and 26), and:
  • Started with the camera on floor LL1 and cars 25 and 26 both on floor P5, both idle, in normal operation, and with doors closed
  • Placed a car call for floor L in car 26
  • Immediately (before car 26 reached floor P4) placed an up hall call on floor LL1

The behavior in this case varied depending on which button I pressed in the elevator editor, as I'm not sure which button is for placing a normal car call. If I entered the car call by pressing "Enqueue Up", then car 26 continued past floor LL1 and stopped at floor L, while car 25 answered the hall call on floor LL1. If I instead pressed "call", then cars 25 and 26 both stopped at floor LL1 (car 25 indicated up, while car 26 did not indicate a direction when it opened). Car 26 did not go anywhere after the doors closed and seemed to just drop the call for floor L entirely.

In this case, I would have expected a typical dispatcher to select car 26, as it would have been able to stop in time to answer the call on floor LL1, and would be able to get there sooner compared to the car that had not yet even started moving. In this specific case however, I can also see how some dispatchers may be tuned to prioritize more non-stop rides over fastest arrival, and in those cases at least one of Skyscraper's behaviors would be reasonable, but this is not a typical thing for dispatchers to optimize for.



If you'd like to take a look at my dispatching code, it's in dispatcherfw.lua. I took a similar approach to how Skyscraper currently works in that the code handling the dispatching is separate from the controllers for each car and also from the call buttons (which are just an input into it), except in this case it's actually a physical object in the world. It can be seen in a few of the screenshots on the ContentDB page, it's the white cabinet with the "D" label on the corner (the ones without the label are controllers).

As of the commit I linked (which, right now, is the latest), the important part is on lines 616-763, where the ETAs for each car are compared and used to select which car to send the call to. This part runs about once per second when there are calls present (it does stop under some conditions, the details of which aren't important right now). The calculateeta() function that it calls in a few places is the one doing a lot of the heavy lifting - it's defined on line 276 of the same file.

Specifically, calculateeta() obtains a list of what the elevator would hypothetically do if it was to be assigned the call, then works through each step and adds up how long it would be expected to take, before finally returning a total time. To do that, it uses estimatetraveltime() (line 233), which takes two floors and a car number and estimates how long it would take to travel between the two (including acceleration/deceleration). The list of what the elevator would do comes from buildstopsequence() (line 242), which does a bit of work to figure out where the car is starting from and in which direction, then calls predictnextstop() (line 187) repeatedly to determine where the elevator will go next after it answers each call. The logic in predictnextstop() is nearly the same as the logic in the controller itself that finds the call it will serve next after the doors close.

For example, if it wants an ETA for car 1 for an up hall call on the 3rd floor and the car already has several calls, buildstopsequence() might come up with something like this:
  • 5th floor car call
  • 7th floor up call
  • 8th floor car call
  • 10th floor down call
  • 8th floor down call
  • 3rd floor down call
  • 1st floor up call
  • 3rd floor up call (the call being searched for, so it stops making the list here)
calculateeta() then calls estimatetraveltime() for each pair (5 to 7, 7 to 8, 8 to 10, 10 to 8, 8 to 3, 3 to 1, and 1 to 3), adds these together along with some extra to account for the doors opening and closing, then returns a number. If this number is lower than the ones for all other cars that could serve this call (or no other elevators can), then it goes to this one.

5
Off Topic / Re: How about some elevators in Minetest?
« on: September 07, 2024, 11:27:11 pm »
One thing I would suggest could be adding a floor indicator or a TV screen with custom textures so that movement effects (as seen in the observation deck elevators in Triton Center III) can be implemented in your creation.

I'll have to take a look at that building sometime... I remember not caring for it too much back when I was on the old forum, but I'm assuming it's improved since then. At the moment, custom PIs aren't currently planned, but more car designs (possibly with more features, like different doors or a rear window) are on the "maybe eventually" list.

Unfortunately there's only one of me, I have a full-time job IRL, and this is already well over a 10k-line project, so I don't necessarily have time to add everything I would sometimes like to. For the most part I've been trying to prioritize functionality over things that are just pure eye candy, which is why (for example) the dispatching in multiple-car groups is done by a relatively complex ETA algorithm, but there's only one type of door.

Speaking of dispatching, that alone was a rather interesting rabbit hole to dive into. I'm not sure what Skyscraper is doing these days, but in the version I looked at when I started this project it appeared to just be choosing the closest idle elevator, or if there were none then picking the closest one moving in the right direction (is it still doing it this way? It would be interesting to hear from someone more familiar with the code). For a game that's probably OK, but since the goal here was realism in at least behavior, I went for approximately this:
  • For each car in the group, check if it's in normal operation (not independent/inspection/emergency stop/fault/etc.), whether it can go to the floor the call is on, and whether it can go in the requested direction once it gets there (for example, if only some cars in the group can go below the lobby, then those that can't are excluded if the call is a down call at the lobby). Build a list of the cars that match these criteria.
  • Check if the list is empty. If it is, cancel the call and end here.
  • For each car in the list, make a copy of the list of calls that it has, add the call being checked to the copy, then generate a list of all actions that car would do (as in, what other calls it would serve) on its way to answer the call.
  • Read the speed of the car and its door timing settings, then calculate how long each of these actions would take, given that information, including the time needed for the car to accelerate, move, decelerate, open its doors, and close them again. If the doors are not already closed, include the time it would take them to close. Add all of these times together to obtain a total estimate of how long the car would take to arrive, if the car was given this call.
  • Find the car in the list with the shortest estimated time, and assign the call to that car.
  • Periodically re-run this whole algorithm until the call is answered (by any car). If at some point another car becomes able to serve the call significantly faster (both relatively and in terms of an absolute number of seconds), and the original car is not yet en route to this call, then cancel the call for that car and reassign it to the new car.

At the moment the destination-based dispatching is using the same algorithm, except that it is not allowed to reassign the call to a different car after making its initial choice (after all, it would be confusing if you were told to take car A, but then car B showed up and car A never did). At some point I would like to add some extra logic to base this on estimated time to destination, but that isn't yet implemented.

6
Off Topic / How about some elevators in Minetest?
« on: September 07, 2024, 03:51:57 pm »
Hi!

I'm the same "cheapie" that was on the old forums for this project ages ago (you know, user #3, the one that was a global moderator for a bit and then got fired from that position1... /that/ one). Quite some time ago, before the old forum even vanished, I had largely moved on from playing Skyscraper to instead playing Minetest.

Minetest is, in most typical forms, a block-building game, following the same general principles as Minecraft but not the same game. The developers would like you to believe that Minetest is just an engine and you can develop arbitrary games for it, but... odds are something like 90% of the player base is playing the same "game" for it and that's a block-building one, so...

...anyway, like pretty much every other block-building game, there have been many, many attempts by various players over the years to make realistic elevator systems in it. Some have certainly been better than others - like some just teleport the player to the selected floor, while others have varying degrees of smooth-ish motion, some have more features than others, and so on.

Sometime around 2019, I used various existing in-game components to make some elevators with the controller features I wanted (fire service, independent service, inspection, etc.) - they weren't great and there was a tendency for players to fall out on the way up, but for the most part they did at least work. Later on they saw some enhancements and eventually ended up looking something like this.

For about 4 years, elevator technology in Minetest kind of stagnated around this point. There were minor enhancements over time (like firmware updates to get the group dispatching to be a little less terrible) but they were still kind of unsatisfactory.

Finally, in 2023, I decided to make a new elevator system in Minetest, this time in the form of a mod that could add whatever I wanted instead of making do with existing in-game parts. I ended up calling it "celevator", from "cheapie" + "elevator".

This time around, I gave it quite a lot of features, and tried to make sure they all work well:
  • 2 to 100 floors with customizable names
  • Travel speed adjustable for each elevator independently, up to 20m/s (more than 7.5m/s not recommended in multiplayer)
  • Can travel through loaded or unloaded mapblocks
  • Full selective-collective operation
  • Group dispatching with up to 16 cars in a group and true ETA dispatching
  • Optional destination-based dispatching
  • Swing car operation
  • Animated doors, hoist machine, and tapehead
  • Controller interface with diagnostic LEDs, display, and GUI configuration
  • Optional car call security settings (require area access to place a car call, or disallow car calls to a specific floor entirely)
  • Functional independent service and fire service phase I and II (approximately following ASME A17.1 codes) modes
  • Car top and machine room inspection operation with adjustable speed
  • Adjustable door dwell and nudging timers
  • mView remote monitoring software (optional, available if "laptop" mod is installed)
  • Mesecons input and output modules (optional, available if "mesecons" mod is installed)
  • Communication with Luacontrollers via digilines input/output modules (optional, available if "digilines" mod is installed)

Here's a video of it in action:
https://www.youtube.com/watch?v=oKm2epe0AzU

Downloads, screenshots, and more information: https://content.minetest.net/packages/cheapie/celevator/

Documentation: https://cheapiesystems.com/git/celevator/plain/docs/celevator_controller_manual.pdf

While I'm not necessarily trying to compete with Skyscraper here - after all, it's a different game - I'd still love to hear if there are any features anyone here particularly wants to see. Same thing if you run into issues, I'd like to hear what they are so I can resolve them. Thanks!



1 In hindsight, given my behavior at the time, this was probably for good reason

Pages: [1]