Sage Modeling and Simulation Library

Highpoint.Sage.Materials Namespace


  Class Description
Public class Dispensary
A Dispensary holds a Mixture that supports infusion of materials (i.e. mixtures or substances) and getters that specify the quantity they want. If there is not enough, then the getter is suspended, and resumed when there is enough material there to satisfy the getter's request. The purpose is to allow suppliers to dump various quantities at varying times, of materials into it, and to support consumers that say, "Give me 100 kg of substance X." If there are 100 kg of X already, then it is dispensed to the consumer. If there are not, then the consumer is blocked, and then (potentially) unblocked later when there *are* 100 kg. If there are never 100 kg, though, the consumer will never unblock.
Public class MassVolumeTracker
Used to determine Mass and Volume high and low values during a change in mixture. We model a mixture into which charges and discharges are performed with a high-level limit equal to the vessel's capacity. The charges and discharges are done in equal proportions during a number of cycles necessary to charge all of the inflows and discharge all of the outflows. With each charge and discharge, we log the high and low levels for Mass and Volume. Reactions may take place as a result of the charges. All mixtures passed in are cloned within this tracker before manipulation.
Public class MaterialService
A MaterialService manages a set of connection tokens (a discrete, replenishable resource), an available capacity (a continuous, replenishable resource) and a set of compartments which are MaterialResourceItems. A Compartment can be thought of as a "bucket" with material in it, and a specified capacity & overbooking setting. Overbooking means that you can, for example, take more than is actually there.

There is a mode setting called "Wildcard mode". When set to true, and a charge or discharge is requested involving a material that the MaterialService does not already have, a compartment is created with an infinite capacity for the desired material, and infinite overbooking permitted so that it may receive or supply as much as you need. The quantity will start at zero, and will always reflect the amount that has been put in (if positive) or taken out (if negative). When "Wildcard" is set to false, In order to complete a requested activity, (charge or discharge) there must be a compartment of the correct MaterialTypes, and with sufficient quantity, if requesting a charge, or capacity, if requesting a discharge.

Protected class MaterialService..::..AcquisitionKey
Used to keep track of the resource requests associated with a material service request.
Protected class MaterialService..::..ReservationPair
A pair of request/target objects, used in a queue to successfully reserve all resources before acquiring any of them. All-or-none.
Public class MaterialTransfer
Public class MaterialTransferRecord
A class that holds the details of a material charge, transfer or discharge.
Public class MaterialTransferRecord..::..Sorter
Public class MaterialTransferrer
Performs transferral of material from one mixture to another.
Public class MaterialTransferrer..::..TypeSpec
Public class MaterialTransferSpecByMass
Represents a request for material transfer, specified as mass of a particular substance.
Public class MaterialTransferSpecByPercentage
Represents a request for material transfer, specified as a percentage of a particular material in the source mixture. Stored in an arraylist keyed to the port on which it is to be effected, in the SOMTaskDetails.m_xferOutSpecLists hashtable.

Note that a MaterialTransferSpecByPercentage is not scalable. It is, in effect, scaled by the amount of material in the source container.


  Interface Description
Public interface IMaterialExtractor
This interface is implemented by an object that will be used to extract material from a mixture. Note that the implementer will actually change the source material in doing so.
Public interface IMaterialTransferHelper
This interface is implemented by any object that intends to help perform a material transfer by extracting the material of interest, and declaring how long it will take to transfer.
Public interface IUpdater
An implementer makes on-request updates to one or more materials.


  Enumeration Description
Public enumeration MaterialTransferRecord..::..TransferType
An enumeration that describes whether this transfer is entering, leaving, or within the model.