Develop pull request from meng

For apsim