Activity: The KSL Server

KSL Applications Activities

Author

Manuel D. Rossetti, PhD P.E.

Work in pairs, with at least one AI assistant connected to the KSL Server between you (Step 6 of the install guide). Each question asks you to predict before you ask; write the prediction down, then check it.

The point of this activity. An AI assistant connected to the KSL Server does not answer from memory. It calls tools: it searches the textbook, searches the KSL source code, and runs the same models the apps run. That makes its answers checkable. Your job today is to check them, using what you already know from the Single-Model and Scenario app activities.

Setup. Both partners start KSL Server and open its console (click the status light, then Open Console). On the laptop with the assistant, keep the console visible beside the assistant’s window. Have your notes and your Staffing.toml file from the Scenario app activity at hand. When the assistant asks permission to use a KSL tool, allow it.

1. Look under the hood

  1. In the console’s Capabilities region, which three surfaces does the server offer, and what is each one for?

  2. Find the Activity & usage region. Predict what will appear there when the assistant answers a question about the textbook. Keep watching it through the rest of the activity.

2. Grounded answers

For each question, type the prompt into the assistant, then check its answer against the source it cites.

  1. Ask:

    Using the KSL textbook, what is the method of replication-deletion, and how do I choose the warm-up period? Cite the sections you used.

    Which tools appeared in the activity feed? Open one of the cited links. Does the section say what the assistant says it does?

  2. Ask:

    In the KSL source code, how does a property of a model element become a control that the KSL apps can change? Show me where that is defined.

    Compare the answer with what you found in the Single-Model app activity about Pharmacy.numPharmacists. Did the assistant point you to real source code? How can you tell?

  3. Before you ask this one, predict what a trustworthy assistant should answer:

    What does the KSL’s runFaster() function do, and how do I call it?

    What did your assistant answer? What would you have to check to know whether to believe it?

3. The staffing study, by conversation

  1. Ask:

    Using the DriveThroughPharmacyWithQ model in the KSL Book Examples, set the mean service time to 0.8 minutes and compare 1, 2, and 3 pharmacists on System Time, 30 replications each, run together so they share common random numbers. Give me the averages, a multiple comparison with the best, and a link to the report.

    Predict first: will the numbers match your Staffing run in the Scenario app exactly, closely, or only roughly? Then compare.

  2. Audit the assistant. Ask it to show you the configuration it ran. Check three things: Is the 0.8 a random-variable parameter of the service time, and not a control or the arrival rate? Is it 30 replications? Were all three scenarios run in one batch? If any number differs from your Scenario app run, find the reason.

  3. Now hand it your own work. Open Staffing.toml in a text editor, copy all of it, paste it into the assistant, and ask it to run that configuration exactly as written. Predict the result before it answers. What does this tell you about the relation between the desktop apps and the server?

  4. Ask:

    A pharmacist costs $50 per hour, and each car in the system costs $0.50 per minute in lost goodwill. Which staffing level costs the least? Show your calculation.

    Compare its arithmetic with your calculation from the Scenario app activity. Which response did it use for the number of cars in the system? If it used System Time instead of Num in System, does that matter here? Why?

4. Know the limits

  1. Look at the console’s Usage study region. What does the server record about your session, where is the record kept, and is it sent anywhere? The KSL Server runs on your laptop; does that mean your conversation stays on your laptop?

  2. Of today’s answers, which would you trust without checking, and which not? Name one habit that makes an AI assistant’s simulation results safe to use in your own work.