~o=39 ~?i&32768 ~o=24 ~$>end_of_copyright ~/!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ~/Copyright (C) Heinz Spiess, CH-2558 Aegerten, 1994. All rights reserved. ~/ ~/The right to use this macro is granted to all EMME/2 users, provided the ~/following conditions are met: ~/ 1) The macro cannot be sold for a fee (but it can be used and distributed ~/ without charge within consulting projects). ~/ 2) The user is aware that this macro is not a part of the EMME/2 software ~/ licence and there is no explicit or implied warranty or support ~/ provided with this macro. ~/ 3) The comments in this macros must not be removed and any additions or ~/ modification must be appropriately identified as such and give at least ~/ date, name and the reason of the modification. ~/!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ~:end_of_copyright ~/********** splitmat - 1.3 (H.Spiess EMME/2 Support Center) **************** ~/splitmat - a macro to split a demand matrix into two intermediate matrices ~/ according to a zone index matrix containing the intermediate ~/ zones. ~/ ~/Intermediate zone index matrices are often the result of convolutions ~/computed with module 3.23. This macro takes such a zone index matrix Kpq ~/and a demand matrix Gpq and produces the two intermediate demand matrices: ~/the first leg matrix Gpk contains the trips from the origins to the ~/intermediate zone, and the second leg matrix contains the trips from the ~/intermediate zone to the final destinations. ~/ ~/usage: ~ ~/ ~/where: demand matrix to be split (input) ~/ index matrix containing intermediate zone numbers (input) ~/ first leg intermediate matrix (output) ~/ second leg intermediate matrix (output) ~/ ~/notes: - macro is called from main menu ~/ - mo99 is used as temporary matrix ~/*************************************************************************** ~x=%0% ~?x<4 ~$>end_of_macro ~/ .... creating temporary origin matrix containing zone numbers 3.21 / create temporary origin matrix to contain zone numbers ~+|1|y|mo99|y|p|zone numbers used by macro splitmat|~?q=1|y|0|p|||n|2|q 3.23 / compute convolutions for first and second leg matrix ~/ .... computing first leg matrix Gpk (%3%) ~+|1|%2%|==|mo99|y|*|n|%1%|2|||%3%|y|Gpk|1st leg splitmat(%1%,%2%)|~?q=1|n|~?q=0|0|n||y|2 ~/ .... computing second leg matrix Gkq (%4%) ~+|1|mo99|==|%2%|n|*|n|%1%|3|||%4%|y|Gkq|2nd leg splitmat(%1%,%2%)|~?q=1|n|~?q=0|0|n||y|2|q ~/*************************************************************************** ~/Macro splitmat terminated normally. First and second leg intermediate ~/matrices are stored in %3% and %4%. ~/*************************************************************************** ~:end_of_macro ~o=6