question

Claire Krupp avatar image
0 Likes"
Claire Krupp asked Jason Lightfoot edited

What discharge rate does an AGV use while off-shift?

I have a model with 12 AGVs and I am monitoring the charge of each to evaluate how many opportunity chargers we will need. I reset the total charge back to 100% every Monday morning, but I am noticing that if the AGVs are discharging at the idle rate (1% per hour) for the whole weekend.

1696610221539.png

My question is, when an AGV goes off-shift, does its discharge rate get set to the idle rate? How do I change it to 0 for the weekend? I tried setting the global AGV Network "Idle Use" rate to 0.0 in the "On Down" trigger in the Time Table, based on another answer,

1696610793972.png

but it had no effect on the AGVs. I'm guessing the AGVs are not re-evaluating their discharge rate after this Event has happened?

Thanks!

(I can't post the model publicly but can send it to FlexSim staff if you give me an email.)

FlexSim 23.1.3
agv discharge
1696610221539.png (101.6 KiB)
1696610793972.png (22.1 KiB)
· 2
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 @Claire Krupp, was one of Claire Krupp's or Jason Lightfoot'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 comment back to reopen your question.

0 Likes 0 ·
Claire Krupp avatar image Claire Krupp Jeanette F ♦♦ commented ·

Hi @Jeanette F both answers are useful in different situations, but since one of them is my own the system doesn't give me the "Accept" option! (It used to allow that - but not anymore.) So, I guess I'll give the points to Jason! Too bad you can't accept more than one answer.

0 Likes 0 ·
Claire Krupp avatar image
0 Likes"
Claire Krupp answered

I came across a workaround from a previous problem that was answered about a year ago in a private post. This statement

agv.batteryLevel = agv.batteryLevel

will "jog" the AGV and make it reevaluate its discharge rate.

So, If I do that for all my AGVs immediately after changing the Idle Use rate, then all of them will reset to a 0.0 rate, until they start a new task after the weekend.

The Trigger "On Down" in the Time Table is:

// change AGV idle discharge rate to 0 (i.e. switch AGVs off)
Model.find("AGVNetwork>variables/agvTypes/DefaultAGV/idleAmps").value = 0.0;

int numAGVs = Group("Travel AGVs").length;
for(int index = 1; index <= numAGVs; index++){
    Object agvObj = Group("Travel AGVs")[index];
    AGV agv = AGV(agvObj);
    agv.batteryLevel = agv.batteryLevel;
   //makes it re-evaluate the discharge rate (as in bugfix)
}

You need to add a similar line 2 in the corresponding "On Resume" Trigger to reset the idleAmps value to your normal value.

5 |100000

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

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Jason Lightfoot edited

One solution could be to create a new AGV type (offShift) and switch it to that. That wasn't enough to change the idle rate but setting the batteryLevel to it's current level fixed it - that might be all you need to do in addition to changing the rate dynamically. Attached is the example changing to the offShift agv type.

AGV_Offshift.fsm


agv-offshift.fsm (36.4 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.

Claire Krupp avatar image Claire Krupp commented ·
Thanks @Jason Lightfoot that works too, but I think my answer is a little bit simpler!
0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ Claire Krupp commented ·

The key is assigning the battery a new level, which as I mentioned I did in my solution.

If you had a mixed number of AGVs where some where off shift or in maintenance while others were in scheduled work, then you would need to change the Type as per my example too, since altering the default type would be changing the idle consumption of all agvs regardless of their situation. In this sense I prefer my solution.

0 Likes 0 ·
Claire Krupp avatar image Claire Krupp Jason Lightfoot ♦ commented ·

True, that would be better in that case.


In my situation it is only the weekends where I need to make the change, and all AGVs are on the same shift pattern. (Actually, if I didn't have a chart showing battery charge vs time I wouldn't notice and wouldn't really care, since I reset all batteries to 100% power on Monday Morning.)

1 Like 1 ·
Claire Krupp avatar image Claire Krupp commented ·
@Jason Lightfoot One more question: How can I see what the current discharge rate or agv Type is for the AGV? I'm looking in the tree and there don't seem to be any variables for those parameters there.
0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ Claire Krupp commented ·

The type is found with

AGV(current).as(treenode).find("agvType").value

which says that AGV(current) is a node in the tree (under the AGVnavigator's 'agvs' variable) under which exists the agvType node.

The current (amps) is not a subnode and is accessed from the agv node using getsdtvalue():

Object te=Model.find("TaskExecuter1");
return getsdtvalue(AGV(te).as(treenode),"curAmps");

Note that accessing all these values without them being class or object properties means they could change in the future, so it may be advisable to use only in a user command getAGVamps(te) for example such that if things change and it breaks you can fix your model with one change to the usercommand.

0 Likes 0 ·
Claire Krupp avatar image Claire Krupp Jason Lightfoot ♦ commented ·

Thanks @Jason Lightfoot , those will be useful, although I was hoping for somewhere to see it in the tree, as a debugging aid.

I did find out that if you go to the AGVnavigator treenode that you mention above, you can see some of those current values there.

0 Likes 0 ·
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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