Sage Modeling and Simulation Library

MaterialService..::..Setup Method (IMaterial, Double, IPort, Boolean)

Performs setup for utilization of this MaterialService. This involves acquiring a service token (if we are limited to a given number of available tokens), reserving the material that will be transferred (if we are going to physically transfer materials), and reserving the delivery capacity (if we are limiting overall available capacity). A current limitation of this class is that its use must be entirely contained within the scope of one SOMTask.

Namespace:  Highpoint.Sage.Materials
Assembly:  Sage4 (in Sage4.dll)

Syntax


public Object Setup(
	IMaterial material,
	double deliveryRate,
	IPort otherGuysPort,
	bool createConnection
)

Parameters

material
Type: Highpoint.Sage.Materials.Chemistry..::..IMaterial
The material we will be transferring. Null if no material will be transferred.
deliveryRate
Type: Double
The amount of capacity this request will use. Units are kilograms per minute, by default.
otherGuysPort
Type: Highpoint.Sage.ItemBased.Ports..::..IPort
The resource-user's desired source or sink port.
createConnection
Type: Boolean
if set to true this setup will create a connection for the transfer, and destroy the connection after the transfer is completed.

Return Value

An opaque object that must be fed back to this MaterialService during subsequent stages of the usage of this operation.