|
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
misc.c
Go to the documentation of this file.
25 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
64 /* calculate the size with this loop, such that the resulting numbers are always the same (-> block memory) */
89 * For a detailed format decription see http://docs.yworks.com/yfiles/doc/developers-guide/gml.html
424 /** constructs the first solution of sparse solution (all variables are set to their lower bound value */
447 /** constructs the next solution of the sparse solution and return whether there was one more or not */
548 /** creates a (circular) queue, best used if the size will be fixed or will not be increased that much */
618 BMSmoveMemoryArray(&(queue->slots[queue->firstused + sizediff]), &(queue->slots[queue->firstused]), oldsize - queue->firstused); /*lint !e866*/
623 /* insert element as leaf in the tree, move it towards the root as long it is better than its parent */
662 /* if we reached the first free position we can reset both, firstused and firstused, positions */
666 queue->firstfree = 0; /* this is not necessary but looks better if we have an empty list to reset this value */
811 /* insert element as leaf in the tree, move it towards the root as long it is better than its parent */
841 /* remove root element of the tree, move the better child to its parents position until the last element
852 if( brotherpos <= pqueue->len && (*pqueue->ptrcomp)(pqueue->slots[brotherpos], pqueue->slots[childpos]) < 0 )
890 /** returns the elements of the queue; changing the returned array may destroy the queue's ordering! */
963 /** returns a reasonable hash table size (a prime number) that is at least as large as the specified value */
1022 /** finds hash list entry pointing to element with given key in the hash list, returns NULL if not found */
1089 SCIPerrorMessage("WARNING: hashkey with same value exists multiple times (e.g. duplicate constraint/variable names), so the return value is maybe not correct\n");
1106 SCIP_HASHTABLELIST** hashtablelist, /**< on input: hash list to search; on exit: hash list entry corresponding
1121 h = hashtablelistFind(*hashtablelist, hashgetkey, hashkeyeq, hashkeyval, userptr, keyval, key);
1189 nnewlists = (int) MIN((unsigned int)(hashtable->nlists * SCIP_HASHTABLE_GROW_FACTOR), SCIP_HASHTABLE_MAXSIZE);
1192 SCIPdebugMessage("load = %g, nelements = %"SCIP_LONGINT_FORMAT", nlists = %d, nnewlist = %d\n", SCIPhashtableGetLoad(hashtable), hashtable->nelements, hashtable->nlists, nnewlists);
1217 /* if the old hash table list consists of only one entry, we still can use this old memory block instead
1245 SCIP_CALL( hashtablelistAppend(&(newlists[hashval]), hashtable->blkmem, hashtablelist->element) );
1344 * @note From a performance point of view you should not fill and clear a hash table too often since the clearing can
1345 * be expensive. Clearing is done by looping over all buckets and removing the hash table lists one-by-one.
1371 * @note A pointer to a hashtablelist returned by SCIPhashtableRetrieveNext() might get invalid when adding an element
1410 /** inserts element in hash table (multiple insertion of same element is checked and results in an error)
1412 * @note A pointer to a hashtablelist returned by SCIPhashtableRetrieveNext() might get invalid when adding a new
1424 if( SCIPhashtableRetrieve(hashtable, hashtable->hashgetkey(hashtable->userptr, element)) != NULL )
1454 return hashtablelistRetrieve(hashtable->lists[hashval], hashtable->hashgetkey, hashtable->hashkeyeq,
1461 * @note The returned hashtablelist pointer might get invalid when adding a new element to the hash table.
1465 SCIP_HASHTABLELIST** hashtablelist, /**< input: entry in hash table list from which to start searching, or NULL
1521 return (hashtablelistFind(hashtable->lists[hashval], hashtable->hashgetkey, hashtable->hashkeyeq,
1557 * @note From a performance point of view you should not fill and clear a hash table too often since the clearing can
1558 * be expensive. Clearing is done by looping over all buckets and removing the hash table lists one-by-one.
1636 SCIPmessagePrintInfo(messagehdlr, "%"SCIP_LONGINT_FORMAT" hash entries, used %d/%d slots (%.1f%%)",
1637 hashtable->nelements, usedslots, hashtable->nlists, 100.0*(SCIP_Real)usedslots/(SCIP_Real)(hashtable->nlists));
1761 /** finds hash list entry pointing to given origin in the hash list, returns NULL if not found */
1797 /** sets image for given origin in the hash list, either by modifying existing origin->image pair or by appending a
1862 * @note if possible always use a blkmem pointer instead of NULL, otherwise it could slow down the map
1900 /** inserts new origin->image pair in hash map (must not be called for already existing origins!) */
1941 /** sets image for given origin in the hash map, either by modifying existing origin->image pair or by appending a
2040 sumslotsize, usedslots, hashmap->nlists, 100.0*(SCIP_Real)usedslots/(SCIP_Real)(hashmap->nlists));
2217 BMSfreeBlockMemoryArrayNull((*realarray)->blkmem, &(*realarray)->vals, (*realarray)->valssize);
2241 assert(realarray->maxusedidx == INT_MIN || realarray->maxusedidx < realarray->firstidx + realarray->valssize);
2250 SCIPdebugMessage("extending realarray %p (firstidx=%d, size=%d, range=[%d,%d]) to range [%d,%d]\n",
2251 (void*)realarray, realarray->firstidx, realarray->valssize, realarray->minusedidx, realarray->maxusedidx, minidx, maxidx);
2329 for( i = realarray->maxusedidx - realarray->firstidx; i >= realarray->minusedidx - realarray->firstidx; --i )
2360 for( i = realarray->minusedidx - realarray->firstidx; i <= realarray->maxusedidx - realarray->firstidx; ++i )
2386 (void*)realarray, realarray->firstidx, realarray->valssize, realarray->minusedidx, realarray->maxusedidx);
2442 SCIPdebugMessage("setting realarray %p (firstidx=%d, size=%d, range=[%d,%d]) index %d to %g\n",
2443 (void*)realarray, realarray->firstidx, realarray->valssize, realarray->minusedidx, realarray->maxusedidx, idx, val);
2570 SCIP_ALLOC( BMSduplicateBlockMemoryArray(blkmem, &(*intarray)->vals, sourceintarray->vals, sourceintarray->valssize) );
2612 assert(intarray->maxusedidx == INT_MIN || intarray->maxusedidx < intarray->firstidx + intarray->valssize);
2621 SCIPdebugMessage("extending intarray %p (firstidx=%d, size=%d, range=[%d,%d]) to range [%d,%d]\n",
2622 (void*)intarray, intarray->firstidx, intarray->valssize, intarray->minusedidx, intarray->maxusedidx, minidx, maxidx);
2700 for( i = intarray->maxusedidx - intarray->firstidx; i >= intarray->minusedidx - intarray->firstidx; --i )
2731 for( i = intarray->minusedidx - intarray->firstidx; i <= intarray->maxusedidx - intarray->firstidx; ++i )
2757 (void*)intarray, intarray->firstidx, intarray->valssize, intarray->minusedidx, intarray->maxusedidx);
2814 (void*)intarray, intarray->firstidx, intarray->valssize, intarray->minusedidx, intarray->maxusedidx, idx, val);
2878 return SCIPintarraySetVal(intarray, arraygrowinit, arraygrowfac, idx, SCIPintarrayGetVal(intarray, idx) + incval);
2954 BMSfreeBlockMemoryArrayNull((*boolarray)->blkmem, &(*boolarray)->vals, (*boolarray)->valssize);
2978 assert(boolarray->maxusedidx == INT_MIN || boolarray->maxusedidx < boolarray->firstidx + boolarray->valssize);
2987 SCIPdebugMessage("extending boolarray %p (firstidx=%d, size=%d, range=[%d,%d]) to range [%d,%d]\n",
2988 (void*)boolarray, boolarray->firstidx, boolarray->valssize, boolarray->minusedidx, boolarray->maxusedidx, minidx, maxidx);
3066 for( i = boolarray->maxusedidx - boolarray->firstidx; i >= boolarray->minusedidx - boolarray->firstidx; --i )
3125 (void*)boolarray, boolarray->firstidx, boolarray->valssize, boolarray->minusedidx, boolarray->maxusedidx);
3181 SCIPdebugMessage("setting boolarray %p (firstidx=%d, size=%d, range=[%d,%d]) index %d to %u\n",
3182 (void*)boolarray, boolarray->firstidx, boolarray->valssize, boolarray->minusedidx, boolarray->maxusedidx, idx, val);
3291 SCIP_ALLOC( BMSduplicateBlockMemoryArray(blkmem, &(*ptrarray)->vals, sourceptrarray->vals, sourceptrarray->valssize) );
3333 assert(ptrarray->maxusedidx == INT_MIN || ptrarray->maxusedidx < ptrarray->firstidx + ptrarray->valssize);
3342 SCIPdebugMessage("extending ptrarray %p (firstidx=%d, size=%d, range=[%d,%d]) to range [%d,%d]\n",
3343 (void*)ptrarray, ptrarray->firstidx, ptrarray->valssize, ptrarray->minusedidx, ptrarray->maxusedidx, minidx, maxidx);
3421 for( i = ptrarray->maxusedidx - ptrarray->firstidx; i >= ptrarray->minusedidx - ptrarray->firstidx; --i )
3452 for( i = ptrarray->minusedidx - ptrarray->firstidx; i <= ptrarray->maxusedidx - ptrarray->firstidx; ++i )
3478 (void*)ptrarray, ptrarray->firstidx, ptrarray->valssize, ptrarray->minusedidx, ptrarray->maxusedidx);
3535 (void*)ptrarray, ptrarray->firstidx, ptrarray->valssize, ptrarray->minusedidx, ptrarray->maxusedidx, idx, val);
3635 /** sort an indexed element set in non-decreasing order, resulting in a permutation index array */
3655 /* SCIPsortInd(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
3662 /* SCIPsortPtr(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
3669 /* SCIPsortPtrPtr(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
3677 /* SCIPsortPtrReal(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
3685 /* SCIPsortPtrInt(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
3693 /* SCIPsortPtrBool(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
3701 /* SCIPsortPtrIntInt(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
3710 /* SCIPsortPtrRealInt(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
3719 /* SCIPsortPtrPtrInt(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
3728 /* SCIPsortPtrPtrReal(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
3737 /* SCIPsortPtrRealIntInt(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
3747 /* SCIPsortPtrPtrIntInt(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
3757 /* SCIPsortPtrPtrRealInt(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
3767 /* SCIPsortPtrPtrLongInt(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
3777 /* SCIPsortPtrPtrLongIntInt(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
3788 /* SCIPsortReal(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
3794 /* SCIPsortRealBoolPtr(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
3802 /* SCIPsortRealPtr(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
3809 /* SCIPsortRealInt(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
3816 /* SCIPsortRealIntLong(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
3824 /* SCIPsortRealIntPtr(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
3832 /* SCIPsortRealRealPtr(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
3840 /* SCIPsortRealLongRealInt(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
3848 /* SCIPsortRealRealIntInt(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
3857 /* SCIPsortRealRealRealInt(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
3866 /* SCIPsortRealRealRealPtr(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
3875 /* SCIPsortRealPtrPtrInt(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
3884 /* SCIPsortRealPtrPtrIntInt(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
3894 /* SCIPsortRealRealRealBoolPtr(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
3904 /* SCIPsortInt(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
3910 /* SCIPsortIntInt(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
3917 /* SCIPsortIntReal(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
3924 /* SCIPsortIntPtr(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
3931 /* SCIPsortIntIntInt(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
3939 /* SCIPsortIntIntLong(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
3947 /* SCIPsortIntIntPtr(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
3955 /* SCIPsortIntIntReal(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
3963 /* SCIPsortIntPtrReal(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
3971 /* SCIPsortIntIntIntPtr(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
3980 /* SCIPsortIntPtrIntReal(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
3989 /* SCIPsortLong(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
3995 /* SCIPsortLongPtr(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4002 /* SCIPsortLongPtrInt(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4010 /* SCIPsortLongPtrRealBool(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4019 /* SCIPsortLongPtrRealRealBool(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4029 /* SCIPsortLongPtrRealRealIntBool(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4040 /* SCIPsortLongPtrPtrInt(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4049 /* SCIPsortLongPtrPtrIntInt(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4059 /* SCIPsortLongPtrPtrBoolInt(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4069 /* SCIPsortPtrIntIntBoolBool(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4080 /* SCIPsortIntPtrIntIntBoolBool(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4094 /** sort an indexed element set in non-increasing order, resulting in a permutation index array */
4115 /* SCIPsortDownInd(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4123 /* SCIPsortDownPtr(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4131 /* SCIPsortDownPtrPtr(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4140 /* SCIPsortDownPtrReal(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4149 /* SCIPsortDownPtrInt(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4157 /* SCIPsortDownPtrBool(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4165 /* SCIPsortDownPtrIntInt(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4175 /* SCIPsortDownPtrRealInt(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4185 /* SCIPsortDownPtrPtrInt(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4195 /* SCIPsortDownPtrPtrReal(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4205 /* SCIPsortDownPtrRealIntInt(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4216 /* SCIPsortDownPtrPtrIntInt(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4227 /* SCIPsortPtrPtrRealInt(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4238 /* SCIPsortDownPtrPtrLongInt(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4249 /* SCIPsortDownPtrPtrLongIntInt(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4261 /* SCIPsortDownReal(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4268 /* SCIPsortDownRealBoolPtr(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4277 /* SCIPsortDownRealPtr(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4285 /* SCIPsortDownRealInt(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4293 /* SCIPsortDownRealIntLong(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4302 /* SCIPsortDownRealIntPtr(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4311 /* SCIPsortDownRealPtrPtr(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4320 /* SCIPsortDownRealRealPtr(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4329 /* SCIPsortDownRealLongRealInt(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4339 /* SCIPsortDownRealRealIntInt(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4349 /* SCIPsortDownRealRealRealInt(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4359 /* SCIPsortDownRealRealRealPtr(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4369 /* SCIPsortDownRealPtrPtrInt(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4378 /* SCIPsortDownRealPtrPtrIntInt(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4389 /* SCIPsortDownRealRealRealBoolPtr(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4400 /* SCIPsortDownInt(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4407 /* SCIPsortDownIntInt(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4415 /* SCIPsortDownIntIntReal(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4424 /* SCIPsortDownIntReal(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4432 /* SCIPsortDownIntPtr(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4440 /* SCIPsortDownIntIntInt(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4449 /* SCIPsortDownIntIntLong(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4458 /* SCIPsortDownIntIntPtr(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4467 /* SCIPsortDownIntIntIntPtr(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4477 /* SCIPsortDownIntPtrIntReal(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4487 /* SCIPsortDownLong(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4494 /* SCIPsortDownLongPtr(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4502 /* SCIPsortDownLongPtrInt(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4511 /* SCIPsortDownLongPtrRealBool(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4521 /* SCIPsortDownLongPtrRealRealBool(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4532 /* SCIPsortLongPtrRealRealIntBool(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4544 /* SCIPsortDownLongPtrPtrInt(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4554 /* SCIPsortDownLongPtrPtrIntInt(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4565 /* SCIPsortDownLongPtrPtrBoolInt(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4576 /* SCIPsortDownPtrIntIntBoolBool(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4588 /* SCIPsortDownIntPtrIntIntBoolBool(), SCIPsortedvecInsert...(), SCIPsortedvecDelPos...(), SCIPsortedvecFind...() via sort template */
4741 SCIPmessageFPrintInfo(messagehdlr, file, "Profile <%p> (capacity %d) --> ", profile, profile->capacity);
4746 SCIPmessageFPrintInfo(messagehdlr, file, "%d:(%d,%d)", t, profile->timepoints[t], profile->loads[t]);
4748 SCIPmessageFPrintInfo(messagehdlr, file, ", %d:(%d,%d)", t, profile->timepoints[t], profile->loads[t]);
4818 /** returns if the given time point exists in the resource profile and stores the position of the given time point if it
4863 /** inserts the given time point into the resource profile if it this time point does not exists yet; returns its
4877 /* get the position of the given time point in the resource profile array if it exists; otherwise the position of the
4890 SCIPsortedvecInsertIntInt(profile->timepoints, profile->loads, timepoint, profile->loads[*pos],
4965 /** insert a core into resource profile; if the core is non-empty the resource profile will be updated otherwise nothing
5011 /* check if the left and right time points of the core correspond to a time point in the resource profile; this
5028 /** returns TRUE if the core (given by its demand and during) can be inserted at the given time point; otherwise FALSE */
5063 SCIPdebugMessage("profile <%p>: core does not fit at time point %d (pos %d)\n", (void*)profile, profile->timepoints[pos], pos);
5085 /** return the earliest possible starting point within the time interval [lb,ub] for a given core (given by its demand
5109 SCIPdebugMessage("profile <%p>: find earliest start time (demad %d, duration %d) [%d,%d]\n", (void*)profile, demand, duration, est, lst);
5118 SCIPdebugMessage("profile <%p>: earliest start time does %s exist as time point (pos %d)\n", (void*)profile, found ? "" : "not", pos);
5120 /* if the position is the last time point in the profile, the core can be inserted at its earliest start time */
5138 /* if the the time point left to the start time has not enough free capacity we can just search the profile
5163 pos = profileFindFeasibleStart(profile, pos+1, profile->timepoints[pos+1], remainingduration, demand, infeasible);
5179 /** returns TRUE if the core (given by its demand and during) can be inserted at the given time point; otherwise FALSE */
5212 SCIPdebugMessage("profile <%p>: core does not fit at time point %d (pos %d)\n", (void*)profile, profile->timepoints[pos-1], pos-1);
5235 /** return the latest possible starting point within the time interval [lb,ub] for a given core (given by its demand and
5271 SCIPdebugMessage("profile <%p>: latest completion time %d does %s exist as time point (pos %d)\n", (void*)profile, lct, found ? "" : "not", pos);
5284 /* if the time point left to the start time has not enough free capacity we can just search the profile starting
5306 pos = profileFindDownFeasibleStart(profile, pos, profile->timepoints[pos], remainingduration, demand, infeasible);
5424 /* copy node data - careful if these are pointers to some information -> need to be copied by hand */
5427 SCIP_ALLOC( BMSduplicateMemoryArray(&(*targetdigraph)->successorssize, sourcedigraph->nsuccessors, nnodes) );
5428 SCIP_ALLOC( BMSduplicateMemoryArray(&(*targetdigraph)->nsuccessors, sourcedigraph->nsuccessors, nnodes) );
5449 /** sets the sizes of the successor lists for the nodes in a directed graph and allocates memory for the lists */
5526 SCIP_ALLOC( BMSallocMemoryArray(&digraph->successors[idx], digraph->successorssize[idx]) ); /*lint !e866*/
5527 SCIP_ALLOC( BMSallocMemoryArray(&digraph->arcdata[idx], digraph->successorssize[idx]) ); /*lint !e866*/
5532 SCIP_ALLOC( BMSreallocMemoryArray(&digraph->successors[idx], digraph->successorssize[idx]) ); /*lint !e866*/
5533 SCIP_ALLOC( BMSreallocMemoryArray(&digraph->arcdata[idx], digraph->successorssize[idx]) ); /*lint !e866*/
5678 /** returns the array of indices of the successor nodes; this array must not be changed from outside */
5694 /** returns the array of data corresponding to the arcs originating at the given node, or NULL if no data exist; this
5720 int* stackadjvisited, /**< array of size number of nodes to store the number of adjacent nodes already visited
5722 int* dfsnodes, /**< array of nodes that can be reached starting at startnode, in reverse dfs order */
5723 int* ndfsnodes /**< pointer to store number of nodes that can be reached starting at startnode */
5785 * @note For each arc, its reverse is added, so the graph does not need to be the directed representation of an
5894 /** Performes an (almost) topological sort on the undirected components of the given directed graph. The undirected
5897 * @note In general a topological sort is not unique. Note, that there might be directed cycles, that are randomly
5938 /* perform depth first search, nodes visited in this call are appended to the list dfsnodes in reverse
5963 /** returns the number of previously computed undirected components for the given directed graph */
5974 /** Returns the previously computed undirected component of the given number for the given directed graph.
5975 * If the components were sorted using SCIPdigraphTopoSortComponents(), the component is (almost) topologically sorted.
6449 * @note The user pointers (object) of the nodes are not freed. If needed, it has to be done by the user.
6465 /** prints the rooted subtree of the given binary tree node in GML format into the given file */
6632 /* the following if/else condition is only to make sure that we do not overflow when adding up both values before
6721 static const SCIP_Real simplednoms[] = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0,
6724 /** converts a real number into a (approximate) rational representation, and returns TRUE iff the conversion was
6754 /* try the simple denominators first: each value of the simpledenoms table multiplied by powers of 10
6790 /* the simple denominators didn't work: calculate rational representation with arbitrary denominator */
6857 /** checks, whether the given scalar scales the given value to an integral number with error in the given bounds */
6862 SCIP_Real mindelta, /**< minimal relative allowed difference of scaled coefficient s*c and integral i */
6863 SCIP_Real maxdelta /**< maximal relative allowed difference of scaled coefficient s*c and integral i */
6884 /** tries to find a value, such that all given values, if scaled with this value become integral in relative allowed
6890 SCIP_Real mindelta, /**< minimal relative allowed difference of scaled coefficient s*c and integral i */
6891 SCIP_Real maxdelta, /**< maximal relative allowed difference of scaled coefficient s*c and integral i */
6894 SCIP_Real* intscalar, /**< pointer to store scalar that would make the coefficients integral, or NULL */
6956 /* try, if values can be made integral multiplying them with the reciprocal of the smallest value and a power of 2 */
6991 /* make values integral by dividing them by the smallest value (and multiplying them with a power of 2) */
7000 /* if the scalar is still the reciprocal of the minimal value, all coeffcients are the same and we do not get a better scalar */
7012 /* convert each value into a rational number, calculate the greatest common divisor of the nominators
7033 SCIPdebugMessage(" -> c=%d first rational: val: %g == %"SCIP_LONGINT_FORMAT"/%"SCIP_LONGINT_FORMAT", gcd=%"SCIP_LONGINT_FORMAT", scm=%"SCIP_LONGINT_FORMAT", rational=%u\n",
7053 SCIPdebugMessage(" -> c=%d next rational : val: %g == %"SCIP_LONGINT_FORMAT"/%"SCIP_LONGINT_FORMAT", gcd=%"SCIP_LONGINT_FORMAT", scm=%"SCIP_LONGINT_FORMAT", rational=%u\n",
7064 /* make values integral by multiplying them with the smallest common multiple of the denominators */
7071 SCIPdebugMessage(" -> integrality could be achieved by scaling with %g (rational:%"SCIP_LONGINT_FORMAT"/%"SCIP_LONGINT_FORMAT")\n",
7087 /** given a (usually very small) interval, tries to find a rational number with simple denominator (i.e. a small
7088 * number, probably multiplied with powers of 10) out of this interval; returns TRUE iff a valid rational
7106 /* in order to compute a rational number that is exactly within the bounds (as the user expects),
7128 /** given a (usually very small) interval, selects a value inside this interval; it is tried to select a rational number
7130 * if no valid rational number inside the interval was found, selects the central value of the interval
7153 SCIPdebugPrintf(" %"SCIP_LONGINT_FORMAT"/%"SCIP_LONGINT_FORMAT" == %.9f\n", nominator, denominator, val);
7224 /* we multiply minrandval and maxrandval separately by randnumber in order to avoid overflow if they are more than INT_MAX
7243 /* we multiply minrandval and maxrandval separately by randnumber in order to avoid overflow if they are more than
7254 /** calculates a binomial coefficient n over m, choose m elements out of n, maximal value will be 33 over 16 (because
7255 * the n=33 is the last line in the Pascal's triangle where each entry fits in a 4 byte value), an error occurs due to
7295 /* first half of Pascal's triangle numbers(without the symmetric part) backwards from (33,16) over (32,16),
7301 1166803110, 601080390, 1037158320, 565722720, 300540195, 155117520, 818809200, 471435600, 265182525, 145422675,
7302 77558760, 40116600, 573166440, 347373600, 206253075, 119759850, 67863915, 37442160, 20058300, 10400600,
7303 354817320, 225792840, 141120525, 86493225, 51895935, 30421755, 17383860, 9657700, 5200300, 2704156, 193536720,
7304 129024480, 84672315, 54627300, 34597290, 21474180, 13037895, 7726160, 4457400, 2496144, 1352078, 705432,
7305 92561040, 64512240, 44352165, 30045015, 20030010, 13123110, 8436285, 5311735, 3268760, 1961256, 1144066,
7306 646646, 352716, 184756, 38567100, 28048800, 20160075, 14307150, 10015005, 6906900, 4686825, 3124550, 2042975,
7307 1307504, 817190, 497420, 293930, 167960, 92378, 48620, 13884156, 10518300, 7888725, 5852925, 4292145, 3108105,
7308 2220075, 1562275, 1081575, 735471, 490314, 319770, 203490, 125970, 75582, 43758, 24310, 12870, 4272048, 3365856,
7309 2629575, 2035800, 1560780, 1184040, 888030, 657800, 480700, 346104, 245157, 170544, 116280, 77520, 50388, 31824,
7310 19448, 11440, 6435, 3432, 1107568, 906192, 736281, 593775, 475020, 376740, 296010, 230230, 177100, 134596,
7311 100947, 74613, 54264, 38760, 27132, 18564, 12376, 8008, 5005, 3003, 1716, 924, 237336, 201376, 169911, 142506,
7312 118755, 98280, 80730, 65780, 53130, 42504, 33649, 26334, 20349, 15504, 11628, 8568, 6188, 4368, 3003, 2002,
7313 1287, 792, 462, 252, 40920, 35960, 31465, 27405, 23751, 20475, 17550, 14950, 12650, 10626, 8855, 7315, 5985,
7379 /* loop backwards through all elements and always swap the current last element to a random position */
7408 /* loop backwards through all elements and always swap the current last element to a random position */
7424 * this implementation is suited for the case that nsubelems is considerably smaller then nelems
7447 SCIPerrorMessage("Cannot create %d-elementary subset of %d-elementary set.\n", nsubelems, nelems);
7486 /** copies characters from 'src' to 'dest', copying is stopped when either the 'stop' character is reached or after
7510 /** prints an error message containing of the given string followed by a string describing the current system error;
7511 * prefers to use the strerror_r method, which is threadsafe; on systems where this method does not exist,
7512 * NO_STRERROR_R should be defined (see INSTALL), in this case, strerror is used which is not guaranteed to be
7550 /** translates the given string into a string where symbols ", ', and spaces are escaped with a \ prefix */
7615 /** extract the next token as a integer value if it is one; in case no value is parsed the endptr is set to @p str
7622 char** endptr /**< pointer to store the final string position if successfully parsed, otherwise @p str */
7646 /** extract the next token as a double value if it is one; in case no value is parsed the endptr is set to @p str
7653 char** endptr /**< pointer to store the final string position if successfully parsed, otherwise @p str */
7677 /** copies the first size characters between a start and end character of str into token, if no error occured endptr
7686 char** endptr /**< pointer to store the final string position if successfully parsed, otherwise @p str */
7796 if( lastslash != NULL && lastdot != NULL && lastdot < lastslash ) /* is the last dot belonging to the path? */
7817 if( lastslash != NULL && lastdot != NULL && lastdot < lastslash ) /* is the last dot belonging to the path? */
void SCIPpermuteArray(void **array, int begin, int end, unsigned int *randseed) Definition: misc.c:7396 SCIP_RETCODE SCIPbtnodeCreate(SCIP_BT *tree, SCIP_BTNODE **node, void *dataptr) Definition: misc.c:6151 static void * hashtablelistRetrieve(SCIP_HASHTABLELIST *hashtablelist, SCIP_DECL_HASHGETKEY((*hashgetkey)), SCIP_DECL_HASHKEYEQ((*hashkeyeq)), SCIP_DECL_HASHKEYVAL((*hashkeyval)), void *userptr, unsigned int keyval, void *key) Definition: misc.c:1055 Definition: struct_misc.h:153 #define BMSfreeBlockMemoryArrayNull(mem, ptr, num) Definition: memory.h:424 int SCIPmemccpy(char *dest, const char *src, char stop, unsigned int cnt) Definition: misc.c:7491 Definition: struct_misc.h:142 static void * hashmaplistGetImage(SCIP_HASHMAPLIST *hashmaplist, void *origin) Definition: misc.c:1780 void SCIPsparseSolGetFirstSol(SCIP_SPARSESOL *sparsesol, SCIP_Longint *sol, int nvars) Definition: misc.c:425 void * SCIPhashmapListGetOrigin(SCIP_HASHMAPLIST *hashmaplist) Definition: misc.c:2114 SCIP_RETCODE SCIPprofileDeleteCore(SCIP_PROFILE *profile, int left, int right, int demand) Definition: misc.c:4998 void SCIPsortInd(int *indarray, SCIP_DECL_SORTINDCOMP((*indcomp)), void *dataptr, int len) SCIP_RETCODE SCIPhashtableInsert(SCIP_HASHTABLE *hashtable, void *element) Definition: misc.c:1374 void SCIPdigraphFreeComponents(SCIP_DIGRAPH *digraph) Definition: misc.c:5997 static SCIP_RETCODE hashmaplistAppend(SCIP_HASHMAPLIST **hashmaplist, BMS_BLKMEM *blkmem, void *origin, void *image) Definition: misc.c:1701 SCIP_RETCODE SCIPintarrayIncVal(SCIP_INTARRAY *intarray, int arraygrowinit, SCIP_Real arraygrowfac, int idx, int incval) Definition: misc.c:2870 Definition: struct_misc.h:63 void SCIPgmlWriteArc(FILE *file, unsigned int source, unsigned int target, const char *label, const char *color) Definition: misc.c:244 SCIP_RETCODE SCIPdigraphComputeUndirectedComponents(SCIP_DIGRAPH *digraph, int minsize, int *components, int *ncomponents) Definition: misc.c:5788 SCIP_RETCODE SCIPrealarrayCreate(SCIP_REALARRAY **realarray, BMS_BLKMEM *blkmem) Definition: misc.c:2166 static SCIP_RETCODE btnodeCreateEmpty(SCIP_BT *tree, SCIP_BTNODE **node) Definition: misc.c:6135 SCIP_RETCODE SCIPintarrayCopy(SCIP_INTARRAY **intarray, BMS_BLKMEM *blkmem, SCIP_INTARRAY *sourceintarray) Definition: misc.c:2558 SCIP_Bool SCIPboolarrayGetVal(SCIP_BOOLARRAY *boolarray, int idx) Definition: misc.c:3149 int * SCIPdigraphGetSuccessors(SCIP_DIGRAPH *digraph, int node) Definition: misc.c:5679 static SCIP_RETCODE ensureSuccessorsSize(SCIP_DIGRAPH *digraph, int idx, int newsize) Definition: misc.c:5509 static void hashmaplistFree(SCIP_HASHMAPLIST **hashmaplist, BMS_BLKMEM *blkmem) Definition: misc.c:1731 void SCIPgmlWriteNode(FILE *file, unsigned int id, const char *label, const char *nodetype, const char *fillcolor, const char *bordercolor) Definition: misc.c:102 Definition: struct_var.h:196 void SCIPsplitFilename(char *filename, char **path, char **name, char **extension, char **compression) Definition: misc.c:7768 SCIP_Bool SCIPsparseSolGetNextSol(SCIP_SPARSESOL *sparsesol, SCIP_Longint *sol, int nvars) Definition: misc.c:448 void * SCIPhashmapListGetImage(SCIP_HASHMAPLIST *hashmaplist) Definition: misc.c:2124 void SCIPbtnodeSetRightchild(SCIP_BTNODE *node, SCIP_BTNODE *right) Definition: misc.c:6421 void SCIPintervalSetRoundingMode(SCIP_ROUNDMODE roundmode) Definition: intervalarith.c:188 void * SCIPptrarrayGetVal(SCIP_PTRARRAY *ptrarray, int idx) Definition: misc.c:3502 SCIP_RETCODE SCIPhashmapCreate(SCIP_HASHMAP **hashmap, BMS_BLKMEM *blkmem, int mapsize) Definition: misc.c:1864 Definition: struct_misc.h:195 int SCIPprofileGetEarliestFeasibleStart(SCIP_PROFILE *profile, int est, int lst, int duration, int demand, SCIP_Bool *infeasible) Definition: misc.c:5088 SCIP_HASHMAPLIST * SCIPhashmapGetList(SCIP_HASHMAP *hashmap, int listindex) Definition: misc.c:2088 miscellaneous datastructures Definition: struct_message.h:35 SCIP_RETCODE SCIPdigraphSetSizes(SCIP_DIGRAPH *digraph, int *sizes) Definition: misc.c:5450 void SCIPdigraphPrintComponents(SCIP_DIGRAPH *digraph, SCIP_MESSAGEHDLR *messagehdlr, FILE *file) Definition: misc.c:6098 SCIP_VAR * SCIPactivityGetVar(SCIP_RESOURCEACTIVITY *activity) Definition: misc.c:4649 SCIP_RETCODE SCIPptrarrayExtend(SCIP_PTRARRAY *ptrarray, int arraygrowinit, SCIP_Real arraygrowfac, int minidx, int maxidx) Definition: misc.c:3316 SCIP_RETCODE SCIPboolarrayCopy(SCIP_BOOLARRAY **boolarray, BMS_BLKMEM *blkmem, SCIP_BOOLARRAY *sourceboolarray) Definition: misc.c:2923 int SCIPdigraphGetNComponents(SCIP_DIGRAPH *digraph) Definition: misc.c:5964 Definition: struct_misc.h:36 SCIP_Bool SCIPstrToIntValue(const char *str, int *value, char **endptr) Definition: misc.c:7619 SCIP_RETCODE SCIPprofileInsertCore(SCIP_PROFILE *profile, int left, int right, int demand, int *pos, SCIP_Bool *infeasible) Definition: misc.c:4968 SCIP_Real SCIPselectSimpleValue(SCIP_Real lb, SCIP_Real ub, SCIP_Longint maxdnom) Definition: misc.c:7132 void SCIPdigraphGetComponent(SCIP_DIGRAPH *digraph, int compidx, int **nodes, int *nnodes) Definition: misc.c:5977 static SCIP_RETCODE hashtablelistAppend(SCIP_HASHTABLELIST **hashtablelist, BMS_BLKMEM *blkmem, void *element) Definition: misc.c:978 void * SCIPhashmapGetImage(SCIP_HASHMAP *hashmap, void *origin) Definition: misc.c:1923 void SCIPsortDown(int *perm, SCIP_DECL_SORTINDCOMP((*indcomp)), void *dataptr, int len) Definition: misc.c:4095 template functions for sorting SCIP_RETCODE SCIPdigraphTopoSortComponents(SCIP_DIGRAPH *digraph) Definition: misc.c:5900 SCIP_RETCODE SCIPhashtableCreate(SCIP_HASHTABLE **hashtable, BMS_BLKMEM *blkmem, int tablesize, SCIP_DECL_HASHGETKEY((*hashgetkey)), SCIP_DECL_HASHKEYEQ((*hashkeyeq)), SCIP_DECL_HASHKEYVAL((*hashkeyval)), void *userptr) Definition: misc.c:1287 static SCIP_RETCODE hashtableResize(SCIP_HASHTABLE *hashtable) Definition: misc.c:1171 SCIP_RETCODE SCIPboolarraySetVal(SCIP_BOOLARRAY *boolarray, int arraygrowinit, SCIP_Real arraygrowfac, int idx, SCIP_Bool val) Definition: misc.c:3170 static SCIP_HASHMAPLIST * hashmaplistFind(SCIP_HASHMAPLIST *hashmaplist, void *origin) Definition: misc.c:1763 SCIP_Bool SCIPhashmapExists(SCIP_HASHMAP *hashmap, void *origin) Definition: misc.c:1966 SCIP_Bool SCIPrealToRational(SCIP_Real val, SCIP_Real mindelta, SCIP_Real maxdelta, SCIP_Longint maxdnom, SCIP_Longint *nominator, SCIP_Longint *denominator) Definition: misc.c:6727 SCIP_RETCODE SCIPdigraphCreate(SCIP_DIGRAPH **digraph, int nnodes) Definition: misc.c:5326 void SCIPsortedvecInsertIntInt(int *intarray1, int *intarray2, int keyval, int field1val, int *len, int *pos) SCIP_RETCODE SCIPrealarrayIncVal(SCIP_REALARRAY *realarray, int arraygrowinit, SCIP_Real arraygrowfac, int idx, SCIP_Real incval) Definition: misc.c:2500 SCIP_RETCODE SCIPactivityCreate(SCIP_RESOURCEACTIVITY **activity, SCIP_VAR *var, int duration, int demand) Definition: misc.c:4604 int SCIPhashmapListGetNEntries(SCIP_HASHMAPLIST *hashmaplist) Definition: misc.c:2101 void SCIPsortDownInd(int *indarray, SCIP_DECL_SORTINDCOMP((*indcomp)), void *dataptr, int len) Definition: struct_misc.h:101 void * SCIPhashtableRetrieveNext(SCIP_HASHTABLE *hashtable, SCIP_HASHTABLELIST **hashtablelist, void *key) Definition: misc.c:1463 static SCIP_Bool hashtablelistRemove(SCIP_HASHTABLELIST **hashtablelist, BMS_BLKMEM *blkmem, void *element) Definition: misc.c:1138 static void * hashtablelistRetrieveNext(SCIP_HASHTABLELIST **hashtablelist, SCIP_DECL_HASHGETKEY((*hashgetkey)), SCIP_DECL_HASHKEYEQ((*hashkeyeq)), SCIP_DECL_HASHKEYVAL((*hashkeyval)), void *userptr, unsigned int keyval, void *key) Definition: misc.c:1105 #define BMSduplicateBlockMemoryArray(mem, ptr, source, num) Definition: memory.h:414 Definition: struct_misc.h:109 SCIP_RETCODE SCIPrealarrayCopy(SCIP_REALARRAY **realarray, BMS_BLKMEM *blkmem, SCIP_REALARRAY *sourcerealarray) Definition: misc.c:2186 SCIP_Longint * SCIPsparseSolGetLbs(SCIP_SPARSESOL *sparsesol) Definition: misc.c:405 Definition: struct_misc.h:73 void SCIPhashmapPrintStatistics(SCIP_HASHMAP *hashmap, SCIP_MESSAGEHDLR *messagehdlr) Definition: misc.c:2005 int SCIPactivityGetEnergy(SCIP_RESOURCEACTIVITY *activity) Definition: misc.c:4679 interval arithmetics for provable bounds void SCIPbtnodeSetLeftchild(SCIP_BTNODE *node, SCIP_BTNODE *left) Definition: misc.c:6407 SCIP_RETCODE SCIPboolarrayCreate(SCIP_BOOLARRAY **boolarray, BMS_BLKMEM *blkmem) Definition: misc.c:2903 void * SCIPdigraphGetNodeData(SCIP_DIGRAPH *digraph, int node) Definition: misc.c:5616 SCIP_Real SCIPrealarrayGetVal(SCIP_REALARRAY *realarray, int idx) Definition: misc.c:2410 Definition: struct_misc.h:45 void SCIPdigraphSetNodeData(SCIP_DIGRAPH *digraph, void *dataptr, int node) Definition: misc.c:5632 void SCIPstrCopySection(const char *str, char startchar, char endchar, char *token, int size, char **endptr) Definition: misc.c:7680 static int profileFindFeasibleStart(SCIP_PROFILE *profile, int pos, int lst, int duration, int demand, SCIP_Bool *infeasible) Definition: misc.c:5030 Definition: struct_misc.h:120 void SCIPdigraphPrint(SCIP_DIGRAPH *digraph, SCIP_MESSAGEHDLR *messagehdlr, FILE *file) Definition: misc.c:6024 static SCIP_HASHTABLELIST * hashtablelistFind(SCIP_HASHTABLELIST *hashtablelist, SCIP_DECL_HASHGETKEY((*hashgetkey)), SCIP_DECL_HASHKEYEQ((*hashkeyeq)), SCIP_DECL_HASHKEYVAL((*hashkeyval)), void *userptr, unsigned int keyval, void *key) Definition: misc.c:1024 void ** SCIPdigraphGetSuccessorsDatas(SCIP_DIGRAPH *digraph, int node) Definition: misc.c:5697 internal miscellaneous methods Definition: type_retcode.h:33 void SCIPgmlWriteEdge(FILE *file, unsigned int source, unsigned int target, const char *label, const char *color) Definition: misc.c:200 static SCIP_RETCODE profileUpdate(SCIP_PROFILE *profile, int left, int right, int demand, int *pos, SCIP_Bool *infeasible) Definition: misc.c:4908 void SCIPmessagePrintInfo(SCIP_MESSAGEHDLR *messagehdlr, const char *formatstr,...) Definition: message.c:578 SCIP_RETCODE SCIPhashtableRemove(SCIP_HASHTABLE *hashtable, void *element) Definition: misc.c:1526 SCIP_RETCODE SCIPintarraySetVal(SCIP_INTARRAY *intarray, int arraygrowinit, SCIP_Real arraygrowfac, int idx, int val) Definition: misc.c:2802 SCIP_RETCODE SCIPprofileCreate(SCIP_PROFILE **profile, int capacity) Definition: misc.c:4695 static SCIP_RETCODE ensureProfileSize(SCIP_PROFILE *profile, int neededsize) Definition: misc.c:4844 Definition: struct_misc.h:93 SCIP_RETCODE SCIPdigraphAddArc(SCIP_DIGRAPH *digraph, int startnode, int endnode, void *data) Definition: misc.c:5544 SCIP_Bool SCIPsortedvecFindInt(int *intarray, int val, int len, int *pos) SCIP_RETCODE SCIPgetRandomSubset(void **set, int nelems, void **subset, int nsubelems, unsigned int randseed) Definition: misc.c:7426 static SCIP_RETCODE pqueueResize(SCIP_PQUEUE *pqueue, int minsize) Definition: misc.c:735 void SCIPhashtablePrintStatistics(SCIP_HASHTABLE *hashtable, SCIP_MESSAGEHDLR *messagehdlr) Definition: misc.c:1601 SCIP_BTNODE * SCIPbtnodeGetRightchild(SCIP_BTNODE *node) Definition: misc.c:6290 public data structures and miscellaneous methods SCIP_RETCODE SCIPdigraphAddArcSafe(SCIP_DIGRAPH *digraph, int startnode, int endnode, void *data) Definition: misc.c:5572 int SCIPdigraphGetNSuccessors(SCIP_DIGRAPH *digraph, int node) Definition: misc.c:5664 Definition: type_retcode.h:49 static SCIP_RETCODE hashmaplistRemove(SCIP_HASHMAPLIST **hashmaplist, BMS_BLKMEM *blkmem, void *origin) Definition: misc.c:1826 SCIP_Longint * SCIPsparseSolGetUbs(SCIP_SPARSESOL *sparsesol) Definition: misc.c:415 SCIP_RETCODE SCIPsparseSolCreate(SCIP_SPARSESOL **sparsesol, SCIP_VAR **vars, int nvars, SCIP_Bool cleared) Definition: misc.c:319 SCIP_Bool SCIPprofileFindLeft(SCIP_PROFILE *profile, int timepoint, int *pos) Definition: misc.c:4821 SCIP_RETCODE SCIPdigraphResize(SCIP_DIGRAPH *digraph, int nnodes) Definition: misc.c:5355 SCIP_Bool SCIPstrToRealValue(const char *str, SCIP_Real *value, char **endptr) Definition: misc.c:7650 SCIP_RETCODE SCIPhashtableSafeInsert(SCIP_HASHTABLE *hashtable, void *element) Definition: misc.c:1415 Definition: struct_misc.h:131 SCIP_Bool SCIPintervalHasRoundingControl(void) Definition: intervalarith.c:180 void SCIPprofilePrint(SCIP_PROFILE *profile, SCIP_MESSAGEHDLR *messagehdlr, FILE *file) Definition: misc.c:4733 void SCIPgmlWriteNodeWeight(FILE *file, unsigned int id, const char *label, const char *nodetype, const char *fillcolor, const char *bordercolor, SCIP_Real weight) Definition: misc.c:150 SCIP_Bool SCIPfindSimpleRational(SCIP_Real lb, SCIP_Real ub, SCIP_Longint maxdnom, SCIP_Longint *nominator, SCIP_Longint *denominator) Definition: misc.c:7091 void * SCIPhashtableRetrieve(SCIP_HASHTABLE *hashtable, void *key) Definition: misc.c:1434 static SCIP_Bool isIntegralScalar(SCIP_Real val, SCIP_Real scalar, SCIP_Real mindelta, SCIP_Real maxdelta) Definition: misc.c:6859 int * SCIPprofileGetTimepoints(SCIP_PROFILE *profile) Definition: misc.c:4775 Definition: struct_misc.h:186 static void hashtablelistFree(SCIP_HASHTABLELIST **hashtablelist, BMS_BLKMEM *blkmem) Definition: misc.c:1000 SCIP_VAR ** SCIPsparseSolGetVars(SCIP_SPARSESOL *sparsesol) Definition: misc.c:385 static void depthFirstSearch(SCIP_DIGRAPH *digraph, int startnode, SCIP_Bool *visited, int *dfsstack, int *stackadjvisited, int *dfsnodes, int *ndfsnodes) Definition: misc.c:5714 int SCIPgetRandomInt(int minrandval, int maxrandval, unsigned int *seedp) Definition: misc.c:7212 Definition: struct_misc.h:161 SCIP_Real SCIPgetRandomReal(SCIP_Real minrandval, SCIP_Real maxrandval, unsigned int *seedp) Definition: misc.c:7231 SCIP_BTNODE * SCIPbtnodeGetLeftchild(SCIP_BTNODE *node) Definition: misc.c:6280 Definition: struct_misc.h:80 SCIP_RETCODE SCIPhashmapRemove(SCIP_HASHMAP *hashmap, void *origin) Definition: misc.c:1984 void SCIPbtnodeSetParent(SCIP_BTNODE *node, SCIP_BTNODE *parent) Definition: misc.c:6393 void SCIPsort(int *perm, SCIP_DECL_SORTINDCOMP((*indcomp)), void *dataptr, int len) Definition: misc.c:3636 SCIP_RETCODE SCIPqueueCreate(SCIP_QUEUE **queue, int initsize, SCIP_Real sizefac) Definition: misc.c:549 static SCIP_RETCODE hashmaplistSetImage(SCIP_HASHMAPLIST **hashmaplist, BMS_BLKMEM *blkmem, void *origin, void *image) Definition: misc.c:1801 SCIP_RETCODE SCIPdigraphCopy(SCIP_DIGRAPH **targetdigraph, SCIP_DIGRAPH *sourcedigraph) Definition: misc.c:5391 SCIP_RETCODE SCIPpqueueInsert(SCIP_PQUEUE *pqueue, void *elem) Definition: misc.c:798 SCIP_RETCODE SCIPpqueueCreate(SCIP_PQUEUE **pqueue, int initsize, SCIP_Real sizefac, SCIP_DECL_SORTPTRCOMP((*ptrcomp))) Definition: misc.c:752 SCIP_RETCODE SCIPintarrayExtend(SCIP_INTARRAY *intarray, int arraygrowinit, SCIP_Real arraygrowfac, int minidx, int maxidx) Definition: misc.c:2595 SCIP_RETCODE SCIPptrarraySetVal(SCIP_PTRARRAY *ptrarray, int arraygrowinit, SCIP_Real arraygrowfac, int idx, void *val) Definition: misc.c:3523 static int profileFindDownFeasibleStart(SCIP_PROFILE *profile, int pos, int ect, int duration, int demand, SCIP_Bool *infeasible) Definition: misc.c:5181 int SCIPactivityGetDuration(SCIP_RESOURCEACTIVITY *activity) Definition: misc.c:4659 public methods for message output void SCIPmessageFPrintInfo(SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char *formatstr,...) Definition: message.c:602 SCIP_RETCODE SCIPhashmapSetImage(SCIP_HASHMAP *hashmap, void *origin, void *image) Definition: misc.c:1944 static SCIP_RETCODE profileInsertTimepoint(SCIP_PROFILE *profile, int timepoint, int *pos) Definition: misc.c:4867 void SCIPpermuteIntArray(int *array, int begin, int end, unsigned int *randseed) Definition: misc.c:7367 SCIP_RETCODE SCIPrealarrayExtend(SCIP_REALARRAY *realarray, int arraygrowinit, SCIP_Real arraygrowfac, int minidx, int maxidx) Definition: misc.c:2224 SCIP_RETCODE SCIPcalcIntegralScalar(SCIP_Real *vals, int nvals, SCIP_Real mindelta, SCIP_Real maxdelta, SCIP_Longint maxdnom, SCIP_Real maxscale, SCIP_Real *intscalar, SCIP_Bool *success) Definition: misc.c:6887 static void btPrintSubtree(SCIP_BTNODE *node, FILE *file, int *nnodes) Definition: misc.c:6467 SCIP_RETCODE SCIPrealarraySetVal(SCIP_REALARRAY *realarray, int arraygrowinit, SCIP_Real arraygrowfac, int idx, SCIP_Real val) Definition: misc.c:2431 SCIP_Bool SCIPhashtableExists(SCIP_HASHTABLE *hashtable, void *element) Definition: misc.c:1499 int SCIPprofileGetLatestFeasibleStart(SCIP_PROFILE *profile, int est, int lst, int duration, int demand, SCIP_Bool *infeasible) Definition: misc.c:5238 SCIP_RETCODE SCIPboolarrayExtend(SCIP_BOOLARRAY *boolarray, int arraygrowinit, SCIP_Real arraygrowfac, int minidx, int maxidx) Definition: misc.c:2961 SCIP_RETCODE SCIPhashmapInsert(SCIP_HASHMAP *hashmap, void *origin, void *image) Definition: misc.c:1901 SCIP_Real SCIPhashtableGetLoad(SCIP_HASHTABLE *hashtable) Definition: misc.c:1591 common defines and data types used in all packages of SCIP Definition: type_retcode.h:43 int SCIPactivityGetDemand(SCIP_RESOURCEACTIVITY *activity) Definition: misc.c:4669 SCIP_RETCODE SCIPptrarrayCreate(SCIP_PTRARRAY **ptrarray, BMS_BLKMEM *blkmem) Definition: misc.c:3259 int SCIPprofileGetNTimepoints(SCIP_PROFILE *profile) Definition: misc.c:4765 Definition: struct_misc.h:171 SCIP_ROUNDMODE SCIPintervalGetRoundingMode(void) Definition: intervalarith.c:196 SCIP_Longint SCIPcalcGreComDiv(SCIP_Longint val1, SCIP_Longint val2) Definition: misc.c:6595 void SCIPdigraphPrintGml(SCIP_DIGRAPH *digraph, FILE *file) Definition: misc.c:6059 SCIP_HASHMAPLIST * SCIPhashmapListGetNext(SCIP_HASHMAPLIST *hashmaplist) Definition: misc.c:2134 SCIP_RETCODE SCIPintarrayCreate(SCIP_INTARRAY **intarray, BMS_BLKMEM *blkmem) Definition: misc.c:2538 SCIP_Longint SCIPhashtableGetNElements(SCIP_HASHTABLE *hashtable) Definition: misc.c:1581 void SCIPintervalSetRoundingModeDownwards(void) Definition: intervalarith.c:390 SCIP_Longint SCIPcalcSmaComMul(SCIP_Longint val1, SCIP_Longint val2) Definition: misc.c:6706 SCIP_RETCODE SCIPptrarrayCopy(SCIP_PTRARRAY **ptrarray, BMS_BLKMEM *blkmem, SCIP_PTRARRAY *sourceptrarray) Definition: misc.c:3279 |