Scippy

SCIP

Solving Constraint Integer Programs

cons_optcumulative.h
Go to the documentation of this file.
1/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2/* */
3/* This file is part of the program and library */
4/* SCIP --- Solving Constraint Integer Programs */
5/* */
6/* Copyright (c) 2002-2024 Zuse Institute Berlin (ZIB) */
7/* */
8/* Licensed under the Apache License, Version 2.0 (the "License"); */
9/* you may not use this file except in compliance with the License. */
10/* You may obtain a copy of the License at */
11/* */
12/* http://www.apache.org/licenses/LICENSE-2.0 */
13/* */
14/* Unless required by applicable law or agreed to in writing, software */
15/* distributed under the License is distributed on an "AS IS" BASIS, */
16/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
17/* See the License for the specific language governing permissions and */
18/* limitations under the License. */
19/* */
20/* You should have received a copy of the Apache-2.0 license */
21/* along with SCIP; see the file LICENSE. If not visit scipopt.org. */
22/* */
23/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
24
25/**@file cons_optcumulative.h
26 * @brief constraint handler for cumulative constraints with optional activities
27 * @author Chris Beck
28 * @author Stefan Heinz
29 */
30
31/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
32
33#ifndef __SCIP_CONS_OPTCUMULATIVE_H__
34#define __SCIP_CONS_OPTCUMULATIVE_H__
35
36
37#include "scip/scip.h"
38
39#ifdef __cplusplus
40extern "C" {
41#endif
42
43/** creates the handler for cumulative constraints with optional activities and includes it in SCIP */
45 SCIP* scip /**< SCIP data structure */
46 );
47
48/** creates and captures a optcumulative constraint */
50 SCIP* scip, /**< SCIP data structure */
51 SCIP_CONS** cons, /**< pointer to hold the created constraint */
52 const char* name, /**< name of constraint */
53 int nvars, /**< number of variables (jobs) */
54 SCIP_VAR** vars, /**< array of integer variable which corresponds to starting times for a job */
55 SCIP_VAR** binvars, /**< array of variable representing if the job has to be processed on this machine */
56 int* durations, /**< array containing corresponding durations */
57 int* demands, /**< array containing corresponding demands */
58 int capacity, /**< available cumulative capacity */
59 SCIP_Bool initial, /**< should the LP relaxation of constraint be in the initial LP?
60 * Usually set to TRUE. Set to FALSE for 'lazy constraints'. */
61 SCIP_Bool separate, /**< should the constraint be separated during LP processing?
62 * Usually set to TRUE. */
63 SCIP_Bool enforce, /**< should the constraint be enforced during node processing?
64 * TRUE for model constraints, FALSE for additional, redundant constraints. */
65 SCIP_Bool check, /**< should the constraint be checked for feasibility?
66 * TRUE for model constraints, FALSE for additional, redundant constraints. */
67 SCIP_Bool propagate, /**< should the constraint be propagated during node processing?
68 * Usually set to TRUE. */
69 SCIP_Bool local, /**< is constraint only valid locally?
70 * Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints. */
71 SCIP_Bool modifiable, /**< is constraint modifiable (subject to column generation)?
72 * Usually set to FALSE. In column generation applications, set to TRUE if pricing
73 * adds coefficients to this constraint. */
74 SCIP_Bool dynamic, /**< is constraint subject to aging?
75 * Usually set to FALSE. Set to TRUE for own cuts which
76 * are seperated as constraints. */
77 SCIP_Bool removable, /**< should the relaxation be removed from the LP due to aging or cleanup?
78 * Usually set to FALSE. Set to TRUE for 'lazy constraints' and 'user cuts'. */
79 SCIP_Bool stickingatnode /**< should the constraint always be kept at the node where it was added, even
80 * if it may be moved to a more global node?
81 * Usually set to FALSE. Set to TRUE to for constraints that represent node data. */
82 );
83
84/** set the left bound of the time axis to be considered (including hmin) */
86 SCIP* scip, /**< SCIP data structure */
87 SCIP_CONS* cons, /**< constraint data */
88 int hmin /**< left bound of time axis to be considered */
89 );
90
91/** returns the left bound of the time axis to be considered */
93 SCIP* scip, /**< SCIP data structure */
94 SCIP_CONS* cons /**< constraint */
95 );
96
97/** set the right bound of the time axis to be considered (not including hmax) */
99 SCIP* scip, /**< SCIP data structure */
100 SCIP_CONS* cons, /**< constraint data */
101 int hmax /**< right bound of time axis to be considered */
102 );
103
104/** returns the right bound of the time axis to be considered */
106 SCIP* scip, /**< SCIP data structure */
107 SCIP_CONS* cons /**< constraint */
108 );
109
110#ifdef __cplusplus
111}
112#endif
113
114#endif
int SCIPgetHmaxOptcumulative(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPincludeConshdlrOptcumulative(SCIP *scip)
int SCIPgetHminOptcumulative(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPsetHminOptcumulative(SCIP *scip, SCIP_CONS *cons, int hmin)
SCIP_RETCODE SCIPsetHmaxOptcumulative(SCIP *scip, SCIP_CONS *cons, int hmax)
SCIP_RETCODE SCIPcreateConsOptcumulative(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_VAR **binvars, int *durations, int *demands, int capacity, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
#define SCIP_Bool
Definition: def.h:91
SCIP callable library.
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:63