0

Setting up Multiple Parameter Forms in Micromine

stuart masters 6 years ago in General updated 6 years ago 11

Hi everyone, I want to estimate 13 variables into 27 Domains and have the option of specifying different Variogram and Data Search parameters for each of the 351 combinations. However, I'd rather not create these one-by-one but instead create them from a tabulation of parameters that I can easily copy/paste/edit. Can this be done (easily) and, if so, how? Thanks, Stuart

Hi Stuart,


I have done this in the past with Macro nesting - a master macro that calls macros for the individual domain estimates that I have set-up with substitutions in the % fields - never for this number of combinations though. You could set-up the macro once for domain 1 then copy multiples of it to an excel file and change the parameters there for each domain - then copy and paste to the new sub-macros which are called by the master...


The other option is using the scripting. This was posted a few months ago...


http://forum.micromine.com/topics/928-parameter-files-for-use-in-scripts/


about pulling the parameters from a .DAT table file. I haven't had a chance to try this out by incorporating it into an estimate but would be useful if I could incorporate it into an estimation script rather than generate multiple forms or use long lines of substitutions.


Easy - perhaps, probably a bit of heartache involved in pulling it together up front...

Ron

Thanks a lot Ron, yes I have used that approach before, albeit not with this number of Domains / Variables. The biggest problem I have is in setting up the Variogram Parameter forms for each Domain / Variable combination as the Variogram parameter form calls on sub-forms for each direction. I'll try exporting the Form Set (for Variogram Parameters) and see if I can edit (copy/paste/rename) them in an editor and then re-import to see if that works. I can open the Form Sets (.mmsetx) in WordPad but it looks pretty scary! Also, there seems to be very long character strings used to link the Variogram Parameters to its Directional Variogram Parameter Sets so such an editing approach doesn't look too attractive after all. Looks like I have a day or two of entering parameters ahead of me ... I'm also a bit concerned about the auditability of the MM setup - it'd be far easier, more efficient and less prone to error if there was a single tabulation (or 3) that held all the parameters a bit like Dangermine and other packages do. Thanks anyway, Cheers, Stuart

Stuart, I wouldn't try editing a forms set in an external editor, there was a time when it was possible, but not now as its all in a SQL DB. So there is in fact a single tabulation for the parms. Re setting things up, there is no reason why you can not use replacable paramaters to specify variogram model paramaters, that said with only 15 replacable paramaters you will likely run out if using a Macro. The scripting approch outlined by Ron is probably the way to go, its one of the reasons it was added.

Thanks Keith, but for now I don't have time to learn scripting. I'll see how far I can get with setting up parameters in a few hours and then make a decision as to whether to hand the estimation part over to an associate of mine who has software that can accommodate this and then import the models. Is the "single tabulation for the parms" you refer to accessible so I can at least export it to, say, a spreadsheet for reporting and validation purposes? Cheers, Stuart

Good day

You can write a macro to do this, you would simply cut and paste most of the values.


Macro's are no longer limited to 15 substitution values you can have 99 substitution values which should be more than enough.


I have often written macros for multiple commodities, multiple run and multiple domains using this approach. It's the best way to do resource estimation and it eliminates errors and can be easily audited.


Below is an example (although this was a IDW model)


The macro screenshot you present looks like the cleanest set up yet, especially for an audit. You have column headers for each parameter and you have made every item a replaceable parameter or so that you can easily see what is being done on each run without digging back into filter forms embedded in kriging process forms. The whole thing can be constructed in EXCEL where viewing and editing is a bit easier and then pasted into the open macro and saved. To clean it up more, you can build similar macros with neat layouts for pre-processing and post-processing and call them from a master macro, as RReid suggests.

Thanks Donald, I've just about got the template for Ordinary Kriging setup. Regards, Stuart

+1

Thanks for this Clint,

The part I am struggling with is how to generate the hundreds of Variogram Parameter files required from a tabulation of parameters (whether that be direct from a spreadsheet or if I just copy/paste them into a macro). Let me (attempt to) explain with some images. Here is a snapshot of the Modelling Parameters screen. In this example I am estimating variable "Cu_Cut" using a variogram model "Cu_Cut_512" and a Data Search "Cu_512_Pass_1". FYI the "512" is a Domain Code of which there are 29 in total. Also, Cu_Cut is one of 13 variables that need to be modelled. Whilst some variables might end up sharing Variogram Models I'd prefer to have a flexible solution that allows each Domain/Variable combination its own Variogram Model.



The next snapshot shows screen I get when I edit the the "Cu_Cut_512" cell under "Semi Variogram". The inputs I need to give are included under the "Directions" area:


Right clicking on each of these reveals:



What I want to do is to generate the Variogram Models and Directional Parameter sets from a tabulation of parameters (and I don't care if I need to cut/paste from a spreadsheet into a macro to do that). Once I have such sets defined the rest if quite easy to do in Micromine. What I don't want to have to do is to define 377 Variogram models, each having 3 directional parameter sets, in the "normal way" i.e. define a new Variogram model by right clicking the "Semi variogram" cell then defining each of the 3 directional parameter sets. Is it possible to do this?

Regards,

Stuart


Stuart


You would simply place substitution variables were values change, so it would look something like this.



Thanks Dave (?), that looks easy to do.

So, in effect, the "krig" Semi Variogram and its directional components (Main, Second, Third) are "temporary" (i.e they change as I change the values of the substitution variables). That's OK by me as I can easily do a few cross-checks from my macro to ensure that the intended values are actually being used (I'm coming from a validation and auditing perspective as this estimate will be subject to a lot of scrutiny and with so many variables and domains it would be very easy to make some mistakes). I'll give it a go soon and let you know how I go.

Regards,

Stuart