I am trying to develop a model in netlogo, in which user can enter the equation for change in some variables. My question is what could be the best way to get equation input and how should i parse it and calculate results. looking for something like "mathml" which could work in netlogo.
相关问题
- Making turtles wait x number of ticks
- Pass a function as a parameter in Netlogo
- Robot obstacle avoidance and skipping visited patc
- Linq to Xml and custom xml entities
- How to match a value of a list of numbers to item
相关文章
- NetLogo: How to filter a list using a criterion wh
- How to render MathML using C#
- Inserting MathMl , Tex or LaTex equation in MS wor
- MathML, Latex or similar for web-based WYSIWYG edi
- Greasemonkey script for inserting math in gmail
- how to do replacing-item in use nested list
- Java error when trying to run NetLogo headlessly o
- NetLogo: Is there a way to customize CSV files gen
A simple solution that doesn't involve MathML or anything of the sort would be to have your users directly enter NetLogo expressions and run those using
runresult
, which can take a string of NetLogo code and execute it.Here is a simple example that uses an input box widget (with the type "String (reporter)") to allow the user to enter an arbitrary mathematical expression. The button prints the result of running the expression in the output box:
In a real world application, of course, you would have to be very careful about error handling.