I am saving the output of my AnyLogic model into an SQL server database. For non-AnyLogic aficionados, AnyLogic is based on Java. However, I am not sure what data types I need to specify for my columns in the database.
So far I am using these:
- double in AnyLogic : float in SQL
- string in AnyLogic : varchar in SQL
- int in AnyLogic : int in SQL
I also have parameters that are of type Option list
, which is, if I understand correctly, a form of Java enum. I tried to save those parameters as varchar
, but this (obviously) does not work. In addition, my model contains various boolean parameters. For my boolean parameters, I add columns of type bit
in SQL by running:
ALTER TABLE myTable
ADD my_bool BIT NOT NULL DEFAULT 0;
However, running the model returns this error
SQLServerException: Invalid column name 'false'. Caused by: Invalid column name 'false'
So concretely, how can I export parameters of type Option list
and boolean
?