check_model: Check if the 'model' is valid

View source: R/check_model.R

check_modelR Documentation

Check if the model is valid

Description

Check if the model is valid Will stop if not.

Usage

check_model(model)

Arguments

model

the GCAE architecture, as checked by check_model. Use read_model_file to read a GCAE architecture from file. Use save_model to save the model to a JSON file. Use plot_model to plot the model. Use save_model_plot to save a plot of the model to file.

Value

Nothing. Will stop if model is invalid.

Author(s)

Richèl J.C. Bilderbeek

Examples

# An example file
model_filename <- get_gcaer_filename("M0.json")
model <- read_model_file(model_filename)
check_model(model)

if (is_gcae_repo_cloned()) {
  # A GCAE file
  model_filename <- get_gcae_model_filename("M0")
  model <- read_model_file(model_filename)
  check_model(model)

  model_filename <- get_gcae_model_filename("M1")
  model <- read_model_file(model_filename)
  check_model(model)
}

richelbilderbeek/gcaer documentation built on March 25, 2024, 3:08 p.m.