πŸ“– Simulator Help

Everything you need to install, use and master CupCarbon Klaines

Getting started Interface IoT nodes Python functions Simulations Consoles & remote Agentic AI Troubleshooting

πŸš€ Getting started

  1. Install Java 17 or newer (adoptium.net) and, for IoT node scripts, Python 3 on the PATH.
  2. Download the CupCarbon package of your platform (Installation Guide), unzip, and double-click its launcher (cupcarbon_win.bat, cupcarbon_macm.command/cupcarbon_macx.command or cupcarbon_linux.sh) β€” it starts CupCarbon from its own folder so the utils/ resources are found.
  3. Create a project: File β†’ New project. A project is a folder containing your nodes, scripts, GPS routes, agentic workflows and results.
  4. Set the executor paths once (Python/Julia/Node) via the executor configuration button if scripts don't start.

πŸ—ΊοΈ Interface & map

The map (OpenStreetMap tiles or offline backgrounds via the Map menu) is where you build your network. Useful interactions:

ActionHow
Add objectspress a number key (e.g. 2 for sensors) then click the map β€” or use console commands like add iot 25.3020 55.4855
Selectclick an object, or drag a rectangle; i inverts the selection
Change an IoT node's iconselect it and press j β€” an icon gallery opens
Radio / sensor radius; / , and ( ) on the selection
Duplicatec on the selection
Map backgroundMap menu: OSM Light/Dark, offline backgrounds (work without internet)

πŸ“‘ IoT nodes

IoT nodes run external Python scripts (or Julia/Node). Assign a script to a node from the node panel or the Program editor (toolbar), write your logic with the cup_* functions, then run the IoT simulation. The Program editor has Python syntax highlighting, auto-indentation (Tab = 4 spaces, tabs highlighted in red, one-click Tabs→Spaces fix), the full function list with per-function help and examples, and ready-made example buttons.

🐍 Python cup_* functions

Start your script with from cup_functions import * (for IDE completion β€” CupCarbon injects the real implementations at simulation start).

CategoryFunctions
Displaycup_print, cup_mark, cup_unmark, cup_pic, cup_visible, cup_alert, cup_message
Mobilitycup_move/cup_moveto, cup_speed, cup_rudder_angle, cup_routewait, cup_routestop, cup_routego, cup_route
Readingcup_getid, cup_getname, cup_getx, cup_gety, cup_getxy, cup_ismarked, cup_dsensor, cup_getmessage, cup_getaction
Messagingcup_send, cup_read (node ↔ node)
Agentic AIcup_toagent(txt, cupid), cup_fromagent(cupid) (node ↔ workflows)
Controlcup_wait, cup_stopsimulation
from cup_functions import *

while True:
    cup_mark()
    cup_toagent('hello from node', 32)
    answer = cup_fromagent(32)
    cup_print(answer)
    cup_unmark()
    cup_wait(1)

▢️ Simulations

πŸ’» Consoles & remote control

πŸ€– Agentic AI in one minute

  1. Open the workflow editor (πŸ€– toolbar button, project required) β†’ New.
  2. ☰ Nodes β†’ add Chat Trigger, AI Agent, Chat Response; connect them.
  3. Click API Keys and paste your Anthropic or OpenAI key (stored locally).
  4. Run β†’ chat with your network in the panel bottom-right.

Full details, node list and the CupCarbon bridge on the Agentic AI page.

πŸ› οΈ Troubleshooting

SymptomFix
Map tiles don't load / project slow to open No internet or blocked tile server: switch to an offline background (Map menu). Tile requests now time out after a few seconds.
Python TabError Mixed tabs/spaces: tabs are highlighted in red in the editor β€” click Tabs β†’ Spaces.
AI Agent answers "no rule matched" The LLM wasn't reached: check the provider on the node, the API key (API Keys dialog; env vars take priority) and the console for the exact error.
IoT scripts don't start Check the executor paths (Python must be on the PATH) and that a script is assigned to each IoT node.
Web pages can't reach CupCarbon Open the Command console first (it activates MQTT), re-copy the topic (it changes at every launch), and try the ws://…:8083 broker endpoint if wss://…:8084 is blocked.