SteveM
SteveM
The ompr documentation does not suggest a non-linear optimization capability. However the R ROI package allows the formulation of non-linear models: http://roi.r-forge.r-project.org/index.html
With dependent binary variables you have to define the types of dependencies between the variables. The side constraints are formulated based on type. For example: x1 requires x2: x1
> > In my case, projects that have a 1 in the dependency matrix are mutually dependent on each other. I need to add a constraint that the sum of...
> Projects depend on each other if the matrix at their intersection has a value greater than 0. For example: But exactly HOW do they depend on each other? If...
> Or should I specify a matrix as the decision variable? You could use matrices with 1 matrix block for each constraint type. The values in a matrix are the...
> But I get an error `Error` You have a bunch of errors in your model. Here's an update: ``` project_list % mutate(item = row_number()) nprojs
> Thank you for your feedback. The use of the coef_matrix does not make sense since you have only a single constraint. Moreover you stated: > The a requires b...
> The model generates the right solutions for my task. That constraint type is usually solved using auxiliary binary variables: ``` project_list % mutate(item = row_number()) nprojs
> Your code works on this data, but I tried to add another group of interdependent projects (e and f) and the solution did not match my expectations. It worked...
I > There are two groups of interdependent projects in the data set (c(a, b, c) & c(e, f) and one independent project (d). > > One of the constrain...