Command to run algorithms


aboucher - Posted on 12 April 2009

All geostatistical algorithms can be run from the command line with the command RunGeostatAlgorithm.

RunGeostatAlgorithm AlgorithmName::ParametersHandler::AlgorithmParameters
Run the algorithm specified by AlgorithmName. ParametersHandler tells SGeMS how to parse the parameters. Use /GeostatParamUtils/XML unless you know well what you are doing. The parameters of the algorithm are provided as an XML string, identical to the one obtained by saving the algorithm parameters to a file (the only difference is that all the parameters must be on a single line).

The following is an example of RunGeostatAlgorithm to run the program sgsim.

#Load a SGeMS project, run sgsim and save data in gslib format
LoadObjectFromFile D:/program/test.prj/TI::s-gems
NewCartesianGrid grid::250::250::1::1.0::1.0::1.0::0::0::0
sgsim::/GeostatParamUtils/XML::< parameters>
  < algorithm name="sgsim"/> < Grid_Name value="grid"/>
  < Property_Name value="sgsim"/> < Nb_Realizations value="1"/>
  < Seed value="14071789"/> < Kriging_Type value="Simple Kriging
  (SK)"/> < Trend value="0 0 0 0 0 0 0 0 0"/> < Local_Mean_Property
  value=""/> < Assign_Hard_Data value="1"/> < Hard_Data grid=""
  property=""/> < Max_Conditioning_Data value="20"/>
  < Search_Ellipsoid value="40 40 1 0 0 0"/> < Use_Target_Histogram
  value="0"/> < nonParamCdf ref_on_file ="0" ref_on_grid ="1"
  filename ="" grid ="" property =""> < LTI_type function ="Power"
  extreme ="0" omega ="3"/> < UTI_type function ="Power" extreme
  ="0" omega ="0.333"/> < /nonParamCdf> < Variogram nugget="0.1"
  structures_count="1"> < structure_1 contribution="0.9"
  type="Spherical"> < ranges max="30" medium="30" min="1"/>
  < angles x="0" y="0" z="0"/> < /structure_1> < /Variogram>
  < /parameters>
SaveGeostatGrid grid::D:/program/sgsim.out::gslib