question

abuadnan M avatar image
1 Like"
abuadnan M asked Phil BoBo edited

Changing time units: sec --> hours

I finished a model but would like to change the Time Units from seconds to hours or minutes. Anyone could advise how to do that? I am unable to make the change under Model Settings.

Choose One
time units
5 |100000

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

1 Answer

·
Phil BoBo avatar image
3 Likes"
Phil BoBo answered Phil BoBo edited

The comments on this page explain the implications of changing the model units after having started building a model.

· 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.

Chris Ligetti avatar image Chris Ligetti commented ·

@phil.bobo, to be clear, there is currently no way to change the time units after a model has been created?

0 Likes 0 ·
Phil BoBo avatar image Phil BoBo ♦♦ Chris Ligetti commented ·

You can manually change the model units in the tree in MODEL:/Tools/ModelUnits. (I would create a new model with the units you want and copy/paste that node into the model you want to change. Then save and reload the model so that the library objects adjust to the new units as well.)

You just have to be aware of the repercussions of making that change, that I explained on that other page:

"For example, any objects in the model have sizes, and if you change the length units, then now they are the same size but a different unit. For example, your processor may now be 4 inches long instead of 4 meters if you change the length units from meters to inches.

Also, any task executers in your model have speeds, accelerations, and decelerations. If you change your time or length units, then those values are now unchanged but mean something different.

Also, any process times or other values in code that aren't explicitly wrapped in unit functions will be the same values, but the units will be different. For example, senddelayedmessage() calls, source arrival times, time tables, mtbf/mttr downtimes, etc will be the same values but different units.

Manually changing the model units in the tree is fine, as long as you recognize that changing those values doesn't affect the values of any existing objects in your model, but it does change what unit those values represent.

Also, the default values of objects in the library (such as sizes, speeds, etc.) are based on your model units when you start a new model or open a saved model. So if you manually change your model units, you will need to save and reopen your model in order for the default values in the library objects to update to your new units."

So it is possible but it is dangerous, so we advise against it and we purposefully haven't made an easy way to do it. If you are going to do it, you need to know what you are doing and understand the implications.

3 Likes 3 ·

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.