(defun plot-data (results) (let ((chartrandom (random 100000000)) (chartindex 0)) (print chartrandom) (while (> (length results) 0) ;(print "step5") ;(print (length results)) (print (length results)) (let ((frontier (pop results)) (pb (pop results)) (hy (pop results)) ;(ag2 (pop results)) ;(ag (pop results)) ;(initial (pop results)) aglst ag2lst pblst hylst oilst oflst) ;(print "step10") ;Chart data for AG ;(let ((totalvalue 0) ; (totalcost 0)) ; (dotimes (x (length (result-endCosts ag))) ; (incf totalvalue (pop (result-endValues ag))) ; (incf totalcost (pop (result-endCosts ag))) ; (push (cons totalcost totalvalue) aglst)) ; (setf aglst (append (list (result-run ag)) aglst))) ;Do processing here ;(let ((totalvalue 0) ; (totalcost 0)) ; (dotimes (x (length (result-endCosts ag2))) ; (incf totalvalue (pop (result-endValues ag2))) ; (incf totalcost (pop (result-endCosts ag2))) ; (push (cons totalcost totalvalue) ag2lst)) ; (setf ag2lst (append (list (result-run ag2)) ag2lst))) ;Do processing here (let ((totalvalue 0) (totalcost 0)) (dotimes (x (length (result-endCosts hy))) (incf totalvalue (pop (result-endValues hy))) (incf totalcost (pop (result-endCosts hy))) (push (cons totalcost totalvalue) hylst)) (setf hylst (append (list (result-run hy)) hylst))) ;Do processing here (let ((totalvalue 0) (totalcost 0)) (dotimes (x (length (result-endCosts pb))) (incf totalvalue (pop (result-endValues pb))) (incf totalcost (pop (result-endCosts pb))) (push (cons totalcost totalvalue) pblst)) (setf pblst (append (list (result-run pb)) pblst))) ;Do processing here ;(let ((totalvalue 0) ; (totalcost 0)) ; (dotimes (x (length (result-endCosts initial))) ; (incf totalvalue (pop (result-endValues initial))) ; (incf totalcost (pop (result-endCosts initial))) ; (push (cons totalcost totalvalue) oilst)) ; (setf oilst (append (list (result-run initial)) oilst))) ;Do processing here (let ((totalvalue 0) (totalcost 0)) (dotimes (x (length (result-endCosts frontier))) (incf totalvalue (pop (result-endValues frontier))) (incf totalcost (pop (result-endCosts frontier))) (push (cons totalcost totalvalue) oflst)) (setf oflst (append (list (result-run frontier)) oflst))) (createDataFile "data/AI.dat" (list pblst hylst oflst)) (print (sh "/bin/bash" "-c" (format nil "pwd;./plot-data.sh ~A-~A ~A ~A ~A" chartrandom (incf chartindex) (car pblst) (car hylst) (car oflst)))))) (values chartrandom chartindex))) ;(createDataFile "data/AI.dat" (list pblst oilst oflst)) ;(print (sh "/bin/bash" "-c" (format nil "pwd;./plot-data.sh ~A-~A" chartrandom (incf chartindex))))))))