Questions tagged [constraints]
A constraint is a condition that has to be fulfilled in a given context. Constraints are typically used in databases and programming languages to detect errors, ensure data consistency, accuracy, and to enforce business requirements.
constraints
8,951
questions
0
votes
1
answer
31
views
Pyomo- adding in export limitation constraints into pyomo optimization for battery energy storage optimization model
I've been bashing my head up against a wall trying to add additional constraints into the battery energy flow model:
https://github.com/cwkcodes/lockbox/tree/7943fb664e808c0ba1bcb11a81f6180b34e1a623/...
0
votes
0
answers
6
views
Taking account of generator ramp constraints in pypsa optimisation
I would like to know how Pypsa handles the ramp constraints (on load, at start-up and at shutdown) of generators. Is it sufficient to fill in these attributes only or does it require additional codes?
...
0
votes
1
answer
35
views
Managing the case sensitivity for a unique field in symfony [duplicate]
I have a form where there is one field "place" and I have used UniqueEntity to make that field unique. But the issue I'm currently facing is that if the user types the same place but changes ...
0
votes
0
answers
5
views
Could we impose to a SARIMA model that the sum of predict values equals a given value (in R)?
I work on a forecasting R model (SARIMA) with monthly time series data. However, for the last year of my training data (2023), I don't have the details by months but I have the annual value.
I want to ...
-1
votes
0
answers
17
views
Postgres relationship between inherits tables
I'm facing an issue when trying to add records to the joined_login_role table in PostgreSQL. I created a new entity tb_psychologist which inherits from tb_login, and when I create a new record in ...
0
votes
0
answers
26
views
How to increase nested TableView's Height in Swift iOS?
I have the main TableView which cell contains another TableView and this TableView's cell also contains another TableView.
This is the response I'm getting from the backend:
{
"data": [
...
0
votes
1
answer
17
views
Swift UIKit ordering and positioning with constraints inside a custom table cell [duplicate]
I have a custom table cell, and all I want to do is insert two button images inside it. This is my code:
gb = UIButton()
gb.setImage(UIImage(named: "skejt_zelena_polutka"), for: .normal)
gb....
-2
votes
0
answers
32
views
Solve a set of nonlinear Equation in a vector with constraints using Python [closed]
I have the following problem in dimensioning, where I am not sure how to properly phrase it.
There is a ratio R=x/y and an area A=x*y, where x and y can only be integers.
R is a vector of R={1,2,4,8,...
0
votes
0
answers
7
views
associations and specializations in class diagram
in the following diagram I have not reported the fact that the type : tip attribute of class3 is an enumeration that can take on two values st or pt . My question is, is this representation okay if ...
1
vote
1
answer
45
views
Rust Generic with trait constraint, where trait also has a generic with a trait constraint
The following example is the simplest I can come up with to try to illustrate what I'm struggling to achieve:
pub trait Recipient {
fn receive(&self, number: i32);
}
pub trait ...
0
votes
2
answers
49
views
How do I make my container take up entire space?
I am making a screen that has a shelf image along with a plus icon overlaying the entire image with a dotted border. I want to make the dotted border take up the entire space allowed by the largest ...
0
votes
1
answer
21
views
MiniZinc: Getting two outputs for an optimal path in a simple TSP model
I am a student starting with the basics of optimization. Basically when I run my TSP model in MiniZinc (IDE 2.8.5, Gecode 6.3.0), I got two "optimal" paths, but it should be only one, right?
...
1
vote
1
answer
57
views
Comparing list of lists
What I'm trying to do is given a list of lists like the one bellow:
inicialState(e([5, 5, 5], [6, 5, 5])).
I want to calculate the some of all the elements of one list and compare it to a certain ...
1
vote
0
answers
31
views
Displaying table layout with table and column name referenced by foreign keys in Postgres
I have this query that works for version 14 of postgres, but doesn't work for version 15.
What it does is show the table name, column name, primary key and how it corresponds with it's foreign key.
...
1
vote
1
answer
73
views
How to find the maximum number possible in an array given constraints?
I'm working on a problem where I need to construct an array of size N such that the array adheres to the following constraints:
The first element of the array is always 0 (arr[0] = 0).
The difference ...