Ipopt Documentation  
 
Loading...
Searching...
No Matches
AmplTNLP.hpp
Go to the documentation of this file.
1// Copyright (C) 2004, 2009 International Business Machines and others.
2// All Rights Reserved.
3// This code is published under the Eclipse Public License.
4//
5// Authors: Carl Laird, Andreas Waechter IBM 2004-08-13
6
7#ifndef __IPAMPLTNLP_HPP__
8#define __IPAMPLTNLP_HPP__
9
10#include "IpUtils.hpp"
11#include "IpTNLP.hpp"
12#include "IpJournalist.hpp"
13#include "IpOptionsList.hpp"
14
15#include <map>
16#include <string>
17
18/* non Ipopt forward declaration */
19struct ASL_pfgh;
20struct SufDecl;
21struct SufDesc;
22
23namespace Ipopt
24{
25
27{
28public:
30
32
38
46
48 const std::string& suffix_string,
49 Suffix_Source source,
50 Suffix_Type type
51 )
52 {
53 suffix_ids_.push_back(suffix_string);
54 suffix_types_.push_back(type);
55 suffix_sources_.push_back(source);
56 // suffix_values_.push_back();
57 }
58
60 const std::string& suffix_string,
61 Suffix_Source source
62 ) const;
63
65 const std::string& suffix_string,
66 Suffix_Source source
67 ) const;
68
69 std::vector<int> GetIntegerSuffixValues(
70 Index n,
71 const std::string& suffix_string,
72 Suffix_Source source
73 ) const;
74
75 std::vector<Number> GetNumberSuffixValues(
76 Index n,
77 const std::string& suffix_string,
78 Suffix_Source source
79 ) const;
80
81private:
92
93 //AmplSuffixHandler();
97 );
98
101 const AmplSuffixHandler&
102 );
104
105 mutable ASL_pfgh* asl_;
106
107 SufDecl* suftab_;
108
109 std::vector<std::string> suffix_ids_;
110 std::vector<Suffix_Type> suffix_types_;
111 std::vector<Suffix_Source> suffix_sources_;
112
115 ASL_pfgh* asl
116 );
117
119 // void RetrieveSuffixesFromAmpl(ASL_pfgh* asl);
120 friend class AmplTNLP;
121};
122
127{
128public:
137
140 {
141 public:
143 const std::string& ipopt_option_name,
144 AmplOptionType type,
145 const std::string& description);
146
148 {
149 delete[] description_;
150 }
151
152 const std::string& IpoptOptionName() const
153 {
154 return ipopt_option_name_;
155 }
157 {
158 return type_;
159 }
160 char* Description() const
161 {
162 return description_;
163 }
164 private:
175
177
180 const AmplOption&);
181
184 const AmplOption&);
186
187 const std::string ipopt_option_name_;
190 };
191
193 {
194 public:
196 const std::string& ipopt_name,
197 SmartPtr<OptionsList> options,
199 void** nerror = NULL
200 )
201 : ipopt_name_(ipopt_name),
202 options_(options),
203 jnlst_(jnlst),
204 nerror_(nerror)
205 {
206 }
207 const std::string& IpoptName() const
208 {
209 return ipopt_name_;
210 }
212 {
213 return options_;
214 }
216 {
217 return jnlst_;
218 }
219 void** NError()
220 {
221 return nerror_;
222 }
223 private:
224 const std::string ipopt_name_;
227 void** nerror_;
228 };
229
230public:
233 : keywds_(NULL),
234 nkeywds_(0)
235 { }
236
239
242 const std::string& ampl_option_name,
243 const std::string& ipopt_option_name,
245 const std::string& description
246 )
247 {
248 SmartPtr<AmplOption> new_option = new AmplOption(ipopt_option_name, type, description);
249 ampl_options_map_[ampl_option_name] = ConstPtr(new_option);
250 }
251
254 {
255 return (Index) ampl_options_map_.size();
256 }
257
259 void* Keywords(
260 const SmartPtr<OptionsList>& options,
262 void** nerror
263 );
264
265private:
276
277 //AmplOptionsList();
280 const AmplOptionsList&
281 );
282
285 const AmplOptionsList&
286 );
288
290 std::string source,
291 std::string& dest
292 ) const;
293
296 );
297
300 );
301
303 std::map<std::string, SmartPtr<const AmplOption> > ampl_options_map_;
304 // AW: I think it should be with const like in the following line
305 // but with const the AIX compiler fails
306 // std::map<const std::string, SmartPtr<const AmplOption> > ampl_options_map_;
307
309 void* keywds_;
310
313};
314
317{
318public:
321
325 const SmartPtr<const Journalist>& jnlst,
326 const SmartPtr<RegisteredOptions> regoptions,
327 const SmartPtr<OptionsList> options,
328 const char* const* argv,
329 SmartPtr<AmplSuffixHandler> suffix_handler = NULL,
330 bool allow_discrete = false,
331 SmartPtr<AmplOptionsList> ampl_options_list = NULL,
332 const char* ampl_option_string = NULL,
333 const char* ampl_invokation_string = NULL,
334 const char* ampl_banner_string = NULL,
335 std::string* nl_file_content = NULL,
336 bool checkinterrupt = false
337 );
338
345 const SmartPtr<const Journalist>& jnlst,
346 const SmartPtr<OptionsList> options,
347 char**& argv,
348 SmartPtr<AmplSuffixHandler> suffix_handler = NULL,
349 bool allow_discrete = false,
350 SmartPtr<AmplOptionsList> ampl_options_list = NULL,
351 const char* ampl_option_string = NULL,
352 const char* ampl_invokation_string = NULL,
353 const char* ampl_banner_string = NULL,
354 std::string* nl_file_content = NULL
355 );
356
358 virtual ~AmplTNLP();
360
362 DECLARE_STD_EXCEPTION(NONPOSITIVE_SCALING_FACTOR);
363
366 virtual bool get_nlp_info(
367 Index& n,
368 Index& m,
369 Index& nnz_jac_g,
370 Index& nnz_h_lag,
371 IndexStyleEnum& index_style
372 );
373
375 Index n,
376 StringMetaDataMapType& var_string_md,
377 IntegerMetaDataMapType& var_integer_md,
378 NumericMetaDataMapType& var_numeric_md,
379 Index m,
380 StringMetaDataMapType& con_string_md,
381 IntegerMetaDataMapType& con_integer_md,
382 NumericMetaDataMapType& con_numeric_md
383 );
384
386 virtual bool get_bounds_info(
387 Index n,
388 Number* x_l,
389 Number* x_u,
390 Index m,
391 Number* g_l,
392 Number* g_u
393 );
394
396 Index m,
397 LinearityType* const_types
398 );
399
400 virtual bool get_starting_point(
401 Index n,
402 bool init_x,
403 Number* x,
404 bool init_z,
405 Number* z_L,
406 Number* z_U,
407 Index m,
408 bool init_lambda,
409 Number* lambda
410 );
411
412 virtual bool eval_f(
413 Index n,
414 const Number* x,
415 bool new_x,
416 Number& obj_value
417 );
418
419 virtual bool eval_grad_f(
420 Index n,
421 const Number* x,
422 bool new_x,
423 Number* grad_f
424 );
425
426 virtual bool eval_g(
427 Index n,
428 const Number* x,
429 bool new_x,
430 Index m,
431 Number* g
432 );
433
434 virtual bool eval_jac_g(
435 Index n,
436 const Number* x,
437 bool new_x,
438 Index m,
439 Index nele_jac,
440 Index* iRow,
441 Index* jCol,
442 Number* values
443 );
444
445 virtual bool eval_h(
446 Index n,
447 const Number* x,
448 bool new_x,
449 Number obj_factor,
450 Index m,
451 const Number* lambda,
452 bool new_lambda,
453 Index nele_hess,
454 Index* iRow,
455 Index* jCol,
456 Number* values
457 );
458
460 Number& obj_scaling,
461 bool& use_x_scaling,
462 Index n,
463 Number* x_scaling,
464 bool& use_g_scaling,
465 Index m,
466 Number* g_scaling
467 );
469
473 AlgorithmMode mode,
474 Index iter,
475 Number obj_value,
476 Number inf_pr,
477 Number inf_du,
478 Number mu,
479 Number d_norm,
480 Number regularization_size,
481 Number alpha_du,
482 Number alpha_pr,
483 Index ls_trials,
484 const IpoptData* ip_data,
486 );
487
488 virtual void finalize_solution(
489 SolverReturn status,
490 Index n,
491 const Number* x,
492 const Number* z_L,
493 const Number* z_U,
494 Index m,
495 const Number* g,
496 const Number* lambda,
497 Number obj_value,
498 const IpoptData* ip_data,
500 );
502
507 Index num_nonlin_vars,
508 Index* pos_nonlin_vars
509 );
511
514
516 {
517 return asl_;
518 }
519
524 // ToDo Maybe this should be at a different place, or collect the numbers itself?
526 const std::string& message
527 ) const;
528
535 Index& nlvb_,
536 Index& nlvbi_,
537 Index& nlvc_,
538 Index& nlvci_,
539 Index& nlvo_,
540 Index& nlvoi_,
541 Index& nbv_,
542 Index& niv_
543 ) const;
545
555 Index obj_no
556 );
557
564 const std::string& tag,
565 const std::vector<std::string>& meta_data
566 )
567 {
568 var_string_md_[tag] = meta_data;
569 }
570
572 const std::string& tag,
573 const std::vector<Index>& meta_data
574 )
575 {
576 var_integer_md_[tag] = meta_data;
577 }
578
580 const std::string& tag,
581 const std::vector<Number>& meta_data
582 )
583 {
584 var_numeric_md_[tag] = meta_data;
585 }
586
588 const std::string& tag,
589 const std::vector<std::string>& meta_data
590 )
591 {
592 con_string_md_[tag] = meta_data;
593 }
594
596 const std::string& tag,
597 const std::vector<Index>& meta_data
598 )
599 {
600 con_integer_md_[tag] = meta_data;
601 }
602
604 const std::string& tag,
605 const std::vector<Number>& meta_data
606 )
607 {
608 con_numeric_md_[tag] = meta_data;
609 }
610
611
617
618private:
629
631
634 const AmplTNLP&
635 );
636
639 const AmplTNLP&
640 );
642
644 const SmartPtr<RegisteredOptions> regoptions,
645 const SmartPtr<OptionsList> options,
646 const char* const* argv,
647 bool allow_discrete /* = false */,
648 SmartPtr<AmplOptionsList> ampl_options_list /* = NULL */,
649 const char* ampl_option_string /* = NULL */,
650 const char* ampl_invokation_string /* = NULL */,
651 const char* ampl_banner_string /* = NULL */,
652 std::string* nl_file_content /* = NULL */
653 );
654
655protected:
658
660 ASL_pfgh* asl_;
661
664
667
669 /* the rest of the problem size data is available easily through the ampl variables */
671
680
683
697
700
702 void* nerror_;
703
706
711
714 const Number* x,
715 Number& obj_val
716 );
717
720 const Number* x,
721 Index m,
722 Number* g = NULL
723 );
724
729 bool new_x,
730 Index n,
731 const Number* x
732 );
733
740 const SmartPtr<RegisteredOptions> regoptions,
741 const SmartPtr<OptionsList>& options,
742 SmartPtr<AmplOptionsList>& ampl_options_list,
743 const char* ampl_option_string,
744 const char* ampl_invokation_string,
745 const char* ampl_banner_string,
746 const char* const* argv
747 );
748
756 const SmartPtr<OptionsList>& options,
757 SmartPtr<AmplOptionsList>& ampl_options_list,
758 const char* ampl_option_string,
759 const char* ampl_invokation_string,
760 const char* ampl_banner_string,
761 // cppcheck-suppress constParameter
762 char**& argv
763 )
764 {
765 return get_options(NULL, options, ampl_options_list, ampl_option_string, ampl_invokation_string, ampl_banner_string, argv);
766 }
767
770 void* nerror
771 );
772
775
783};
784
785} // namespace Ipopt
786
787#endif
#define IPOPT_DEPRECATED
macro to declare symbols as deprecated
Definition IpTypes.h:25
Ampl Option class containing name, type and description for an AMPL option.
Definition AmplTNLP.hpp:140
const std::string & IpoptOptionName() const
Definition AmplTNLP.hpp:152
AmplOptionType Type() const
Definition AmplTNLP.hpp:156
AmplOption()
Default Constructor.
AmplOption(const std::string &ipopt_option_name, AmplOptionType type, const std::string &description)
const std::string ipopt_option_name_
Definition AmplTNLP.hpp:187
void operator=(const AmplOption &)
Default Assignment Operator.
AmplOption(const AmplOption &)
Copy Constructor.
const SmartPtr< OptionsList > & Options() const
Definition AmplTNLP.hpp:211
const SmartPtr< const Journalist > jnlst_
Definition AmplTNLP.hpp:226
const SmartPtr< const Journalist > & Jnlst() const
Definition AmplTNLP.hpp:215
const SmartPtr< OptionsList > options_
Definition AmplTNLP.hpp:225
const std::string & IpoptName() const
Definition AmplTNLP.hpp:207
PrivatInfo(const std::string &ipopt_name, SmartPtr< OptionsList > options, SmartPtr< const Journalist > jnlst, void **nerror=NULL)
Definition AmplTNLP.hpp:195
void AddAmplOption(const std::string &ampl_option_name, const std::string &ipopt_option_name, AmplOptionsList::AmplOptionType type, const std::string &description)
Adding a new AMPL Option.
Definition AmplTNLP.hpp:241
void PrintLatex(SmartPtr< const Journalist > jnlst)
AmplOptionsList(const AmplOptionsList &)
Default Constructor.
void * Keywords(const SmartPtr< OptionsList > &options, SmartPtr< const Journalist > jnlst, void **nerror)
ASL keywords list for the stored options.
@ HaltOnError_Option
this is for our setting of the nerror_ member
Definition AmplTNLP.hpp:135
@ WS_Option
this is for AMPL's internal wantsol callback
Definition AmplTNLP.hpp:134
Index NumberOfAmplOptions()
Number of AMPL Options.
Definition AmplTNLP.hpp:253
void * keywds_
pointer to the keywords
Definition AmplTNLP.hpp:309
void PrintDoxygen(SmartPtr< const Journalist > jnlst)
void MakeValidLatexString(std::string source, std::string &dest) const
Index nkeywds_
Number of entries stored in keywds_.
Definition AmplTNLP.hpp:312
~AmplOptionsList()
Destructor.
void operator=(const AmplOptionsList &)
Default Assignment Operator.
std::map< std::string, SmartPtr< const AmplOption > > ampl_options_map_
map for storing registered AMPL options
Definition AmplTNLP.hpp:303
AmplOptionsList()
Default Constructor.
Definition AmplTNLP.hpp:232
const int * GetIntegerSuffixValues(const std::string &suffix_string, Suffix_Source source) const
std::vector< Number > GetNumberSuffixValues(Index n, const std::string &suffix_string, Suffix_Source source) const
std::vector< int > GetIntegerSuffixValues(Index n, const std::string &suffix_string, Suffix_Source source) const
std::vector< Suffix_Source > suffix_sources_
Definition AmplTNLP.hpp:111
std::vector< std::string > suffix_ids_
Definition AmplTNLP.hpp:109
void operator=(const AmplSuffixHandler &)
Default Assignment Operator.
const Number * GetNumberSuffixValues(const std::string &suffix_string, Suffix_Source source) const
void PrepareAmplForSuffixes(ASL_pfgh *asl)
Method called by AmplTNLP to prepare the asl for the suffixes.
void AddAvailableSuffix(const std::string &suffix_string, Suffix_Source source, Suffix_Type type)
Definition AmplTNLP.hpp:47
std::vector< Suffix_Type > suffix_types_
Definition AmplTNLP.hpp:110
AmplSuffixHandler(const AmplSuffixHandler &)
Default Constructor.
friend class AmplTNLP
Method called by AmplTNLP to retrieve the suffixes from asl.
Definition AmplTNLP.hpp:120
void * Oinfo_ptr_
Pointer to the Oinfo structure.
Definition AmplTNLP.hpp:699
SmartPtr< AmplSuffixHandler > get_suffix_handler()
Method for returning the suffix handler.
Definition AmplTNLP.hpp:613
virtual bool eval_jac_g(Index n, const Number *x, bool new_x, Index m, Index nele_jac, Index *iRow, Index *jCol, Number *values)
Method to request either the sparsity structure or the values of the Jacobian of the constraints.
SmartPtr< AmplSuffixHandler > suffix_handler_
Suffix Handler.
Definition AmplTNLP.hpp:705
StringMetaDataMapType con_string_md_
Definition AmplTNLP.hpp:780
void set_string_metadata_for_con(const std::string &tag, const std::vector< std::string > &meta_data)
Definition AmplTNLP.hpp:587
Number obj_sign_
Sign of the objective fn (1 for min, -1 for max)
Definition AmplTNLP.hpp:663
bool interrupted_
pointer to flag to check whether to interrupt signal was set
Definition AmplTNLP.hpp:710
Number * z_L_sol_
Definition AmplTNLP.hpp:674
virtual Index get_number_of_nonlinear_variables()
Return the number of variables that appear nonlinearly in the objective function or in at least one c...
AmplTNLP(const AmplTNLP &)
Copy Constructor.
virtual bool get_nlp_info(Index &n, Index &m, Index &nnz_jac_g, Index &nnz_h_lag, IndexStyleEnum &index_style)
Method to request the initial information about the problem.
ASL_pfgh * AmplSolverObject()
Return the ampl solver object (ASL*)
Definition AmplTNLP.hpp:515
Index nz_h_full_
number of nonzeros in the full_x Hessian
Definition AmplTNLP.hpp:668
void gutsOfConstructor(const SmartPtr< RegisteredOptions > regoptions, const SmartPtr< OptionsList > options, const char *const *argv, bool allow_discrete, SmartPtr< AmplOptionsList > ampl_options_list, const char *ampl_option_string, const char *ampl_invokation_string, const char *ampl_banner_string, std::string *nl_file_content)
IntegerMetaDataMapType var_integer_md_
Definition AmplTNLP.hpp:778
DECLARE_STD_EXCEPTION(NONPOSITIVE_SCALING_FACTOR)
Exceptions.
StringMetaDataMapType var_string_md_
meta data to pass on to TNLP
Definition AmplTNLP.hpp:777
bool hesset_called_
whether we have called hesset
Definition AmplTNLP.hpp:693
bool apply_new_x(bool new_x, Index n, const Number *x)
Internal function to update the internal and ampl state if the x value changes.
AmplTNLP()
Default Constructor.
IPOPT_DEPRECATED AmplTNLP(const SmartPtr< const Journalist > &jnlst, const SmartPtr< OptionsList > options, char **&argv, SmartPtr< AmplSuffixHandler > suffix_handler=NULL, bool allow_discrete=false, SmartPtr< AmplOptionsList > ampl_options_list=NULL, const char *ampl_option_string=NULL, const char *ampl_invokation_string=NULL, const char *ampl_banner_string=NULL, std::string *nl_file_content=NULL)
Constructor without RegisteredOptions.
SmartPtr< const Journalist > jnlst_
Journalist.
Definition AmplTNLP.hpp:657
virtual void finalize_solution(SolverReturn status, Index n, const Number *x, const Number *z_L, const Number *z_U, Index m, const Number *g, const Number *lambda, Number obj_value, const IpoptData *ip_data, IpoptCalculatedQuantities *ip_cq)
This method is called when the algorithm has finished (successfully or not) so the TNLP can digest th...
Number * x_sol_
Definition AmplTNLP.hpp:673
virtual bool get_scaling_parameters(Number &obj_scaling, bool &use_x_scaling, Index n, Number *x_scaling, bool &use_g_scaling, Index m, Number *g_scaling)
Method to request scaling parameters.
virtual bool eval_g(Index n, const Number *x, bool new_x, Index m, Number *g)
Method to request the constraint values.
virtual bool eval_grad_f(Index n, const Number *x, bool new_x, Number *grad_f)
Method to request the gradient of the objective function.
AmplTNLP(const SmartPtr< const Journalist > &jnlst, const SmartPtr< RegisteredOptions > regoptions, const SmartPtr< OptionsList > options, const char *const *argv, SmartPtr< AmplSuffixHandler > suffix_handler=NULL, bool allow_discrete=false, SmartPtr< AmplOptionsList > ampl_options_list=NULL, const char *ampl_option_string=NULL, const char *ampl_invokation_string=NULL, const char *ampl_banner_string=NULL, std::string *nl_file_content=NULL, bool checkinterrupt=false)
Constructor.
NumericMetaDataMapType var_numeric_md_
Definition AmplTNLP.hpp:779
virtual bool intermediate_callback(AlgorithmMode mode, Index iter, Number obj_value, Number inf_pr, Number inf_du, Number mu, Number d_norm, Number regularization_size, Number alpha_du, Number alpha_pr, Index ls_trials, const IpoptData *ip_data, IpoptCalculatedQuantities *ip_cq)
Intermediate Callback method for the user.
virtual bool get_list_of_nonlinear_variables(Index num_nonlin_vars, Index *pos_nonlin_vars)
Return the indices of all nonlinear variables.
virtual bool get_starting_point(Index n, bool init_x, Number *x, bool init_z, Number *z_L, Number *z_U, Index m, bool init_lambda, Number *lambda)
Method to request the starting point before iterating.
virtual bool get_constraints_linearity(Index m, LinearityType *const_types)
Method to request the constraints linearity.
NumericMetaDataMapType con_numeric_md_
Definition AmplTNLP.hpp:782
void set_numeric_metadata_for_con(const std::string &tag, const std::vector< Number > &meta_data)
Definition AmplTNLP.hpp:603
bool internal_conval(const Number *x, Index m, Number *g=NULL)
Make the constraint call to ampl.
void get_discrete_info(Index &nlvb_, Index &nlvbi_, Index &nlvc_, Index &nlvci_, Index &nlvo_, Index &nlvoi_, Index &nbv_, Index &niv_) const
Give the number of binary and integer variables.
char * get_options(const SmartPtr< RegisteredOptions > regoptions, const SmartPtr< OptionsList > &options, SmartPtr< AmplOptionsList > &ampl_options_list, const char *ampl_option_string, const char *ampl_invokation_string, const char *ampl_banner_string, const char *const *argv)
Method for obtaining the name of the NL file and the options set from AMPL.
virtual bool eval_h(Index n, const Number *x, bool new_x, Number obj_factor, Index m, const Number *lambda, bool new_lambda, Index nele_hess, Index *iRow, Index *jCol, Number *values)
Method to request either the sparsity structure or the values of the Hessian of the Lagrangian.
void set_string_metadata_for_var(const std::string &tag, const std::vector< std::string > &meta_data)
Definition AmplTNLP.hpp:563
IPOPT_DEPRECATED char * get_options(const SmartPtr< OptionsList > &options, SmartPtr< AmplOptionsList > &ampl_options_list, const char *ampl_option_string, const char *ampl_invokation_string, const char *ampl_banner_string, char **&argv)
Method for obtaining the name of the NL file and the options set from AMPL.
Definition AmplTNLP.hpp:755
virtual ~AmplTNLP()
Default destructor.
void write_solution_file(const std::string &message) const
Write the solution file.
virtual bool eval_f(Index n, const Number *x, bool new_x, Number &obj_value)
Method to request the value of the objective function.
virtual bool get_bounds_info(Index n, Number *x_l, Number *x_u, Index m, Number *g_l, Number *g_u)
returns bounds of the nlp.
bool conval_called_with_current_x_
whether the constraint values have been calculated with the current x set to false in apply_new_x,...
Definition AmplTNLP.hpp:691
Number * lambda_sol_
Definition AmplTNLP.hpp:677
void set_numeric_metadata_for_var(const std::string &tag, const std::vector< Number > &meta_data)
Definition AmplTNLP.hpp:579
void call_hesset()
calls hesset ASL function
Number * g_sol_
Definition AmplTNLP.hpp:676
void set_integer_metadata_for_var(const std::string &tag, const std::vector< Index > &meta_data)
Definition AmplTNLP.hpp:571
void * nerror_
nerror flag passed to ampl calls - set to NULL to halt on error
Definition AmplTNLP.hpp:702
Number * z_U_sol_
Definition AmplTNLP.hpp:675
bool objval_called_with_current_x_
whether the objective value has been calculated with the current x
Definition AmplTNLP.hpp:687
virtual bool get_var_con_metadata(Index n, StringMetaDataMapType &var_string_md, IntegerMetaDataMapType &var_integer_md, NumericMetaDataMapType &var_numeric_md, Index m, StringMetaDataMapType &con_string_md, IntegerMetaDataMapType &con_integer_md, NumericMetaDataMapType &con_numeric_md)
Method to request meta data for the variables and the constraints.
bool checkinterrupt_
whether to register handler for interrupt signals
Definition AmplTNLP.hpp:708
bool internal_objval(const Number *x, Number &obj_val)
Make the objective call to ampl.
void set_integer_metadata_for_con(const std::string &tag, const std::vector< Index > &meta_data)
Definition AmplTNLP.hpp:595
bool set_active_objective_called_
whether set_active_objective has been called
Definition AmplTNLP.hpp:695
void operator=(const AmplTNLP &)
Default Assignment Operator.
IntegerMetaDataMapType con_integer_md_
Definition AmplTNLP.hpp:781
void set_active_objective(Index obj_no)
A method for setting the index of the objective function to be considered.
bool nerror_ok(void *nerror)
whether the ampl nerror code is ok
ASL_pfgh * asl_
pointer to the main ASL structure
Definition AmplTNLP.hpp:660
Class for all IPOPT specific calculated quantities.
Class to organize all the data required by the algorithm.
Template class for Smart Pointers.
std::map< std::string, std::vector< Index > > IntegerMetaDataMapType
Definition IpTNLP.hpp:71
std::map< std::string, std::vector< Number > > NumericMetaDataMapType
Definition IpTNLP.hpp:72
LinearityType
Linearity-types of variables and constraints.
Definition IpTNLP.hpp:53
std::map< std::string, std::vector< std::string > > StringMetaDataMapType
Definition IpTNLP.hpp:70
#define IPOPTAMPLINTERFACELIB_EXPORT
Definition config.h:85
This file contains a base class for all exceptions and a set of macros to help with exceptions.
SmartPtr< const U > ConstPtr(const SmartPtr< U > &smart_ptr)
SolverReturn
enum for the return from the optimize algorithm
ipindex Index
Type of all indices of vectors, matrices etc.
Definition IpTypes.hpp:20
ipnumber Number
Type of all numbers.
Definition IpTypes.hpp:17
AlgorithmMode
enum to indicate the mode in which the algorithm is