ccm_pyactr

package
v0.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 23, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package ccm_pyactr provides functions to output the internal actr data structures in Python suitable for running using CCM's python_actr package, and to run those models using Python.

Index

Constants

This section is empty.

Variables

View Source
var Info framework.Info = framework.Info{
	Name:           "ccm",
	Language:       "python",
	FileExtension:  "py",
	ExecutableName: "python",

	PythonRequiredPackages: []string{"python_actr"},
}

Functions

This section is empty.

Types

type CCMPyACTR

type CCMPyACTR struct {
	framework.Framework
	framework.WriterHelper
	// contains filtered or unexported fields
}

func New

func New(settings *cli.Settings) (c *CCMPyACTR, err error)

New simply creates a new CCMPyACTR instance and sets the tmp path.

func (*CCMPyACTR) GenerateCode added in v0.8.0

func (c *CCMPyACTR) GenerateCode(initialBuffers framework.InitialBuffers) (code []byte, err error)

GenerateCode converts the internal actr.Model to Python code.

func (CCMPyACTR) Info added in v0.5.0

func (CCMPyACTR) Info() *framework.Info

func (CCMPyACTR) Model added in v0.4.0

func (c CCMPyACTR) Model() (model *actr.Model)

func (*CCMPyACTR) Run

func (c *CCMPyACTR) Run(initialBuffers framework.InitialBuffers) (result *framework.RunResult, err error)

Run generates the python code from the amod file, writes it to disk, creates a "run" file to actually run the model, and returns the output (stdout and stderr combined).

func (*CCMPyACTR) SetModel

func (c *CCMPyACTR) SetModel(model *actr.Model) (err error)

SetModel sets our model and saves the python class name we are going to use.

func (CCMPyACTR) ValidateModel added in v0.6.0

func (CCMPyACTR) ValidateModel(model *actr.Model) (log *issues.Log)

func (*CCMPyACTR) WriteModel

func (c *CCMPyACTR) WriteModel(path string, initialBuffers framework.InitialBuffers) (outputFileName string, err error)

WriteModel converts the internal actr.Model to Python and writes it to a file.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL