Table of Contents
The reserves module provides access to the MineSight® Interactive Planner (MSIP) reserve information for an MSIP session.
The main purpose of this module is to provide access to two important dictionaries,
- The reserves dictionary.
- The equipment dictionary.
Rarely should these dictionaries by access directly by the script writer. Instead the script writer should use the grail.ip.reslib library for working with the reserves dictionary, and the grail.ip.equtils for working with the equipment dictionary.
In order to use this module effectively you will need to perform the following two steps,
- You must get a handle to the current reserves reference.
- You must use that handle to get the reserves dictionary.
In Python code this would look like,
hres = reserves.hGetCurResRef()
dres = reserves.dGetRes(hres)
Triggers a plan refresh from the database. This call is reentrant, meaning you can call and get the new modified dRes after making the refresh call to get the newly loaded data. Any existing dRes structures obtained from before the refresh call will NOT reflect the reloaded data.
As an example consider the following,
in the above example, as soon as you execute vRefreshPlan, the value of hRes and dRes become invalid. The hRes_r and dRes_r now have the new plan information stored within them.
To simplify the above example, you could have simply done the following,
and now the hRes and dRes will reference the correct reserves dictionary.
Returns the geometry dictionary for the indexed cut. The data dictionary contains the following keys,
A list of points as triplet lists, in the form,
[[x0, y0, z0], ..., [xN, yN, zN]]
A list of vertex indice triples. In the form,
[[v0_0, v0_1, v0_2], ..., [vN_M, ...]]
where the first each triplet corresponds to a face.
Note
That the face list definition used above is not the same as the one used in the grail.ag module.
Returns a dictionary that describes the limits (bounding box) for the cut at the given index. Dictionary keys used are,
- Easting.min
- Easting.max
- Northing.min
- Northing.max
- Elevation.min
- Elevation.max
These values report 3-D box that inscribes the cut.
Returns the a dictionary containing the equipment information for a given material within the given geometry cut key. An example of using this would be,
See the grail.ip.equtils module for information about working with the equipment dictionary.
In the following listing, each indentation either represents another Python dictionary or Python listing.
Note
It is not recommended that you work with the reserves dictionary directly unless you really have to. The grail.ip.reslib module provides methods to make working with the dictionary much easier.
If you choose to work with the dictionary directly the internal organization is not always guaranteed to work from MineSight® Grail version to version.
The reserves dictionary is listed as follows,
List of cut dictionaries (use numerical index).
List of customs attribute dictionaries.
A listing of reserve dictionaries with the following keys,
A list of area dictionaries where the keys are defined as follows,
Warning
Do not use.
List of ore and waste items only 1 in simple case.
- pctitem : string
- Percent item name.
- zoneitem : string
- Zone item name.
- orepctitem : string
- Ore percent item (only used in single ore percent case).
- densityitem : string
- Density item.
- sgflag : integer
- This is 1 if using specific gravity (SG).
- waste : integer
- This is 1 if waste in the multi-percent case.
- priority : integer
- Numeric priority, values can be repeated.
- numgrades : integer
- Num grades.
- grades : list
List of grades dictionaries, where the keys are defined as follows,
- name : string
- Grade name.
- accum : integer
- Flag accumulated versus averaged.
- thick : integer
- This is flag for thickness grade so average with numblocks.
- materialsets : list of dictionaries
List of material set dictionaries where the keys are defined as follows,
- name : string
- Material set name.
- materials : list of dictionaries
The material dictionary keys are defined as follows,
- name : string
- Material name.
- index : integer
- Materials index.
- waste : integer
- Set to 1 if waste.
- default : integer
- Set to 1 if this is the default material.
- numcutoffs : integer
- Number of cutoffs.
- density : float
- Default density for this material.
- cutoffs : list
- A listing of cutoff values (each element is a float).