window title="Papa Schnutio\'s Gelatteria" onClose=.onClosePBSddeExamples

#-----------------------------------------------------
grid 1 5 sticky=W
	label text=View: font=bold
	button text=Docs func=openFile action=demo_files/icecream_doc.pdf
	button text="R Code" func=openFile action=demo/icecream.r
	button text=Window func=openFile action=demo_files/icecream_win.txt
	button text=History func=openFile action=demo_files/icecream_hist.txt

#-----------------------------------------------------
label text="Simulation" font=bold fg=violetred1 sticky=SW
grid 3 1
	grid 1 2
		grid 2 1 sticky=NE
			label text="Time series" font="bold 10" sticky=""
			vector length=4 names="from to by see" labels="from to by see" \
				values="0 100 0.1 5" vert=T sticky=E width=5
		grid 2 1 sticky=NE
			label text="Ice cream" font="bold 10" sticky="E"
			vector length=4 names="y0 r Y f" width=6 vert=T sticky=E \
				label="'initial stock' 'consumption rate' 'delivered stock' 'theft fraction'" \
				value="10 0.7 5 0.2" vecnames="ice r Y f"
	label text="Schedule (days)" font="bold 10" sticky=W
	data nrow=2 ncol=4 modes="numeric numeric numeric logical" byrow=T \
		rowlabels="delivery theft" collabels="period offset actual random" \
		names="tgive ogive agive rgive ttake otake atake rtake" \
		values="25 5 0 FALSE 50 5 0 FALSE"

button func=icePlot text="Plot" width=15 bg="#89cf3d"
#-----------------------------------------------------
label text="History" font=bold fg=blue3 sticky=SW pady=5
history import="demo_files/icecream_hist.txt" func=icePlot

