Jump to content

token return value in vehicle evaluating request


lhu123
 Share

Recommended Posts

I found two interesting things when I am modifying the subclass of a vehicle.


I was trying to incorporate the request evaluating logic in the vehicle subclass processes rather than model processes, for ease of transplant and multiple uses.


But when the token return value is 0 in subclass, no matter what add-on-process returns, vehicle still picks up entities.


What's the logic behind this?


How should I make it work? Anybody knows?



Another problem is I added breakpoint in the subclass, it does not stop, but I use some assign step to detect it, these assign step works, which means token is executing the process, anybody knows why the breakpoint does not work?


Attachment is the model, Assign step assign token return value 'False' in evaluating request in subclass of vehicle.


Everytime process runs, It could be seen weight of vehicle +0.5


Anybody knows why?

SimplestTuggerWithTwoCycle.spfx

Link to comment
Share on other sites

I had a similiar problem with the transporter not listening what you tell it to do....


Solution...


Delete the on visiting Node process and rewrite the logic....There are setNode,s statements in the Onvisitingnode process which overwrites the user assignments as the process is the first and last process which executes during run time as a transporter moves through a node....

Link to comment
Share on other sites

lhu123,


Your model is working -- transport requests are rejected. However, pickup requests (at the node itself) are not, so the vehicle picks entities up. This is because you have not modified the vehicles 'OnEvaluatingRiderAtPickup' process.


The standard library vehicle calls the 'Evaluating Transport Request' add on from both the OnEvaluatingTransportRequest and OnEvaluatingRiderAtPickup processes. To bring this logic into the vehicle, you will need to subclass both processes.

Link to comment
Share on other sites

Yes! I found it!

 

lhu123,


Your model is working -- transport requests are rejected. However, pickup requests (at the node itself) are not, so the vehicle picks entities up. This is because you have not modified the vehicles 'OnEvaluatingRiderAtPickup' process.


The standard library vehicle calls the 'Evaluating Transport Request' add on from both the OnEvaluatingTransportRequest and OnEvaluatingRiderAtPickup processes. To bring this logic into the vehicle, you will need to subclass both processes.

Link to comment
Share on other sites

×
×
  • Create New...