The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [modeling]

For questions related to the process of converting a real-world problem into a mathematical model. Can include questions related to linearization, logical constraints, tightness of formulations, and so on.

Filter by
Sorted by
Tagged with
7
votes
3answers
261 views

Modeling the Choose function

In statistics, one often encounters the choose function ${x \choose y}$ which encodes the number of ways of choosing $y$ items from a set of $x$ items. How would one go about modeling a choose ...
6
votes
1answer
68 views

How to tackle large nurse scheduling problem?

I have a nurse-scheduling type of problem with a time span of a year and many employees. Formulation My main variables are: \begin{align}x_{e,t} &= \begin{cases}1 \text{ if employee } e \text{ ...
5
votes
1answer
37 views

Maximize charging, minimize cost

The task pertains to choosing an algorithm based on the data, requirements and constraints. I have a number of electrical devices ($d_1,d_2,\dots,d_n$) with batteries. Throughout the day I will ...
5
votes
1answer
72 views

Logical Constraints Modelling using Big-M formulation

I am trying to model some logical constraints in ILOG. Logical constraints could be given such as: Constraint 1 or Constraint 2, Constraint 3 or Constraint 4, Constraint 5 or Constraint 6. The ...
8
votes
4answers
651 views

Modeling the Round (Nearest Integer) function

Modeling various non-differentiable functions is quite common knowledge including $\operatorname{abs}$, $\min$ and $\max$ functions. How would one go about modeling the nearest integer function, say ...
7
votes
1answer
133 views

Shipments consolidation - how to model mutually exclusive items with OR-Tools CP Solver in Python (multi-knapsack, updated)

I am implementing a solution for packages consolidation (basing on Nurse Problem solution) with OR-Tools CP Solver. There is a factory that manufactures some small Packages that need to be ...
6
votes
0answers
71 views

Help in solving resource allocation optimization problem

I've been pondering on this question for some work optimization, and I need some help in being directed to the right direction. I have multiple customers that require an amount of $X$, $Y$ and $Z$ ...
8
votes
1answer
173 views

Standard cumulative distribution function with optimization model variable

We all know that expressions in mathematical optimization models can't contain "black boxes" around a decision variable since everything has to be written using mathematical expressions. For example, "...
9
votes
2answers
140 views

Optimal set order to maximize stochastic reward

You have a ticket allowing you to visit up to $n$ of $M$ carnival booths offering games of chance. At each booth you have probability $p_{i}$ of winning a reward with average value $r_{i}$. Each booth ...
6
votes
1answer
73 views

How to decide the hiring headcount for a retail department

The job responsibility is exactly the same in the department. The department has a total number of working hours required. The total retention is about 50% a year, and the hiring cost is about $2000 ...
6
votes
1answer
105 views

How can I solve this problem?

I have $N_{\rm C}=8,$ and $N_{\rm U}=25$ Scenario 1: $$\frac{l_{c,u}}{\sum\limits_{c=1}^{N_{\rm C}}l_{c,u}}\ge 0.1,\quad\forall u,u=1,2,\cdots,N_{\rm U}$$ and $$\sum_{u=1}^{N_{\rm U}}l_{c,u}\le 1,...
9
votes
1answer
176 views

How can I model regression with an asymmetric loss function?

Mosek provided a concrete example of using the Huber loss function, Huber loss, which is great! One problem I am trying to tackle is to use asymmetric loss, as described in the answer of asymmetric ...
8
votes
3answers
176 views

How could we simplify solving the large scale MIPs without using any advanced methods like decompositions?

Many practical optimization models (specially MIPs) are NP-Hard and solving them need much time even with the modern solvers like CPLEX or GUROBI. One of the best way (but not easy) is using ...
7
votes
1answer
112 views

I've formulated my optimization model; now what?

I've formulated my linear/nonlinear/integer/mixed-integer optimization problem in algebraic form (possibly with the help of the folks on this site). Now what? How do I solve it?
3
votes
1answer
71 views

XOR constraint representation

In an scheduling optimization problem, for job $l$, $\xi_l$ is binary variable that $\xi_l=1$ shows job $l$ is selected. $t_{r,l}$ and $t_{e,l}$ are registration time and time that job is completed. ...
3
votes
1answer
105 views

Scheduling Optimization Problem

I want to solve below optimization problem. This is scheduling problem where I seek to complete as many of the jobs $\xi_l$ (objective function and constraint 1), with $T_C$ being the last time until ...
7
votes
1answer
138 views

Specific filter on the set using Python

I'm trying to write an optimization model using an open-source solver's Python API. I'm new to use Python. The model objective function is as follows: \begin{equation} \sum_{k=1}^{K} \sum_{j=1}^{n}\...
9
votes
1answer
81 views

Binary variable to count appearances

Let $x \in \mathbb{R}^n$ be an optimization variable. Now, at a constraint, I would like to count how many times a value, say $2$, appears in $x$ decision. I think we can have a binary variable $y_i$...
12
votes
3answers
1k views

Number of aircraft to operate in an airline company

Suppose that an airline company has X planes, in general the companies keep a number of these aircraft (say 80% of X) in reserve in case of hazards. My question is how the airline companies compute ...
9
votes
2answers
133 views

Valid Inequalities and Strong Inequalities

Consider the following mixed-integer set: \begin{equation} P(A, b ; S) \stackrel{\text { def }}{=}\left\{x \in \mathbb{R}^{n} : A x \leq b, x_{j} \in \mathbb{Z} \text { for } j \in S\right\} \end{...
7
votes
1answer
44 views

Get a MPS file using NEOS/GAMS web interface

I'm trying to use Neos/GAMS to solve an optimization problem. I will need to get a MPS file from the model. With using GAMS IDE it is easy to use an option file to get it but, it needs a licence file ...
9
votes
1answer
62 views

Using Spatial Multi Criteria Analysis for simultaneously locating various facilities?

Is it possible to use SMCA (Spatial Multi Criteria Analysis) for determining simultaneously where to locate various facilities? Suppose, for example, I'm planing to build a new city and everything ...
7
votes
2answers
299 views

Finding an Objective Function for Assigning Employees to Sequence Dates

I am using a mixed-integer-program to schedule employees to projects. These projects can have a time window to get completed from a few weeks to a few months. At the moment I am working in a ...
9
votes
1answer
73 views

How to model 24 hours demand into a daily shift schedule?

I am working on a weekly staff scheduling optimization problem with 24/7 demand. The binary decision variable is: $X_{\text{staff},\,\text{day},\,\text{shift}}$ whether to assign the staff $s$ to day ...
4
votes
0answers
172 views

How can I formulate this multi-objective optimization problem?

Now, for each system $X$ $(X=A,B,C,E)$, my objective is $$\max\min\frac{s_{x_u}}{d_{x_u}}$$ here, $x=a$ for system A, $x=b$ for system B and follows... and for the whole system, my objective is $$\...
9
votes
1answer
105 views

Profit Maximization vs Cost Minimization for Employee Scheduling

I wanted to write two objective functions for an employee scheduling problem (MIP) until it occurred to me, that one objective function may be redundant. Is there a difference between the cost ...
12
votes
3answers
581 views

What is a “hard problem” in the context of Mixed-integer programming?

As a practical (real-world problems) point of view, it's important we could solve optimization problems as quickly as possible (for instance, to release a daily schedule). Maybe a problem with many ...
10
votes
2answers
239 views

Expressing an implication as ILP where each implication term comprises a chain of boolean ORs

Consider an implication of the form $A \implies B$ where both $A, B$ comprises a chain of Boolean OR variables. For example, $(a_1 \lor a_2 \lor a_3) \implies (b_1 \lor b_2 \lor b_3)$. How can this ...
9
votes
1answer
109 views

Comparison of Algebraic modelling languages and general programming languages

Some optimization software/frameworks (commercial or open-source) such as AMPL, GAMS, Cplex, ... have a specific Algebraic modelling language. Some of them have another type of programming that uses ...
8
votes
1answer
120 views

Strategy for filling a table only slightly dependant on the number of columns

I'm using the OR-Tools CP-SAT solver to fill a table with integers, with various constraints, as illustrated by the x in the following figure. ...
6
votes
5answers
2k views

Algorithms vs LP or MIP

Is there a way of writing an algorithm with if-, while-statements to find an optimal solution without using linear-programming (LP)/MIP? If so, what would the benefits be against the LP/MIP? Is it ...
10
votes
2answers
156 views

Decoding a Deep Neural Network as an Analytical Expression for Optimization Purpose

This post is not really about a specific question but rather a topic I am curious about to know more. We know that when it comes to integrate machine/statistical learning with optimization for the ...
11
votes
0answers
126 views

Modeling an assignment/scheduling problem to minimize total wait

I have an assignment type problem in which there is a set of students, $S$, and a set of training classes $T$. Each training has a fixed start and end day and can accommodate at most 1 student. In ...
10
votes
1answer
180 views

Expressing a chain of boolean ORs using ILP involving different variables

How can I express a chain of OR operations in an ILP, given that each operand is an inequality between two binary variables? I have asked a similar question here: Chain of Boolean ORs. In that ...
15
votes
4answers
525 views

Best model for precedence constraints within scheduling problem

Suppose I'm modeling a problem where I want to compute the start time bucket for some jobs. All time buckets have equal duration. There are some additional constraints involved but I also have to ...
11
votes
1answer
141 views

Representing an indicator function: binary variables and “indicator constraints”

I want to represent the indicator function: $$ \mathbb{1}_{(y=j)}$$ where $y$ is a non negative, integer variable. My attempt is as follows: define a binary variable: $$ z_j =\begin{cases} 1 \qquad\...
12
votes
2answers
387 views

Expressing a chain of boolean ORs using ILP

How to express a chain of OR operations in an ILP in which each expression is a less than or equal constraint and the left hand side variable in all inequalities is always the same? All the variables ...
11
votes
2answers
248 views

Is there a way to proportionalize fixed costs in a MILP?

So assume we have a MILP (e.g. inventory or capacity planning) and the objective is to minimize total costs (inventory costs, set-up costs, backorder costs, production costs etc.). The production of a ...
13
votes
4answers
2k views

Is there a SQL/English like language that lets you define formulations given some data?

It would be very useful for beginning and non technical users to be able to define models in a way that was natural for them. Further this could perhaps assist generating some kind of generic ...
9
votes
1answer
117 views

Static stochastic knapsack problem: unbounded version

In the static stochastic knapsack problem (SSKP) the weights $w_i$ of the items are distributed according to a probability distribution. Each item $i \in I$ can be selected at most once. So, ...
17
votes
6answers
1k views

Infeasibility in mathematical optimization models

Sometimes, when solving mathematical optimization models (especially MIPs), they may be infeasible. Is there any comprehensive method to deal with the infeasibility conditions? (especially in complex ...
25
votes
1answer
221 views

The rationale to improve MTZ?

Currently I need to solve a quite specific problem involving symmetric TSP as a sub-problem (i.e., a Hamiltonian cycle is a necessary condition for optimizing some problem-specific variables that ...
22
votes
5answers
1k views

Validation and verification of mathematical models

Within the subject of simulation I have found some literature on validation and verification (e.g. Sargent's paper). My question is, what techniques do you use to validate and verify your mathematical ...
7
votes
2answers
185 views

Difference between Chance constraints and logical constraints

A logical constraint combines linear constraints using logical operators, such as logical-and, logical-or, negation (that is, not), conditional statements (that is, if ... then ...) to express complex ...
10
votes
2answers
686 views

Running a linear programming model to maximize binned predictions

I have a dataframe like: ...
-3
votes
1answer
76 views

NPV calculation using monte carlo simulation [closed]

I need help in solving part b). I need to solve it using excel can someone help? a) Conduct a discounted cash flow calculation to determine the NPV of the following project, assuming a required ...
11
votes
3answers
987 views

Soft constraints and hard constraints

The terms "soft constraints" and "hard constraints" are used in the context of optimization modeling. Is there any standard way to figure out which is which in some of the complicated models?
9
votes
1answer
139 views

Structural Optimization

Currently, I am working on a problem in which I need to use MILP to model equilibrium equations in a lightweight structure. Although this is an application based question, I wondered if there is a ...
3
votes
2answers
124 views

Queuing models in R, $\lambda$ Little

It's noted that the number of folks in a stationary system will maintain an average equal to the rate of arrival multiplied by the mean of the service distribution. Where the formula $L = \lambda w$ ...
7
votes
1answer
217 views

How to reformulate (linearize/convexify) a budgeted assignment problem?

I have a scheduling problem at hand. In my system, there is a service station with $M$ service outlets, therefore, the service station can serve $M$ users at a time. But, there are $N$ users $N>M$ ...