Scippy

SCIP

Solving Constraint Integer Programs

pub_nlp.h File Reference

Detailed Description

public methods for NLP management

Author
Thorsten Gellermann
Stefan Vigerske

Definition in file pub_nlp.h.

#include <stdio.h>
#include "scip/def.h"
#include "scip/type_message.h"
#include "blockmemshell/memory.h"
#include "scip/type_set.h"
#include "scip/type_stat.h"
#include "scip/type_nlp.h"
#include "scip/type_var.h"
#include "scip/type_sol.h"
#include "nlpi/type_expr.h"
#include "nlpi/type_nlpi.h"

Go to the source code of this file.

Functions

Expressions and Expression tree methods
SCIP_VAR ** SCIPexprtreeGetVars (SCIP_EXPRTREE *tree)
 
SCIP_RETCODE SCIPexprtreeSetVars (SCIP_EXPRTREE *tree, int nvars, SCIP_VAR **vars)
 
SCIP_RETCODE SCIPexprtreeAddVars (SCIP_EXPRTREE *tree, int nvars, SCIP_VAR **vars)
 
SCIP_RETCODE SCIPexprtreePrintWithNames (SCIP_EXPRTREE *tree, SCIP_MESSAGEHDLR *messagehdlr, FILE *file)
 
int SCIPexprtreeFindVar (SCIP_EXPRTREE *tree, SCIP_VAR *var)
 
Nonlinear row methods
SCIP_Real SCIPnlrowGetConstant (SCIP_NLROW *nlrow)
 
int SCIPnlrowGetNLinearVars (SCIP_NLROW *nlrow)
 
SCIP_VAR ** SCIPnlrowGetLinearVars (SCIP_NLROW *nlrow)
 
SCIP_RealSCIPnlrowGetLinearCoefs (SCIP_NLROW *nlrow)
 
int SCIPnlrowGetNQuadVars (SCIP_NLROW *nlrow)
 
SCIP_VAR ** SCIPnlrowGetQuadVars (SCIP_NLROW *nlrow)
 
int SCIPnlrowSearchQuadVar (SCIP_NLROW *nlrow, SCIP_VAR *var)
 
int SCIPnlrowGetNQuadElems (SCIP_NLROW *nlrow)
 
SCIP_QUADELEMSCIPnlrowGetQuadElems (SCIP_NLROW *nlrow)
 
void SCIPnlrowGetQuadData (SCIP_NLROW *nlrow, int *nquadvars, SCIP_VAR ***quadvars, int *nquadelems, SCIP_QUADELEM **quadelems)
 
SCIP_EXPRTREESCIPnlrowGetExprtree (SCIP_NLROW *nlrow)
 
SCIP_Real SCIPnlrowGetLhs (SCIP_NLROW *nlrow)
 
SCIP_Real SCIPnlrowGetRhs (SCIP_NLROW *nlrow)
 
const char * SCIPnlrowGetName (SCIP_NLROW *nlrow)
 
int SCIPnlrowGetNLPPos (SCIP_NLROW *nlrow)
 
SCIP_Bool SCIPnlrowIsInNLP (SCIP_NLROW *nlrow)
 
SCIP_Real SCIPnlrowGetDualsol (SCIP_NLROW *nlrow)
 

Function Documentation

SCIP_VAR** SCIPexprtreeGetVars ( SCIP_EXPRTREE tree)

returns variables of expression tree

Parameters
treeexpression tree
SCIP_RETCODE SCIPexprtreeSetVars ( SCIP_EXPRTREE tree,
int  nvars,
SCIP_VAR **  vars 
)

stores array of variables in expression tree

Parameters
treeexpression tree
nvarsnumber of variables
varsvariables
SCIP_RETCODE SCIPexprtreeAddVars ( SCIP_EXPRTREE tree,
int  nvars,
SCIP_VAR **  vars 
)

adds variables to the expression tree variables array

