reader_diff.c
Go to the documentation of this file.
21 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/ 104 SCIPerrorMessage("Syntax error in line %d ('%s'): %s \n", lpinput->linenumber, lpinput->token, msg); 190 else if( (*exptype == LP_EXP_NONE) && !(*hasdot) && (c == '.') && isdigit((unsigned char)nextc) ) 230 /* if we previously detected a comment we have to parse the remaining line away if there is something left */ 271 SCIPwarningMessage(scip, "we read %d characters from the file; this might indicate a corrupted input file!", 288 lpinput->linebuf[LP_MAX_LINELEN-1] = '\0'; /* we want to use lookahead of one char -> we need two \0 at the end */ 300 *(commentstart+1) = '\0'; /* we want to use lookahead of one char -> we need two \0 at the end */ 324 /** reads the next token from the input file into the token buffer; returns whether a token was read */ 403 * if the token is an equality token '=' and the next character is a '<' or '>', replace the token by the inequality sense 410 && (lpinput->token[tokenlen-1] == '<' || lpinput->token[tokenlen-1] == '>' || lpinput->token[tokenlen-1] == '=') 415 else if( lpinput->token[tokenlen-1] == '=' && (buf[lpinput->linepos] == '<' || buf[lpinput->linepos] == '>') ) 429 /** puts the current token on the token stack, such that it is read at the next call to getNextToken() */ 442 /** puts the buffered token on the token stack, such that it is read at the next call to getNextToken() */ 466 /** checks whether the current token is a section identifier, and if yes, switches to the corresponding section */ 677 SCIP_Bool isobjective, /**< indicates whether we are currently reading the coefficients of the objective */ 681 SCIP_Real** coefs, /**< pointer to store the array with coefficients (must be freed by caller) */ 731 /* the second token was no colon: push the tokens back onto the token stack and parse them as coefficients */ 738 /* there was only one token left: push it back onto the token stack and parse it as coefficient */ 769 SCIPdebugMessage("(line %d) read coefficient value: %g with sign %+d\n", lpinput->linenumber, coef, coefsign); 793 /* check if we reached a new section, that will be only allowed when having no current sign and value and if we 800 SCIPwarningMessage(scip, "skipped single sign %c without value or variable in objective\n", coefsign == 1 ? '+' : '-'); 838 SCIPdebugMessage("(line %d) read linear coefficient: %+g<%s>\n", lpinput->linenumber, coefsign * coef, SCIPvarGetName(var)); 1010 SCIP_CALL( SCIPincludeReaderBasic(scip, &reader, READER_NAME, READER_DESC, READER_EXTENSION, readerdata) ); 1025 const char* filename, /**< full path and name of file to read, or NULL if stdin should be used */ 1043 SCIP_CALL( SCIPallocMemoryArray(scip, &(lpinput.pushedtokens[i]), LP_MAX_LINELEN) ); /*lint !e866 !e506*/
Definition: reader_diff.c:54 SCIP_RETCODE SCIPreadDiff(SCIP *scip, SCIP_READER *reader, const char *filename, SCIP_RESULT *result) Definition: reader_diff.c:1022 Definition: reader_diff.c:54 int SCIPmemccpy(char *dest, const char *src, char stop, unsigned int cnt) Definition: misc.c:8086 Definition: struct_reader.h:35 Definition: struct_scip.h:53 static SCIP_Bool isValueChar(char c, char nextc, SCIP_Bool firstchar, SCIP_Bool *hasdot, LPEXPTYPE *exptype) Definition: reader_diff.c:177 Definition: type_prob.h:38 static SCIP_RETCODE readDiffFile(SCIP *scip, LPINPUT *lpinput, const char *filename) Definition: reader_diff.c:912 void SCIPwarningMessage(SCIP *scip, const char *formatstr,...) Definition: scip.c:1248 static SCIP_Bool getNextToken(SCIP *scip, LPINPUT *lpinput) Definition: reader_diff.c:326 Definition: type_result.h:49 static SCIP_Bool isValue(SCIP *scip, LPINPUT *lpinput, SCIP_Real *value) Definition: reader_diff.c:571 Definition: struct_var.h:196 diff file reader Definition: reader_diff.c:60 SCIP_RETCODE SCIPchgVarObj(SCIP *scip, SCIP_VAR *var, SCIP_Real newobj) Definition: scip.c:19590 Definition: reader_diff.c:60 Definition: type_retcode.h:38 SCIP_RETCODE SCIPsetReaderFree(SCIP *scip, SCIP_READER *reader, SCIP_DECL_READERFREE((*readerfree))) Definition: scip.c:4625 SCIP_RETCODE SCIPsetReaderCopy(SCIP *scip, SCIP_READER *reader, SCIP_DECL_READERCOPY((*readercopy))) Definition: scip.c:4601 static SCIP_RETCODE getVariable(SCIP *scip, char *name, SCIP_VAR **var) Definition: reader_diff.c:634 Definition: type_retcode.h:36 Definition: type_retcode.h:33 SCIP_RETCODE SCIPsetReaderRead(SCIP *scip, SCIP_READER *reader, SCIP_DECL_READERREAD((*readerread))) Definition: scip.c:4649 static SCIP_RETCODE readCoefficients(SCIP *scip, LPINPUT *lpinput, SCIP_Bool isobjective, char *name, SCIP_VAR ***vars, SCIP_Real **coefs, int *ncoefs, SCIP_Bool *newsection) Definition: reader_diff.c:674 Definition: reader_diff.c:54 static void syntaxError(SCIP *scip, LPINPUT *lpinput, const char *msg) Definition: reader_diff.c:94 SCIP_RETCODE SCIPincludeReaderBasic(SCIP *scip, SCIP_READER **readerptr, const char *name, const char *desc, const char *extension, SCIP_READERDATA *readerdata) Definition: scip.c:4563 Definition: type_message.h:43 Definition: reader_diff.c:48 void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...) Definition: scip.c:1298 Definition: type_set.h:34 SCIP_RETCODE SCIPsetObjsense(SCIP *scip, SCIP_OBJSENSE objsense) Definition: scip.c:10014 Definition: reader_diff.c:60 static SCIP_RETCODE readObjective(SCIP *scip, LPINPUT *lpinput) Definition: reader_diff.c:869 Definition: reader_diff.c:48 Definition: type_prob.h:39 Definition: type_retcode.h:43 Definition: objbranchrule.h:33 Definition: reader_diff.c:48 static SCIP_Bool isNewSection(SCIP *scip, LPINPUT *lpinput) Definition: reader_diff.c:468 |