In this example, the same dynamic model is loaded into several Domain Managers, each starting with a different --conf directory. Instead of copying the same compiled dynamic model file (the file with extension .ldm) to each BASEDIR/smarts/local/model/<conf> directory, one single copy is created and compiled in BASEDIR/smarts/local/model. Each of the Domain Managers is then started with the --dynamic command line option to load the compiled dynamic model file from BASEDIR/smarts/local/model.
To create the dynamic model:
-
Create and edit a new file in the BASEDIR/smarts/modeldirectory. Type the following at a command prompt:
BASEDIR /smarts/bin/sm_edit --create model/Example1.mdl
-
To declare the new printer class as a subclass of the UnitaryComputerSystem class, type the following lines into the Example1.mdl file.
interface SM_Printer:UnitaryComputerSystem "Create a printer class inheriting from UCS" { }
-
Save and close the Example1.mdl file.
The file is saved in the BASEDIR/smarts/local/modeldirectory.