代写 Scheme Université d’Ottawa Faculté de génie

Université d’Ottawa Faculté de génie
École de science d’informatique
et de génie électrique
University of Ottawa Faculty of Engineering
School of Electrical Engineering and Computer Science
Problem Description
See the separate problem description first.
Assignment 0
CSI2120 Programming Paradigms Winter 2019
Part 4 due on April 7th before 11:00 pm in Virtual Campus
[3 marks]
Part 4: Initial Solution in Scheme [3 marks]
The final step in the comprehensive assignment is to calculate an initial solution to the transport problem with the minimum cell cost method implemented in Scheme. Your function must write the initial solution in the previously specified format to file.
(minimumCell “3by3_inputdata.txt” “3by3_initial_scheme.txt”)
You are given the top level define readTableau which reads a specification file into a Scheme list of lists.
(readTableau “3by3_inputdata.txt”)  ‘((“COSTS” “A” “B” “C” “SUPPLY”)
(“Source1” 6 8 10 150)
(“Source2” 7 11 11 175)
(“Source3” 4 5 12 275)
(“DEMAND” 200 100 300))
Note: The Scheme interpreter will not break up the list over several lines, this is just for easier reading.
You are also given the top level define writeTableau which writes a Scheme list of lists to file.
(define tb (readTableau “3by3_inputdata.txt”))
(writeTableau tb “test.txt”)
#t
Please see next page.

CSI 2120 page 2 _________________________________________________________________________________________________
Hints: The global define current_directory lets you both read and set your working directory.
(current-directory)
 # (define fp (build-path “C:” “teaching” “CSI2120” “assignW19”
“assign0”))
(current-directory fp)
(current-directory)
 # You must submit your Scheme source code well commented, in which all global defines and the key steps in functions are clearly described.