/** * Read configuration file */ private function getOptions($path) { \Classes\Controller\Util\Utils::ensure(file_exists($path), "Configuration file isn't found'"); $options = parse_ini_file($path, true); \Classes\Controller\Util\Utils::ensure(is_array($options), "Configuration file is damaged"); $coordinateTolerance = $options['coordinate_tolerance']; \Classes\Controller\Util\Utils::ensure($coordinateTolerance, "There is no [coordinate_tolerance] option in configuration file"); \Classes\Factory\Model\Model::$coordinateTolerance = $coordinateTolerance; $epsilon = $options['epsilon']; \Classes\Controller\Util\Utils::ensure($epsilon, "There is no [epsilon] option in configuration file"); \Classes\Utils\Math\Constant::$epsilon = $epsilon; $timeLimit = $options['time_limit']; \Classes\Controller\Util\Utils::ensure($timeLimit, "There is no [time_limit] option in configuration file"); set_time_limit($timeLimit); }
<?php spl_autoload_extensions(".php"); spl_autoload_register(); /** PHPExcel_IOFactory */ include 'Classes/PHPExcel/IOFactory.php'; set_time_limit(36000); \Classes\Factory\Model\Model::$coordinateTolerance = 0.01; \Classes\Utils\Math\Constant::$epsilon = 0.01; try { // UPLOAD STEEL MEMBERS Classes\Utils\Timer\Timer::start('STEEL_MEMBER_UPLOAD'); $uploadFactory = new \Classes\Factory\Import\Instance\InstanceUploaderFromExcel(); $steelMemberArray = $uploadFactory->upload('./Source/Excel/Small_Model/Members.xlsx', new \Classes\Instance\Member\SteelMember()); foreach ($steelMemberArray as &$object) { Classes\Factory\Model\Addition\SteelMemberAddition::add($object); } Classes\Utils\Timer\Timer::stop('STEEL_MEMBER_UPLOAD'); // DELETE DOUBLE NODES \Classes\Utils\Timer\Timer::start('COMBINE_DOUBLE_NODES'); \Classes\Utils\Node\DoubleNodes::combineAll(array(Classes\Factory\Model\Model::getHashTable())); \Classes\Utils\Timer\Timer::stop('COMBINE_DOUBLE_NODES'); // DIVIDE MEMBERS BY NODES \Classes\Utils\Timer\Timer::start('DIVIDE_ALL_MEMBERS'); \Classes\Utils\Member\DivideMember::divideAllMembersByExistingNodes(); \Classes\Utils\Timer\Timer::stop('DIVIDE_ALL_MEMBERS'); // UPLOAD LOAD CASES Classes\Utils\Timer\Timer::start('LOAD_CASES_UPLOAD'); $loadCaseArray = $uploadFactory->upload('./Source/Excel/Small_Model/Load Cases.xlsx', new \Classes\Instance\LoadCase\LoadCase()); foreach ($loadCaseArray as $object) { Classes\Factory\Model\Addition\LoadCaseAddition::add($object);