Package-level declarations

Types

Link copied to clipboard
data class AcrossRepStatTableData(var id: Int = -1, var element_id_fk: Int = -1, var sim_run_id_fk: Int = -1, var stat_name: String = "", var stat_count: Double? = null, var average: Double? = null, var std_dev: Double? = null, var std_err: Double? = null, var half_width: Double? = null, var conf_level: Double? = null, var minimum: Double? = null, var maximum: Double? = null, var sum_of_obs: Double? = null, var dev_ssq: Double? = null, var last_value: Double? = null, var kurtosis: Double? = null, var skewness: Double? = null, var lag1_cov: Double? = null, var lag1_corr: Double? = null, var von_neumann_lag1_stat: Double? = null, var num_missing_obs: Double? = null) : DbTableData
Link copied to clipboard
data class AcrossRepViewData(var exp_name: String = "", var stat_name: String = "", var stat_count: Double? = null, var average: Double? = null, var std_dev: Double? = null) : TabularData
Link copied to clipboard
data class BatchStatTableData(var id: Int = -1, var element_id_fk: Int = -1, var sim_run_id_fk: Int = -1, var rep_id: Int = -1, var stat_name: String = "", var stat_count: Double? = null, var average: Double? = null, var std_dev: Double? = null, var std_err: Double? = null, var half_width: Double? = null, var conf_level: Double? = null, var minimum: Double? = null, var maximum: Double? = null, var sum_of_obs: Double? = null, var dev_ssq: Double? = null, var last_value: Double? = null, var kurtosis: Double? = null, var skewness: Double? = null, var lag1_cov: Double? = null, var lag1_corr: Double? = null, var von_neumann_lag1_stat: Double? = null, var num_missing_obs: Double? = null, var min_batch_size: Double? = null, var min_num_batches: Double? = null, var max_num_batches_multiple: Double? = null, var max_num_batches: Double? = null, var num_rebatches: Double? = null, var current_batch_size: Double? = null, var amt_unbatched: Double? = null, var total_num_obs: Double? = null) : DbTableData
Link copied to clipboard
data class BatchStatViewData(var exp_name: String = "", var run_name: String = "", var rep_id: Int = -1, var stat_name: String = "", var stat_count: Double? = null, var average: Double? = null, var std_dev: Double? = null) : TabularData
Link copied to clipboard
data class ColumnMetaData(val catalogName: String, val className: String, val label: String, val name: String, val typeName: String, val type: Int, val tableName: String, val schemaName: String, val isAutoIncrement: Boolean, val isCaseSensitive: Boolean, val isCurrency: Boolean, val isDefiniteWritable: Boolean, val isReadOnly: Boolean, val isSearchable: Boolean, val isReadable: Boolean, val isSigned: Boolean, val isWritable: Boolean, val nullable: Int)

Represents column metadata extracted from database

Link copied to clipboard
data class ControlTableData(var control_id: Int = -1, var exp_id_fk: Int = -1, var element_id_fk: Int = -1, var key_name: String = "", var control_value: Double? = null, var lower_bound: Double? = null, var upper_bound: Double? = null, var property_name: String = "", var control_type: String = "", var comment: String? = null) : DbTableData
Link copied to clipboard
class DataAccessException(msg: String = "DataAccess Exception!") : RuntimeException

This class inherits from RuntimeException and is thrown when there is a problem with some data access. This class may either be instantiated with a specific error message or with the default error message.

Link copied to clipboard
open class Database(val dataSource: DataSource, var label: String, var defaultSchemaName: String? = null) : DatabaseIfc
Link copied to clipboard
class DatabaseAlreadyExistsException(msg: String = "DatabaseAlreadyExistsException: The database already exists!") : RuntimeException
Link copied to clipboard
class DatabaseDoesNotExistException(msg: String = "DatabaseDoesNotExistException: The database does not exist!") : RuntimeException
Link copied to clipboard

Many databases define database, user, schema in a variety of ways. This abstraction defines this concept as the userSchema. It is the name of the organizational construct for which the user defined database object are contained. These are not the system abstractions. The database name provided to the construct is for labeling and may or may not have any relationship to the actual file name or database name of the database. The supplied connection has all the information that it needs to access the database.

