• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Solving a theme Park problem using FSP

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi i have this project to do on a log flume ride - i have developed the FSP required for parts 1 and 2 but for the 3rd part i need to implement a ticket machine and i have no idea how to do this - the FSP i have come with is as follows i would appreciate any help on this - also i need to put the FSP below into a java monitor so any help with that also would be cool
const M=4
set Bold={bold[1..2]}
set Meek={meek[1..2]}
set RIDERS={Bold,Meek}
PASSENGER=(enterLog->exitLog->PASSENGER).
CONTROL=ENTER[0],
ENTER[i:0..M]= (when (i<2) enterLog->ENTER[i+1]
| when (i==2) ride->EXIT[2]),
EXIT[j:0..M]=(when (j>0) exitLog->EXIT[j-1]
|when(j==0) clean->ENTER[0]).

LOG=(ride->clean->LOG).
||RIDE=(LOG||RIDERS ASSENGER||RIDERS::CONTROL)
/{ride/{bold, meek}[1..2].ride,clean/{bold,meek}[1..2].clean}.
progress Bold={bold[1..2].enterLog}
progress Meek={meek[1..2].enterLog}
||UNFAIR = (RIDE) >> {meek[1..2].enterLog}.
This is the unfair model as the bold passengers have greater priority so i need to implement the ticket machine
 
Ranch Hand
Posts: 3404
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This link may help.
Ticket Machine
I'm not sure what is meant by FSP. Ok Finite State Processes. In which case the link won't help with threads.
[ December 14, 2003: Message edited by: HS Thomas ]
 
We begin by testing your absorbancy by exposing you to this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic