Search code examples
anylogic

How to use two digits of number after zero in System Dynamics in Anylogic?


enter image description here

As you can see in the above image, the Land Availability Value is currently 0.999. This result is messing up my table function, my table function is as follows

enter image description here

As you can see if the value is 1 or 100% then the value should be 0, but in my case in the first image you can 0.999 is being treated as 0.9.

How to overcome this problem i.e. treat 0.99 as 1?


Solution

  • what you can do is the following for your land availability variable assuming that the formula you have now is

    tableFunction(businessStructure)
    

    you can do

    businessStructure>0.99 ? 0 : tableFunction(businessStructure)