question

Jenson avatar image
0 Likes"
Jenson asked Jeanette F commented

how to set an elevator idle at level 3

Hi, i need help with my 2nd elevator where it need to be idle at level 3 but it seems that it idle at level 1. hope someone can help.

Final After.fsm

FlexSim 23.0.1
elevator bank
final-after.fsm (86.4 KiB)
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Jenson, was one of Joerg Vogel's or Felix Möhlmann's answers helpful? If so, please click the "Accept" button at the bottom of the one that best answers your question. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·
Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Jenson commented

Do you mean that the elevator should start the model on the third level or that it should return to it when there are no pending requests?

In the first case, you can add a small block to a Process Flow (for example "Arrivals") that simply sets the location of the elevator to that of the third level at the start of the simulation.

1673426981238.png

I fear the second case might be a lot more complicated since the evelator banks are controlled in a unique way, compared to other task executers. You would probably have to monitor the request list and add an entry for level 3 when the list becomes empty and the elevator is currently at another level.


1673426981238.png (14.1 KiB)
· 7
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jenson avatar image Jenson commented ·

hi @Felix Möhlmann,

I have entered the code and it works thanks but i have another problem that occurred after I entered the code that i want the lift to be a station on floor 3 when there is no one taking the lift but currently is that when there no one taking the lift it will station at various lift ( example a patient goes to level 5 and no one else taking the lift. It will stuck at level 5 rather than then going back to level 3 )


Final After.fsm

0 Likes 0 ·
final-after.fsm (86.8 KiB)
Felix Möhlmann avatar image Felix Möhlmann Jenson commented ·

In the attached model I use a process flow to react to the elevator becoming idle. If it is not already at the correct height, the process flow tells it to travel there.

This seems to work fine, but I can't guarantee that this won't interfere with the standard logic in weird ways at some point.

Edit:

Sorry, I just realized that the model was build in an older version. Here is the updated model in 21.0

elevator_home_location_21.fsm

Please remember to select the correct software version that you are using, when asking a question.

0 Likes 0 ·
Jenson avatar image Jenson commented ·

@Joerg Vogel , sorry i have search the post under travel home and find there isnt anything related to elevator in healthcare. maybe u can advised me on it or can i have a sample Final After.fsm

0 Likes 0 ·
final-after.fsm (86.8 KiB)
Jenson avatar image Jenson commented ·

@Felix Möhlmann , but once no one taking the lift it will idle at level 3 but it does not take in people at the waiting time ?n

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Jenson commented ·

The people in the waiting line (more specifically the first one) are still waiting to acquire a location.

1673525939023.png

0 Likes 0 ·
1673525939023.png (30.0 KiB)
Jenson avatar image Jenson Felix Möhlmann commented ·

@Felix Möhlmann , But if that the case, how do i make lift 1 to take in people from level 3 if lift 2 is occupied. sorry to bother you

Final After 2.0.fsm

0 Likes 0 ·
final-after-20.fsm (91.6 KiB)
Show more comments
Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Jason Lightfoot commented

@Jenson instead of on resource available the Elevator Bank Object has got an Event called On Idle. This event is only accessible in process flow. You can use it for a single elevator bank object or a group of elevator bank objects.

A Event Driven source can create a token in process flow. You put involved object reference into a token label in the edit field "Assign Event Object To" for example as token.elevator.

You can build a tasksequence by source code or by Process Flow activities as @Felix Möhlmann has shown.

A Tasksequence in scource code consists of a create method, one or several added tasks and finally dispatching of the created tasksequence treenode.final-after-jv.jpg final-after-jv.fsm


final-after-jv.jpg (226.8 KiB)
final-after-jv.fsm (90.3 KiB)
· 8
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jenson avatar image Jenson commented ·
@Joerg Vogel , Hi i saw the code u mention but elevator bank1 need to station at 1st floor and elevator bank 2 station at 3 floor ( which able to work) but my elevator bank 1 need to accept patients from level 3 as well whn there is space to enter .
0 Likes 0 ·
Jenson avatar image Jenson Jenson commented ·
@Joerg Vogel hi, the problem is it i didnt place enough location?
0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel Jenson commented ·
homets.addTask(TASKTYPE_TRAVELTOLOC,NULL,NULL,homeLocation.x,homeLocation.y,19.9);

you can set a variable for different home locations by a switch by case structure:

Vec3 homeLocation = elevator.location;
Variant bank = elevator.up; //Datatype treenode or Object ist possible, too
Array banks = ["Elevator Bank1", "Elevator Bank2"];// array of Elevator Bank names
switch(banks.indexOf(bank.name)){
    case 1:
    { homeLocation.z = 20.0;
      break;}
    default: // or case 2: for "Elevator Bank2" for more elevator banks
    { homeLocation.z = 10.0; // set right value
      break;}
}// switch bank.name end
homets.addTask(TASKTYPE_TRAVELTOLOC,NULL,NULL,homeLocation.x,homeLocation.y,homeLocation.z);

final-after-more-home-locations-jv.jpgfinal-after-more-home-locations-jv.fsm

0 Likes 0 ·
Show more comments