Cancel
Showing results for 
Search instead for 
Did you mean: 

Car-control

Pioneer
Pioneer

Hello,

 

I have a car which transports movable objects on a track. After the completed a job, I want that my car go on a specific position and wait for the next job. And also the specific position is dependent on the time.

For example:

07:30 to 11:00 am the car should go to poistion A

14: to 17:30 pm the car should go to position B

 

Is it possible?

 

Best regards

8 REPLIES

Re: Car-control

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor
you can use the attribute targetPosition (see help); the attribute is watchable; if the transporter stops at its target position; Plant Simulation sets targetPosition to -1 --> you can use this in a waituntil statement
Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: Car-control

Pioneer
Pioneer

Hi,

 

so could it work, if i write a method and implement it in the transporter in "goal-making:

And coukd the method look like:

/*  If case 1 (Case 1 = buffer and trasporter are empty)

     and if it's between 08 and 10 am

go to Buffer 3

 

If case 1 (Case 1 = buffer and trasporter are empty)

   and it'between 1 and 3 pm

go to buffer 5

 

and so on

*/

 

Is it possible to realize that?

 

Best regards

Re: Car-control

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

yes, it is possible, but how do you want to start this?

 

just an idea

 

/*  If case 1 (Case 1 = buffer and trasporter are empty)

     and if it's between 08 and 10 am

go to Buffer 3

 

--If case 1 (Case 1 = buffer and trasporter are empty)   and it'between 1 and 3 pm

if transporter.empty and buffer.empty and timeOfDay(eventController.absSimTime)> 13*3600 and timeOfDay(eventController.absSimTime)<= 15*3600  then
--start transporter
--go to buffer 5 transporter.targetPosition:= xxx waituntil transporter.targetPosition=-1 -- stopped end --and so on

--this will fail, if the transporter is already on this position or if the transporter is still moving...

 

Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: Car-control

Pioneer
Pioneer

Hi,

 

thanks. So i think it is not realy possible?

 

Another idea:

I have (attachment) sensors on every floor.

Can i set the conditions i've called in the method of each floor?

--> If buffer.empty and transporter.empty and it ist between 1 pm and 3 pm

go to position 1 (buffer 1)

--> If buffer.empty and transporter.empty and it ist between 4 pm and 6 pm

go to position 2 (buffer 3)

 

or will i have same problems like in my first idea?

I am not sure if i understand it correctly to implement my car-control.

 

Best regards

Re: Car-control

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor
I guess, it can be only one part of your control (if the last passenger has left the lift and no other request exists) --> drive to a default position --> wait for requests

I think the control of the lift don't need to be very smart: If there is a request und the lift is not on the right position --> start lift into the right direction
On your sensors: check if there is a request for stopping at this position (internal, external). If yes stop - move people; delete request; if more requests --> move ... and so on


Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: Car-control

Pioneer
Pioneer

Hi,

 

so if i can integrate it in my method, it will be great.

For example, is this possible (all in one mehtod)

/*

Case1: transporter.empty and buffer.pccupied

1.If transporter.empty, go to a buffer with the oldest call

2.read the floor of the call and go to the buffer

 

Case2: transporter.occupied

3. check, if people with target=current position; if yes, transfer them to the drain

4.check, if current buffer is occupied. if yes, ckeck if there people who wants in the same direction

5.go on to the target

 

Case 3: transporter.empty AND buffer.empty

6. then go to position 1 -> between 7 and 10 am

or go to position 2 -> between 1 and 3 pm

*/

 

is it possilbe to implement the method like this? It would ne helpful if i know it can be happend.

So if the transporter passes the sensor, the method should check which case is present.

 

best regards

Re: Car-control

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor
yes, it is possible; have a look on elseif...
Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: Car-control

Pioneer
Pioneer

Hi,

 

Great, thanks fou your help.

And if i implement this mehtod on each floor, it should be work?!

it is good to know because the documentation is important for my bachelor thesis.

 

I try to implement in my system

 

Thank you and best regards!!!! :-)