proc getSeed {field} {
set MAXINT [expr {pow(2, 31) - 1}]
expr srand([clock clicks])
set val [expr {int(rand() * $MAXINT)}]
if {[expr {$val % 2}] == 0} {
incr val -1
}
$field setCurrentValue $val
}
proc updateCutoffs {cutoffs cat_or_cut variogramTabPane} {
for {set updateCutoffs_row_idx 0} {$updateCutoffs_row_idx < [$cutoffs getRowCount]} {incr updateCutoffs_row_idx} {
set cutoff [$cat_or_cut getCurrentValue $updateCutoffs_row_idx]
$variogramTabPane setTitleAt $updateCutoffs_row_idx $cutoff
set use_idx [expr $updateCutoffs_row_idx + 1]
global cutoff_value_$use_idx
upvar 0 cutoff_value_$use_idx cut
$cut setCurrentValue $cutoff
}
}
proc createNewPanel {insertIndex} {
incr insertIndex
global variogram_$insertIndex
global vpanel_$insertIndex
global cutoff_$insertIndex
global cutoff_value_$insertIndex
global nugget_$insertIndex
global sill_label_$insertIndex
global sill_$insertIndex
global variogram_scroll_$insertIndex
global variograms_$insertIndex
global type_$insertIndex
global cc_$insertIndex
global angle1_$insertIndex
global angle2_$insertIndex
global angle3_$insertIndex
global hmax_$insertIndex
global hmin_$insertIndex
global hvert_$insertIndex
if [catch {
set table "variograms_$insertIndex"
set variograms_rows [GuidoGetParamBufferValue [GuidoExecServer GetLastValues [subst {function_name = "BM GSLIB IK3D" form_name = "IK3DParameters." table = $table table_row = 0 field_name = "__num_instances"}]] constant]
} result] {
set variograms_rows 1
}
GuidoPanel variogram_$insertIndex {
-layout BoxLayout Y_AXIS
-label "0"
GuidoPanel vpanel_$insertIndex {
-layout CentreLineLayout
GuidoLabel cutoff_$insertIndex {
-label "Threshold"
}
GuidoLabel cutoff_value_$insertIndex {
-label "0"
}
GuidoField nugget_$insertIndex {
-display_length 5
-label "Nugget"
-default 1
-null false
-tip GSLIB_IK3D_NUGGET_1_TIP
-format double
}
GuidoLabel sill_label_$insertIndex {
-label "Sill"
}
GuidoLabel sill_$insertIndex {
-label "2"
}
}
GuidoScrollPane variogram_scroll_$insertIndex {
-scroll_size 60 16
GuidoTable variograms_$insertIndex {
-instances $variograms_rows 1 100
-interactive true
GuidoComboBox type_$insertIndex {
-display_length 9
-exclusive true
-label "Type"
-null false
-tip GSLIB_IK3D_TYPE_1_TIP
-value_in 1 2 4 5
-alternative_values "Spherical (1)" "Exponential (2)" "Power (4)" "Hole effect (5)"
-default 1
}
GuidoField cc_$insertIndex {
-display_length 5
-label "Cc"
-default 1
-null false
-tip GSLIB_IK3D_CC_1_TIP
-format double
}
GuidoField hmax_$insertIndex {
-label "hMax"
-display_length 5
-default 1
-low_bound 0.0001
-null false
-tip GSLIB_IK3D_HMAX_1_TIP
-format double
}
GuidoField hmin_$insertIndex {
-label "hMin"
-display_length 5
-default 1
-low_bound 0.0001
-null false
-tip GSLIB_IK3D_HMIN_1_TIP
-format double
}
GuidoField hvert_$insertIndex {
-label "Vert"
-display_length 5
-default 1
-low_bound 0.0001
-null false
-tip GSLIB_IK3D_HVERT_1_TIP
-format double
}
GuidoField angle1_$insertIndex {
-label "Angle1"
-display_length 5
-default 0
-null false
-tip GSLIB_ROTATION_ANGLE_TIP
-format double
}
GuidoField angle2_$insertIndex {
-label "Angle2"
-display_length 5
-default 0
-null false
-tip GSLIB_ROTATION_ANGLE_TIP
-format double
}
GuidoField angle3_$insertIndex {
-label "Angle3"
-display_length 5
-default 0
-null false
-tip GSLIB_ROTATION_ANGLE_TIP
-format double
}
}
}
}
upvar 0 nugget_$insertIndex useNugget
upvar 0 variograms_$insertIndex useTable
upvar 0 cc_$insertIndex useCc
upvar 0 sill_$insertIndex useSill
$useNugget setActionCallback valueChanged {[
set sill_value [$useNugget getCurrentValue]
for {set row_idx 0} {$row_idx < [$useTable getRowCount]} {incr row_idx} {
set val [$useCc getCurrentValue $row_idx]
set sill_value [expr $sill_value + $val]
}
eval [$useSill setCurrentValue $sill_value]
]}
$useCc setActionCallback valueChanged {[
set sill_value [$useNugget getCurrentValue]
for {set row_idx 0} {$row_idx < [$useTable getRowCount]} {incr row_idx} {
set val [$useCc getCurrentValue $row_idx]
set sill_value [expr $sill_value + $val]
}
eval [$useSill setCurrentValue $sill_value]
]}
$useTable setActionCallback rowAdded {[
set sill_value [$useNugget getCurrentValue]
for {set row_idx 0} {$row_idx < [$useTable getRowCount]} {incr row_idx} {
set val [$useCc getCurrentValue $row_idx]
set sill_value [expr $sill_value + $val]
}
eval [$useSill setCurrentValue $sill_value]
]}
$useTable setActionCallback rowInserted {[
set sill_value [$useNugget getCurrentValue]
for {set row_idx 0} {$row_idx < [$useTable getRowCount]} {incr row_idx} {
set val [$useCc getCurrentValue $row_idx]
set sill_value [expr $sill_value + $val]
}
eval [$useSill setCurrentValue $sill_value]
]}
$useTable setActionCallback rowDeleted {[
set sill_value [$useNugget getCurrentValue]
for {set row_idx 0} {$row_idx < [$useTable getRowCount]} {incr row_idx} {
set val [$useCc getCurrentValue $row_idx]
set sill_value [expr $sill_value + $val]
}
eval [$useSill setCurrentValue $sill_value]
]}
upvar 0 variogram_$insertIndex newPanel
return $newPanel
}
proc addVariogram {variogramTabPane idx} {
set numPanels [$variogramTabPane getTabCount]
set newPanel [createNewPanel $numPanels]
$variogramTabPane insertTabAt $numPanels [$newPanel getObject]
if {$idx < $numPanels} {
set numTabs [$variogramTabPane getTabCount]
for {set shuffle_row_idx [expr $numTabs]} {$shuffle_row_idx > [expr $idx + 1]} {incr shuffle_row_idx -1} {
set shuffle_row_jdx [expr $shuffle_row_idx - 1]
global nugget_$shuffle_row_idx
global nugget_$shuffle_row_jdx
upvar 0 nugget_$shuffle_row_idx a
upvar 0 nugget_$shuffle_row_jdx b
$a setCurrentValue [$b getCurrentValue]
global variograms_$shuffle_row_idx
global variograms_$shuffle_row_jdx
upvar 0 variograms_$shuffle_row_idx a
upvar 0 variograms_$shuffle_row_jdx b
while {[$a getRowCount] < [$b getRowCount]} {
$a addRows 1
}
while {[$a getRowCount] > [$b getRowCount]} {
$a removeRow 1
}
global type_$shuffle_row_idx
global type_$shuffle_row_jdx
upvar 0 type_$shuffle_row_idx typea
upvar 0 type_$shuffle_row_jdx typeb
global cc_$shuffle_row_idx
global cc_$shuffle_row_jdx
upvar 0 cc_$shuffle_row_idx cca
upvar 0 cc_$shuffle_row_jdx ccb
global angle1_$shuffle_row_idx
global angle1_$shuffle_row_jdx
upvar 0 angle1_$shuffle_row_idx angle1a
upvar 0 angle1_$shuffle_row_jdx angle1b
global angle2_$shuffle_row_idx
global angle2_$shuffle_row_jdx
upvar 0 angle2_$shuffle_row_idx angle2a
upvar 0 angle2_$shuffle_row_jdx angle2b
global angle3_$shuffle_row_idx
global angle3_$shuffle_row_jdx
upvar 0 angle3_$shuffle_row_idx angle3a
upvar 0 angle3_$shuffle_row_jdx angle3b
global hmin_$shuffle_row_idx
global hmin_$shuffle_row_jdx
upvar 0 hmin_$shuffle_row_idx hmina
upvar 0 hmin_$shuffle_row_jdx hminb
global hmax_$shuffle_row_idx
global hmax_$shuffle_row_jdx
upvar 0 hmax_$shuffle_row_idx hmaxa
upvar 0 hmax_$shuffle_row_jdx hmaxb
global hvert_$shuffle_row_idx
global hvert_$shuffle_row_jdx
upvar 0 hvert_$shuffle_row_idx hverta
upvar 0 hvert_$shuffle_row_jdx hvertb
for {set v_row_idx 0} {$v_row_idx < [$a getRowCount]} {incr v_row_idx} {
$typea setCurrentValue $v_row_idx [$typeb getCurrentValue $v_row_idx]
$cca setCurrentValue $v_row_idx [$ccb getCurrentValue $v_row_idx]
$angle1a setCurrentValue $v_row_idx [$angle1b getCurrentValue $v_row_idx]
$angle2a setCurrentValue $v_row_idx [$angle2b getCurrentValue $v_row_idx]
$angle3a setCurrentValue $v_row_idx [$angle3b getCurrentValue $v_row_idx]
$hmina setCurrentValue $v_row_idx [$hminb getCurrentValue $v_row_idx]
$hmaxa setCurrentValue $v_row_idx [$hmaxb getCurrentValue $v_row_idx]
$hverta setCurrentValue $v_row_idx [$hvertb getCurrentValue $v_row_idx]
}
}
incr idx
global nugget_$idx
upvar 0 nugget_$idx a
$a setCurrentValue 1
global variograms_$idx
upvar 0 variograms_$idx a
$a addRows 1
while {[$a getRowCount] > 1} {
$a removeRow 0
}
}
set numPanels [$variogramTabPane getTabCount]
global variable_type
for {set row_idx 1} {$row_idx <= $numPanels} {incr row_idx} {
global cutoff_$row_idx
upvar 0 cutoff_$row_idx useHandle
if {"[$variable_type getCurrentValue]" == "0"} {
$useHandle setLabel "Category"
} else {
$useHandle setLabel "Threshold"
}
}
}
proc deleteVariogram {variogramTabPane idx} {
set numTabs [$variogramTabPane getTabCount]
for {set shuffle_row_idx [expr $idx + 1]} {$shuffle_row_idx < $numTabs} {incr shuffle_row_idx} {
set shuffle_row_jdx [expr $shuffle_row_idx + 1]
global nugget_$shuffle_row_idx
global nugget_$shuffle_row_jdx
upvar 0 nugget_$shuffle_row_idx a
upvar 0 nugget_$shuffle_row_jdx b
$a setCurrentValue [$b getCurrentValue]
global variograms_$shuffle_row_idx
global variograms_$shuffle_row_jdx
upvar 0 variograms_$shuffle_row_idx a
upvar 0 variograms_$shuffle_row_jdx b
while {[$a getRowCount] < [$b getRowCount]} {
$a addRows 1
}
while {[$a getRowCount] > [$b getRowCount]} {
$a removeRow 1
}
global type_$shuffle_row_idx
global type_$shuffle_row_jdx
upvar 0 type_$shuffle_row_idx typea
upvar 0 type_$shuffle_row_jdx typeb
global cc_$shuffle_row_idx
global cc_$shuffle_row_jdx
upvar 0 cc_$shuffle_row_idx cca
upvar 0 cc_$shuffle_row_jdx ccb
global angle1_$shuffle_row_idx
global angle1_$shuffle_row_jdx
upvar 0 angle1_$shuffle_row_idx angle1a
upvar 0 angle1_$shuffle_row_jdx angle1b
global angle2_$shuffle_row_idx
global angle2_$shuffle_row_jdx
upvar 0 angle2_$shuffle_row_idx angle2a
upvar 0 angle2_$shuffle_row_jdx angle2b
global angle3_$shuffle_row_idx
global angle3_$shuffle_row_jdx
upvar 0 angle3_$shuffle_row_idx angle3a
upvar 0 angle3_$shuffle_row_jdx angle3b
global hmin_$shuffle_row_idx
global hmin_$shuffle_row_jdx
upvar 0 hmin_$shuffle_row_idx hmina
upvar 0 hmin_$shuffle_row_jdx hminb
global hmax_$shuffle_row_idx
global hmax_$shuffle_row_jdx
upvar 0 hmax_$shuffle_row_idx hmaxa
upvar 0 hmax_$shuffle_row_jdx hmaxb
global hvert_$shuffle_row_idx
global hvert_$shuffle_row_jdx
upvar 0 hvert_$shuffle_row_idx hverta
upvar 0 hvert_$shuffle_row_jdx hvertb
for {set v_row_idx 0} {$v_row_idx < [$a getRowCount]} {incr v_row_idx} {
$typea setCurrentValue $v_row_idx [$typeb getCurrentValue $v_row_idx]
$cca setCurrentValue $v_row_idx [$ccb getCurrentValue $v_row_idx]
$angle1a setCurrentValue $v_row_idx [$angle1b getCurrentValue $v_row_idx]
$angle2a setCurrentValue $v_row_idx [$angle2b getCurrentValue $v_row_idx]
$angle3a setCurrentValue $v_row_idx [$angle3b getCurrentValue $v_row_idx]
$hmina setCurrentValue $v_row_idx [$hminb getCurrentValue $v_row_idx]
$hmaxa setCurrentValue $v_row_idx [$hmaxb getCurrentValue $v_row_idx]
$hverta setCurrentValue $v_row_idx [$hvertb getCurrentValue $v_row_idx]
}
}
incr numTabs -1
$variogramTabPane removeTabAt $numTabs
}
GuidoApp check_bm "CHECK BM CONNECTED"
$check_bm setParam functionName "BM GSLIB SISIM"
set result [$check_bm invoke]
$check_bm destroy
if {$result == "0"} {
GuidoApp appHandle "BM GSLIB SISIM"
$appHandle setParam license "test"
set appStatus [$appHandle invoke]
$appHandle destroy
if {$appStatus == "-10311"} {
return
}
if [catch {
set variograms_1_rows [GuidoGetParamBufferValue [GuidoExecServer GetLastValues {function_name = "BM GSLIB SISIM" form_name = "SISIMParameters." table = "variograms_1" table_row = 0 field_name = "__num_instances"}] constant]
} result] {
set variograms_1_rows 1
}
GuidoForm SISIMParameters {
-help_id 474
-default_buttons
-label "GSLIB interface: Sequential indicator simulation (sisim / postsim)"
-tip GSLIB_SISIM_FORM_TIP
-defaults_management true
-layout BoxLayout Y_AXIS
GuidoTabbedPane tabPane {
GuidoPanel anonymous {
-layout BoxLayout Y_AXIS
-label GUI_FILES
GuidoPanel anonymous {
-layout CentreLineLayout
-border etched true
-label "Input"
-width 62
GuidoFileBrowserField string_file_location {
-display_length 26
-file_mask *.str
-link string_file_id
-format none
-input true
-label "Location"
-max_length 252
-null false
-tip GSLIB_IK3D_STRING_FILE_TIP
}
GuidoField string_file_id {
-display_length 10
-format none
-input true
-label "ID Number"
-max_length 16
-null false
-tip GSLIB_IK3D_STRING_FILE_TIP
}
GuidoField range {
-default 1
-display_length 10
-format range
-label "String range"
-max_length 26
-null false
-tip GSLIB_IK3D_STRING_FILE_TIP
-translate none
}
GuidoComboBox field {
-display_length 3
-exclusive true
-label "D-field"
-max_length 4
-default D1
-null false
-tip GSLIB_IK3D_STRING_FILE_TIP
-value_in D1 D2 D3 D4 D5 D6 D7 D8 D9 D10 D11 D12 D13 D14 D15 D16 D17 D18 D19 D20 D21 D22 D23 D24 D25 D26 D27 D28 D29 D30 D31 D32 D33 D34 D35 D36 D37 D38 D39 D40 D41 D42 D43 D44 D45 D46 D47 D48 D49 D50 D51 D52 D53 D54 D55 D56 D57 D58 D59 D60 D61 D62 D63 D64 D65 D66 D67 D68 D69 D70 D71 D72 D73 D74 D75 D76 D77 D78 D79 D80 D81 D82 D83 D84 D85 D86 D87 D88 D89 D90 D91 D92 D93 D94 D95 D96 D97 D98 D99 D100
}
GuidoComboBox variable_type {
-display_length 10
-exclusive true
-label "Variable type"
-null false
-tip GSLIB_IK3D_VARIABLE_TYPE_TIP
-value_in 0 1
-alternative_values "categorical (0)" "continuous (1)"
-default 0
}
GuidoField tmin {
-display_length 10
-label "Minimum"
-default -1E+21
-null false
-tip GSLIB_IK3D_TMIN_TIP
-format double
}
GuidoField tmax {
-display_length 10
-label "Maximum"
-default 1E+21
-null false
-tip GSLIB_IK3D_TMAX_TIP
-format double
}
}
GuidoPanel anonymous {
-layout CentreLineLayout
-border etched true
-label "Output"
-width 62
GuidoBMAttributeBrowser attribute_prefix {
-label "Estimate"
-display_length 10
-max_length BM_MAX_ATT_NAME_LEN
-null false
-format none
-translate none
-exclusive false
-attribute_types real integer
-tip GSLIB_SGSIM_PREFIX_TIP
}
GuidoField num_realizations {
-display_length 8
-label "Number of realizations"
-default 1
-low_bound 1
-null false
-tip GSLIB_SGSIM_REALIZATIONS_TIP
-format integer
}
GuidoLabel anonymous {
-label "Seed"
-height 1
}
GuidoPanel anonymous {
-layout CentreLineLayout
GuidoField seed {
-display_length 8
-default 1
-null false
-tip GSLIB_SGSIM_SEED_TIP
-format integer
}
GuidoButton button {
-height 1
-caption "Generate seed"
-action valueChanged {[getSeed $seed]}
-tip GSLIB_SISIM_MAKE_SEED_TIP
}
}
GuidoCheckBox constrain_interpolation {
-label "Constrain interpolation"
-default false
-tip GSLIB_IK3D_CONSTRAIN_TIP
}
GuidoFileBrowserField debug_file {
-display_length 26
-file_mask *.dbg
-format none
-input true
-label "Debug file"
-max_length 252
-null false
-tip GSLIB_DEBUG_TIP
}
GuidoComboBox debug_level {
-dependency {"[ $debug_file getCurrentValue]" != ""}
-display_length 8
-exclusive true
-label "Debug level"
-null false
-tip GSLIB_DEBUG_LEVEL_TIP
-value_in 0 1 2 3
-alternative_values "none (0)" "low (1)" "medium (2)" "high (3)"
-default 0
}
GuidoCheckBox remove_intermediate_files {
-label "Clean up"
-default true
-tip GSLIB_IK3D_CLEANUP_TIP
}
}
}
GuidoPanel anonymous {
-label "Cutoffs"
-layout BoxLayout Y_AXIS
GuidoPanel anonymous {
-layout BoxLayout Y_AXIS
-border etched true
-label "Cutoffs"
-width 62
GuidoPanel anonymous {
-layout CentreLineLayout
GuidoCheckBox soft_data {
-label "Soft data"
-default false
-tip GSLIB_IK3D_SOFT_DATA_TIP
}
GuidoFileBrowserField soft_data_location {
-dependency {"[ $soft_data getCurrentValue]"}
-display_length 26
-file_mask *.str
-link soft_data_file_id
-format none
-input true
-label "Location"
-max_length 252
-null false
-tip GSLIB_IK3D_SOFT_STRING_FILE_TIP
}
GuidoField soft_data_file_id {
-dependency {"[ $soft_data getCurrentValue]"}
-display_length 10
-font_style bold
-format none
-input true
-label "ID Number"
-max_length 16
-null false
-tip GSLIB_IK3D_SOFT_STRING_FILE_TIP
}
GuidoField soft_data_range {
-dependency {"[ $soft_data getCurrentValue]"}
-default 1
-display_length 10
-format range
-label "String range"
-max_length 26
-null false
-tip GSLIB_IK3D_SOFT_STRING_FILE_TIP
-translate none
}
GuidoCheckBox markov_bayes {
-dependency {"[ $soft_data getCurrentValue]"}
-label "Markov-Bayes simulation"
-default 0
-tip GSLIB_SISIM_MARKOV_BAYES_TIP
}
}
GuidoFiller fill3 {
-height 0.5
}
GuidoScrollPane cutoff_scroll {
-scroll_size 33 16
GuidoTable cutoffs {
-instances 1 1 100
-interactive true
GuidoField cat_or_cut {
-label "Threshold"
-display_length 8
-default 0
-null false
-tip GSLIB_IK3D_CAT_OR_CUT_TIP
-format double
}
GuidoField cdf {
-label "cdf"
-display_length 5
-default 0
-null false
-tip GSLIB_IK3D_CDF_TIP
-format double
}
GuidoComboBox soft_field {
-dependency {"[ $soft_data getCurrentValue]"}
-display_length 3
-exclusive true
-label "D-field"
-max_length 4
-default D1
-null false
-tip GSLIB_IK3D_SOFT_STRING_FILE_TIP
-value_in D1 D2 D3 D4 D5 D6 D7 D8 D9 D10 D11 D12 D13 D14 D15 D16 D17 D18 D19 D20 D21 D22 D23 D24 D25 D26 D27 D28 D29 D30 D31 D32 D33 D34 D35 D36 D37 D38 D39 D40 D41 D42 D43 D44 D45 D46 D47 D48 D49 D50 D51 D52 D53 D54 D55 D56 D57 D58 D59 D60 D61 D62 D63 D64 D65 D66 D67 D68 D69 D70 D71 D72 D73 D74 D75 D76 D77 D78 D79 D80 D81 D82 D83 D84 D85 D86 D87 D88 D89 D90 D91 D92 D93 D94 D95 D96 D97 D98 D99 D100
}
GuidoField bz {
-label "B(z)"
-display_length 5
-default 0
-null false
-tip GSLIB_SISIM_BZ_TIP
-format double
-dependency {"[$soft_data getCurrentValue]" != "false" && "[$markov_bayes getCurrentValue]" != "false"}
}
}
}
}
}
GuidoPanel anonymous {
-label "Simulation Options"
-layout BoxLayout Y_AXIS
GuidoPanel anonymous {
-layout CentreLineLayout
GuidoPanel anonymous {
-border etched true
-label "Simulation parameters"
-layout BoxLayout Y_AXIS
-width 62
GuidoPanel anonymous {
-layout CentreLineLayout
GuidoComboBox ik_type {
-label "Full IK"
-display_length 12
-exclusive true
-null false
-tip GSLIB_IK3D_IK_TYPE_TIP
-value_in 0 1
-alternative_values "Full IK (0)" "Median IK (1)"
-default 0
}
GuidoField ik_cutoff {
-label "IK cutoff"
-dependency {"[ $ik_type getCurrentValue]" == "1"}
-display_length 12
-default 2.5
-null false
-tip GSLIB_IK3D_IK_CUTOFF_TIP
-format double
}
GuidoComboBox kriging_type {
-label "Kriging type"
-display_length 12
-exclusive true
-null false
-tip GSLIB_SISIM_KRIGING_TYPE_TIP
-value_in 0 1
-alternative_values "Simple kriging (0)" "Ordinary kriging (1)"
-default 0
}
GuidoFiller fill2 {
-height 0.5
}
GuidoFiller fill2 {
-height 0.5
}
GuidoField max_per_octant {
-display_length 6
-label "Maximum samples per octant"
-default 0
-null false
-tip GSLIB_IK3D_MAX_PER_OCTANT_TIP
-format integer
}
GuidoField max_original {
-display_length 6
-label "Maximum original data"
-default 4
-null false
-tip GSLIB_SISIM_MAX_SAMPLES_TIP
-format integer
}
GuidoField max_previous {
-display_length 6
-label "Number of simulated nodes to use"
-default 8
-null false
-tip GSLIB_SGSIM_NUMSIM_TIP
-format integer
}
GuidoField max_soft {
-label "Maximum soft indicator nodes"
-display_length 6
-default 12
-null false
-tip GSLIB_SISIM_NUMSOFT_TIP
-format integer
}
GuidoCheckBox multiple_grid_search {
-label "Multiple grid search"
-default true
-tip GSLIB_SGSIM_MULTIGRID_TIP
}
GuidoField num_grids {
-dependency {"[$multiple_grid_search getCurrentValue]"}
-label "Number of multiple grid refinements"
-display_length 6
-default 3
-null false
-tip GSLIB_SGSIM_NUM_REFINEMENTS_TIP
-format integer
}
GuidoCheckBox assign {
-label "Assign data to nodes"
-default false
-tip GSLIB_SGSIM_ASSIGN_TO_NODES_TIP
}
GuidoFiller fill2 {
-height 0.5
}
GuidoFiller fill2 {
-height 0.5
}
GuidoLabel label {
-label " "
-height 1
}
GuidoPanel anonymous {
-layout BoxLayout X_AXIS
GuidoLabel hMaxlabel {
-label "hMax"
-width 6
}
GuidoLabel hMinlabel {
-label "hMin"
-width 6
}
GuidoLabel Vertlabel {
-label "Vert"
-width 6
}
}
GuidoLabel label {
-label "Search radius"
-height 1.1
}
GuidoPanel anonymous {
-layout BoxLayout X_AXIS
GuidoField x_search_radius {
-display_length 6
-default 20
-null false
-tip GSLIB_IK3D_X_SEARCH_RADIUS_TIP
-format double
}
GuidoField y_search_radius {
-display_length 6
-default 20
-null false
-tip GSLIB_IK3D_Y_SEARCH_RADIUS_TIP
-format double
}
GuidoField z_search_radius {
-display_length 6
-default 20
-null false
-tip GSLIB_IK3D_Z_SEARCH_RADIUS_TIP
-format double
}
}
GuidoLabel label {
-label ""
-height 1.1
}
GuidoPanel anonymous {
-layout BoxLayout X_AXIS
GuidoLabel labelx {
-width 6
-label "Angle1"
}
GuidoLabel labely {
-width 6
-label "Angle2"
}
GuidoLabel labelz {
-width 6
-label "Angle3"
}
}
GuidoLabel label {
-label "Search angles"
-height 1.1
}
GuidoPanel anonymous {
-layout BoxLayout X_AXIS
GuidoField x_search_angle {
-display_length 6
-default 0
-null false
-tip GSLIB_IK3D_X_SEARCH_ANGLE_TIP
-format double
}
GuidoField y_search_angle {
-display_length 6
-default 0
-null false
-tip GSLIB_IK3D_Y_SEARCH_ANGLE_TIP
-format double
}
GuidoField z_search_angle {
-display_length 6
-default 0
-null false
-tip GSLIB_IK3D_Z_SEARCH_ANGLE_TIP
-format double
}
}
GuidoLabel label {
-label ""
-height 1.1
}
GuidoPanel anonymous {
-layout BoxLayout X_AXIS
GuidoLabel labelx {
-width 6
-label "X"
}
GuidoLabel labely {
-width 6
-label "Y"
}
GuidoLabel labelz {
-width 6
-label "Z"
}
}
GuidoLabel label {
-label "Size of covariance lookup table"
-height 1.1
}
GuidoPanel anonymous {
-layout BoxLayout X_AXIS
GuidoField x_lookup_size {
-display_length 6
-default 0
-null false
-tip GSLIB_SGSIM_COVARIANCE_TABLE_TIP
-format integer
-low_bound 1
}
GuidoField y_lookup_size {
-display_length 6
-default 0
-null false
-tip GSLIB_SGSIM_COVARIANCE_TABLE_TIP
-format integer
-low_bound 1
}
GuidoField z_lookup_size {
-display_length 6
-default 0
-null false
-tip GSLIB_SGSIM_COVARIANCE_TABLE_TIP
-format integer
-low_bound 1
}
}
GuidoFiller fill2 {
-height 0.5
}
GuidoFiller fill2 {
-height 0.5
}
}
}
}
}
GuidoPanel panel4 {
-label "Variograms"
-layout BoxLayout Y_AXIS
GuidoPanel 4a {
-layout BoxLayout Y_AXIS
-border etched true
-label "Variograms"
-width 62
GuidoTabbedPane variogramTabPane {
GuidoPanel variogram_1 {
-layout BoxLayout Y_AXIS
-label "0"
GuidoPanel vpanel_1 {
-layout CentreLineLayout
GuidoLabel cutoff_1 {
-label "Threshold"
}
GuidoLabel cutoff_value_1 {
-label "0"
}
GuidoField nugget_1 {
-display_length 5
-label "Nugget"
-default 1
-null false
-tip GSLIB_IK3D_NUGGET_1_TIP
-format double
}
GuidoLabel sill_label_1 {
-label "Sill"
}
GuidoLabel sill_1 {
-label "1"
}
}
GuidoScrollPane variogram_scroll_1 {
-scroll_size 60 16
GuidoTable variograms_1 {
-instances $variograms_1_rows 1 100
-interactive true
GuidoComboBox type_1 {
-display_length 9
-exclusive true
-label "Type"
-null false
-tip GSLIB_IK3D_TYPE_1_TIP
-value_in 1 2 4 5
-alternative_values "Spherical (1)" "Exponential (2)" "Power (4)" "Hole effect (5)"
-default 1
}
GuidoField cc_1 {
-display_length 5
-label "Cc"
-default 1
-null false
-tip GSLIB_IK3D_CC_1_TIP
-format double
}
GuidoField hmax_1 {
-label "hMax"
-display_length 5
-default 1
-low_bound 0.0001
-null false
-tip GSLIB_IK3D_HMAX_1_TIP
-format double
}
GuidoField hmin_1 {
-label "hMin"
-display_length 5
-default 1
-low_bound 0.0001
-null false
-tip GSLIB_IK3D_HMIN_1_TIP
-format double
}
GuidoField hvert_1 {
-label "Vert"
-display_length 5
-default 1
-low_bound 0.0001
-null false
-tip GSLIB_IK3D_HVERT_1_TIP
-format double
}
GuidoField angle1_1 {
-label "Angle1"
-display_length 5
-default 0
-null false
-tip GSLIB_ROTATION_ANGLE_TIP
-format double
}
GuidoField angle2_1 {
-label "Angle2"
-display_length 5
-default 0
-null false
-tip GSLIB_ROTATION_ANGLE_TIP
-format double
}
GuidoField angle3_1 {
-label "Angle3"
-display_length 5
-default 0
-null false
-tip GSLIB_ROTATION_ANGLE_TIP
-format double
}
}
}
}
}
}
}
GuidoPanel anonymous {
-label "Post Processing"
-layout BoxLayout Y_AXIS
GuidoPanel anonymous {
-layout CentreLineLayout
-border etched true
-label "Output type"
-width 62
GuidoComboBox output_type {
-display_length 28
-exclusive true
-label "Output type"
-tip GSLIB_POSTIK_TIP
-value_in 1 2 3 4 5
-alternative_values "E-type estimate (1)" "Probability and means above and below ... (2)" "Z percentile corresponding to ... (3)" "Symmetric probability interval with width... (4)" "Conditional variance (5)"
-default ""
}
GuidoFiller fill0 {
-height 0.5
}
GuidoPanel panel1bb {
-layout OverlayLayout
GuidoPanel panel_output1 {
-layout CentrelineLayout
-dependency {"[$output_type getCurrentValue]" == "1"}
GuidoBMAttributeBrowser attribute {
-label "Estimate"
-display_length 10
-max_length BM_MAX_ATT_NAME_LEN
-null false
-format none
-translate none
-exclusive false
-attribute_types real
-tip GSLIB_IK3D_ATTRIBUTE_TIP
-dependency {"[$output_type getCurrentValue]" == "1"}
}
}
GuidoPanel panel_output2 {
-layout CentrelineLayout
-dependency {"[$output_type getCurrentValue]" == "2"}
GuidoField output_threshold {
-label "Threshold"
-display_length 10
-default 0.25
-null false
-tip GSLIB_IK3D_OUTPUT_THRESHOLD_TIP
-format double
-dependency {"[$output_type getCurrentValue]" == "2"}
}
GuidoBMAttributeBrowser probability_attribute {
-label "probability > Threshold"
-display_length 7.6
-max_length BM_MAX_ATT_NAME_LEN
-null false
-format none
-translate none
-exclusive false
-attribute_types real
-tip GSLIB_IK3D_PROBABILITY_ATTRIBUTE_TIP
-dependency {"[$output_type getCurrentValue]" == "2"}
}
GuidoBMAttributeBrowser mean_greater {
-label "mean > Threshold"
-display_length 7.6
-max_length BM_MAX_ATT_NAME_LEN
-null false
-format none
-translate none
-exclusive false
-attribute_types real
-tip GSLIB_IK3D_MEAN_GREATER_TIP
-dependency {"[$output_type getCurrentValue]" == "2"}
}
GuidoBMAttributeBrowser mean_less {
-label "mean < Threshold"
-display_length 7.6
-max_length BM_MAX_ATT_NAME_LEN
-null false
-format none
-translate none
-exclusive false
-attribute_types real
-tip GSLIB_IK3D_MEAN_LESS_TIP
-dependency {"[$output_type getCurrentValue]" == "2"}
}
}
GuidoPanel panel_output3 {
-layout CentrelineLayout
-dependency {"[$output_type getCurrentValue]" == "3"}
GuidoField output_cdf {
-label "cdf"
-display_length 10
-default 0.25
-low_bound 0.0
-high_bound 1.0
-null false
-tip GSLIB_IK3D_OUTPUT_CDF_TIP
-format double
-dependency {"[$output_type getCurrentValue]" == "3"}
}
GuidoBMAttributeBrowser z_value {
-label "z value"
-display_length 7.6
-max_length BM_MAX_ATT_NAME_LEN
-null false
-format none
-translate none
-exclusive false
-attribute_types real
-tip GSLIB_IK3D_Z_VALUE_TIP
-dependency {"[$output_type getCurrentValue]" == "3"}
}
}
GuidoPanel panel_output4 {
-layout CentrelineLayout
-dependency {"[$output_type getCurrentValue]" == "4"}
GuidoField total_width {
-label "Total width"
-display_length 10
-null false
-tip GSLIB_SGSIM_TOTAL_WIDTH_TIP
-format double
-dependency {"[$output_type getCurrentValue]" == "4"}
}
GuidoBMAttributeBrowser lower {
-label "Lower"
-display_length 10
-max_length BM_MAX_ATT_NAME_LEN
-null false
-format none
-translate none
-exclusive false
-attribute_types real
-tip GSLIB_SGSIM_PROBABILITY_INTERVAL_TIP
}
GuidoBMAttributeBrowser upper {
-label "Upper"
-display_length 10
-max_length BM_MAX_ATT_NAME_LEN
-null false
-format none
-translate none
-exclusive false
-attribute_types real
-tip GSLIB_SGSIM_PROBABILITY_INTERVAL_TIP
}
}
GuidoPanel panel_output5 {
-layout CentrelineLayout
-dependency {"[$output_type getCurrentValue]" == "5"}
GuidoBMAttributeBrowser conditional_variance {
-label "Conditional variance"
-display_length 10
-max_length BM_MAX_ATT_NAME_LEN
-null false
-format none
-translate none
-exclusive false
-attribute_types real
-tip GSLIB_IK3D_CONDITIONAL_VARIANCE_TIP
-dependency {"[$output_type getCurrentValue]" == "5"}
}
}
}
}
GuidoPanel panel4b {
-layout BoxLayout Y_AXIS
-border etched true
-label "Indicator extrapolation"
-width 62
GuidoPanel panel4bb {
-layout BoxLayout X_AXIS
GuidoPanel panel4bba {
-layout CentreLineLayout
GuidoField min_data_value {
-display_length 4
-format double
-input true
-label "Minimum data value"
-default 0
-max_length 16
-null false
-tip GSLIB_IK3D_MIN_DATA_VALUE_TIP
}
GuidoFiller fill5 {
-height 1
}
GuidoFiller fill6 {
}
GuidoField max_data_value {
-display_length 4
-format double
-input true
-label "Maximum data value"
-default 0
-max_length 16
-null false
-tip GSLIB_IK3D_MAX_DATA_VALUE_TIP
}
}
GuidoPanel panel4bbc {
-layout CentreLineLayout
GuidoComboBox lower_tail {
-display_length 26
-exclusive true
-label "Lower tail"
-null false
-tip GSLIB_IK3D_LOWER_TAIL_TIP
-value_in 1 2 3
-alternative_values "Linear interpolation (1)" "Power model interpolation (2)" "Tabulated quantiles linear interpolation (3)"
-default 1
}
GuidoComboBox middle {
-display_length 26
-exclusive true
-label "Middle"
-null false
-tip GSLIB_IK3D_MIDDLE_TIP
-value_in 1 2 3
-alternative_values "Linear interpolation (1)" "Power model interpolation (2)" "Tabulated quantiles linear interpolation (3)"
-default 1
}
GuidoComboBox upper_tail {
-display_length 26
-exclusive true
-label "Upper tail"
-null false
-tip GSLIB_IK3D_UPPER_TAIL_TIP
-value_in 1 2 3 4
-alternative_values "Linear interpolation (1)" "Power model interpolation (2)" "Tabulated quantiles linear interpolation (3)" "Hyperbolic model interpolation (4)"
-default 1
}
}
GuidoPanel panel4bbb {
-layout CentreLineLayout
GuidoField parameter1 {
-dependency {"[$lower_tail getCurrentValue]" == 2}
-display_length 4
-format double
-input true
-label "w"
-default 0
-max_length 16
-null false
-tip GSLIB_IK3D_PARAMETER1_TIP
}
GuidoField parameter2 {
-dependency {"[$middle getCurrentValue]" == 2}
-display_length 4
-format double
-input true
-label "w"
-default 1
-max_length 16
-null false
-tip GSLIB_IK3D_PARAMETER2_TIP
}
GuidoField parameter3 {
-dependency {"[$upper_tail getCurrentValue]" == 2 || "[$upper_tail getCurrentValue]" == 4}
-display_length 4
-format double
-input true
-label "w"
-default 1
-max_length 16
-null false
-tip GSLIB_IK3D_PARAMETER3_TIP
}
}
}
GuidoFiller fill4b {
-height 0.5
}
GuidoPanel panel4bc {
-layout CentreLineLayout
GuidoLabel tabulated_label {
-label "Tabulated values"
}
GuidoFiller fill7 {
}
GuidoFileBrowserField tabulated_file {
-dependency {"[$upper_tail getCurrentValue]" == 3 || "[$lower_tail getCurrentValue]" == 3 || "[$middle getCurrentValue]" == 3}
-display_length 26
-file_mask *.dat
-format none
-input true
-label "File"
-max_length 252
-null false
-tip GSLIB_IK3D_TABULATED_FILE_TIP
}
GuidoField tabulated_variable {
-dependency {"[$upper_tail getCurrentValue]" == 3 || "[$lower_tail getCurrentValue]" == 3 || "[$middle getCurrentValue]" == 3}
-display_length 6
-format integer
-label "Variable"
-default 3
-null false
-tip GSLIB_IK3D_TABULATED_VARIABLE_TIP
-format integer
}
GuidoField tabulated_weight {
-dependency {"[$upper_tail getCurrentValue]" == 3 || "[$lower_tail getCurrentValue]" == 3 || "[$middle getCurrentValue]" == 3}
-display_length 6
-format integer
-label "Weight"
-default 0
-null false
-tip GSLIB_IK3D_TABULATED_WEIGHT_TIP
-format integer
}
}
}
}
}
}
$string_file_location setActionCallback focusLost {[
set val [$string_file_location getCurrentValue]
if {$val > ""} {
if {[string match *.str $val]} {
set len [string length $val]
incr len -5
set val [string range $val 0 $len]
}
set filen "$val.dbg"
$debug_file setCurrentValue $filen
}
]}
$variograms_1 setActionCallback rowAdded {[
set sill_value [$nugget_1 getCurrentValue]
for {set row_idx 0} {$row_idx < [$variograms_1 getRowCount]} {incr row_idx} {
set val [$cc_1 getCurrentValue $row_idx]
set sill_value [expr $sill_value + $val]
}
catch {
$sill_1 setCurrentValue $sill_value
}
]}
$variograms_1 setActionCallback rowInserted {[
set sill_value [$nugget_1 getCurrentValue]
for {set row_idx 0} {$row_idx < [$variograms_1 getRowCount]} {incr row_idx} {
set val [$cc_1 getCurrentValue $row_idx]
set sill_value [expr $sill_value + $val]
}
catch {
$sill_1 setCurrentValue $sill_value
}
]}
$variograms_1 setActionCallback rowDeleted {[
set sill_value [$nugget_1 getCurrentValue]
for {set row_idx 0} {$row_idx < [$variograms_1 getRowCount]} {incr row_idx} {
set val [$cc_1 getCurrentValue $row_idx]
set sill_value [expr $sill_value + $val]
}
catch {
$sill_1 setCurrentValue $sill_value
}
]}
$cc_1 setActionCallback valueChanged {[
set sill_value [$nugget_1 getCurrentValue]
for {set row_idx 0} {$row_idx < [$variograms_1 getRowCount]} {incr row_idx} {
set val [$cc_1 getCurrentValue $row_idx]
set sill_value [expr $sill_value + $val]
}
$sill_1 setCurrentValue $sill_value
]}
$nugget_1 setActionCallback valueChanged {[
set sill_value [$nugget_1 getCurrentValue]
for {set row_idx 0} {$row_idx < [$variograms_1 getRowCount]} {incr row_idx} {
set val [$cc_1 getCurrentValue $row_idx]
set sill_value [expr $sill_value + $val]
}
$sill_1 setCurrentValue $sill_value
]}
$cutoffs setActionCallback rowAdded {[
addVariogram $variogramTabPane [$cutoffs getRowChanged]
updateCutoffs $cutoffs $cat_or_cut $variogramTabPane
]}
$cutoffs setActionCallback rowInserted {[
addVariogram $variogramTabPane [$cutoffs getRowChanged]
updateCutoffs $cutoffs $cat_or_cut $variogramTabPane
]}
$cutoffs setActionCallback rowDeleted {[
deleteVariogram $variogramTabPane [$cutoffs getRowChanged]
updateCutoffs $cutoffs $cat_or_cut $variogramTabPane
]}
$cat_or_cut setActionCallback valueChanged {[
updateCutoffs $cutoffs $cat_or_cut $variogramTabPane
]}
$tabPane setActionCallback mousePressed {[
updateCutoffs $cutoffs $cat_or_cut $variogramTabPane
set numTabs [$variogramTabPane getTabCount]
for {set tab_idx 1} {$tab_idx <= $numTabs} {incr tab_idx} {
global nugget_$tab_idx
global variograms_$tab_idx
global cc_$tab_idx
global sill_$tab_idx
upvar 0 nugget_$tab_idx useNugget
upvar 0 variograms_$tab_idx useTable
upvar 0 cc_$tab_idx useCc
upvar 0 sill_$tab_idx useSill
set sill_value [$useNugget getCurrentValue]
for {set row_idx 0} {$row_idx < [$useTable getRowCount]} {incr row_idx} {
set val [$useCc getCurrentValue $row_idx]
set sill_value [expr $sill_value + $val]
}
$useSill setCurrentValue $sill_value
}
]}
$tabPane setActionCallback keyReleased {[
updateCutoffs $cutoffs $cat_or_cut $variogramTabPane
set numTabs [$variogramTabPane getTabCount]
for {set tab_idx 1} {$tab_idx <= $numTabs} {incr tab_idx} {
global nugget_$tab_idx
global variograms_$tab_idx
global cc_$tab_idx
global sill_$tab_idx
upvar 0 nugget_$tab_idx useNugget
upvar 0 variograms_$tab_idx useTable
upvar 0 cc_$tab_idx useCc
upvar 0 sill_$tab_idx useSill
set sill_value [$useNugget getCurrentValue]
for {set row_idx 0} {$row_idx < [$useTable getRowCount]} {incr row_idx} {
set val [$useCc getCurrentValue $row_idx]
set sill_value [expr $sill_value + $val]
}
$useSill setCurrentValue $sill_value
}
]}
$SISIMParameters setActionCallback mouseEntered {[
updateCutoffs $cutoffs $cat_or_cut $variogramTabPane
set val [$string_file_location getCurrentValue]
if {$val > ""} {
if {[string match *.str $val]} {
set len [string length $val]
incr len -5
set val [string range $val 0 $len]
}
set filen "$val.dbg"
$debug_file setCurrentValue $filen
}
set sill_value [$nugget_1 getCurrentValue]
for {set row_idx 0} {$row_idx < [$variograms_1 getRowCount]} {incr row_idx} {
set val [$cc_1 getCurrentValue $row_idx]
set sill_value [expr $sill_value + $val]
}
$sill_1 setCurrentValue $sill_value
]}
$variable_type setActionCallback focusLost {[
if {"[$variable_type getCurrentValue]" == "0"} {
$cat_or_cut setLabel "Category"
$cdf setLabel "pdf"
set numPanels [$variogramTabPane getTabCount]
for {set row_idx 1} {$row_idx <= $numPanels} {incr row_idx} {
upvar 0 cutoff_$row_idx useHandle
$useHandle setLabel "Category"
}
} else {
$cat_or_cut setLabel "Threshold"
$cdf setLabel "cdf"
set numPanels [$variogramTabPane getTabCount]
for {set row_idx 1} {$row_idx <= $numPanels} {incr row_idx} {
upvar 0 cutoff_$row_idx useHandle
$useHandle setLabel "Threshold"
}
}
]}
if [catch {
set cutoff_rows [GuidoGetParamBufferValue [GuidoExecServer GetLastValues {function_name = "BM GSLIB SISIM" form_name = "SISIMParameters." table = "cutoffs" table_row = 0 field_name = "__num_instances"}] constant]
} result] {
set cutoff_rows 1
}
for {set row_idx 1} {$row_idx < $cutoff_rows} {incr row_idx} {
$cutoffs addRows 1
}
$attribute updateBrowserList
$attribute_prefix updateBrowserList
$probability_attribute updateBrowserList
$mean_greater updateBrowserList
$mean_less updateBrowserList
$z_value updateBrowserList
$lower updateBrowserList
$upper updateBrowserList
$conditional_variance updateBrowserList
getSeed $seed
set dataBuffer [GuidoExecServer GetBlockModelParameters {}]
set xorg [GuidoGetParamBufferValue $dataBuffer Origin(0)]
set yorg [GuidoGetParamBufferValue $dataBuffer Origin(1)]
set zorg [GuidoGetParamBufferValue $dataBuffer Origin(2)]
set xext [GuidoGetParamBufferValue $dataBuffer Extents(0)]
set yext [GuidoGetParamBufferValue $dataBuffer Extents(1)]
set zext [GuidoGetParamBufferValue $dataBuffer Extents(2)]
set xsiz [GuidoGetParamBufferValue $dataBuffer UserBlock(0)]
set ysiz [GuidoGetParamBufferValue $dataBuffer UserBlock(1)]
set zsiz [GuidoGetParamBufferValue $dataBuffer UserBlock(2)]
$x_lookup_size setCurrentValue [expr ($xext - $xorg) / $xsiz + 1]
$y_lookup_size setCurrentValue [expr ($yext - $yorg) / $ysiz + 1]
$z_lookup_size setCurrentValue [expr ($zext - $zorg) / $zsiz + 1]
set formStatus [$SISIMParameters interact]
if {$formStatus == "apply"} {
GuidoApp appHandle "BM GSLIB SISIM"
$appHandle setParam string_file_location [$string_file_location getCurrentValue]
$appHandle setParam string_file_id [$string_file_id getCurrentValue]
$appHandle setParam range [$range getCurrentValue]
$appHandle setParam field [$field getCurrentValue]
$appHandle setParam variable_type [$variable_type getCurrentValue]
$appHandle setParam tmin [$tmin getCurrentValue]
$appHandle setParam tmax [$tmax getCurrentValue]
$appHandle setParam attribute_prefix [$attribute_prefix getCurrentValue]
$appHandle setParam num_realizations [$num_realizations getCurrentValue]
$appHandle setParam seed [$seed getCurrentValue]
$appHandle setParam constrain_interpolation [$constrain_interpolation getCurrentValue]
$appHandle setParam debug_file [$debug_file getCurrentValue]
$appHandle setParam debug_level [$debug_level getCurrentValue]
$appHandle setParam remove_intermediate_files [$remove_intermediate_files getCurrentValue]
$appHandle setParam soft_data [$soft_data getCurrentValue]
if {[$soft_data getCurrentValue]} {
$appHandle setParam soft_data_location [$soft_data_location getCurrentValue]
$appHandle setParam soft_data_file_id [$soft_data_file_id getCurrentValue]
$appHandle setParam soft_data_range   [$soft_data_range getCurrentValue]
$appHandle setParam markov_bayes      [$markov_bayes getCurrentValue]
}
for {set row_idx 0} {$row_idx < [$cutoffs getRowCount]} {incr row_idx} {
$appHandle setParam "cat_or_cut($row_idx)"      [$cat_or_cut getCurrentValue $row_idx]
$appHandle setParam "cdf($row_idx)"             [$cdf getCurrentValue $row_idx]
if {[$soft_data getCurrentValue]} {
$appHandle setParam "soft_field($row_idx)" [$soft_field getCurrentValue $row_idx]
if {[$markov_bayes getCurrentValue]} {
$appHandle setParam "bz($row_idx)" [$bz getCurrentValue $row_idx]
}
}
}
$appHandle setParam ik_type [$ik_type getCurrentValue]
if {"[$ik_type getCurrentValue]" == "1"} {
$appHandle setParam ik_cutoff [$ik_cutoff getCurrentValue]
}
$appHandle setParam kriging_type [$kriging_type getCurrentValue]
$appHandle setParam max_per_octant [$max_per_octant getCurrentValue]
$appHandle setParam max_original [$max_original getCurrentValue]
$appHandle setParam max_previous [$max_previous getCurrentValue]
$appHandle setParam max_soft     [$max_soft getCurrentValue]
$appHandle setParam x_search_radius [$x_search_radius getCurrentValue]
$appHandle setParam y_search_radius [$y_search_radius getCurrentValue]
$appHandle setParam z_search_radius [$z_search_radius getCurrentValue]
$appHandle setParam x_search_angle [$x_search_angle getCurrentValue]
$appHandle setParam y_search_angle [$y_search_angle getCurrentValue]
$appHandle setParam z_search_angle [$z_search_angle getCurrentValue]
$appHandle setParam x_lookup_size [$x_lookup_size getCurrentValue]
$appHandle setParam y_lookup_size [$y_lookup_size getCurrentValue]
$appHandle setParam z_lookup_size [$z_lookup_size getCurrentValue]
$appHandle setParam assign [$assign getCurrentValue]
$appHandle setParam multiple_grid_search [$multiple_grid_search getCurrentValue]
if {[$multiple_grid_search getCurrentValue]} {
$appHandle setParam num_grids [$num_grids getCurrentValue]
}
for {set row_idx 0} {$row_idx < [$cutoffs getRowCount]} {incr row_idx} {
set use_idx [expr $row_idx + 1]
upvar 0 nugget_$use_idx useHandle
$appHandle setParam "nugget($row_idx)" [$useHandle getCurrentValue]
upvar 0 variograms_$use_idx useHandle
set numStruct [$useHandle getRowCount]
$appHandle setParam "nrows($row_idx)" $numStruct
for {set vrow_idx 0} {$vrow_idx < $numStruct} {incr vrow_idx} {
upvar 0 type_$use_idx useHandle
set variogramType [$useHandle getCurrentValue $vrow_idx]
regexp {([0-9]+)} $variogramType number
$appHandle setParam "type$row_idx\($vrow_idx\)" $number
upvar 0 cc_$use_idx useHandle
$appHandle setParam "cc$row_idx\($vrow_idx\)"      [$useHandle getCurrentValue $vrow_idx]
upvar 0 angle1_$use_idx useHandle
$appHandle setParam "angle1_$row_idx\($vrow_idx\)" [$useHandle getCurrentValue $vrow_idx]
upvar 0 angle2_$use_idx useHandle
$appHandle setParam "angle2_$row_idx\($vrow_idx\)" [$useHandle getCurrentValue $vrow_idx]
upvar 0 angle3_$use_idx useHandle
$appHandle setParam "angle3_$row_idx\($vrow_idx\)" [$useHandle getCurrentValue $vrow_idx]
upvar 0 hmin_$use_idx useHandle
$appHandle setParam "hmin$row_idx\($vrow_idx\)"    [$useHandle getCurrentValue $vrow_idx]
upvar 0 hmax_$use_idx useHandle
$appHandle setParam "hmax$row_idx\($vrow_idx\)"    [$useHandle getCurrentValue $vrow_idx]
upvar 0 hvert_$use_idx useHandle
$appHandle setParam "hvert$row_idx\($vrow_idx\)"   [$useHandle getCurrentValue $vrow_idx]
}
}
$appHandle setParam output_type [$output_type getCurrentValue]
if {[$output_type getCurrentValue] == 1} {
$appHandle setParam parameter 0.0
$appHandle setParam attribute [$attribute getCurrentValue]
}
if {[$output_type getCurrentValue] == 2} {
$appHandle setParam parameter [$output_threshold getCurrentValue]
$appHandle setParam probability_attribute [$probability_attribute getCurrentValue]
$appHandle setParam mean_greater [$mean_greater getCurrentValue]
$appHandle setParam mean_less [$mean_less getCurrentValue]
}
if {[$output_type getCurrentValue] == 3} {
$appHandle setParam parameter [$output_cdf getCurrentValue]
$appHandle setParam attribute [$z_value getCurrentValue]
}
if {[$output_type getCurrentValue] == 4} {
$appHandle setParam parameter [$total_width getCurrentValue]
$appHandle setParam lower [$lower getCurrentValue]
$appHandle setParam upper [$upper getCurrentValue]
}
if {[$output_type getCurrentValue] == 5} {
$appHandle setParam parameter 0.0
$appHandle setParam attribute [$conditional_variance getCurrentValue]
}
$appHandle setParam min_data_value [$min_data_value getCurrentValue]
$appHandle setParam max_data_value [$max_data_value getCurrentValue]
$appHandle setParam lower_tail     [$lower_tail getCurrentValue]
$appHandle setParam middle         [$middle getCurrentValue]
$appHandle setParam upper_tail     [$upper_tail getCurrentValue]
if {"[$lower_tail getCurrentValue]" == 2} {
$appHandle setParam parameter1 [$parameter1 getCurrentValue]
}
if {"[$middle getCurrentValue]" == 2} {
$appHandle setParam parameter2 [$parameter2 getCurrentValue]
}
if {"[$upper_tail getCurrentValue]" == 2 || "[$upper_tail getCurrentValue]" == 4} {
$appHandle setParam parameter3 [$parameter3 getCurrentValue]
}
if {"[$upper_tail getCurrentValue]" == 3 || "[$lower_tail getCurrentValue]" == 3 || "[$middle getCurrentValue]" == 3} {
$appHandle setParam tabulated_file [$tabulated_file getCurrentValue]
$appHandle setParam tabulated_variable [$tabulated_variable getCurrentValue]
$appHandle setParam tabulated_weight [$tabulated_weight getCurrentValue]
}
$appHandle invoke
$appHandle destroy
}
$SISIMParameters destroy
}
