gams-dev / gamspy Goto Github PK
View Code? Open in Web Editor NEWPython-based algebraic modeling interface to GAMS
License: Other
Python-based algebraic modeling interface to GAMS
License: Other
Hi, just a small bug I encountered: Trying to solve a model whose name contains a space leads to a compilation error, but there is no clear indication that the name is invalid. Also, it should not be possible to assign an invalid name in the first place.
A small example:
from gamspy import Container, Model, Sum, Sense
c = Container()
a = c.addSet("a", records=["a"])
var = c.addVariable("v", domain=a)
eq = c.addEquation("eq", domain=a)
eq[a] = var[a] >= 1
m = Model(container=c,
name="with space",
problem="LP",
equations=c.getEquations(),
sense=Sense.MIN,
objective=Sum(a, var[a]))
m.solve()
This leads to the following error:
GamspyException:
================================================================================
Error Summary
================================================================================
58 solve with space using LP MIN autogenerated_8ef7b1ba_475c_4475_b4c7_a1462bf49f70_variable;
**** $812
**** LINE 4 INPUT [C:\Users\<user name redacted>\AppData\Local\Temp\tmp48vx2ty7\_job_35566420-2f8b-4031-ab1b-a3f87a5830fb.gms](file:///C:/Users/<user name redacted>/AppData/Local/Temp/tmp48vx2ty7/_job_35566420-2f8b-4031-ab1b-a3f87a5830fb.gms)
**** 812 Solve keys expected - USING MAX/MIN SCENARIO
Meaning of return code 2: There was a compilation error
Can gamspy solve neural network functions trained with pytorch as the objective function?the objective function like y=net(Xi)
, where net
is trained with pytorch.
Sorry I write the issue here, it was intended for https://github.com/GAMS-dev/gdx/ but there is no issue board in that repo. I was wondering if you are considering the implementation of a Rust API to work with GDX files. Maybe not a full GAMS interface but at least some handling tools would be great.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.