Where Are The Robots?

C

Chris Molland

Hello,

I have created a project file with 4 resources, they are robotic devices. I
want to assign the robots to tasks relating to work they are to carry out.
The robots are static while they work but can be located in different places
to work (using a crane). I need to keep track of where they are at any chosen
point in time.

I have added some custom fields to my tasks: Robot Name, location x,
location y. As I create each task I assign the resource (robot) to it and
enter the information in the custom fields for the task.

Would it be possible to create 2 custom fields in each Resource (x and y)
which calculate their most recently assigned value, based upon the date which
you can manually enter to view the project status at any time (sorry, I have
forgotten the term).

I want to try and keep the location values constantly calculated because I
need to get the location data from a Visual Basic application which I am
writing. It would be far more efficient to simply read the location values
from the resources than loop through all of the tasks working out the current
locations of the robots.

In summary I want to enter a date in my VB form, this sets the view project
date and then read the location of the robots.

Thank you for reading this. I will be very interested to hear of any
suggestions.

Chris
 
J

Jan De Messemaeker

Hi,

Since the location is task-dependent I would use a task custom field anyhow.
A reasonably simple VBA procedure can then find out which task each robot
works on at a certain point in time and copy that to a resource field.
"Reading all tasks" may be a bor when done by a uman but for a VBA procedure
it is quite easy!

Greetings,
 
C

Chris Molland

Hi Jan,

I understand your point of view and did initially think that I should
calculate the locations for each task and put the result in a Task custom
field. What makes it a little difficult is that the robots aren't always
working so we can't simply go through the currently active tasks reading the
location data. A robot may have completed a task and still be situated at its
location. So from a task point of view we would have to loop through all
tasks preceding the Status Date (I remembered it!) calculating the location
for the most recent task for each robot.

However if a calculation within each resource could somehow calculate its
most recent location (based on the Status Date) we would simply have to read
the information from the 4 resources.

Any help would be very appreciated.

Thank you.
 
J

Jan De Messemaeker

Hi Chris,

Think of this
Location is linked to the task
You run a daily macro; for all busy tasks you copy the robot location to a
resource custom field
Now if a task ends and the robot is left there the resource custom field
will also remain there.
On the other hand if someboidy tells you he moved the robot independently of
a task you can still change this resoruce custom field manually; it should
only be set automatically when a task is busy.

HTH
 
C

Chris Molland

Hi Jan,

Thank you for your prompt reply.

I can see how your suggestion would work. However I need to be able to set
the Status Date and then read the location for each robot on that date. I
think that this will require the values to be calculated in each resource
based upon the Status Date. Something like: If the robot is assigned to a
task which is active on the Status Date then the location assigned to that
Task is the location to be set in the resource, else find the most recent
task with the robot assigned and use that location data.

I cannot figure out how to create such a calculation in a Custom Field
though. It seems more simple than it is.

Regards

Chris
 
J

Jan De Messemaeker

Hi Chris,

By all means you can't!
Since you are posting in the developer group I assumed you meant VBA; I also
mentioned "running a macro", not using a formula.
About the logic:

If the robot is assigned to a
task which is active on the Status Date then the location assigned to that
Task is the location to be set in the resource,

That's what I suggested, yes.

else find the most recent
task with the robot assigned and use that location data.

Not wrong, obviously, but isn't that the location entered in the resource
the last time it was updated? IMHO this is useless.

Hope this helps,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top