Esempio n. 1
0
std::vector<M> acadoIn(const std::string arg_s0="",M arg_m0=M(),const std::string arg_s1="",M arg_m1=M(),const std::string arg_s2="",M arg_m2=M(),const std::string arg_s3="",M arg_m3=M(),const std::string arg_s4="",M arg_m4=M(),const std::string arg_s5="",M arg_m5=M(),const std::string arg_s6="",M arg_m6=M(),const std::string arg_s7="",M arg_m7=M(),const std::string arg_s8="",M arg_m8=M(),const std::string arg_s9="",M arg_m9=M(),const std::string arg_s10="",M arg_m10=M(),const std::string arg_s11="",M arg_m11=M(),const std::string arg_s12="",M arg_m12=M(),const std::string arg_s13="",M arg_m13=M(),const std::string arg_s14="",M arg_m14=M(),const std::string arg_s15="",M arg_m15=M(),const std::string arg_s16="",M arg_m16=M()){
  std::vector<M> ret(17);
  std::map<std::string,M> arg;
  if (arg_s0!="") arg.insert(make_pair(arg_s0,arg_m0));
  if (arg_s1!="") arg.insert(make_pair(arg_s1,arg_m1));
  if (arg_s2!="") arg.insert(make_pair(arg_s2,arg_m2));
  if (arg_s3!="") arg.insert(make_pair(arg_s3,arg_m3));
  if (arg_s4!="") arg.insert(make_pair(arg_s4,arg_m4));
  if (arg_s5!="") arg.insert(make_pair(arg_s5,arg_m5));
  if (arg_s6!="") arg.insert(make_pair(arg_s6,arg_m6));
  if (arg_s7!="") arg.insert(make_pair(arg_s7,arg_m7));
  if (arg_s8!="") arg.insert(make_pair(arg_s8,arg_m8));
  if (arg_s9!="") arg.insert(make_pair(arg_s9,arg_m9));
  if (arg_s10!="") arg.insert(make_pair(arg_s10,arg_m10));
  if (arg_s11!="") arg.insert(make_pair(arg_s11,arg_m11));
  if (arg_s12!="") arg.insert(make_pair(arg_s12,arg_m12));
  if (arg_s13!="") arg.insert(make_pair(arg_s13,arg_m13));
  if (arg_s14!="") arg.insert(make_pair(arg_s14,arg_m14));
  if (arg_s15!="") arg.insert(make_pair(arg_s15,arg_m15));
  if (arg_s16!="") arg.insert(make_pair(arg_s16,arg_m16));
  typedef typename std::map<std::string,M>::const_iterator it_type;
  for(it_type it = arg.begin(); it != arg.end(); it++) {
    int n = getSchemeEntryEnum(SCHEME_ACADO_Input,it->first);
    if (n==-1)
      casadi_error("Keyword error in ACADO_Input: '" << it->first << "' is not recognized. Available keywords are: x_guess, u_guess, p_guess, lbx, ubx, lbx0, ubx0, lbxf, ubxf, lbu, ubu, lbp, ubp, lbc, ubc, lbr, ubr");
    ret[n] = it->second;
  }
  return ret;
}
Esempio n. 2
0
std::vector<M> mayerIn(const std::string arg_s0="",M arg_m0=M(),const std::string arg_s1="",M arg_m1=M()){
  std::vector<M> ret(2);
  std::map<std::string,M> arg;
  if (arg_s0!="") arg.insert(make_pair(arg_s0,arg_m0));
  if (arg_s1!="") arg.insert(make_pair(arg_s1,arg_m1));
  typedef typename std::map<std::string,M>::const_iterator it_type;
  for(it_type it = arg.begin(); it != arg.end(); it++) {
    int n = getSchemeEntryEnum(SCHEME_MayerInput,it->first);
    if (n==-1)
      casadi_error("Keyword error in MayerInput: '" << it->first << "' is not recognized. Available keywords are: x, p");
    ret[n] = it->second;
  }
  return ret;
}
Esempio n. 3
0
std::vector<M> acadoOut(const std::string arg_s0="",M arg_m0=M(),const std::string arg_s1="",M arg_m1=M(),const std::string arg_s2="",M arg_m2=M(),const std::string arg_s3="",M arg_m3=M()){
  std::vector<M> ret(4);
  std::map<std::string,M> arg;
  if (arg_s0!="") arg.insert(make_pair(arg_s0,arg_m0));
  if (arg_s1!="") arg.insert(make_pair(arg_s1,arg_m1));
  if (arg_s2!="") arg.insert(make_pair(arg_s2,arg_m2));
  if (arg_s3!="") arg.insert(make_pair(arg_s3,arg_m3));
  typedef typename std::map<std::string,M>::const_iterator it_type;
  for(it_type it = arg.begin(); it != arg.end(); it++) {
    int n = getSchemeEntryEnum(SCHEME_ACADO_Output,it->first);
    if (n==-1)
      casadi_error("Keyword error in ACADO_Output: '" << it->first << "' is not recognized. Available keywords are: x_opt, u_opt, p_opt, cost");
    ret[n] = it->second;
  }
  return ret;
}
Esempio n. 4
0
std::vector<M> nlpsolverIn(const std::string arg_s0="",M arg_m0=M(),const std::string arg_s1="",M arg_m1=M(),const std::string arg_s2="",M arg_m2=M(),const std::string arg_s3="",M arg_m3=M(),const std::string arg_s4="",M arg_m4=M(),const std::string arg_s5="",M arg_m5=M(),const std::string arg_s6="",M arg_m6=M()){
  std::vector<M> ret(7);
  std::map<std::string,M> arg;
  if (arg_s0!="") arg.insert(make_pair(arg_s0,arg_m0));
  if (arg_s1!="") arg.insert(make_pair(arg_s1,arg_m1));
  if (arg_s2!="") arg.insert(make_pair(arg_s2,arg_m2));
  if (arg_s3!="") arg.insert(make_pair(arg_s3,arg_m3));
  if (arg_s4!="") arg.insert(make_pair(arg_s4,arg_m4));
  if (arg_s5!="") arg.insert(make_pair(arg_s5,arg_m5));
  if (arg_s6!="") arg.insert(make_pair(arg_s6,arg_m6));
  typedef typename std::map<std::string,M>::const_iterator it_type;
  for(it_type it = arg.begin(); it != arg.end(); it++) {
    int n = getSchemeEntryEnum(SCHEME_NLPInput,it->first);
    if (n==-1)
      casadi_error("Keyword error in NLPInput: '" << it->first << "' is not recognized. Available keywords are: x_init, lbx, ubx, lbg, ubg, lambda_init, p");
    ret[n] = it->second;
  }
  return ret;
}
Esempio n. 5
0
std::vector<M> rdaeIn(const std::string arg_s0="",M arg_m0=M(),const std::string arg_s1="",M arg_m1=M(),const std::string arg_s2="",M arg_m2=M(),const std::string arg_s3="",M arg_m3=M(),const std::string arg_s4="",M arg_m4=M(),const std::string arg_s5="",M arg_m5=M(),const std::string arg_s6="",M arg_m6=M(),const std::string arg_s7="",M arg_m7=M(),const std::string arg_s8="",M arg_m8=M()){
  std::vector<M> ret(9);
  std::map<std::string,M> arg;
  if (arg_s0!="") arg.insert(make_pair(arg_s0,arg_m0));
  if (arg_s1!="") arg.insert(make_pair(arg_s1,arg_m1));
  if (arg_s2!="") arg.insert(make_pair(arg_s2,arg_m2));
  if (arg_s3!="") arg.insert(make_pair(arg_s3,arg_m3));
  if (arg_s4!="") arg.insert(make_pair(arg_s4,arg_m4));
  if (arg_s5!="") arg.insert(make_pair(arg_s5,arg_m5));
  if (arg_s6!="") arg.insert(make_pair(arg_s6,arg_m6));
  if (arg_s7!="") arg.insert(make_pair(arg_s7,arg_m7));
  if (arg_s8!="") arg.insert(make_pair(arg_s8,arg_m8));
  typedef typename std::map<std::string,M>::const_iterator it_type;
  for(it_type it = arg.begin(); it != arg.end(); it++) {
    int n = getSchemeEntryEnum(SCHEME_RDAEInput,it->first);
    if (n==-1)
      casadi_error("Keyword error in RDAEInput: '" << it->first << "' is not recognized. Available keywords are: rx, rz, rp, x, z, p, t, xdot, rxdot");
    ret[n] = it->second;
  }
  return ret;
}
Esempio n. 6
0
 int IOSchemeBuiltinInternal::index(const std::string &name) const {
   return getSchemeEntryEnum(scheme_, name);
 }