Parameters
treeexpression tree
nvarsnumber of variables
varsvariables
SCIP_RETCODE SCIPexprtreePrintWithNames ( SCIP_EXPRTREE tree,
SCIP_MESSAGEHDLR messagehdlr,
FILE *  file 
)

prints an expression tree using variable names from variables array

Parameters
treeexpression tree
messagehdlrmessage handler
filefile for printing, or NULL for stdout
int SCIPexprtreeFindVar ( SCIP_EXPRTREE tree,
SCIP_VAR var 
)

searches the variables array of an expression tree for a variable and returns its position, or -1 if not found Note that this is an O(n) operation!

Parameters
treeexpression tree
varvariable to search for
SCIP_Real SCIPnlrowGetConstant ( SCIP_NLROW nlrow)

gets constant

Parameters
nlrowNLP row
int SCIPnlrowGetNLinearVars ( SCIP_NLROW nlrow)

gets number of variables of linear part

Parameters
nlrowNLP row
SCIP_VAR** SCIPnlrowGetLinearVars ( SCIP_NLROW nlrow)

gets array with variables of linear part

Parameters
nlrowNLP row
SCIP_Real* SCIPnlrowGetLinearCoefs ( SCIP_NLROW nlrow)

gets array with coefficients in linear part

Parameters
nlrowNLP row
int SCIPnlrowGetNQuadVars ( SCIP_NLROW nlrow)

gets number of quadratic variables in quadratic part

Parameters
nlrowNLP row
SCIP_VAR** SCIPnlrowGetQuadVars ( SCIP_NLROW nlrow)

gets quadratic variables in quadratic part

Parameters
nlrowNLP row
int SCIPnlrowSearchQuadVar ( SCIP_NLROW nlrow,
SCIP_VAR var 
)

gives position of variable in quadvars array of row, or -1 if not found

Parameters
nlrownonlinear row
varvariable to search for
int SCIPnlrowGetNQuadElems ( SCIP_NLROW nlrow)

gets number of quadratic elements in quadratic part

Parameters
nlrowNLP row
SCIP_QUADELEM* SCIPnlrowGetQuadElems ( SCIP_NLROW nlrow)

gets quadratic elements in quadratic part

Parameters
nlrowNLP row
void SCIPnlrowGetQuadData ( SCIP_NLROW nlrow,
int *  nquadvars,
SCIP_VAR ***  quadvars,
int *  nquadelems,
SCIP_QUADELEM **  quadelems 
)

gets array with coefficients in linear part

Parameters
nlrowNLP row
nquadvarsbuffer to store number of variables in quadratic term, or NULL if not of interest
quadvarsbuffer to store pointer to array of variables in quadratic term, or NULL if not of interest
nquadelemsbuffer to store number of entries in quadratic term, or NULL if not of interest
quadelemsbuffer to store pointer to array of entries in quadratic term, or NULL if not of interest
SCIP_EXPRTREE* SCIPnlrowGetExprtree ( SCIP_NLROW nlrow)

gets expression tree

Parameters
nlrowNLP row
SCIP_Real SCIPnlrowGetLhs ( SCIP_NLROW nlrow)

returns the left hand side of a nonlinear row

Parameters
nlrowNLP row
SCIP_Real SCIPnlrowGetRhs ( SCIP_NLROW nlrow)

returns the right hand side of a nonlinear row

Parameters
nlrowNLP row
const char* SCIPnlrowGetName ( SCIP_NLROW nlrow)

returns the name of a nonlinear row

Parameters
nlrowNLP row
int SCIPnlrowGetNLPPos ( SCIP_NLROW nlrow)

gets position of a nonlinear row in current NLP, or -1 if not in NLP

Parameters
nlrowNLP row
SCIP_Bool SCIPnlrowIsInNLP ( SCIP_NLROW nlrow)

returns TRUE iff row is member of current NLP

Parameters
nlrowNLP row
SCIP_Real SCIPnlrowGetDualsol ( SCIP_NLROW nlrow)

gets the dual NLP solution of a nlrow for a ranged constraint, the dual value is positive if the right hand side is active and negative if the left hand side is active

Parameters
nlrowNLP row