Search found 6 matches

by Maclean16
2 months ago
Forum: Modeling
Topic: Correctness of a piecewise NL constraint
Replies: 1
Views: 2887

Correctness of a piecewise NL constraint

Hello everyone, I'm trying to model the constraint defined as the following piecewise function: in a model: def _function(x): condlist= [(x>=x1) & (x<x2), (x>=x2) & (x<x3), (x>=x3) & (x<=x4)] funclist= [lambda x: k1 * (x-x1) - high, lambda x: CHF_base, lambda x: k3 * (x-x3) + base] retur...
by Maclean16
4 months ago
Forum: Modeling
Topic: GAMSPy model building
Replies: 6
Views: 24704

Re: GAMSPy model building

I finally found the error. COST should not be an optimization variable. In addition, the type of GEN should be "Positive". For my first experience with GAMSPy, I find that this environment is very fast in model building (little time required), which saves me quite a bit of time in executio...
by Maclean16
4 months ago
Forum: Modeling
Topic: GAMSPy model building
Replies: 6
Views: 24704

Re: GAMSPy model building

Dear support team, For this small system example (demand, dispatchable generation, non dispatchable generation), I'd like to know the capacities of the different sources to satisfy the demand. In any case, the optimization should start with the existing "ex" capacities ( equation "e25...
by Maclean16
4 months ago
Forum: Modeling
Topic: GAMSPy model building
Replies: 6
Views: 24704

Re: GAMSPy model building

Thank you so much :) ! It works perfectly.
by Maclean16
4 months ago
Forum: Modeling
Topic: GAMSPy model building
Replies: 6
Views: 24704

Re: GAMSPy model building

Here is the results of your suggestion: cp1252.
I'm working on windows.
Here is the link to the code: https://github.com/Lere16/Example.git
by Maclean16
4 months ago
Forum: Modeling
Topic: GAMSPy model building
Replies: 6
Views: 24704

GAMSPy model building

Hello dear support team! I'm trying to build a model using GAMSpy environment. e1=Equation(container=cep, name="e1", type="regular", domain=[tech_demand], description=" variable cost for demand technology",) e1=Equation(container=cep, name="e1", type="reg...