/*
initialize the models and create their appropiate model instance.
970016
function initModels(seqObj, modelFiles, models, tablePrefix) {
    modelFiles.forEach((item) => {
      var modelFn;
      try {
        modelFn = require(item.fullPath);
      } catch (e) {
        console.error('Thorin.sql: could not require model: ' + item.fullPath + '\n', e.stack);
        return;
      }
      if (modelFn == null) return;  // we skip it
      if (typeof modelFn !== 'function') {
        console.error(thorin.error('SQL.INVALID_MODEL', 'SQL Model: ' + item.fullPath + ' must export a function(modelObj){}'));
        return;
      }
      if (modelFn.name === 'extend') {
        if (typeof extendModels[item.code] === 'undefined') extendModels[item.code] = [];
        extendModels[item.code].push(modelFn);
        return;
      }
      let modelObj = loader.buildModel(seqObj, modelFn, item, tablePrefix);
      if (modelObj) {
        if (typeof models[modelObj.code] !== 'undefined') {
          console.error(thorin.error('SQL.ADD_MODEL', 'SQL Store: model ' + modelObj.code + ' was already declared.'));
          return;
        }
        models[modelObj.code] = modelObj;
      }
    });
  }
19203
@Override
    public void initializeInstance(PopulationModel populationModel) {
        super.initializeInstance(populationModel);
        parentSelection.initializeInstance(populationModel.getPopulation());
    }
378696
public void init(Configuration c)
	{
		final DatapointModel m = c.getDatapointModel();
		if (m != null)
			createReferences(m);
	}
643033
private void initialize() {
        this.setName(NAME);
        this.setOrder(1);	// High order so that cmdline updates are installed asap
        this.downloadManager = new DownloadManager(Model.getSingleton().getOptionsParam().getConnectionParam());
        this.downloadManager.start();
        // Do this before it can get overwritten by the latest one
        this.getPreviousVersionInfo();
	}
696520
public function init()
    {
        parent::init();

        // setup paths
        $this->setImport(array(
            'audit.models.*',
            'audit.components.*',
        ));

        // map models
        foreach ($this->getDefaultModelMap() as $method => $data)
            foreach ($data as $name => $options)
                if (empty($this->modelMap[$method][$name]))
                    $this->modelMap[$method][$name] = $options;

        // init yiiStrap
        $this->initYiiStrap();
    }
1285238
protected void initModel() throws Exception {
        Model.getSingleton().init(getControlOverrides());
        Model.getSingleton().getOptionsParam().setGUI(getArgs().isGUI());
    }
1028183
private void initModelsMap() {
        modelsMap = new HashMap<>();
        List<PMML4Model> rootModels = modelFactory.getModels(this);
        if (rootModels != null && !rootModels.isEmpty()) {
            for (PMML4Model model : rootModels) {
                modelsMap.put(model.getModelId(), model);
                addChildModelsToMap(model);
            }
        } else {
            throw new IllegalStateException("BRMS-PMML requires at least one model of the model types that are recognized");
        }
    }
1350077
void init()
    {
        view.set(new View(
                         ImmutableList.of(new Memtable(cfstore)),
                         ImmutableList.<Memtable>of(),
                         Collections.<SSTableReader, SSTableReader>emptyMap(),
                         Collections.<SSTableReader>emptySet(),
                         Collections.<SSTableReader>emptySet(),
                         SSTableIntervalTree.empty()));
    }
536125
function Model(attributes, options) {
  var _attributes = attributes || {};
  options = options || {};
  this.attributes = Object.create(null);
  this.set(_attributes, options);
  this.initialize.apply(this, arguments);
}
1189909
function constructor(models, options) {
      if (!Array.isArray(models)) {
        options = models;
        models = [];
      }

      options = options || {};

      //
      // Set the database name if it was provided in the options.
      //
      if (options.url) this.url = options.url;
      if (options.database) this.database = options.database;

      //
      // Define restricted non-enumerated properties.
      //
      predefine(this, fossa);

      //
      // Call original Backbone Model constructor.
      //
      backbone.Collection.call(this, models, options);
    }
951002
public void initialize() {
        val pair = buildLoggerContext(environment, resourceLoader);
        pair.ifPresent(it -> {
            this.logConfigurationFile = it.getKey();
            this.loggerContext = it.getValue();
        });
    }
1270839
function createApplication(options) {
    options = options || {};
    var sapp = new Application();
    sapp.sycle = sycle;

    if (options.loadBuiltinModels) {
        sapp.phase(require('./boot/builtin-models')());
    }

    return sapp;

}
354053
def build_model(self):
        """"""
        with tf.variable_scope(
                "model", reuse=None, initializer=self.initializer):
            self._create_placeholders()
            self._create_rnn_cells()
            self._create_initstate_and_embeddings()
            self._create_rnn_architecture()
            self._create_optimizer_node()
1163885
public function initialize()
    {
        parent::initialize();

        $this->setUrl($this->getModelConfiguration()->getCancelUrl());
        $this->setHtmlAttributes($this->getHtmlAttributes() + [
            'class' => 'btn btn-warning',
        ]);
    }
1218669
public function init() {

		parent::init();

		$this->modelService		= Yii::$app->controller->modelService;
		$this->galleryService 	= Yii::$app->factory->get( 'galleryService' );
	}
143727
protected function _init() {
		parent::_init();

		foreach ($this->_fields as $key => $val) {
			if (is_int($key)) {
				unset($this->_fields[$key]);
				$this->_fields[$val] = $val;
			}
		}
		if (!class_exists($model = Libraries::locate('models', $this->_model))) {
			throw new ClassNotFoundException("Model class '{$this->_model}' not found.");
		}
		$this->_model = $model;
	}
1283911
private void populateModel()
   {
      if (m_count != 0)
      {
         m_count = 0;
         Arrays.fill(m_flags, false);
      }

      for (Resource resource : m_parentFile.getResources())
      {
         for (int loop = 0; loop < MPXResourceField.MAX_FIELDS; loop++)
         {
            if (resource.getCachedValue(MPXResourceField.getMpxjField(loop)) != null)
            {
               if (m_flags[loop] == false)
               {
                  m_flags[loop] = true;
                  m_fields[m_count] = loop;
                  ++m_count;
               }
            }
         }
      }

      //
      // Ensure the the model fields always appear in the same order
      //
      Arrays.sort(m_fields);
      System.arraycopy(m_fields, m_fields.length - m_count, m_fields, 0, m_count);
   }