This directory contains an example that also can be used as a template
for creating user defined metamodels for LS-OPT.

BUILDING THE EXAMPLE

  Under Linux, issue the command "make" while in this directory.
  Your resulting metamodel is called umm_avgdistance_linux_i386.so
  (or umm_avgdistance_linux_x86_64.so if running under 64-bit OS).

  Under windows, open usermetamodel.sln in Visual Studio. Open the
  Build menu, select "Build solution". Your resulting metamodel is
  called umm_avgdistance_win32.dll

  Along with the metamodel binary you also get an executable called
  "testmodel". This program can be used for simple verification of
  your metamodel. Just give the name of your metamodel as a parameter,
  i.e.:
    testmodel avgdistance

  Note that you are not supposed to supply the full .dll/.so filename
  as a parameter.


USING THE EXAMPLE AS A TEMPLATE

  If you wish to use the example as a template for your own metamodel,
  do the following steps (in this example your metamodel is called
  mymetamodel):

    * Copy avgdistance.* to mymetamodel.*

    * Replace any occurrence of the string "avgdistance" with
      "mymetamodel" in the following files: Makefile, mymetamodel.def,
      mymetamodel.vcproj, Makefile, usermetamodel.sln

DISTRIBUTABLE METAMODEL

  When compiled, your metamodel binary will be called something like:
    umm_mymetamodel_win32.dll
  or
    umm_mymetamodel_linux_i386.dll

  This is the only file that is needed in order to use the metamodel
  from LS-OPT.  It can be placed either in a central repository (which
  needs to be pointed out by the "solver user metamodel path" command
  (see below), or in the same directory as the command file that
  refers to it.

REFERRING TO USER DEFINED METAMODELS IN LS-OPT COMMAND FILES

  In order to use a user defined metamodel for a certain solver, add
  the command "solver order user" to the command file, under the
  appropriate solver.

  The following commands apply for user defined metamodels:
  
    solver order user 

      Enables the use of user defined metamodel for the current
      solver.


    solver user metamodel 'name'
  
      Gives the name of the user defined metamodel. This should not
      include the "umm_" prefix or the platform dependent suffix.
      LS-OPT will go looking for the correct file based upon the
      current platform.  This allows for cross platform operation.


    solver user metamodel path "/home/joe/metamodels"
   
      Specifies where the user defined metamodel may be found.  If it
      is not found in the given directory (or that directory does not
      exist), LS-OPT will look in the same directory as the current
      command file. This parameter is optional

    
    solver user metamodel command "do it right"

      Allows the user to send one string parameter to the user defined
      metamodel, that may be used in any way by the metamodel. This
      parameter is optional.

    
    solver user metamodel param 1.3
    
      Allows the user to send a numeric parameter to the user defined
      metamodel. This statement may be given multiple times for one
      solver in order to pass many parameters to the metamodel. It is
      up to the metamodel to specify which, if any, parameters it
      requires for operation.