Resource Properties

Read and Write Properties

The Resource properties that are editable through the Visual Logic Set Value Editor are:
Max Available

Sets the Maximum Number of Resources available to a number.

Example:

Set Resource1.Max Available = 5

Image

Sets the image used for the Resource to any image located in the Graphics, Images menu option.

Example:

Set Resource1.Image = "BlueB": where BlueB exists as an image. Note the Inverted Commas around the name of the image

Index

Sets the Index number of the Resource to a value other than the default value. Index is a property available on all simulation objects. It is not used by Simul8 and can be used for any purpose by the simulation builder. A common use is the act as an index pointer into a row in a Simul8 spreadsheet where many further cells of data store information relevant to the simulation object.

Example:

Set Resource1.Index = 5

Name

Allows the name of the Resource to be changed or accessed.

Example: Set Resource1.Name = “Change the Name”: changes the name to whatever is inside the inverted commas

Set Var1 = Resource1.Name: sets a text Global Data Item to contain the name of the Resource

Other Cost

This property can be utilised to add further cost details to your income statement.

Example:

Set Resource 1. Other Costs = 200: sets an additional cost of 200 for Resource 1 into the Finance Report.

Other Revenue

This property can be utilised to add revenue details to your income statement for a Resource.

Example:

Set Resource 1. Other Revenue = 6000: sets an additional revenue of 6000 at the time of execution to the
Finance Report.

Results Collection Mode

The object property Results Collection Mode allows control over the collection of results for specific object through Visual Logic.

1 = Results Collection on
0 = Results Collection off

Example:

Set Resource 1.Results Collection Mode = 1

Selected

Sets whether the resource is selected onscreen or not.

1 = Selected
0 = Not selected

 Set Resource1.Selected = 0

Read Only Properties

Current Available

Returns the number of Resources not currently in use.

Example:

Set Var1 = Resource1.Current Available: this sets Var1 to contain the number of free Resources

Unique ID

Gets Simul8's internal Unique Number that identifies every object - you can be sure it is different for all objects. It never changes once an object is in a simulation.

See Also