Documentation ¶
Overview ¶
compat provides the ability to read and write XMILE files that correspond to the implementation in isee systems STELLA and iThink version 10 products.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CanonicalName ¶
CanonicalName takes the string in and converts literal newlines into underscores, and collapes multiple underscores into a single underscore.
func ConvertFromIsee ¶
TODO(bp) f is an interface{} so that any tag can be passed, and the corresponding TC xmile tag returned. Currently, only the root File tag is supported.
TODO(bp) implement stripVendorTags ¶
ConvertFromIsee takes an isee tag and converts it to the current TC draft XMILE spec. If stripVendorTags is true, isee-namespaced tags and attributes that would otherwise have been passed through will be removed.
Types ¶
type File ¶
type File struct { XMLName xml.Name `xml:"http://www.systemdynamics.org/XMILE xmile"` Version string `xml:"version,attr"` Level int `xml:"level,attr"` IseeHack string `xml:"xmlns:isee,attr"` // FIXME(bp) workaround for, I think go issue w.r.t. namespaces Header xmile.Header `xml:"header"` SimSpec xmile.SimSpec `xml:"sim_specs"` Dimensions []*xmile.Dimension `xml:"dimensions>dim,omitempty"` ModelUnits xmile.ModelUnits `xml:"model_units"` IseePrefs IseePrefs `xml:"prefs"` Behavior xmile.Behavior `xml:"behavior"` Models []*Model `xml:"model,omitempty"` }
File represents the entire contents of a XMILE document as implemented by STELLA & iThink version ~10.0.3
func NewFile ¶
NewFile returns a new File object of the given XMILE compliance level and name, along with a new UUID. If you have a file on disk you are looking to process, please see ReadFile.
type IseePrefs ¶
type IseePrefs struct { XMLName xml.Name Layer string `xml:"layer,attr"` GridWidth string `xml:"grid_width,attr"` GridHeight string `xml:"grid_height,attr"` DivByZeroAlert bool `xml:"divide_by_zero_alert,attr"` ShowModPrefix bool `xml:"show_module_prefix,attr"` HideTransparentButtons bool `xml:"hide_transparent_buttons,attr"` Window xmile.Window `xml:"window"` Security xmile.Security `xml:"security"` PrintSetup xmile.Window `xml:"print_setup"` }
IseePrefs contains preferences used by STELLA and iThink
type Model ¶
type Model struct { XMLName xml.Name `xml:"model"` Name string `xml:"name,attr,omitempty"` Variables []*Variable `xml:",any,omitempty"` Display xmile.View `xml:"display"` Interface xmile.View `xml:"interface"` }
Model represents a container for both the computational definition of a system dynamics model, as well as the visual representations of that model.
Notes ¶
Bugs ¶
when we read in a tag with a variable tag name, the XMILE namespace gets propagated to that tag.