Link copied to clipboard
interface DatabaseIOIfc

An interface that defines basic I/O capabilities for a database.

Link copied to clipboard

A DbCreateTask represents a set of instructions that can be used to create, possibly fill, and alter a database. It can be used only once. The enum Type indicates what kind of tasks will be executed and the state of the task.

Link copied to clipboard
class DbResultsAsText(rowSet: CachedRowSet, var dFormat: String? = "%.3f") : Iterable<List<String>>
Link copied to clipboard
data class DbSchemaInfo(var catalogName: String?, var schemaName: String?, var tableName: String)

A data class to hold meta-data information about the tables and the containing schema

Link copied to clipboard
abstract class DbTableData(tblName: String, val keyFields: List<String>, val autoIncField: Boolean = false) : TabularData

DbTableData represents a base class for constructing data classes that work with instances of DatabaseIfc. Specifically, DbTableData provide the ability to push data into a table. Thus, subclasses of DbTableData must provide information about the primary key of the table and whether the key is an auto-increment type field.

Link copied to clipboard
open class DerbyDb(dbName: String, dbDirectory: Path = KSL.dbDir, create: Boolean = true) : Database

Facilitates the creation of a database backed by Derby. The database will be empty.

Link copied to clipboard
class DuckDb(dbName: String, dbDirectory: Path = KSL.dbDir, deleteIfExists: Boolean = true) : Database

Facilitates the creation of a database backed by DuckDb. The database will be empty.

Link copied to clipboard
class DuckDbDataSource(var databaseName: String = "") : DataSource

The client should set the databaseName property appropriately before establishing a connection. The databaseName property should be a path to the file that represents the database on disk. If no database name is provided then an in-memory database is created.

Link copied to clipboard
interface EmbeddedDbIfc
Link copied to clipboard
Link copied to clipboard
data class ExperimentTableData(var exp_id: Int = -1, var sim_name: String = "", var model_name: String = "", var exp_name: String = "", var num_chunks: Int = 1, var length_of_rep: Double? = null, var length_of_warm_up: Double? = null, var rep_allowed_exec_time: Long? = null, var rep_init_option: Boolean = true, var reset_start_stream_option: Boolean = false, var antithetic_option: Boolean = false, var adv_next_sub_stream_option: Boolean = true, var num_stream_advances: Int = -1, var gc_after_rep_option: Boolean = false) : DbTableData
Link copied to clipboard
data class ExpStatRepViewData(var exp_name: String = "", var stat_name: String = "", var rep_id: Int = -1, var rep_value: Double? = null) : TabularData
Link copied to clipboard
data class FrequencyTableData(var id: Int = -1, var element_id_fk: Int = -1, var sim_run_id_fk: Int = -1, var name: String = "", var cell_label: String = "", var value: Int = -1, var count: Double? = null, var cum_count: Double? = null, var proportion: Double? = null, var cum_proportion: Double? = null) : DbTableData
Link copied to clipboard
data class HistogramTableData(var id: Int = -1, var element_id_fk: Int = -1, var sim_run_id_fk: Int = -1, var response_id_fk: Int = -1, var response_name: String = "", var bin_label: String = "", var bin_num: Int = -1, var bin_lower_limit: Double? = null, var bin_upper_limit: Double? = null, var bin_count: Double? = null, var bin_cum_count: Double? = null, var bin_proportion: Double? = null, var bin_cum_proportion: Double? = null) : DbTableData
Link copied to clipboard
class KSLDatabase(db: Database, clearDataOption: Boolean = false) : DatabaseIOIfc
Link copied to clipboard
class KSLDatabaseNotConfigured(msg: String = "KSLDatabase: The supplied database was not configured as a KSLDatabase!") : RuntimeException
Link copied to clipboard
class KSLDatabaseObserver(model: Model, val db: KSLDatabase = KSLDatabase("${model.simulationName}.db".replace(" ", "_"), model.outputDirectory.dbDir), var clearDataBeforeExperimentOption: Boolean = false)

The observer is automatically attached to the model upon creation. Use startObserving() or stopObserving() as needed.

