Repository navigation
Docs: add examples for individual_class, server_class and exit_node_class - #294
Open
berkaydiin wants to merge 1 commit into
Open
berkaydiin wants to merge 1 commit into
berkaydiin wants to merge 1 commit into
Conversation
Addresses CiwPython#286. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0148gNqkerECUCfQ6MnLpMnF
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses #286.
The "How to Get More Custom Behaviour" page lists five classes that can be passed into
Simulation, but the example library only had examples fornode_classandarrival_node_class. This adds one page for each of the other three:individual_class): each shopper gets a basket size when they are created, and a custom distribution readsind.itemsto set their service time.server_class): aServersubclass with aspeedattribute. The service distribution divides byind.server.speed, and the records show the faster server getting through about twice as many customers as the others.exit_node_class): anExitNodesubclass that overridesacceptto count orders that spent longer than a target time in a two-node system. The page mentions thatexit_datehas already been reset by the time an individual reaches the exit node, so the time in the system is read from the data records instead.On the index page I also fixed three typos ("beahviour", "overwitten", "arugments") and added
ciw.ExitNodeto the list of parent classes, where it was missing.The new pages are doctested and pass. Running
doctests.pylocally, the only failures wereresults.rstandpause_restart.rst, which need pandas (not installed in my environment) and fail the same way on master. Happy to rename or move the pages if you'd prefer them somewhere else.🤖 Generated with Claude Code
https://claude.ai/code/session_0148gNqkerECUCfQ6MnLpMnF