Minsky
|
#include <minsky.h>
Public Types | |
enum | CmdData { no_command, is_const, is_setterGetter, generic } |
enum | MemCheckResult { OK, proceed, abort } |
check whether to proceed or abort, given a request to allocate bytes of memory. Implemented in MinskyTCL More... | |
using | AvailableOperationsMapping = classdesc::StringKeyMap< std::vector< OperationType::Type > > |
Public Member Functions | |
void | addNewPublicationTab (const std::string &name) |
void | addCanvasItemToPublicationTab (size_t i) |
bool | multipleEquities () const |
bool | multipleEquities (const bool &m) |
bool | edited () const |
reflects whether the model has been changed since last save More... | |
bool | reset_flag () const |
true if reset needs to be called prior to numerical integration More... | |
void | markEdited () |
indicate model has been changed since last saved More... | |
void | requestReset () |
void | requestRedraw () |
requests a redraw of the curren active tab More... | |
bool | resetIfFlagged () override |
checks whether a reset is required, and resets the simulation if so More... | |
void | populateMissingDimensions () |
fills in dimensions table with all loaded ravel axes More... | |
void | populateMissingDimensionsFromVariable (const VariableValue &, bool &incompatibleMessageDisplayed) |
populate missing dimensions from a variableValue More... | |
void | populateMissingDimensionsFromVariable (const VariableValue &v) |
void | renameDimension (const std::string &oldName, const std::string &newName) |
void | setGodleyIconResource (const string &s) |
void | setGroupIconResource (const string &s) |
void | setLockIconResource (const string &locked, const string &unlocked) |
void | setRavelIconResource (const string &s) |
std::set< string > | matchingTableColumns (const GodleyIcon &currTable, GodleyAssetClass::AssetClass ac) |
void | importDuplicateColumn (GodleyTable &srcTable, int srcCol) |
find any duplicate column, and use it as a source column for balanceDuplicateColumns More... | |
void | balanceDuplicateColumns (const GodleyIcon &srcTable, int srcCol) |
makes all duplicated columns consistent with srcTable, srcCol More... | |
std::vector< std::string > | allGodleyFlowVars () const |
Minsky () | |
~Minsky () | |
void | clearAllMaps (bool clearHistory) |
void | clearAllMaps () |
void | clearAllMapsTCL () |
VariablePtr | definingVar (const std::string &valueId) const |
returns reference to variable defining (ie input wired) for valueId More... | |
void | saveCanvasItemAsFile (const string &fileName) const |
void | initGodleys () |
void | cut () |
erase items in current selection, put copy into clipboard More... | |
void | copy () const |
copy items in current selection into clipboard More... | |
void | paste () |
paste clipboard as a new group or ungrouped items on the canvas. canvas.itemFocus is set to refer to the new group or items. More... | |
bool | clipboardEmpty () const |
return true if nothing available in clipboard More... | |
void | saveSelectionAsFile (const string &fileName) const |
void | insertGroupFromFile (const string &file) |
void | makeVariablesConsistent () |
void | imposeDimensions () |
void | garbageCollect () |
bool | cycleCheck () const |
checks for presence of illegal cycles in network. Returns true if there are some More... | |
void | openLogFile (const string &) |
opens the log file, and writes out a header line describing names of all variables More... | |
void | closeLogFile () |
closes log file More... | |
bool | loggingEnabled () const |
returns true if logging is in operation More... | |
void | constructEquations () |
construct the equations based on input data More... | |
void | dimensionalAnalysis () const |
performs dimension analysis, throws if there is a problem More... | |
void | deleteAllUnits () |
removes units markup from all variables in model More... | |
bool | checkEquationOrder () const |
consistency check of the equation order. Should return true. Outputs the operation number of the invalidly ordered operation. More... | |
double | deltaT () const |
void | reset () |
resets the variables back to their initial values More... | |
std::vector< double > | step () |
step the equations (by n steps, default 1) More... | |
void | save (const std::string &filename) |
void | load (const std::string &filename) |
load from a file More... | |
void | exportSchema (const std::string &filename, int schemaLevel=1) |
void | displayErrorItem (const Item &op) const |
indicate operation item has error, if visible, otherwise contining group More... | |
std::string | ecolabVersion () const |
std::string | ravelVersion () const |
std::string | autoSaveFile () const |
name of an auto save file More... | |
void | setAutoSaveFile (const std::string &file) |
initialises auto saving empty file to turn off autosave More... | |
void | clearHistory () |
clear history More... | |
void | checkPushHistory () |
called periodically to ensure history up to date More... | |
bool | pushHistory () |
push current model state onto history if it differs from previous More... | |
bool | commandHook (const std::string &command, unsigned nargs) |
Executed after each interpreter command to maintain undo/redo stack, edited flag, autosaving etc. More... | |
virtual CmdData | getCommandData (const std::string &command) const |
return meta information on a given command More... | |
long | undo (int changes=1) |
restore model to state changes ago More... | |
void | convertVarType (const std::string &name, VariableType::Type type) |
Converts variable(s) named by name into a variable of type type. More... | |
void | addIntegral () |
add integral to current canvas item (which must be variable convertible to an integral variable More... | |
bool | inputWired (const std::string &name) const |
returns true if any variable of name name has a wired input More... | |
void | renderCanvasToPS (const std::string &filename) |
render canvas to a postscript file More... | |
void | renderCanvasToPDF (const std::string &filename) |
render canvas to a PDF file More... | |
void | renderCanvasToSVG (const std::string &filename) |
render canvas to an SVG file More... | |
void | renderCanvasToPNG (const std::string &filename) |
render canvas to a PNG image file More... | |
void | renderCanvasToPNG (const std::string &filename, const Canvas::ZoomCrop &z) |
Render canvas to a PNG file filename, scaling the canvas temporarily by zoom, shifts it to left, top, and crops to width, height (in ZoomCrop struct). More... | |
void | renderCanvasToEMF (const std::string &filename) |
render canvas to a EMF image file (Windows only) More... | |
void | renderAllPlotsAsSVG (const string &prefix) const |
render all plots More... | |
void | exportAllPlotsAsCSV (const string &prefix) const |
export all plots More... | |
void | setAllDEmode (bool) |
set DE mode on all godley tables More... | |
void | srand (int seed) |
set std library RNG seed More... | |
void | setGodleyDisplayValue (bool displayValues, GodleyTable::DisplayStyle displayStyle) |
set display value mode on all godley table editor modes More... | |
void | importVensim (const std::string &) |
import a Vensim file More... | |
void | redrawAllGodleyTables () |
request all Godley table windows to redraw More... | |
virtual void | setBusyCursor () |
set/clear busy cursor in GUI More... | |
virtual void | clearBusyCursor () |
virtual void | progress (const std::string &title, int) |
set progress bar, out of 100, labelling the progress bar with title More... | |
virtual void | bookmarkRefresh () |
refresh the bookmark menu after changes More... | |
virtual void | resetScroll () |
reset main window scroll bars after model has been panned More... | |
virtual void | message (const std::string &) |
display a message in a popup box on the GUI More... | |
virtual void | runItemDeletedCallback (const Item &) |
run callback attached to item More... | |
virtual MemCheckResult | checkMemAllocation (size_t bytes) const |
std::size_t | physicalMem () const |
returns amount of memory installed on system More... | |
vector< string > | listFonts () const |
int | numOpArgs (OperationType::Type o) |
OperationType::Group | classifyOp (OperationType::Type o) const |
void | latex (const std::string &filename, bool wrapLaTeXLines) |
void | matlab (const std::string &filename) |
string | latex2pango (const std::string &x) |
std::vector< std::string > | availableOperations () |
list of available operations More... | |
Minsky::AvailableOperationsMapping | availableOperationsMapping () const |
std::vector< std::string > | variableTypes () |
list of available variable types More... | |
std::vector< std::string > | assetClasses () |
return list of available asset classes More... | |
void | autoLayout () |
auto layout current open group and recentre More... | |
void | randomLayout () |
randomly layout current open group and recentre reinitialises canvas to the group located in item More... | |
void | openGroupInCanvas () |
void | openModelInCanvas () |
reinitialises canvas to the toplevel group More... | |
void | listAllInstances () |
void | nameCurrentItem (const std::string &name) |
void | itemFromNamedItem (const std::string &name) |
bool | triggerCheckMemAllocationCallback () const |
trigger checkMem callback for testing purposes More... | |
char | getc () const |
Used to implement a pause until return pressed for attaching debugger purposes. More... | |
void | setDefinition (const std::string &valueId, const std::string &definition) |
add/replace a definition for a flow variable given by valueId More... | |
void | pushFlags () |
push and pop state of the flags More... | |
void | popFlags () |
push and pop state of the flags More... | |
std::string | defaultFont () |
the default used by Pango More... | |
std::string | defaultFont (const std::string &x) |
the default used by Pango More... | |
double | fontScale () |
an extra scaling factor of Pango fonts More... | |
double | fontScale (double) |
an extra scaling factor of Pango fonts More... | |
![]() | |
virtual | ~RungeKutta ()=default |
void | rkreset () |
reset the simulation More... | |
void | rkstep () |
step the equations (by n steps, default 1) evaluate the flow equations without stepping. More... | |
void | evalEquations () |
![]() | |
Minsky_multipleEquities (const std::string &name, ecolab::TCLAccessor< Minsky, bool >::Getter g, ecolab::TCLAccessor< Minsky, bool >::Setter s) | |
Static Public Member Functions | |
static void | saveGroupAsFile (const Group &, const string &fileName) |
static bool | ravelAvailable () |
static bool | ravelExpired () |
static int | daysUntilRavelExpires () |
Public Attributes | |
PannableTab< EquationDisplay > | equationDisplay |
FontDisplay | fontSampler |
PhillipsDiagram | phillipsDiagram |
std::vector< PubTab > | publicationTabs |
VariableValues | variableValues |
Dimensions | dimensions |
Conversions | conversions |
std::map< Units, double > | maxValue |
stash the maximum absolute value obtained by a dimensioned quantity More... | |
std::map< Units, double > | maxFlowValue |
SVGRenderer | histogramResource |
Exclude< std::map< std::string, std::shared_ptr< CallableFunction > > > | userFunctions |
GroupPtr | model {new Group} |
Canvas | canvas {model} |
std::set< string > | logVarList |
set of variables (valueIds) to log More... | |
double | lastT {0} |
previous timestep More... | |
int | numBackups =1 |
number of previous versions of saved files to keep save to a file More... | |
std::string | fileVersion |
Minsky version file was saved under. More... | |
unsigned | maxHistory {100} |
maximum no. of history states to save More... | |
int | maxWaitMS =100 |
maximum wait in millisecond between redrawing canvas during simulation More... | |
bool | doPushHistory =true |
flag to indicate whether a TCL should be pushed onto the history stack, or logged in a recording. This is used to avoid movements being added to recordings and undo history More... | |
bool | displayValues =false |
GodleyTable::DisplayStyle | displayStyle =GodleyTable::sign |
std::shared_ptr< VariableInstanceList > | variableInstanceList |
supports navigation to all instances of current variable More... | |
std::map< std::string, std::weak_ptr< Item > > | namedItems |
VariablePane | variablePane |
![]() | |
double | t {0} |
time More... | |
bool | running =false |
controls whether simulation is running More... | |
bool | reverse =false |
reverse direction of simulation More... | |
EvalGodley | evalGodley |
![]() | |
double | stepMin {0} |
double | stepMax {0.01} |
int | nSteps {1} |
double | epsRel {1e-2} |
double | epsAbs {1e-3} |
int | order {4} |
bool | implicit {false} |
int | simulationDelay {0} |
std::string | timeUnit |
double | tmax {INFINITY} |
double | t0 {0} |
Static Public Attributes | |
static const std::string | minskyVersion =MINSKY_VERSION |
return the AEGIS assigned version number More... | |
![]() | |
static std::vector< double, CIVITA_ALLOCATOR< double > > | stockVars |
vector of variables that are integrated via Runge-Kutta. These variables label the columns of the Godley table More... | |
static std::vector< double, CIVITA_ALLOCATOR< double > > | flowVars |
variables defined as a simple function of the stock variables, also known as lhs variables. These variables appear in the body of the Godley table More... | |
Private Member Functions | |
CLASSDESC_ACCESS (Minsky) | |
std::string | diagnoseNonFinite () const |
returns a diagnostic about an item that is infinite or NaN. Either a variable name, or and operator type. More... | |
void | logVariables () const |
write current state of all variables to the log file More... | |
void | balanceColumns (const GodleyIcon &srcGodley, int srcCol, GodleyIcon &destGodley, int destCol) const |
balance two Godley columns More... | |
void | removeItems (Wire &wire) |
remove the definition network from wire, up to, but not including attached variables. More... | |
Private Attributes | |
Exclude< ptime > | lastRedraw |
bool | m_multipleEquities =false |
Additional Inherited Members | |
![]() | |
void | evalEquations (double result[], double, const double vars[]) |
void | evalJacobian (Matrix &, double, const double vars[]) |
![]() | |
static int | RKfunction (double, const double y[], double f[], void *) |
function to be integrated (internal use) More... | |
static int | jacobian (double, const double y[], double *, double dfdt[], void *) |
compute jacobian (internal use) More... | |
using minsky::Minsky::AvailableOperationsMapping = classdesc::StringKeyMap<std::vector<OperationType::Type> > |
Enumerator | |
---|---|
no_command | |
is_const | |
is_setterGetter | |
generic |
check whether to proceed or abort, given a request to allocate bytes of memory. Implemented in MinskyTCL
Enumerator | |
---|---|
OK | |
proceed | |
abort |
|
inline |
Definition at line 241 of file minsky.h.
minsky::Minsky::~Minsky | ( | ) |
Definition at line 120 of file minsky.cc.
References minsky::remove().
|
inline |
void minsky::Minsky::addIntegral | ( | ) |
add integral to current canvas item (which must be variable convertible to an integral variable
Definition at line 1527 of file minsky.cc.
References minsky::Item::moveTo().
Referenced by minsky::MinskyTCL::addIntegral().
|
inline |
vector< string > minsky::Minsky::allGodleyFlowVars | ( | ) | const |
Definition at line 820 of file minsky.cc.
vector< string > minsky::Minsky::assetClasses | ( | ) |
void minsky::Minsky::autoLayout | ( | ) |
auto layout current open group and recentre
Definition at line 1625 of file minsky.cc.
|
inline |
vector< string > minsky::Minsky::availableOperations | ( | ) |
Minsky::AvailableOperationsMapping minsky::Minsky::availableOperationsMapping | ( | ) | const |
Definition at line 1613 of file minsky.cc.
References minsky::op, and minsky::to_string().
|
private |
balance two Godley columns
Definition at line 645 of file minsky.cc.
References minsky::FlowCoef::coef, minsky::GodleyIcon::flowSignature(), minsky::FlowCoef::name, minsky::scope(), minsky::FlowCoef::str(), minsky::GodleyIcon::table, minsky::trimWS(), minsky::uqName(), and minsky::GodleyIcon::valueId().
void minsky::Minsky::balanceDuplicateColumns | ( | const GodleyIcon & | srcTable, |
int | srcCol | ||
) |
makes all duplicated columns consistent with srcTable, srcCol
Definition at line 753 of file minsky.cc.
References minsky::GodleyTable::_assetClass(), minsky::GodleyTable::cell(), minsky::GodleyTable::cols(), minsky::GodleyIcon::table, minsky::trimWS(), and minsky::GodleyIcon::valueId().
Referenced by minsky::GodleyIcon::deleteRow(), minsky::GodleyTableEditor::mouseUp(), minsky::GodleyIcon::setCell(), and minsky::GodleyTableEditor::update().
|
inlinevirtual |
refresh the bookmark menu after changes
Reimplemented in minsky::anonymous_namespace{addon.cc}::AddOnMinsky.
Definition at line 450 of file minsky.h.
Referenced by minsky::GroupItems::addItem(), minsky::Item::adjustBookmark(), minsky::Group::deleteItem(), and minsky::Canvas::openGroupInCanvas().
bool minsky::Minsky::checkEquationOrder | ( | ) | const |
consistency check of the equation order. Should return true. Outputs the operation number of the invalidly ordered operation.
Definition at line 1177 of file minsky.cc.
References minsky::op.
|
inlinevirtual |
Definition at line 464 of file minsky.h.
|
inline |
called periodically to ensure history up to date
Definition at line 365 of file minsky.h.
|
private |
|
inline |
Definition at line 495 of file minsky.h.
References minsky::OperationType::classify().
void minsky::Minsky::clearAllMaps | ( | bool | clearHistory | ) |
Definition at line 127 of file minsky.cc.
References variablePane().
|
inline |
Definition at line 259 of file minsky.h.
References clearAllMaps().
Referenced by clearAllMaps().
|
inlinevirtual |
Reimplemented in minsky::anonymous_namespace{addon.cc}::AddOnMinsky, and minsky::MinskyTCL.
|
inline |
|
inline |
|
inline |
bool minsky::Minsky::commandHook | ( | const std::string & | command, |
unsigned | nargs | ||
) |
Executed after each interpreter command to maintain undo/redo stack, edited flag, autosaving etc.
command | '.' separated command |
nargs | number of arguments |
Definition at line 1326 of file minsky.cc.
References minsky::getCommandData().
Referenced by minsky::RESTMinsky::commandHook(), and minsky::member_entry_hook().
void minsky::Minsky::constructEquations | ( | ) |
construct the equations based on input data
ecolab::error | if the data is inconsistent |
Definition at line 393 of file minsky.cc.
References minsky::canonicalName(), f, MathDAG::SystemOfEquations::populateEvalOpVector(), minsky::timeUnit, MathDAG::SystemOfEquations::updatePortVariableValue(), and minsky::valueIdFromScope().
void minsky::Minsky::convertVarType | ( | const std::string & | name, |
VariableType::Type | type | ||
) |
Converts variable(s) named by name into a variable of type type.
if | conversion is disallowed |
Definition at line 1457 of file minsky.cc.
References TCLcmd::trap::init, minsky::isValueId(), and minsky::var.
Referenced by minsky::MinskyTCL::convertVarType(), minsky::IntOp::description(), minsky::VariableBase::retype(), and minsky::GodleyIcon::updateVars().
void minsky::Minsky::copy | ( | ) | const |
copy items in current selection into clipboard
Definition at line 191 of file minsky.cc.
References minsky::schemaURL, and classdesc::xml_pack().
Referenced by minsky::Canvas::select().
void minsky::Minsky::cut | ( | ) |
erase items in current selection, put copy into clipboard
Definition at line 157 of file minsky.cc.
bool minsky::Minsky::cycleCheck | ( | ) | const |
|
inlinestatic |
string minsky::Minsky::defaultFont | ( | ) |
the default used by Pango
Definition at line 1738 of file minsky.cc.
References minsky::_defaultFont.
string minsky::Minsky::defaultFont | ( | const std::string & | x | ) |
the default used by Pango
Definition at line 1741 of file minsky.cc.
References minsky::_defaultFont.
VariablePtr minsky::Minsky::definingVar | ( | const std::string & | valueId | ) | const |
returns reference to variable defining (ie input wired) for valueId
Definition at line 205 of file minsky.cc.
References minsky::valueId().
Referenced by minsky::VariableValue::hypercube(), minsky::VariableValue::init(), minsky::Canvas::renameItem(), minsky::VariableValues::resetValue(), minsky::VariableBase::sliderVisible(), and minsky::GodleyIcon::update().
void minsky::Minsky::deleteAllUnits | ( | ) |
removes units markup from all variables in model
Definition at line 460 of file minsky.cc.
References minsky::timeUnit.
|
private |
returns a diagnostic about an item that is infinite or NaN. Either a variable name, or and operator type.
Definition at line 999 of file minsky.cc.
References minsky::anonymous_namespace{userFunction.cc}::isfinite().
void minsky::Minsky::dimensionalAnalysis | ( | ) | const |
performs dimension analysis, throws if there is a problem
Definition at line 432 of file minsky.cc.
void minsky::Minsky::displayErrorItem | ( | const Item & | op | ) | const |
indicate operation item has error, if visible, otherwise contining group
Definition at line 1230 of file minsky.cc.
References minsky::Canvas::itemIndicator, pyminsky::minsky, minsky::op, and resetScroll().
Referenced by MathDAG::OperationDAGBase::addEvalOps(), minsky::TensorOpFactory::create(), minsky::RungeKutta::evalEquations(), minsky::anonymous_namespace{minsky.cc}::Network::followWire(), MathDAG::SystemOfEquations::makeDAG(), MathDAG::anonymous_namespace{equations.cc}::NoArgument::NoArgument(), and minsky::Item::throw_error().
|
inline |
|
inline |
void minsky::Minsky::exportAllPlotsAsCSV | ( | const string & | prefix | ) | const |
export all plots
Definition at line 1563 of file minsky.cc.
References minsky::str().
void minsky::Minsky::exportSchema | ( | const std::string & | filename, |
int | schemaLevel = 1 |
||
) |
Definition at line 1106 of file minsky.cc.
References f, minsky::schemaURL, and classdesc::xsd_generate().
double minsky::Minsky::fontScale | ( | ) |
double minsky::Minsky::fontScale | ( | double | s | ) |
void minsky::Minsky::garbageCollect | ( | ) |
Definition at line 375 of file minsky.cc.
|
inline |
|
inlinevirtual |
return meta information on a given command
Reimplemented in minsky::MinskyTCL, and minsky::RESTMinsky.
void minsky::Minsky::importDuplicateColumn | ( | GodleyTable & | srcTable, |
int | srcCol | ||
) |
find any duplicate column, and use it as a source column for balanceDuplicateColumns
Definition at line 618 of file minsky.cc.
References minsky::GodleyTable::cell(), minsky::GodleyTable::cols(), and minsky::trimWS().
Referenced by minsky::GodleyTableEditor::importStockVarByCol(), minsky::GodleyIcon::setCell(), and minsky::GodleyTableEditor::update().
void minsky::Minsky::importVensim | ( | const std::string & | filename | ) |
import a Vensim file
Definition at line 1599 of file minsky.cc.
References f, and minsky::readMdl().
void minsky::Minsky::imposeDimensions | ( | ) |
Definition at line 365 of file minsky.cc.
Referenced by minsky::Ravel::setDimension().
void minsky::Minsky::initGodleys | ( | ) |
Definition at line 857 of file minsky.cc.
|
inline |
returns true if any variable of name name has a wired input
Definition at line 399 of file minsky.h.
Referenced by minsky::GroupItems::addWire().
void minsky::Minsky::insertGroupFromFile | ( | const string & | file | ) |
Definition at line 323 of file minsky.cc.
References schema3::Minsky::populateGroup(), and minsky::stripByteOrderingMarker().
|
inline |
Definition at line 531 of file minsky.h.
void minsky::Minsky::latex | ( | const std::string & | filename, |
bool | wrapLaTeXLines | ||
) |
Definition at line 1755 of file minsky.cc.
References f, MathDAG::SystemOfEquations::latex(), and MathDAG::SystemOfEquations::latexWrapped().
|
inline |
Definition at line 506 of file minsky.h.
References minsky::latexToPango().
void minsky::Minsky::listAllInstances | ( | ) |
Definition at line 1637 of file minsky.cc.
void minsky::Minsky::load | ( | const std::string & | filename | ) |
load from a file
Definition at line 1048 of file minsky.cc.
References schema3::Minsky::populateMinsky(), reset(), schema3::Minsky::schemaVersion, minsky::stripByteOrderingMarker(), and schema3::Minsky::version.
Referenced by minsky::MinskyTCL::load().
|
inline |
|
private |
write current state of all variables to the log file
Definition at line 108 of file minsky.cc.
|
inline |
indicate model has been changed since last saved
Definition at line 173 of file minsky.h.
References variablePane().
Referenced by minsky::Canvas::keyPress(), and minsky::GodleyTable::markEdited().
std::set< string > minsky::Minsky::matchingTableColumns | ( | const GodleyIcon & | currTable, |
GodleyAssetClass::AssetClass | ac | ||
) |
currTable | - this table, not included in the matching process |
Definition at line 567 of file minsky.cc.
References minsky::godley, and minsky::scope().
Referenced by minsky::MinskyTCL::matchingTableColumns(), and minsky::GodleyTableEditor::matchingTableColumnsByCol().
|
inline |
Definition at line 499 of file minsky.h.
References f, and MathDAG::SystemOfEquations::matlab().
|
inlinevirtual |
display a message in a popup box on the GUI
Reimplemented in minsky::anonymous_namespace{addon.cc}::AddOnMinsky, and minsky::MinskyTCL.
bool minsky::Minsky::multipleEquities | ( | const bool & | m | ) |
Definition at line 90 of file minsky.cc.
|
inline |
Definition at line 530 of file minsky.h.
int minsky::Minsky::numOpArgs | ( | OperationType::Type | o | ) |
|
inline |
Definition at line 521 of file minsky.h.
void minsky::Minsky::openLogFile | ( | const string & | name | ) |
opens the log file, and writes out a header line describing names of all variables
Definition at line 97 of file minsky.cc.
References minsky::CSVQuote().
|
inline |
reinitialises canvas to the toplevel group
Definition at line 523 of file minsky.h.
void minsky::Minsky::paste | ( | ) |
paste clipboard as a new group or ungrouped items on the canvas. canvas.itemFocus is set to refer to the new group or items.
Definition at line 220 of file minsky.cc.
References schema3::Minsky::populateGroup(), and minsky::valueId().
size_t minsky::Minsky::physicalMem | ( | ) | const |
returns amount of memory installed on system
Definition at line 1713 of file minsky.cc.
Referenced by minsky::MinskyTCL::checkMemAllocation().
|
inline |
void minsky::Minsky::populateMissingDimensions | ( | ) |
fills in dimensions table with all loaded ravel axes
Definition at line 497 of file minsky.cc.
void minsky::Minsky::populateMissingDimensionsFromVariable | ( | const VariableValue & | v, |
bool & | incompatibleMessageDisplayed | ||
) |
populate missing dimensions from a variableValue
incompatibleMessageDisplayed | boolean flag to make message display single shot |
Definition at line 516 of file minsky.cc.
References minsky::VariableValue::hypercube().
Referenced by minsky::VariableBase::importFromCSV().
|
inline |
Definition at line 211 of file minsky.h.
|
inlinevirtual |
set progress bar, out of 100, labelling the progress bar with title
Reimplemented in minsky::anonymous_namespace{addon.cc}::AddOnMinsky.
Definition at line 447 of file minsky.h.
Referenced by minsky::Progress::displayProgress().
|
inline |
bool minsky::Minsky::pushHistory | ( | ) |
push current model state onto history if it differs from previous
Definition at line 1265 of file minsky.cc.
References classdesc::xml_pack().
Referenced by minsky::PubTab::addNote(), minsky::Canvas::copyItem(), minsky::PhillipsDiagram::init(), minsky::member_entry_hook(), minsky::PubTab::mouseUp(), minsky::PhillipsDiagram::mouseUp(), minsky::VariableBase::onMouseMotion(), minsky::PubTab::removeItemAt(), and minsky::PubTab::removeSelf().
void minsky::Minsky::randomLayout | ( | ) |
randomly layout current open group and recentre reinitialises canvas to the group located in item
Definition at line 1631 of file minsky.cc.
|
inlinestatic |
|
inlinestatic |
|
inline |
Definition at line 339 of file minsky.h.
References minsky::to_string().
void minsky::Minsky::redrawAllGodleyTables | ( | ) |
request all Godley table windows to redraw
Definition at line 1703 of file minsky.cc.
Referenced by minsky::GodleyTableEditor::update().
|
private |
remove the definition network from wire, up to, but not including attached variables.
Definition at line 1648 of file minsky.cc.
References minsky::wire.
void minsky::Minsky::renameDimension | ( | const std::string & | oldName, |
const std::string & | newName | ||
) |
void minsky::Minsky::renderAllPlotsAsSVG | ( | const string & | prefix | ) | const |
render all plots
Definition at line 1548 of file minsky.cc.
References minsky::str().
|
inline |
|
inline |
|
inline |
|
inline |
Render canvas to a PNG file filename, scaling the canvas temporarily by zoom, shifts it to left, top, and crops to width, height (in ZoomCrop struct).
Definition at line 414 of file minsky.h.
|
inline |
|
inline |
void minsky::Minsky::requestRedraw | ( | ) |
requests a redraw of the curren active tab
Definition at line 487 of file minsky.cc.
void minsky::Minsky::requestReset | ( | ) |
Definition at line 467 of file minsky.cc.
References reset().
Referenced by minsky::Ravel::collapseAllHandles(), minsky::Canvas::deleteItem(), minsky::Canvas::deleteWire(), minsky::Sheet::draw(), minsky::RavelPopup::mouseOver(), minsky::PubTab::mouseUp(), minsky::Canvas::mouseUp(), minsky::Ravel::onKeyPress(), minsky::VariableBase::onKeyPress(), minsky::VariableBase::onMouseMotion(), minsky::Ravel::pickSliceLabels(), minsky::Group::renameAllInstances(), and minsky::Ravel::sortByValue().
void minsky::Minsky::reset | ( | ) |
resets the variables back to their initial values
Definition at line 866 of file minsky.cc.
References minsky::onStackExit(), and minsky::wire.
Referenced by minsky::Lock::toggleLocked().
|
inline |
true if reset needs to be called prior to numerical integration
Definition at line 171 of file minsky.h.
Referenced by minsky::Canvas::mouseMove().
|
inlineoverridevirtual |
checks whether a reset is required, and resets the simulation if so
Reimplemented from minsky::RungeKutta.
Definition at line 194 of file minsky.h.
References reset().
|
inlinevirtual |
reset main window scroll bars after model has been panned
Reimplemented in minsky::anonymous_namespace{addon.cc}::AddOnMinsky.
Definition at line 453 of file minsky.h.
Referenced by displayErrorItem(), minsky::VariableInstanceList::gotoInstance(), and minsky::Canvas::zoomToDisplay().
|
inlinevirtual |
run callback attached to item
Reimplemented in minsky::MinskyTCL.
Definition at line 459 of file minsky.h.
Referenced by minsky::Group::deleteItem().
void minsky::Minsky::save | ( | const std::string & | filename | ) |
Definition at line 1014 of file minsky.cc.
References minsky::Saver::os, minsky::Saver::packer, minsky::remove(), minsky::Saver::save(), and minsky::to_string().
|
inline |
Definition at line 267 of file minsky.h.
|
static |
Definition at line 214 of file minsky.cc.
References minsky::Saver::save().
|
inline |
Definition at line 281 of file minsky.h.
void minsky::Minsky::setAllDEmode | ( | bool | mode | ) |
void minsky::Minsky::setAutoSaveFile | ( | const std::string & | file | ) |
|
inlinevirtual |
set/clear busy cursor in GUI
Reimplemented in minsky::anonymous_namespace{addon.cc}::AddOnMinsky, and minsky::MinskyTCL.
void minsky::Minsky::setDefinition | ( | const std::string & | valueId, |
const std::string & | definition | ||
) |
add/replace a definition for a flow variable given by valueId
Definition at line 1668 of file minsky.cc.
References minsky::UserFunction::expression, minsky::flipped(), minsky::Item::moveTo(), minsky::Item::ports(), minsky::valueId(), minsky::var, and minsky::Item::width().
void minsky::Minsky::setGodleyDisplayValue | ( | bool | displayValues, |
GodleyTable::DisplayStyle | displayStyle | ||
) |
set display value mode on all godley table editor modes
Definition at line 1587 of file minsky.cc.
|
inline |
Definition at line 215 of file minsky.h.
References minsky::SVGRenderer::setResource(), and minsky::GodleyIcon::svgRenderer.
|
inline |
Definition at line 217 of file minsky.h.
References minsky::SVGRenderer::setResource(), and minsky::Group::svgRenderer.
|
inline |
Definition at line 219 of file minsky.h.
References minsky::Lock::lockedIcon, minsky::SVGRenderer::setResource(), and minsky::Lock::unlockedIcon.
|
inline |
Definition at line 223 of file minsky.h.
References minsky::SVGRenderer::setResource(), and minsky::Ravel::svgRenderer.
|
inline |
vector< double > minsky::Minsky::step | ( | ) |
step the equations (by n steps, default 1)
Definition at line 976 of file minsky.cc.
|
inline |
trigger checkMem callback for testing purposes
Definition at line 534 of file minsky.h.
long minsky::Minsky::undo | ( | int | changes = 1 | ) |
restore model to state changes ago
Definition at line 1401 of file minsky.cc.
References schema3::Minsky::phillipsDiagram, schema3::Minsky::populateGroup(), schema3::PhillipsDiagram::populatePhillipsDiagram(), schema3::Minsky::populatePublicationTabs(), and schema3::Minsky::zoomFactor.
Referenced by minsky::Canvas::copyItem(), and minsky::MinskyTCL::undo().
vector< string > minsky::Minsky::variableTypes | ( | ) |
Definition at line 256 of file minsky.h.
Referenced by minsky::MinskyTCL::addGodley(), minsky::MinskyTCL::addGroup(), minsky::MinskyTCL::addIntegral(), minsky::MinskyTCL::addLock(), minsky::MinskyTCL::addNote(), minsky::MinskyTCL::addOperation(), minsky::MinskyTCL::addPlot(), minsky::MinskyTCL::addRavel(), minsky::MinskyTCL::addSheet(), minsky::MinskyTCL::addSwitch(), minsky::MinskyTCL::addVariable(), minsky::MinskyTCL::convertVarType(), minsky::Canvas::copyItem(), minsky::MinskyTCL::createGroup(), minsky::VariablePaneCell::emplace(), minsky::MinskyTCL::findObject(), minsky::MinskyTCL::findVariable(), minsky::MinskyTCL::findVariableDefinition(), minsky::MinskyTCL::getItemAt(), minsky::MinskyTCL::getItemAtFocus(), minsky::MinskyTCL::getWireAt(), minsky::Group::gotoBookmark_b(), minsky::VariableInstanceList::gotoInstance(), minsky::MinskyTCL::groupOfItem(), minsky::MinskyTCL::itemFocusFromItem(), minsky::MinskyTCL::itemFromItemFocus(), minsky::MinskyTCL::listAllInstances(), minsky::MinskyTCL::loadVariableFromCSV(), minsky::VariableBase::local(), minsky::MinskyTCL::openGodley(), minsky::MinskyTCL::openGroupInCanvas(), minsky::MinskyTCL::openModelInCanvas(), schema3::Minsky::populateMinsky(), minsky::MinskyTCL::resetItem(), minsky::MinskyTCL::retypeItem(), minsky::MinskyTCL::selectVar(), MathDAG::SystemOfEquations::SystemOfEquations(), minsky::MinskyTCL::TCLItem(), and minsky::GodleyTableEditor::update().
Conversions minsky::Minsky::conversions |
Definition at line 202 of file minsky.h.
Referenced by schema3::Minsky::Minsky(), and schema3::Minsky::populateMinsky().
Dimensions minsky::Minsky::dimensions |
Definition at line 201 of file minsky.h.
Referenced by minsky::Ravel::dimension(), minsky::Ravel::dimensionType(), minsky::Ravel::dimensionUnitsFormat(), minsky::Ravel::hypercube(), schema3::Minsky::Minsky(), schema3::Minsky::populateMinsky(), minsky::VariableValues::resetValue(), and minsky::Ravel::setDimension().
GodleyTable::DisplayStyle minsky::Minsky::displayStyle =GodleyTable::sign |
bool minsky::Minsky::displayValues =false |
Definition at line 431 of file minsky.h.
Referenced by minsky::GodleyTableEditor::draw().
bool minsky::Minsky::doPushHistory =true |
PannableTab<EquationDisplay> minsky::Minsky::equationDisplay |
std::string minsky::Minsky::fileVersion |
Minsky version file was saved under.
Definition at line 351 of file minsky.h.
Referenced by schema3::Minsky::populateMinsky().
FontDisplay minsky::Minsky::fontSampler |
SVGRenderer minsky::Minsky::histogramResource |
Definition at line 225 of file minsky.h.
Referenced by minsky::Operation< minsky::OperationType::integrate >::iconDraw().
std::set<string> minsky::Minsky::logVarList |
unsigned minsky::Minsky::maxHistory {100} |
std::map<Units, double> minsky::Minsky::maxValue |
int minsky::Minsky::maxWaitMS =100 |
maximum wait in millisecond between redrawing canvas during simulation
Definition at line 354 of file minsky.h.
Referenced by minsky::Canvas::reportDrawTime().
|
static |
return the AEGIS assigned version number
Definition at line 337 of file minsky.h.
Referenced by schema3::Minsky::Minsky(), and minsky::MinskyTCL::startRecording().
Definition at line 255 of file minsky.h.
Referenced by minsky::IntOp::description(), minsky::MinskyTCL::findObject(), minsky::MinskyTCL::findVariable(), minsky::Group::gotoBookmark_b(), minsky::PhillipsDiagram::init(), minsky::anonymous_namespace{group.cc}::isGlobal(), minsky::Ravel::joinLockGroup(), minsky::Ravel::lockGroupColours(), schema3::Minsky::Minsky(), minsky::MinskyTCL::openModelInCanvas(), schema3::Minsky::populateMinsky(), minsky::Ravel::Ravel(), minsky::Group::renameAllInstances(), minsky::VariableValue::summary(), MathDAG::SystemOfEquations::SystemOfEquations(), minsky::IntOp::toggleCoupled(), minsky::VariableBase::units(), and minsky::GodleyTableEditor::update().
std::map<std::string,std::weak_ptr<Item> > minsky::Minsky::namedItems |
int minsky::Minsky::numBackups =1 |
PhillipsDiagram minsky::Minsky::phillipsDiagram |
Definition at line 155 of file minsky.h.
Referenced by schema3::Minsky::Minsky(), and schema3::Minsky::populateMinsky().
std::vector<PubTab> minsky::Minsky::publicationTabs |
Definition at line 156 of file minsky.h.
Referenced by schema3::Minsky::Minsky(), schema3::Minsky::populateMinsky(), and minsky::PubTab::removeSelf().
Exclude<std::map<std::string, std::shared_ptr<CallableFunction> > > minsky::Minsky::userFunctions |
Definition at line 253 of file minsky.h.
Referenced by minsky::UserFunction::compile(), and minsky::UserFunction::units().
std::shared_ptr<VariableInstanceList> minsky::Minsky::variableInstanceList |
VariablePane minsky::Minsky::variablePane |
VariableValues minsky::Minsky::variableValues |
Definition at line 200 of file minsky.h.
Referenced by MathDAG::ConstantDAG::addEvalOps(), MathDAG::VariableDAG::addEvalOps(), minsky::UserFunction::compile(), minsky::IntOp::description(), minsky::GodleyTableEditor::draw(), minsky::VariableBase::ensureValueExists(), minsky::VariableBase::exportAsCSV(), minsky::VariableBase::init(), minsky::VariableValue::init(), MathDAG::latexInit(), MathDAG::matlabInit(), minsky::VariableBase::setUnits(), minsky::GodleyIcon::stockVarUnits(), MathDAG::SystemOfEquations::SystemOfEquations(), MathDAG::VariableDAG::tensorEval(), minsky::UserFunction::units(), minsky::VariableBase::units(), minsky::GodleyIcon::update(), minsky::VariableBase::value(), and minsky::VariableBase::vValue().