Link copied to clipboard
data class ModelElementTableData(var exp_id_fk: Int = -1, var element_id: Int = -1, var element_name: String = "", var class_name: String = "", var parent_id_fk: Int? = null, var parent_name: String? = null, var left_count: Int = -1, var right_count: Int = -1) : DbTableData
Link copied to clipboard
object PostgresDb
Link copied to clipboard
data class PWDiffWithinRepViewData(var sim_name: String = "", var stat_name: String = "", var rep_id: Int = -1, var a_exp_name: String = "", var a_value: Double? = null, var b_exp_name: String = "", var b_value: Double? = null, var diff_name: String = "", var a_minus_b: Double? = null) : TabularData
Link copied to clipboard

The user can convert the returned rows based on ColumnMetaData

Link copied to clipboard

The user can convert the returned rows based on ColumnMetaData. The rows contain a map that is indexed by the column name and the value of the column

Link copied to clipboard
data class RvParameterTableData(var rv_param_id: Int = -1, var exp_id_fk: Int = -1, var element_id_fk: Int = -1, var class_name: String = "", var data_type: String = "", var rv_name: String = "", var param_name: String = "", var param_value: Double = Double.NaN) : DbTableData
Link copied to clipboard
data class SimulationRunTableData(var run_id: Int = -1, var exp_id_fk: Int = -1, var run_name: String = "", var num_reps: Int = -1, var start_rep_id: Int = -1, var last_rep_id: Int? = null, var run_start_time_stamp: Timestamp? = null, var run_end_time_stamp: Timestamp? = null, var run_error_msg: String? = null) : DbTableData
Link copied to clipboard
open class SQLiteDb(dbName: String, dbDirectory: Path = KSL.dbDir, deleteIfExists: Boolean = true) : Database

Facilitates the creation of a database backed by SQLite. The database will be empty.

Link copied to clipboard
class TableDoesNotExistException(msg: String = "TableDoesNotExistException: The table in the database does not exist!") : RuntimeException
Link copied to clipboard
abstract class TabularData(tableName: String)

TabularData represents a base class for constructing data classes that hold tabular data. Only base types can be represented. Numeric columns can be represented by (Double, Int, Long, Short, Byte, Float, and Boolean). Boolean is considered numeric via conversion with 1 true and 0 false. Non-numeric fields are represented by String. Complex data types are not represented.

Link copied to clipboard
data class WithinRepCounterStatTableData(var id: Int = -1, var element_id_fk: Int = -1, var sim_run_id_fk: Int = -1, var rep_id: Int = -1, var stat_name: String = "", var last_value: Double? = null) : DbTableData
Link copied to clipboard
data class WithinRepCounterViewData(var exp_name: String = "", var run_name: String = "", var num_reps: Int = -1, var start_rep_id: Int = -1, var last_rep_id: Int = -1, var stat_name: String = "", var rep_id: Int = -1, var last_value: Double? = null) : TabularData
Link copied to clipboard
data class WithinRepResponseViewData(var exp_name: String = "", var run_name: String = "", var num_reps: Int = -1, var start_rep_id: Int = -1, var last_rep_id: Int = -1, var stat_name: String = "", var rep_id: Int = -1, var average: Double? = null) : TabularData
Link copied to clipboard
data class WithinRepStatTableData(var id: Int = -1, var element_id_fk: Int = -1, var sim_run_id_fk: Int = -1, var rep_id: Int = -1, var stat_name: String = "", var stat_count: Double? = null, var average: Double? = null, var minimum: Double? = null, var maximum: Double? = null, var weighted_sum: Double? = null, var sum_of_weights: Double? = null, var weighted_ssq: Double? = null, var last_value: Double? = null, var last_weight: Double? = null) : DbTableData
Link copied to clipboard
data class WithinRepViewData(var exp_name: String = "", var run_name: String = "", var num_reps: Int = -1, var start_rep_id: Int = -1, var last_rep_id: Int = -1, var stat_name: String = "", var rep_id: Int = -1, var rep_value: Double? = null) : TabularData

Functions

Link copied to clipboard
fun isEven(value: Int): Boolean
Link copied to clipboard
fun isOdd(value: Int): Boolean
Link copied to clipboard
fun main()