Floworks: loading and unloading ships using Basic berth

Floworks: loading and unloading ships using Basic berth

kelvin-barbosa
Participant Participant
106 Views
3 Replies
Message 1 of 4

Floworks: loading and unloading ships using Basic berth

kelvin-barbosa
Participant
Participant

Hi everyone,

 

I'm working on a model for loading and unloading ships using the Basic Berth. The loading part is working fine, but when a ship arrives for unloading, I get the following error:

time:1127.656910 Entered new max content is smaller than the current content at P02/FlowVesselT21/Tank Content is reduced to maximum content

From what I've checked, the access to the information seems to be correctly set up, but the model isn't retrieving the values from the table as expected.

The model is attached in case anyone would like to take a closer look.

Has anyone faced this issue before or could help me understand what might be going wrong?

 

FlexSim 24.0.1

 

Thanks in advance!

0 Likes
Accepted solutions (1)
107 Views
3 Replies
Replies (3)
Message 2 of 4

patrick_zweekhorst
Advocate
Advocate

Hi @kelvin-barbosa ,

 

I have looked at your model and have found the following.

The first time you get the exception (at time 1448.37) the vessel that you are going to unload arrives full at the berth.

The content of the tank of that vessel is 19749 when the vessel arrives.

Your logic is than going to change the maximum content of the tank in the vessel to 734.01.

However, the content of the tank is still 19749.

 

I don't know which of the two is where it goes wrong. Either the new content is incorrect, or that is correct but you will need to make a small change to the logic.

If the new content is correct, you will first need to set the new content of the tank before changing the maximum content.

So, something like this:

 

patrick_zweekhorst_0-1747808249399.png

 

Does this help you further?

0 Likes
Message 3 of 4

kelvin-barbosa
Participant
Participant

My goal is to dump 19,749, but I can't figure out why the logic is using the value 734.01.

In addition, I would like to learn how to properly debug in FlexSim. Is there a best practice or tool within the software that can help me find exactly where the error is in the logic?

0 Likes
Message 4 of 4

patrick_zweekhorst
Advocate
Advocate
Accepted solution

The steps I took to debug your model where:

 

  • Check the error msg and stop the model just before that time
  • I found which activity was setting the content of the tank:
    patrick_zweekhorst_0-1747828235295.png

     



  • I placed a breakpoint in the code, and that showed me that the maximum content was changed, while there was more product in the tank.

 

Then for your new comment. You want to assign 19,749. This is not done, so it must go wrong where that label value is retrieved:

patrick_zweekhorst_1-1747828342714.png

 

If I click on the token I see that token.lb_fornecimento has the value 1 and token.CompartmentIndex has the value 1.
Looking in the table does give a distribution that can give 734.


Maybe the thing that goes wrong is the decide? That you do not want to go to this assign labels activity?

The main debugging thing I did is to step through the activities and see what is happening

 

0 Likes