Zookal
Zookal

We’d love to hear any feedback or comment from you!

© 2011-2021 Zookal Pty Ltd

View question and answer

From our collection of questions and answers
Other · Other
Question details

Figure 1 gives a stream CSP model for the document circulation example for circulating a document among 4 persons. Only one person may hold and read the document at any time point. We use the state variable read_i to denote whether person i has read the document yet. The variable giveTo represents the action that pass the document to the next person. The action has no preconditions and the effect is that read_i becomes 1 in the next time point after person i receives the document in the current time point. State variable succ becomes 1 only when the document has been read by all persons; otherwise succ is 0 // stream variables declarations var succ: [0, 1]; // whether the document has been circulated var giveTo: [0, 3]; // the person whom the document is given to var read.0: [0, 1]; // whether person 0 has read the document var read.1: [0, 1]; // whether person 1 has read the document var read2: [0, 1]; // whether person 2 has read the document var read.3: [0, 1]; // whether person 3 has read the document // initial conditions first read.00 first read 10 first read 20 first read 30 // person i has read the document if she has read it at some // previous time point or the document is given to her next read 0 read 0 or (giveTo eq 0); next read 1 - read.1 or (giveTo eq 1); next read 2 - read 2 or (giveTo eq 2); next read 3-read 3 or (giveTo eq 3); // succ becomes 1 if every people has read the document succ -- (read 0 and read 1 and read 2 and read 3); Figure 1: Model for Document Circulation Example Please add constraint(s) to this model to enforce the following precedence relationship that person 2 can read the document only after both person 1 and person 3 have read the document.

Answer
Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.

Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.