PSOPT在ubuntu系统下的安装与测试

http://www.psopt.org/ 与 https://github.com/PSOPT/psopt  网址安装psopt

在ubuntu下安装容易些, 使用其自带的install-ubuntu-16.04.sh即可,注意问题:

命令cd $HOME/Downloads会存在问题

$HOME表示/home的路径,但是有的系统可能无法识别这个命名,可以直接指定,比如换为/home/admin

Downloads这个路径也会存在问题,中文的ubuntu系统,会无法识别这个路径,可以将Downloads改为Download,

在/home/admin/Download,这样尽量避免系统无法识别命令的情况


安装成功的标志是,使用install-ubuntu.sh安装结束后,会出现几个图;并且PSOPT/examples/launch在这个路径中,有.exe文件,安装成功,例程example中会有exe文件;

安装结束后,如过出现/usr/bin/ld: 找不到 -lapack;  /usr/bin/ld: 找不到 -lopenblas,需要检查,sudo apt-get -y install g++ gfortran f2c libf2c2-dev libf2c2 libblas-dev libopenblas-base libopenblas-dev libblas3 libatlas-base-dev liblapack-dev liblapack3  这些库是否安装

    通过命令dpkg -l |grep blas可以查看,|grep 字符串,会显示所有包含该字符串的安装库,如出现以下结果

ii  libblas-common                         3.6.0-2ubuntu2                                amd64        Dependency package for all BLAS implementations
ii  libblas-dev                            3.6.0-2ubuntu2                                amd64        Basic Linear Algebra Subroutines 3, static library
ii  libblas3                               3.6.0-2ubuntu2                                amd64        Basic Linear Algebra Reference implementations, shared library
ii  libopenblas-base                       0.2.18-1ubuntu1                               amd64        Optimized BLAS (linear algebra) library (shared library)
ii  libopenblas-dev                        0.2.18-1ubuntu1                               amd64        Optimized BLAS (linear algebra) library (development files)

如果找不到库,说明没有安装好库;需要sudo apt-get update更新;

安装成功后,跑以下命令;可以出现以下类似结果,并有图;

zengyuhang@zengyuhang-X556UQK:~$ cd /home/zengyuhang/psopt-master/PSOPT/examples/launch
zengyuhang@zengyuhang-X556UQK:~/psopt-master/PSOPT/examples/launch$ ./launch

 *******************************************************************************
 * This is PSOPT, an optimal control solver based on pseudospectral and local  *
 * collocation methods, together with large scale nonlinear programming        *
 * Copyright (C) 2010  Victor M. Becerra.                                      *
 *                                                                             *
 * This library is free software; you can redistribute it and/or               *
 * modify it under the terms of the GNU Lesser General Public License          *
 * as published by the Free Software Foundation;  version 2.1.                 *
 * This library is distributed in the hope that it will be useful,             *
 * but WITHOUT ANY WARRANTY; without even the implied warranty of              *
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU           *
 * Lesser General Public License for more details.                             *
 * You should have received a copy of the GNU Lesser General Public            *
 * License along with this library;                                            *
 * If not please visit http://www.gnu.org/licenses                             *
 *                                                                             *
 * The author can be contacted at his email address:    v.m.becerra@ieee.org   *
 *                                                                             *
 *******************************************************************************


Problem:                        Multiphase vehicle launch
This is mesh refinement iteration:            1
Collocation method:                    Legendre
Differentiation matrix:                    standard
Number of NLP variables                    208
Number of NLP nonlinear constraints:            200
Number of nodes phase 1:                5
Number of nodes phase 2:                5
Number of nodes phase 3:                5
Number of nodes phase 4:                5



  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 5
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值